dri-devel.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] drm/vc4: crtc: Increase setup cost in core clock calculation to handle extreme reduced blanking
@ 2023-01-27 14:55 Maxime Ripard
  2023-02-09  9:05 ` (subset) " Maxime Ripard
  0 siblings, 1 reply; 2+ messages in thread
From: Maxime Ripard @ 2023-01-27 14:55 UTC (permalink / raw)
  To: Daniel Vetter, David Airlie, Maarten Lankhorst,
	Thomas Zimmermann, Maxime Ripard
  Cc: Dom Cobley, dri-devel

From: Dom Cobley <popcornmix@gmail.com>

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>
---
 drivers/gpu/drm/vc4/vc4_crtc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/vc4/vc4_crtc.c b/drivers/gpu/drm/vc4/vc4_crtc.c
index cdc0559221f0..bef9d45ef1df 100644
--- a/drivers/gpu/drm/vc4/vc4_crtc.c
+++ b/drivers/gpu/drm/vc4/vc4_crtc.c
@@ -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;
-- 
2.39.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: (subset) [PATCH] drm/vc4: crtc: Increase setup cost in core clock calculation to handle extreme reduced blanking
  2023-01-27 14:55 [PATCH] drm/vc4: crtc: Increase setup cost in core clock calculation to handle extreme reduced blanking Maxime Ripard
@ 2023-02-09  9:05 ` Maxime Ripard
  0 siblings, 0 replies; 2+ messages in thread
From: Maxime Ripard @ 2023-02-09  9:05 UTC (permalink / raw)
  To: Daniel Vetter, David Airlie, Maarten Lankhorst,
	Thomas Zimmermann, Maxime Ripard
  Cc: Dom Cobley, dri-devel

On Fri, 27 Jan 2023 15:55:58 +0100, Maxime Ripard wrote:
> 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


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-02-09  9:06 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-27 14:55 [PATCH] drm/vc4: crtc: Increase setup cost in core clock calculation to handle extreme reduced blanking Maxime Ripard
2023-02-09  9:05 ` (subset) " Maxime Ripard

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).