From: David Laight <david.laight.linux@gmail.com>
To: Nicolas Frattaroli <nicolas.frattaroli@collabora.com>
Cc: "Sandy Huang" <hjc@rock-chips.com>,
"Heiko Stübner" <heiko@sntech.de>,
"Andy Yan" <andy.yan@rock-chips.com>,
"Maarten Lankhorst" <maarten.lankhorst@linux.intel.com>,
"Maxime Ripard" <mripard@kernel.org>,
"Thomas Zimmermann" <tzimmermann@suse.de>,
"David Airlie" <airlied@gmail.com>,
"Simona Vetter" <simona@ffwll.ch>,
"Chaoyi Chen" <chaoyi.chen@rock-chips.com>,
dri-devel@lists.freedesktop.org,
linux-arm-kernel@lists.infradead.org,
linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org,
"Daniel Stone" <daniels@collabora.com>,
kernel@collabora.com
Subject: Re: [PATCH v4 1/8] drm/rockchip: vop2: Switch impossible format conditional to WARN_ON
Date: Thu, 11 Dec 2025 22:38:22 +0000 [thread overview]
Message-ID: <20251211223822.6eeabb4d@pumpkin> (raw)
In-Reply-To: <20251211-vop2-atomic-fixups-v4-1-5d50eda26bf8@collabora.com>
On Thu, 11 Dec 2025 21:40:31 +0100
Nicolas Frattaroli <nicolas.frattaroli@collabora.com> wrote:
> From: Daniel Stone <daniels@collabora.com>
>
> We should never be able to create a framebuffer with an unsupported
> format, so throw a warning if this ever happens, instead of attempting
> to stagger on.
It doesn't look like you've changed the behaviour.
Except that all the systems with PANIC_ON_WARN set will panic.
I believe that is somewhere over 90% of systems.
David
>
> Signed-off-by: Daniel Stone <daniels@collabora.com>
> Signed-off-by: Nicolas Frattaroli <nicolas.frattaroli@collabora.com>
> ---
> drivers/gpu/drm/rockchip/rockchip_drm_vop2.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_vop2.c b/drivers/gpu/drm/rockchip/rockchip_drm_vop2.c
> index 498df0ce4680..20b49209ddcd 100644
> --- a/drivers/gpu/drm/rockchip/rockchip_drm_vop2.c
> +++ b/drivers/gpu/drm/rockchip/rockchip_drm_vop2.c
> @@ -1030,7 +1030,8 @@ static int vop2_plane_atomic_check(struct drm_plane *plane,
> return 0;
>
> format = vop2_convert_format(fb->format->format);
> - if (format < 0)
> + /* We shouldn't be able to create a fb for an unsupported format */
> + if (WARN_ON(format < 0))
> return format;
>
> /* Co-ordinates have now been clipped */
>
WARNING: multiple messages have this Message-ID (diff)
From: David Laight <david.laight.linux@gmail.com>
To: Nicolas Frattaroli <nicolas.frattaroli@collabora.com>
Cc: "Sandy Huang" <hjc@rock-chips.com>,
"Heiko Stübner" <heiko@sntech.de>,
"Andy Yan" <andy.yan@rock-chips.com>,
"Maarten Lankhorst" <maarten.lankhorst@linux.intel.com>,
"Maxime Ripard" <mripard@kernel.org>,
"Thomas Zimmermann" <tzimmermann@suse.de>,
"David Airlie" <airlied@gmail.com>,
"Simona Vetter" <simona@ffwll.ch>,
"Chaoyi Chen" <chaoyi.chen@rock-chips.com>,
dri-devel@lists.freedesktop.org,
linux-arm-kernel@lists.infradead.org,
linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org,
"Daniel Stone" <daniels@collabora.com>,
kernel@collabora.com
Subject: Re: [PATCH v4 1/8] drm/rockchip: vop2: Switch impossible format conditional to WARN_ON
Date: Thu, 11 Dec 2025 22:38:22 +0000 [thread overview]
Message-ID: <20251211223822.6eeabb4d@pumpkin> (raw)
In-Reply-To: <20251211-vop2-atomic-fixups-v4-1-5d50eda26bf8@collabora.com>
On Thu, 11 Dec 2025 21:40:31 +0100
Nicolas Frattaroli <nicolas.frattaroli@collabora.com> wrote:
> From: Daniel Stone <daniels@collabora.com>
>
> We should never be able to create a framebuffer with an unsupported
> format, so throw a warning if this ever happens, instead of attempting
> to stagger on.
It doesn't look like you've changed the behaviour.
Except that all the systems with PANIC_ON_WARN set will panic.
I believe that is somewhere over 90% of systems.
David
>
> Signed-off-by: Daniel Stone <daniels@collabora.com>
> Signed-off-by: Nicolas Frattaroli <nicolas.frattaroli@collabora.com>
> ---
> drivers/gpu/drm/rockchip/rockchip_drm_vop2.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_vop2.c b/drivers/gpu/drm/rockchip/rockchip_drm_vop2.c
> index 498df0ce4680..20b49209ddcd 100644
> --- a/drivers/gpu/drm/rockchip/rockchip_drm_vop2.c
> +++ b/drivers/gpu/drm/rockchip/rockchip_drm_vop2.c
> @@ -1030,7 +1030,8 @@ static int vop2_plane_atomic_check(struct drm_plane *plane,
> return 0;
>
> format = vop2_convert_format(fb->format->format);
> - if (format < 0)
> + /* We shouldn't be able to create a fb for an unsupported format */
> + if (WARN_ON(format < 0))
> return format;
>
> /* Co-ordinates have now been clipped */
>
_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip
next prev parent reply other threads:[~2025-12-11 22:38 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-11 20:40 [PATCH v4 0/8] drm/rockchip: No more post-atomic_check fixups Nicolas Frattaroli
2025-12-11 20:40 ` Nicolas Frattaroli
2025-12-11 20:40 ` [PATCH v4 1/8] drm/rockchip: vop2: Switch impossible format conditional to WARN_ON Nicolas Frattaroli
2025-12-11 20:40 ` Nicolas Frattaroli
2025-12-11 22:38 ` David Laight [this message]
2025-12-11 22:38 ` David Laight
2025-12-12 12:43 ` Nicolas Frattaroli
2025-12-12 12:43 ` Nicolas Frattaroli
2025-12-15 17:55 ` Daniel Stone
2025-12-15 17:55 ` Daniel Stone
2025-12-15 18:16 ` David Laight
2025-12-15 18:16 ` David Laight
2025-12-11 20:40 ` [PATCH v4 2/8] drm/rockchip: vop2: Switch impossible pos " Nicolas Frattaroli
2025-12-11 20:40 ` Nicolas Frattaroli
2025-12-11 22:41 ` David Laight
2025-12-11 22:41 ` David Laight
2025-12-15 17:57 ` Daniel Stone
2025-12-15 17:57 ` Daniel Stone
2025-12-11 20:40 ` [PATCH v4 3/8] drm/rockchip: vop2: Fix Esmart test condition Nicolas Frattaroli
2025-12-11 20:40 ` Nicolas Frattaroli
2025-12-11 20:40 ` [PATCH v4 4/8] drm/rockchip: vop2: Enforce scaling workaround in plane_check Nicolas Frattaroli
2025-12-11 20:40 ` Nicolas Frattaroli
2025-12-11 20:40 ` [PATCH v4 5/8] drm/rockchip: vop2: Enforce AFBC source alignment " Nicolas Frattaroli
2025-12-11 20:40 ` Nicolas Frattaroli
2025-12-11 20:40 ` [PATCH v4 6/8] drm/rockchip: vop2: Enforce AFBC transform stride align " Nicolas Frattaroli
2025-12-11 20:40 ` Nicolas Frattaroli
2025-12-11 20:40 ` [PATCH v4 7/8] drm/rockchip: vop2: Use drm_is_afbc helper function Nicolas Frattaroli
2025-12-11 20:40 ` Nicolas Frattaroli
2025-12-11 20:40 ` [PATCH v4 8/8] drm/rockchip: vop2: Simplify format_mod_supported Nicolas Frattaroli
2025-12-11 20:40 ` Nicolas Frattaroli
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=20251211223822.6eeabb4d@pumpkin \
--to=david.laight.linux@gmail.com \
--cc=airlied@gmail.com \
--cc=andy.yan@rock-chips.com \
--cc=chaoyi.chen@rock-chips.com \
--cc=daniels@collabora.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=heiko@sntech.de \
--cc=hjc@rock-chips.com \
--cc=kernel@collabora.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rockchip@lists.infradead.org \
--cc=maarten.lankhorst@linux.intel.com \
--cc=mripard@kernel.org \
--cc=nicolas.frattaroli@collabora.com \
--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 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.