drm/vc4: hdmi: Rework hdmi_enable_4kp60 detection code
authorMaxime Ripard <maxime@cerno.tech>
Thu, 27 Oct 2022 12:52:45 +0000 (14:52 +0200)
committerMaxime Ripard <maxime@cerno.tech>
Fri, 28 Oct 2022 11:03:19 +0000 (13:03 +0200)
commit2a001ca00ad55fd9e0fc96d84f57b894a4c34388
tree58b04f7f3528fa51288a407a1a7be5fce3463aa3
parentdd51d3a33c10925b20d4b9b665a6f4a65f24ca67
drm/vc4: hdmi: Rework hdmi_enable_4kp60 detection code

In order to support higher HDMI frequencies, users have to set the
hdmi_enable_4kp60 parameter in their config.txt file.

This will have the side-effect of raising the maximum of the core clock,
tied to the HVS, and managed by the HVS driver.

However, we are querying this in the HDMI driver by poking into the HVS
structure to get our struct clk handle.

Let's make this part of the HVS bind implementation to have all the core
clock related setup in the same place.

Reviewed-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
Link: https://lore.kernel.org/r/20220815-rpi-fix-4k-60-v5-5-fe9e7ac8b111@cerno.tech
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
drivers/gpu/drm/vc4/vc4_drv.h
drivers/gpu/drm/vc4/vc4_hdmi.c
drivers/gpu/drm/vc4/vc4_hdmi.h
drivers/gpu/drm/vc4/vc4_hvs.c