All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/msm/dpu: limit wb modes based on max_mixer_width
@ 2022-06-16 19:26 Abhinav Kumar
  2022-06-17 17:58 ` Dmitry Baryshkov
  0 siblings, 1 reply; 2+ messages in thread
From: Abhinav Kumar @ 2022-06-16 19:26 UTC (permalink / raw)
  To: freedreno
  Cc: markyacoub, Abhinav Kumar, dri-devel, swboyd, seanpaul,
	dmitry.baryshkov, quic_jesszhan, quic_aravindh

As explained in [1], using max_linewidth to limit the modes
does not seem to remove 4K modes on chipsets such as
sm8250 where the max_linewidth actually supports 4k.

This would have been alright if dual SSPP support was
present but otherwise fails the per SSPP bandwidth check.

The ideal way to implement this would be to filter out
the modes which will exceed the bandwidth check by computing
it.

But this would be an exhaustive solution till we have
dual SSPP support.

Let's instead use max_mixer_width to limit the modes.

max_mixer_width still remains 2560 on sm8250 so even if
the max_linewidth is 4096, the only way 4k modes could have
been supported is to have source split enabled on the SSPP.

Since source split support is not enabled yet in DPU driver,
enforce max_mixer_width as the upper limit on the modes.

[1] https://patchwork.freedesktop.org/patch/489662/

Fixes: e67dcecda06f ("drm/msm/dpu: limit writeback modes according to max_linewidth")
Signed-off-by: Abhinav Kumar <quic_abhinavk@quicinc.com>
---
 drivers/gpu/drm/msm/disp/dpu1/dpu_writeback.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_writeback.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_writeback.c
index 399115e4e217..2fd787079f9b 100644
--- a/drivers/gpu/drm/msm/disp/dpu1/dpu_writeback.c
+++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_writeback.c
@@ -11,7 +11,14 @@ static int dpu_wb_conn_get_modes(struct drm_connector *connector)
 	struct msm_drm_private *priv = dev->dev_private;
 	struct dpu_kms *dpu_kms = to_dpu_kms(priv->kms);
 
-	return drm_add_modes_noedid(connector, dpu_kms->catalog->caps->max_linewidth,
+	/*
+	 * We should ideally be limiting the modes only to the maxlinewidth but
+	 * on some chipsets this will allow even 4k modes to be added which will
+	 * fail the per SSPP bandwidth checks. So, till we have dual-SSPP support
+	 * and source split support added lets limit the modes based on max_mixer_width
+	 * as 4K modes can then be supported.
+	 */
+	return drm_add_modes_noedid(connector, dpu_kms->catalog->caps->max_mixer_width,
 			dev->mode_config.max_height);
 }
 
-- 
2.7.4


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

* Re: [PATCH] drm/msm/dpu: limit wb modes based on max_mixer_width
  2022-06-16 19:26 [PATCH] drm/msm/dpu: limit wb modes based on max_mixer_width Abhinav Kumar
@ 2022-06-17 17:58 ` Dmitry Baryshkov
  0 siblings, 0 replies; 2+ messages in thread
From: Dmitry Baryshkov @ 2022-06-17 17:58 UTC (permalink / raw)
  To: Abhinav Kumar, freedreno
  Cc: markyacoub, dri-devel, swboyd, seanpaul, quic_jesszhan, quic_aravindh

On 16/06/2022 22:26, Abhinav Kumar wrote:
> As explained in [1], using max_linewidth to limit the modes
> does not seem to remove 4K modes on chipsets such as
> sm8250 where the max_linewidth actually supports 4k.
> 
> This would have been alright if dual SSPP support was
> present but otherwise fails the per SSPP bandwidth check.
> 
> The ideal way to implement this would be to filter out
> the modes which will exceed the bandwidth check by computing
> it.
> 
> But this would be an exhaustive solution till we have
> dual SSPP support.
> 
> Let's instead use max_mixer_width to limit the modes.
> 
> max_mixer_width still remains 2560 on sm8250 so even if
> the max_linewidth is 4096, the only way 4k modes could have
> been supported is to have source split enabled on the SSPP.
> 
> Since source split support is not enabled yet in DPU driver,
> enforce max_mixer_width as the upper limit on the modes.
> 
> [1] https://patchwork.freedesktop.org/patch/489662/
> 
> Fixes: e67dcecda06f ("drm/msm/dpu: limit writeback modes according to max_linewidth")
> Signed-off-by: Abhinav Kumar <quic_abhinavk@quicinc.com>

Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>


-- 
With best wishes
Dmitry

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

end of thread, other threads:[~2022-06-17 17:58 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-16 19:26 [PATCH] drm/msm/dpu: limit wb modes based on max_mixer_width Abhinav Kumar
2022-06-17 17:58 ` Dmitry Baryshkov

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.