kernel_optimize_test/include/drm
Archit Taneja 862e686ce4 drm: bridge: Allow daisy chaining of bridges
Allow drm_bridge objects to link to each other in order to form an encoder
chain. The requirement for creating a chain of bridges comes because the
MSM drm driver uses up its encoder and bridge objects for blocks within
the SoC itself. There isn't anything left to use if the SoC display output
is connected to an external encoder IC. Having an additional bridge
connected to the existing bridge helps here. In general, it is possible for
platforms to have  multiple devices between the encoder and the
connector/panel that require some sort of configuration.

We create drm bridge helper functions corresponding to each op in
'drm_bridge_funcs'. These helpers call the corresponding
'drm_bridge_funcs' op for the entire chain of bridges. These helpers are
used internally by drm_atomic_helper.c and drm_crtc_helper.c.

The drm_bridge_enable/pre_enable helpers execute enable/pre_enable ops of
the bridge closet to the encoder, and proceed until the last bridge in the
chain is enabled. The same holds for drm_bridge_mode_set/mode_fixup
helpers. The drm_bridge_disable/post_disable helpers disable the last
bridge in the chain first, and proceed until the first bridge in the chain
is disabled.

drm_bridge_attach() remains the same. As before, the driver calling this
function should make sure it has set the links correctly. The order in
which the bridges are connected to each other determines the order in which
the calls are made. One requirement is that every bridge in the chain
should point the parent encoder object. This is required since bridge
drivers expect a valid encoder pointer in drm_bridge. For example, consider
a chain where an encoder's output is connected to bridge1, and bridge1's
output is connected to bridge2:

	/* Like before, attach bridge to an encoder */
	bridge1->encoder = encoder;
	ret = drm_bridge_attach(dev, bridge1);
	..

	/*
	 * set the first bridge's 'next' bridge to bridge2, set its encoder
	 * as bridge1's encoder
	 */
	bridge1->next = bridge2
	bridge2->encoder = bridge1->encoder;
	ret = drm_bridge_attach(dev, bridge2);

	...
	...

This method of bridge chaining isn't intrusive and existing drivers that
use drm_bridge will behave the same way as before. The bridge helpers also
cleans up the atomic and crtc helper files a bit.

Reviewed-by: Jani Nikula <jani.nikula@linux.intel.com>
Reviewed-by: Rob Clark <robdclark@gmail.com>
Reviewed-by: Daniel Vetter <daniel@ffwll.ch>
Signed-off-by: Archit Taneja <architt@codeaurora.org>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2015-05-21 13:55:42 +02:00
..
bridge drm: bridge/dw_hdmi: separate VLEVCTRL settting into platform driver 2015-04-01 10:54:13 +01:00
i2c
ttm drm/ttm: device address space != CPU address space 2015-03-05 09:04:39 +10:00
ati_pcigart.h drm: Move legacy buffer structures to <drm/drm_legacy.h> 2014-09-12 15:28:12 +02:00
drm_agpsupport.h drm: move remaining includes in drmP.h to the top 2014-09-10 17:42:03 +10:00
drm_atomic_helper.h drm/atomic: add commit_planes_on_crtc helper 2015-05-21 10:28:39 +02:00
drm_atomic.h drm/atomic: add drm_atomic_add_affected_planes 2015-05-21 10:29:07 +02:00
drm_cache.h
drm_core.h
drm_crtc_helper.h drm: make crtc/encoder/connector/plane helper_private a const pointer 2015-04-13 15:00:13 +02:00
drm_crtc.h drm: bridge: Allow daisy chaining of bridges 2015-05-21 13:55:42 +02:00
drm_displayid.h drm/displayid: add displayid defines and edid extension (v2) 2014-12-09 09:56:46 +10:00
drm_dp_helper.h drm/dp: Fix comment in DP helper 2015-05-18 08:46:11 +02:00
drm_dp_mst_helper.h drm/dp_mst: add a function to retrieve vcpi slots 2015-03-19 12:26:45 -04:00
drm_edid.h drm/edid: add #defines for ELD versions 2015-04-13 14:59:58 +02:00
drm_encoder_slave.h
drm_fb_cma_helper.h
drm_fb_helper.h drm/fb: document drm_fb_helper_surface_size 2015-03-11 22:07:33 +01:00
drm_fixed.h
drm_flip_work.h drm: flip-work: change drm_flip_work_init prototype 2014-11-15 09:29:14 +10:00
drm_gem_cma_helper.h drm/cma: Introduce drm_gem_cma_dumb_create_internal() 2014-11-13 13:27:17 +01:00
drm_gem.h drm: Use kref_put_mutex in drm_gem_object_unreference_unlocked 2015-04-07 18:11:25 +02:00
drm_global.h
drm_hashtab.h
drm_legacy.h drm: move drm_mmap to <drm/drm_legacy.h> 2014-09-24 11:43:07 +10:00
drm_mem_util.h
drm_mipi_dsi.h drm/dsi: Do not require .owner field to be set 2014-11-13 13:56:17 +01:00
drm_mm.h drm/mm: Support 4 GiB and larger ranges 2015-03-05 09:01:37 +10:00
drm_modes.h drm: Fix the CRTC_STEREO_DOUBLE_ONLY define to include stero modes 2015-02-23 11:19:35 +01:00
drm_modeset_lock.h drm: Per-plane locking 2014-11-12 17:56:12 +10:00
drm_of.h drm: add of_graph endpoint helper to find possible CRTCs 2014-07-11 15:38:28 +01:00
drm_os_linux.h
drm_panel.h drm/panel: Add display timing support 2015-04-02 19:04:12 +02:00
drm_pciids.h drm/radeon: add new bonaire pci id 2015-05-12 13:42:46 -04:00
drm_plane_helper.h drm: make crtc/encoder/connector/plane helper_private a const pointer 2015-04-13 15:00:13 +02:00
drm_rect.h drm: Add drm_rect rotation functions 2014-07-11 23:44:12 +02:00
drm_sysfs.h
drm_vma_manager.h drm: init TTM dev_mapping in ttm_bo_device_init() 2014-03-16 12:23:42 +01:00
drmP.h drm: simplify authentication management 2015-05-05 09:45:57 +02:00
exynos_drm.h
gma_drm.h drm/gma500: Remove unused ioctls 2014-03-17 20:11:57 +01:00
i915_component.h drm/i915: add component support 2015-01-12 02:48:20 +01:00
i915_drm.h
i915_pciids.h drm/i915/bxt: Add BXT PCI ids 2015-04-09 15:57:45 +02:00
intel-gtt.h