2f1d1799a057488ab9f1b994e4d21e29190418a8
[openwrt/staging/chunkeey.git] / target / linux / bcm27xx / patches-5.10 / 950-0573-drm-vc4-hvs-Make-the-HVS-bind-first.patch
1 From 7109030996578e85610f30dc60c04c952e87fb2a Mon Sep 17 00:00:00 2001
2 From: Maxime Ripard <maxime@cerno.tech>
3 Date: Thu, 25 Feb 2021 14:42:03 +0100
4 Subject: [PATCH] drm/vc4: hvs: Make the HVS bind first
5
6 We'll need to have the HVS binding before the HDMI controllers so that
7 we can check whether the firmware allows to run in 4kp60. Reorder a bit
8 the component list, and document the current constraints we're aware of.
9
10 Acked-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
11 Acked-by: Thomas Zimmermann <tzimmermann@suse.de>
12 Signed-off-by: Maxime Ripard <maxime@cerno.tech>
13 ---
14 drivers/gpu/drm/vc4/vc4_drv.c | 11 ++++++++++-
15 1 file changed, 10 insertions(+), 1 deletion(-)
16
17 --- a/drivers/gpu/drm/vc4/vc4_drv.c
18 +++ b/drivers/gpu/drm/vc4/vc4_drv.c
19 @@ -354,12 +354,21 @@ static const struct component_master_ops
20 .unbind = vc4_drm_unbind,
21 };
22
23 +/*
24 + * This list determines the binding order of our components, and we have
25 + * a few constraints:
26 + * - The TXP driver needs to be bound before the PixelValves (CRTC)
27 + * but after the HVS to set the possible_crtc field properly
28 + * - The HDMI driver needs to be bound after the HVS so that we can
29 + * lookup the HVS maximum core clock rate and figure out if we
30 + * support 4kp60 or not.
31 + */
32 static struct platform_driver *const component_drivers[] = {
33 + &vc4_hvs_driver,
34 &vc4_hdmi_driver,
35 &vc4_vec_driver,
36 &vc4_dpi_driver,
37 &vc4_dsi_driver,
38 - &vc4_hvs_driver,
39 &vc4_txp_driver,
40 &vc4_crtc_driver,
41 &vc4_firmware_kms_driver,