drm/vc4: crtc: Increase setup cost in core clock calculation to handle extreme reduce...
authorDom Cobley <popcornmix@gmail.com>
Fri, 27 Jan 2023 14:55:58 +0000 (15:55 +0100)
committerMaxime Ripard <maxime@cerno.tech>
Thu, 9 Feb 2023 08:59:10 +0000 (09:59 +0100)
commit247a631f9c0ffb37ed0786a94cb4c5f2b6fc7ab1
treedabb04f2e9556118d69d70c6d9b5ec416798c443
parent7fa846b95ce8fd4cb80f32516e2ad3f4ea4d6742
drm/vc4: crtc: Increase setup cost in core clock calculation to handle extreme reduced blanking

The formula that determines the core clock requirement based on pixel
clock and blanking has been determined experimentally to minimise the
clock while supporting all modes we've seen.

A new reduced blanking mode (4kp60 at 533MHz rather than the standard
594MHz) has been seen that doesn't produce a high enough clock and
results in "flip_done timed out" error.

Increase the setup cost in the formula to make this work. The result is
a reduced blanking mode increases by up to 7MHz while leaving the
standard timing
mode untouched

Link: https://github.com/raspberrypi/linux/issues/4446
Fixes: 16e101051f32 ("drm/vc4: Increase the core clock based on HVS load")
Signed-off-by: Dom Cobley <popcornmix@gmail.com>
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
Link: https://patchwork.freedesktop.org/patch/msgid/20230127145558.446123-1-maxime@cerno.tech
drivers/gpu/drm/vc4/vc4_crtc.c