OSDN Git Service

drm/sun4i: tcon: Find matching display backend by device node matching
authorChen-Yu Tsai <wens@csie.org>
Fri, 21 Apr 2017 08:38:54 +0000 (16:38 +0800)
committerMaxime Ripard <maxime.ripard@free-electrons.com>
Sun, 14 May 2017 06:31:57 +0000 (08:31 +0200)
commitb317fa3ba11a10eee45c3e64d6396015ff87e8dc
tree54688d752a6fb2417436d932f3fffef89dcfac60
parent2c03e2fb063f33694e35bbade6d9186274b9a02f
drm/sun4i: tcon: Find matching display backend by device node matching

With Allwinner's Display Engine 1.0, each TCON's input is tied to a
specific display backend, and the 2 comprise what is known as a crtc
in DRM KMS land: The layer, framebuffer, and compositing functions are
provided by the backend, while the TCON provides the display timing
signals and vblank interrupts. This 1 to 1 relationship is represented
in the device tree. On some systems there is an intermediate DRC
component.

Pointers to both matching components must be provided when initializing
the crtc. As the backend is always registered before the associated
tcon, we can recursively search upwards through the of_graph to find
the matching backend.

Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
drivers/gpu/drm/sun4i/sun4i_tcon.c