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 v3 3/3] drm/panic: avoid WARN when checking format support
Date: Wed, 17 Dec 2025 09:06:56 +0100 [thread overview]
Message-ID: <20251217-drm_draw_conv_check-v3-3-15b6f8bc1cbc@valla.it> (raw)
In-Reply-To: <20251217-drm_draw_conv_check-v3-0-15b6f8bc1cbc@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.
Reviewed-by: Jocelyn Falempe <jfalempe@redhat.com>
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 d4b6ea42db0fe65ea010255ff57554baf723e60c..27989a010ace38b18bc047ad87db64128ec25790 100644
--- a/drivers/gpu/drm/drm_panic.c
+++ b/drivers/gpu/drm/drm_panic.c
@@ -833,7 +833,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.52.0
next prev parent reply other threads:[~2025-12-17 8:08 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-17 8:06 [PATCH v3 0/3] drm/draw: add check API to avoid spurious WARN Francesco Valla
2025-12-17 8:06 ` [PATCH v3 1/3] drm/draw: add drm_draw_can_convert_from_xrgb8888 Francesco Valla
2025-12-17 8:06 ` [PATCH v3 2/3] drm/log: avoid WARN when searching for usable format Francesco Valla
2025-12-17 8:06 ` Francesco Valla [this message]
2025-12-19 8:05 ` [PATCH v3 0/3] drm/draw: add check API to avoid spurious WARN Jocelyn Falempe
2025-12-19 22:11 ` 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=20251217-drm_draw_conv_check-v3-3-15b6f8bc1cbc@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®