linux/drivers/gpu/drm/sun4i
Chen-Yu Tsai 46cce6dac3 drm/sun4i: Initialize crtc from tcon bind function
The tcon provides part of the functionality of the crtc, and also
provides the device node for the output port of the crtc. To be able
to use drm_of_find_possible_crtcs(), all crtc must be initialized before
any downstream encoders. The other part of the crtc is the display
backend.

The Rockchip DRM driver does this by first binding all vops, which is
their crtc, and this step also creates the crtc objects. Then all
remaining hardware components are bound. With the Allwinner display
pipeline, we have multiple components comprising the crtc, and varying
depths of the display pipeline. Since components are added with a depth
first search of the of_graph, we can initialize the crtc object within
the tcon bind function. Since the backend precedes the tcon, and the
backends cannot be muxed or switched around, we can be sure that the
associated backend is already initialized.

This patch also moves the crtc pointer from the main drm_device data to
the tcon device data. Besides the crtc callbacks, the crtc structure is
only used within the tcon driver to signal vblank events from its
interrupt handler.

As the crtc and layer bits are now called from the tcon bits, we must
move them from the sun4i-drm module to the sun4i-tcon module to avoid
circular dependencies between the two modules. This is because sun4i-drm
also calls into sun4i-tcon.

Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
2017-03-07 22:18:23 +01:00
..
Kconfig drm/sun4i: add COMMON_CLK dependency 2016-05-30 08:28:33 +02:00
Makefile drm/sun4i: Initialize crtc from tcon bind function 2017-03-07 22:18:23 +01:00
sun4i_backend.c drm/sun4i: Make sunxi_rgb2yuv_coef constant 2017-03-07 22:15:15 +01:00
sun4i_backend.h drm/sun4i: Fix the high buffer address mask 2016-09-22 10:13:22 +03:00
sun4i_crtc.c drm/sun4i: Move layers from sun4i_drv to sun4i_crtc 2017-03-07 22:18:23 +01:00
sun4i_crtc.h drm/sun4i: Move layers from sun4i_drv to sun4i_crtc 2017-03-07 22:18:23 +01:00
sun4i_dotclock.c drm/sun4i: dotclock: Round to closest clock rate 2016-09-20 09:19:31 +02:00
sun4i_dotclock.h
sun4i_drv.c drm/sun4i: Initialize crtc from tcon bind function 2017-03-07 22:18:23 +01:00
sun4i_drv.h drm/sun4i: Initialize crtc from tcon bind function 2017-03-07 22:18:23 +01:00
sun4i_framebuffer.c drm/sun4i: Move drm_mode_config_cleanup call to main driver 2017-03-07 22:15:14 +01:00
sun4i_framebuffer.h
sun4i_layer.c drm/sun4i: Add end of list element for sun4i_layers_init's returned list 2017-03-07 22:15:16 +01:00
sun4i_layer.h
sun4i_rgb.c drm: bridge: Link encoder and bridge in core code 2016-12-18 16:31:45 +05:30
sun4i_rgb.h
sun4i_tcon.c drm/sun4i: Initialize crtc from tcon bind function 2017-03-07 22:18:23 +01:00
sun4i_tcon.h drm/sun4i: Initialize crtc from tcon bind function 2017-03-07 22:18:23 +01:00
sun4i_tv.c drm: Make the connector .detect() callback optional 2016-12-01 10:05:53 -05:00
sun6i_drc.c Merge tag 'drm-misc-next-2016-11-16' of git://anongit.freedesktop.org/git/drm-misc into drm-next 2016-11-17 08:02:46 +10:00