[Freedreno] [PATCH] drm/msm/dpu: limit writeback modes according to max_linewidth
Abhinav Kumar
quic_abhinavk at quicinc.com
Fri May 13 22:59:59 UTC 2022
Writeback modes were being added according to mode_config.max_width
but this is assigned to double of max_mixer_width.
For compositors/clients using a single SSPP, this will fail
the dpu_plane's atomic check as it checks for max_linewidth.
Limit writeback modes according to max_linewidth to allow
even compositors/clients which use only a single SSPP to
use writeback.
Fixes: 77b001acdcfeb ("drm/msm/dpu: add the writeback connector layer")
Reported-by: Jessica Zhang <quic_jesszhan at quicinc.com>
Signed-off-by: Abhinav Kumar <quic_abhinavk at quicinc.com>
---
drivers/gpu/drm/msm/disp/dpu1/dpu_writeback.c | 4 +++-
1 file changed, 3 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 7620ffe55779..399115e4e217 100644
--- a/drivers/gpu/drm/msm/disp/dpu1/dpu_writeback.c
+++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_writeback.c
@@ -8,8 +8,10 @@
static int dpu_wb_conn_get_modes(struct drm_connector *connector)
{
struct drm_device *dev = connector->dev;
+ struct msm_drm_private *priv = dev->dev_private;
+ struct dpu_kms *dpu_kms = to_dpu_kms(priv->kms);
- return drm_add_modes_noedid(connector, dev->mode_config.max_width,
+ return drm_add_modes_noedid(connector, dpu_kms->catalog->caps->max_linewidth,
dev->mode_config.max_height);
}
--
2.35.1
More information about the Freedreno
mailing list