[PATCH v6 27/32] drm/msm/dpu: add support for wide planes

Abhinav Kumar quic_abhinavk at quicinc.com
Tue Mar 14 21:07:39 UTC 2023



On 3/14/2023 8:41 AM, Dmitry Baryshkov wrote:
> On Tue, 14 Mar 2023 at 17:36, Dmitry Baryshkov
> <dmitry.baryshkov at linaro.org> 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 at linaro.org>
>> ---
>>   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.

ack, will wait for the next rev
> 
>>
>> -       /* 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]
> 


More information about the dri-devel mailing list