summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/vc4/vc4_hvs.c
diff options
context:
space:
mode:
authorDom Cobley <popcornmix@gmail.com>2022-10-27 14:52:46 +0200
committerMaxime Ripard <maxime@cerno.tech>2022-10-28 13:03:20 +0200
commitf09e172da85854d71284638d8ca25f0b3a980cb6 (patch)
tree26f3df569c6f922d5daff04ad36d7ab8e68fdb7e /drivers/gpu/drm/vc4/vc4_hvs.c
parentdrm/vc4: hdmi: Rework hdmi_enable_4kp60 detection code (diff)
downloadlinux-f09e172da85854d71284638d8ca25f0b3a980cb6.tar.xz
linux-f09e172da85854d71284638d8ca25f0b3a980cb6.zip
drm/vc4: hdmi: Add more checks for 4k resolutions
At least the 4096x2160@60Hz mode requires some overclocking that isn't available by default, even if hdmi_enable_4kp60 is enabled. Let's add some logic to detect whether we can satisfy the core clock requirements for that mode, and prevent it from being used otherwise. Signed-off-by: Dom Cobley <popcornmix@gmail.com> Reviewed-by: Dave Stevenson <dave.stevenson@raspberrypi.com> Link: https://lore.kernel.org/r/20220815-rpi-fix-4k-60-v5-6-fe9e7ac8b111@cerno.tech Signed-off-by: Maxime Ripard <maxime@cerno.tech>
Diffstat (limited to 'drivers/gpu/drm/vc4/vc4_hvs.c')
-rw-r--r--drivers/gpu/drm/vc4/vc4_hvs.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/gpu/drm/vc4/vc4_hvs.c b/drivers/gpu/drm/vc4/vc4_hvs.c
index fc4b7310bf63..c4453a5ae163 100644
--- a/drivers/gpu/drm/vc4/vc4_hvs.c
+++ b/drivers/gpu/drm/vc4/vc4_hvs.c
@@ -818,6 +818,9 @@ static int vc4_hvs_bind(struct device *dev, struct device *master, void *data)
if (max_rate >= 550000000)
hvs->vc5_hdmi_enable_hdmi_20 = true;
+ if (max_rate >= 600000000)
+ hvs->vc5_hdmi_enable_4096by2160 = true;
+
hvs->max_core_rate = max_rate;
ret = clk_prepare_enable(hvs->core_clk);