From: Francesco Valla <francesco@valla.it>
To: Jocelyn Falempe <jfalempe@redhat.com>,
Javier Martinez Canillas <javierm@redhat.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>
Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org,
Francesco Valla <francesco@valla.it>
Subject: [PATCH v2 3/3] drm/panic: avoid WARN when checking format support
Date: Tue, 14 Oct 2025 22:08:14 +0200 [thread overview]
Message-ID: <20251014-drm_draw_conv_check-v2-3-05bef3eb06fb@valla.it> (raw)
In-Reply-To: <20251014-drm_draw_conv_check-v2-0-05bef3eb06fb@valla.it>
Use drm_draw_can_convert_from_xrgb8888() instead of
drm_draw_color_from_xrgb8888() while checking if a color format is
usable. This avoids a WARN in case the first format is not usable.
Signed-off-by: Francesco Valla <francesco@valla.it>
---
drivers/gpu/drm/drm_panic.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/drm_panic.c b/drivers/gpu/drm/drm_panic.c
index 1d6312fa142935fcf763381920ad889ca4cf4b27..4ba961e445e576d03cfb58953eead90d32b40151 100644
--- a/drivers/gpu/drm/drm_panic.c
+++ b/drivers/gpu/drm/drm_panic.c
@@ -785,7 +785,7 @@ static bool drm_panic_is_format_supported(const struct drm_format_info *format)
{
if (format->num_planes != 1)
return false;
- return drm_draw_color_from_xrgb8888(0xffffff, format->format) != 0;
+ return drm_draw_can_convert_from_xrgb8888(format->format);
}
static void draw_panic_dispatch(struct drm_scanout_buffer *sb)
--
2.51.0
next prev parent reply other threads:[~2025-10-15 7:52 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-14 20:08 [PATCH v2 0/3] drm/draw: add check API to avoid spurious WARN Francesco Valla
2025-10-14 20:08 ` [PATCH v2 1/3] drm/draw: add drm_draw_can_convert_from_xrgb8888 Francesco Valla
2025-10-15 7:39 ` Jocelyn Falempe
2025-10-14 20:08 ` [PATCH v2 2/3] drm/log: avoid WARN when searching for usable format Francesco Valla
2025-10-15 7:40 ` Jocelyn Falempe
2025-10-14 20:08 ` Francesco Valla [this message]
2025-10-15 7:40 ` [PATCH v2 3/3] drm/panic: avoid WARN when checking format support Jocelyn Falempe
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=20251014-drm_draw_conv_check-v2-3-05bef3eb06fb@valla.it \
--to=francesco@valla.it \
--cc=airlied@gmail.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=javierm@redhat.com \
--cc=jfalempe@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=maarten.lankhorst@linux.intel.com \
--cc=mripard@kernel.org \
--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
all inboxes | Powered by JetHome®