summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/msm
diff options
context:
space:
mode:
authorAbhinav Kumar <quic_abhinavk@quicinc.com>2022-05-14 00:59:59 +0200
committerAbhinav Kumar <quic_abhinavk@quicinc.com>2022-05-19 00:43:08 +0200
commite67dcecda06f279cf40b2ab696ca70305b3ba6df (patch)
treeb9c126eeeac22936a8b02971276745ed1da8acca /drivers/gpu/drm/msm
parentdrm: msm: fix possible memory leak in mdp5_crtc_cursor_set() (diff)
downloadlinux-e67dcecda06f279cf40b2ab696ca70305b3ba6df.tar.xz
linux-e67dcecda06f279cf40b2ab696ca70305b3ba6df.zip
drm/msm/dpu: limit writeback modes according to max_linewidth
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@quicinc.com> Signed-off-by: Abhinav Kumar <quic_abhinavk@quicinc.com> Tested-by: Jessica Zhang <quic_jesszhan@quicinc.com> # Trogdor (SC8170) Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Patchwork: https://patchwork.freedesktop.org/patch/486176/ Link: https://lore.kernel.org/r/20220513225959.19004-1-quic_abhinavk@quicinc.com Signed-off-by: Abhinav Kumar <quic_abhinavk@quicinc.com>
Diffstat (limited to 'drivers/gpu/drm/msm')
-rw-r--r--drivers/gpu/drm/msm/disp/dpu1/dpu_writeback.c4
1 files changed, 3 insertions, 1 deletions
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);
}