drm/msm/dpu: try multirect based on mdp clock limits
authorAbhinav Kumar <quic_abhinavk@quicinc.com>
Mon, 11 Sep 2023 22:16:27 +0000 (15:16 -0700)
committerDmitry Baryshkov <dmitry.baryshkov@linaro.org>
Fri, 1 Dec 2023 23:49:14 +0000 (02:49 +0300)
commite6c0de5f445091d250b75dabc4c60dd2643b8c98
treeda1f6195fc61ef2e012f831fa1cc8e77cdd52e92
parent07e6de738aa6f0e873463e9ca88bdb7081c4bfd4
drm/msm/dpu: try multirect based on mdp clock limits

It's certainly possible that for large resolutions a single DPU SSPP
cannot process the image without exceeding the MDP clock limits but
it can still process it in multirect mode because the source rectangles
will get divided and can fall within the MDP clock limits.

If the SSPP cannot process the image even in multirect mode, then it
will be rejected in dpu_plane_atomic_check_pipe().

Hence try using multirect for resolutions which cannot be processed
by a single SSPP without exceeding the MDP clock limits.

changes in v2:
- use crtc_state's adjusted_mode instead of mode
- fix the UBWC condition to check maxlinewidth

Signed-off-by: Abhinav Kumar <quic_abhinavk@quicinc.com>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Tested-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Patchwork: https://patchwork.freedesktop.org/patch/556817/
Link: https://lore.kernel.org/r/20230911221627.9569-2-quic_abhinavk@quicinc.com
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c