ARM Sunxi Platform Development
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Shirong Zhao" <shxzhaosr@163.com>
Cc: dri-devel@lists.freedesktop.org, linux-sunxi@lists.linux.dev
Subject: Re: [PATCH] drm/sun4i: reject zero-sized layer
Date: Sat, 05 Dec 2026 02:27:52 +0000	[thread overview]
Message-ID: <sashiko-outbox-250944@kernel.org> (raw)
In-Reply-To: <20261205021741.44-1-shxzhaosr@163.com>

Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Low] drm/sun4i: Fixes trailer cites commit predating frontend
  divide-by-zero
--

commit 38f14c080ffeebc7f15d4cfb56f927a9e17b180b
Author: Shirong Zhao <shxzhaosr@163.com>

> drm/sun4i: reject zero-sized layer
>
> sun4i_frontend_update_coord(), reached through the frontend path, computes
> the scaler factors as
>
>         (luma_width << 16) / state->crtc_w
>         (luma_height << 16) / state->crtc_h
>
> state->crtc_w/crtc_h are the userspace atomic plane destination size.  The
> DRM core only bounds them from above, and nothing in the sun4i backend
> rejects zero, so a commit with a zero destination size divides by zero.
>
> Reject zero-sized layers in sun4i_backend_plane_is_supported().
>
> Fixes: 9026e0d122ac ("drm: Add Allwinner A10 Display Engine support")
> Signed-off-by: Shirong Zhao <shxzhaosr@163.com>

[Severity: Low]
Does the Fixes tag point to the right commit?  9026e0d122ac ("drm: Add
Allwinner A10 Display Engine support") predates the display frontend and
sun4i_frontend_update_coord(), which misdirects stable backport tracking.

The division by state->crtc_w and state->crtc_h was introduced in
dd0421f47505 ("drm/sun4i: Add a driver for the display frontend") and
enabled via 96180dde23b7 ("drm/sun4i: backend: Add a custom atomic_check
for the frontend").  Should this be:

  Fixes: 96180dde23b7 ("drm/sun4i: backend: Add a custom atomic_check for the frontend")

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261205021741.44-1-shxzhaosr@163.com?part=1

  reply	other threads:[~2026-12-05  2:27 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-12-05  2:17 [PATCH] drm/sun4i: reject zero-sized layer Shirong Zhao
2026-12-05  2:27 ` sashiko-bot [this message]
2026-12-05  2:34 ` [PATCH v2] " Shirong Zhao

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=sashiko-outbox-250944@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=linux-sunxi@lists.linux.dev \
    --cc=sashiko-reviews@lists.linux.dev \
    --cc=shxzhaosr@163.com \
    /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