Current width limit is 2560 with single WB interface. 2 WB interfaces can double the limit in quad-pipe topology case.
Signed-off-by: Jun Nie <[email protected]> --- drivers/gpu/drm/msm/disp/dpu1/dpu_writeback.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_writeback.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_writeback.c index e7b09013ae4c..b1177e4bd16e 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_writeback.c +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_writeback.c @@ -14,15 +14,11 @@ 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); + /* we support dual-WB at most so far */ + int wb_count = min(2, dpu_kms->catalog->wb_count); - /* - * 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, + return drm_add_modes_noedid(connector, + wb_count * dpu_kms->catalog->wb->maxlinewidth, dev->mode_config.max_height); } -- 2.53.0
