Skip to contentSkip to conversation

drm/vc4: crtc: Increase setup cost in core clock calculation to handle extreme reduced blanking

PATCH Applied Maxime Ripard 1 participant 2 messages Jan 27, 2023 – Feb 9, 2023

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/vc4: crtc: Increase setup cost in core clock calculation to handle extreme reduced blanking

From: Dom Cobley <[email protected]>

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

Fixes 16e101051f32 ("drm/vc4: Increase the core clock based on HVS load")
---
 drivers/gpu/drm/vc4/vc4_crtc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/vc4/vc4_crtc.c +1 -1
index cdc0559221f0..bef9d45ef1df 100644
@@ -722,7 +722,7 @@ int vc4_crtc_atomic_check(struct drm_crtc *crtc,
 		struct vc4_encoder *vc4_encoder = to_vc4_encoder(encoder);
 
 		if (vc4_encoder->type == VC4_ENCODER_TYPE_HDMI0) {
-			vc4_state->hvs_load = max(mode->clock * mode->hdisplay / mode->htotal + 1000,
+			vc4_state->hvs_load = max(mode->clock * mode->hdisplay / mode->htotal + 8000,
 						  mode->clock * 9 / 10) * 1000;
 		} else {
 			vc4_state->hvs_load = mode->clock * 1000;
Signature · 1 line
2.39.1
author Applied
#1 lore raw

Re: (subset) [PATCH] drm/vc4: crtc: Increase setup cost in core clock calculation to handle extreme reduced blanking

Quoted 9 lines · Maxime Ripard

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.

[...]

Applied to drm/drm-misc (drm-misc-fixes).

Thanks!
Maxime