Linux-Rockchip Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Christian Hewitt <christianshewitt@gmail.com>
To: Alok Tiwari <alok.a.tiwari@oracle.com>
Cc: michael.riesch@wolfvision.net, robh@kernel.org,
	s.hauer@pengutronix.de, dri-devel@lists.freedesktop.org,
	simona@ffwll.ch, airlied@gmail.com, tzimmermann@suse.de,
	mripard@kernel.org, hjc@rock-chips.com, heiko@sntech.de,
	andy.yan@rock-chips.com, maarten.lankhorst@linux.intel.com,
	linux-arm-kernel@lists.infradead.org,
	linux-rockchip@lists.infradead.org
Subject: Re: [PATCH] drm/rockchip: vop2: use correct destination rectangle height check
Date: Sun, 12 Oct 2025 15:28:39 +0400	[thread overview]
Message-ID: <79AC74F5-9579-4A1A-B051-FD8731DCC524@gmail.com> (raw)
In-Reply-To: <20251011130450.123444-1-alok.a.tiwari@oracle.com>

> On 11 Oct 2025, at 5:04 pm, Alok Tiwari <alok.a.tiwari@oracle.com> wrote:
> 
> The vop2_plane_atomic_check() function incorrectly checks
> drm_rect_width(dest) twice instead of verifying both width and height.
> Fix the second condition to use drm_rect_height(dest) so that invalid
> destination rectangles with height < 4 are correctly rejected.
> 
> Fixes: 604be85547ce ("drm/rockchip: Add VOP2 driver")
> Signed-off-by: Alok Tiwari <alok.a.tiwari@oracle.com>
> ---
> drivers/gpu/drm/rockchip/rockchip_drm_vop2.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_vop2.c b/drivers/gpu/drm/rockchip/rockchip_drm_vop2.c
> index b50927a824b4..697f54777a32 100644
> --- a/drivers/gpu/drm/rockchip/rockchip_drm_vop2.c
> +++ b/drivers/gpu/drm/rockchip/rockchip_drm_vop2.c
> @@ -1031,7 +1031,7 @@ static int vop2_plane_atomic_check(struct drm_plane *plane,
> return format;
> 
> if (drm_rect_width(src) >> 16 < 4 || drm_rect_height(src) >> 16 < 4 ||
> -    drm_rect_width(dest) < 4 || drm_rect_width(dest) < 4) {
> +    drm_rect_width(dest) < 4 || drm_rect_heigh(dest) < 4) {

Typo: s/drm_rect_heigh/drm_rect_height

Christian


_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip

  parent reply	other threads:[~2025-10-12 11:29 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-11 13:04 [PATCH] drm/rockchip: vop2: use correct destination rectangle height check Alok Tiwari
2025-10-12  3:12 ` kernel test robot
2025-10-12 11:28 ` Christian Hewitt [this message]
2025-10-12 11:31   ` [External] : " ALOK TIWARI

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=79AC74F5-9579-4A1A-B051-FD8731DCC524@gmail.com \
    --to=christianshewitt@gmail.com \
    --cc=airlied@gmail.com \
    --cc=alok.a.tiwari@oracle.com \
    --cc=andy.yan@rock-chips.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=heiko@sntech.de \
    --cc=hjc@rock-chips.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-rockchip@lists.infradead.org \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=michael.riesch@wolfvision.net \
    --cc=mripard@kernel.org \
    --cc=robh@kernel.org \
    --cc=s.hauer@pengutronix.de \
    --cc=simona@ffwll.ch \
    --cc=tzimmermann@suse.de \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox