On Tue, 14 Mar 2023 at 17:36, Dmitry Baryshkov <dmitry.baryshkov@xxxxxxxxxx> wrote: > > It is possible to use multirect feature and split source to use the SSPP > to output two consecutive rectangles. This commit brings in this > capability to support wider screen resolutions. > > Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@xxxxxxxxxx> > --- > drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c | 19 +++- > drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c | 127 +++++++++++++++++++--- > drivers/gpu/drm/msm/disp/dpu1/dpu_plane.h | 4 + > 3 files changed, 133 insertions(+), 17 deletions(-) > > diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c > index f52120b05b6e..494c1144075a 100644 > --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c > +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c [...] > @@ -1016,21 +1026,58 @@ static int dpu_plane_atomic_check(struct drm_plane *plane, > return -E2BIG; > } > > + fmt = to_dpu_format(msm_framebuffer_format(new_plane_state->fb)); > + > max_linewidth = pdpu->catalog->caps->max_linewidth; > + if (DPU_FORMAT_IS_UBWC(fmt)) > + max_linewidth /= 2; I added this check and only after sending it caught my mind that this check should not be applied in the non-multirec case. Please ignore the series, I will resend it later. > > - /* check decimated source width */ > if (drm_rect_width(&pipe_cfg->src_rect) > max_linewidth) { > - DPU_DEBUG_PLANE(pdpu, "invalid src " DRM_RECT_FMT " line:%u\n", > - DRM_RECT_ARG(&pipe_cfg->src_rect), max_linewidth); > - return -E2BIG; > - } > + if (drm_rect_width(&pipe_cfg->src_rect) > 2 * max_linewidth) { > + DPU_DEBUG_PLANE(pdpu, "invalid src " DRM_RECT_FMT " line:%u\n", > + DRM_RECT_ARG(&pipe_cfg->src_rect), max_linewidth); > + return -E2BIG; > + } > [skipped the rest] -- With best wishes Dmitry