linux/drivers/gpu/drm/rcar-du
Laurent Pinchart b4734f43f3 drm: rcar-du: Use LVDS PLL clock as dot clock when possible
On selected SoCs, the DU can use the clock output by the LVDS encoder
PLL as its input dot clock. This feature is optional, but on the D3 and
E3 SoC it is often the only way to obtain a precise dot clock frequency,
as the other available clocks (CPG-generated clock and external clock)
usually have fixed rates.

Add a DU model information field to describe which DU channels can use
the LVDS PLL output clock as their input clock, and configure clock
routing accordingly.

This feature is available on H2, M2-W, M2-N, D3 and E3 SoCs, with D3 and
E3 being the primary targets. It is left disabled in this commit, and
will be enabled per-SoC after careful testing.

At the hardware level, clock routing is configured at runtime in two
steps, first selecting an internal dot clock between the LVDS PLL clock
and the external DOTCLKIN clock, and then selecting between the internal
dot clock and the CPG-generated clock. The first part requires stopping
the whole DU group in order for the change to take effect, thus causing
flickering on the screen. For this reason we currently hardcode the
clock source to the LVDS PLL clock if available, and allow flicker-free
selection of the external DOTCLKIN clock or CPG-generated clock
otherwise. A more dynamic clock selection process can be implemented
later if the need arises.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Tested-by: Jacopo Mondi <jacopo+renesas@jmondi.org>
Reviewed-by: Jacopo Mondi <jacopo+renesas@jmondi.org>
2018-09-25 00:41:03 +03:00
..
Kconfig drm: rcar-du: Convert to SPDX identifiers 2018-09-14 13:54:03 +03:00
Makefile drm: rcar-du: disable dtc graph-endpoint warnings on DT overlays 2018-05-15 08:23:46 -05:00
rcar_du_crtc.c drm: rcar-du: Use LVDS PLL clock as dot clock when possible 2018-09-25 00:41:03 +03:00
rcar_du_crtc.h drm: rcar-du: Convert to SPDX identifiers 2018-09-14 13:54:03 +03:00
rcar_du_drv.c drm: rcar-du: Rename and document dpll_ch field 2018-09-15 17:28:31 +03:00
rcar_du_drv.h drm: rcar-du: Use LVDS PLL clock as dot clock when possible 2018-09-25 00:41:03 +03:00
rcar_du_encoder.c drm: rcar-du: Convert to SPDX identifiers 2018-09-14 13:54:03 +03:00
rcar_du_encoder.h drm: rcar-du: Convert to SPDX identifiers 2018-09-14 13:54:03 +03:00
rcar_du_group.c drm: rcar-du: Use LVDS PLL clock as dot clock when possible 2018-09-25 00:41:03 +03:00
rcar_du_group.h drm: rcar-du: Convert to SPDX identifiers 2018-09-14 13:54:03 +03:00
rcar_du_kms.c drm: rcar-du: Update framebuffer pitch and alignment limits for Gen3 2018-09-15 17:28:33 +03:00
rcar_du_kms.h drm: rcar-du: Convert to SPDX identifiers 2018-09-14 13:54:03 +03:00
rcar_du_of_lvds_r8a7790.dts drm: rcar-du: Fix legacy DT to create LVDS encoder nodes 2018-03-07 18:06:41 +02:00
rcar_du_of_lvds_r8a7791.dts drm: rcar-du: Fix legacy DT to create LVDS encoder nodes 2018-03-07 18:06:41 +02:00
rcar_du_of_lvds_r8a7793.dts drm: rcar-du: Fix legacy DT to create LVDS encoder nodes 2018-03-07 18:06:41 +02:00
rcar_du_of_lvds_r8a7795.dts drm: rcar-du: Fix legacy DT to create LVDS encoder nodes 2018-03-07 18:06:41 +02:00
rcar_du_of_lvds_r8a7796.dts drm: rcar-du: Fix legacy DT to create LVDS encoder nodes 2018-03-07 18:06:41 +02:00
rcar_du_of.c drm: rcar-du: of: Include header to define prototypes 2018-05-05 17:11:15 +03:00
rcar_du_of.h drm: rcar-du: Fix rcar_du_of_init() stub 2018-05-17 15:03:32 +10:00
rcar_du_plane.c drm: rcar-du: Convert to SPDX identifiers 2018-09-14 13:54:03 +03:00
rcar_du_plane.h drm: rcar-du: Convert to SPDX identifiers 2018-09-14 13:54:03 +03:00
rcar_du_regs.h drm: rcar-du: Write ESCR and OTAR as CRTC registers 2018-09-15 17:28:31 +03:00
rcar_du_vsp.c drm: rcar-du: Remove packed VYUY support 2018-09-15 17:28:34 +03:00
rcar_du_vsp.h drm: rcar-du: Convert to SPDX identifiers 2018-09-14 13:54:03 +03:00
rcar_dw_hdmi.c drm: rcar-du: Convert to SPDX identifiers 2018-09-14 13:54:03 +03:00
rcar_lvds_regs.h drm: rcar-du: lvds: D3/E3 support 2018-09-25 00:40:56 +03:00
rcar_lvds.c drm: rcar-du: lvds: D3/E3 support 2018-09-25 00:40:56 +03:00