Commit e67dcecd authored by Abhinav Kumar's avatar Abhinav Kumar

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: 77b001ac ("drm/msm/dpu: add the writeback connector layer")
Reported-by: default avatarJessica Zhang <quic_jesszhan@quicinc.com>
Signed-off-by: default avatarAbhinav Kumar <quic_abhinavk@quicinc.com>
Tested-by: Jessica Zhang <quic_jesszhan@quicinc.com> # Trogdor (SC8170)
Reviewed-by: default avatarDmitry Baryshkov <dmitry.baryshkov@linaro.org>
Patchwork: https://patchwork.freedesktop.org/patch/486176/
Link: https://lore.kernel.org/r/20220513225959.19004-1-quic_abhinavk@quicinc.comSigned-off-by: default avatarAbhinav Kumar <quic_abhinavk@quicinc.com>
parent 947a844b
......@@ -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);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment