All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
From: Abhinav Kumar <quic_abhinavk@quicinc.com>
To: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>,
	Rob Clark <robdclark@gmail.com>, Sean Paul <sean@poorly.run>,
	Marijn Suijten <marijn.suijten@somainline.org>,
	David Airlie <airlied@gmail.com>, Daniel Vetter <daniel@ffwll.ch>
Cc: Abel Vesa <abel.vesa@linaro.org>,
	Johan Hovold <johan+linaro@kernel.org>,
	<linux-arm-msm@vger.kernel.org>,
	<dri-devel@lists.freedesktop.org>,
	<freedreno@lists.freedesktop.org>
Subject: Re: [PATCH 5/9] drm/msm/dpu: check for the plane pitch overflow
Date: Fri, 19 Apr 2024 17:16:30 -0700	[thread overview]
Message-ID: <2d0e922f-8d68-aa5b-ebbf-b1bde3e9e2af@quicinc.com> (raw)
In-Reply-To: <20240319-dpu-mode-config-width-v1-5-d0fe6bf81bf1@linaro.org>



On 3/19/2024 6:22 AM, Dmitry Baryshkov wrote:
> Check that the plane pitch doesn't overflow the maximum pitch size
> allowed by the hardware.
> 
> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
> ---
>   drivers/gpu/drm/msm/disp/dpu1/dpu_hw_sspp.h | 2 ++
>   drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c   | 6 +++++-
>   2 files changed, 7 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_sspp.h b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_sspp.h
> index b7dc52312c39..86b1defa5d21 100644
> --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_sspp.h
> +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_sspp.h
> @@ -12,6 +12,8 @@
>   
>   struct dpu_hw_sspp;
>   
> +#define DPU_SSPP_MAX_PITCH_SIZE		0xffff
> +

You obtained this value from below code right?

	if (pipe->multirect_index == DPU_SSPP_RECT_0) {
487 			ystride0 = (ystride0 & 0xFFFF0000) |
488 				(layout->plane_pitch[0] & 0x0000FFFF);
489 			ystride1 = (ystride1 & 0xFFFF0000)|
490 				(layout->plane_pitch[2] & 0x0000FFFF);
491 		} else {
492 			ystride0 = (ystride0 & 0x0000FFFF) |
493 				((layout->plane_pitch[0] << 16) &
494 				 0xFFFF0000);
495 			ystride1 = (ystride1 & 0x0000FFFF) |
496 				((layout->plane_pitch[2] << 16) &
497 				 0xFFFF0000);
498 		}

Seems correct, but was just curious

Reviewed-by: Abhinav Kumar <quic_abhinavk@quicinc.com>

  reply	other threads:[~2024-04-20  0:16 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-19 13:21 [PATCH 0/9] drm/msm/dpu: be more friendly to X.org Dmitry Baryshkov
2024-03-19 13:21 ` [PATCH 1/9] drm/msm/dpu: drop dpu_format_check_modified_format Dmitry Baryshkov
2024-04-19 23:43   ` Abhinav Kumar
2024-04-20  1:26     ` Dmitry Baryshkov
2024-04-20  2:32       ` Abhinav Kumar
2024-04-22 11:06         ` Dmitry Baryshkov
2024-03-19 13:22 ` [PATCH 2/9] drm/msm/dpu: drop dpu_format_populate_layout from dpu_plane_sspp_atomic_update Dmitry Baryshkov
2024-04-19 23:55   ` Abhinav Kumar
2024-03-19 13:22 ` [PATCH 3/9] drm/msm/dpu: split dpu_format_populate_layout Dmitry Baryshkov
2024-04-20  0:08   ` Abhinav Kumar
2024-03-19 13:22 ` [PATCH 4/9] drm/msm/dpu: move dpu_format_populate_plane_sizes to atomic_check Dmitry Baryshkov
2024-04-20  0:14   ` Abhinav Kumar
2024-04-20  1:34     ` Dmitry Baryshkov
2024-04-20  2:37       ` Abhinav Kumar
2024-04-22 12:22         ` Dmitry Baryshkov
2024-03-19 13:22 ` [PATCH 5/9] drm/msm/dpu: check for the plane pitch overflow Dmitry Baryshkov
2024-04-20  0:16   ` Abhinav Kumar [this message]
2024-04-20  1:56     ` Dmitry Baryshkov
2024-03-19 13:22 ` [PATCH 6/9] drm/msm/dpu: drop call to _dpu_crtc_setup_lm_bounds from atomic_begin Dmitry Baryshkov
2024-03-19 13:22 ` [PATCH 7/9] drm/msm/dpu: check for overflow in _dpu_crtc_setup_lm_bounds() Dmitry Baryshkov
2024-03-19 13:22 ` [PATCH 8/9] drm/msm/dpu: merge MAX_IMG_WIDTH/HEIGHT with DPU_MAX_IMG_WIDTH/HEIGHT Dmitry Baryshkov
2024-04-20  2:54   ` Abhinav Kumar
2024-03-19 13:22 ` [PATCH 9/9] drm/msm/dpu: sync mode_config limits to the FB limits in dpu_plane.c Dmitry Baryshkov
2024-04-20  3:05   ` Abhinav Kumar
2024-04-20  3:06     ` Dmitry Baryshkov
2024-04-20  3:58       ` Abhinav Kumar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2d0e922f-8d68-aa5b-ebbf-b1bde3e9e2af@quicinc.com \
    --to=quic_abhinavk@quicinc.com \
    --cc=abel.vesa@linaro.org \
    --cc=airlied@gmail.com \
    --cc=daniel@ffwll.ch \
    --cc=dmitry.baryshkov@linaro.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=freedreno@lists.freedesktop.org \
    --cc=johan+linaro@kernel.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=marijn.suijten@somainline.org \
    --cc=robdclark@gmail.com \
    --cc=sean@poorly.run \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.