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 2/3] drm/log: avoid WARN when searching for usable format
Date: Tue, 14 Oct 2025 22:08:13 +0200 [thread overview]
Message-ID: <20251014-drm_draw_conv_check-v2-2-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 searching for a usable color
format. This avoids a WARN in case the first format is not usable.
Signed-off-by: Francesco Valla <francesco@valla.it>
---
drivers/gpu/drm/clients/drm_log.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/clients/drm_log.c b/drivers/gpu/drm/clients/drm_log.c
index d239f1e3c456397ad64007b20dde716f5d3d0881..c0150f0c3b4b395e6e2126cf0d9660c967c182ec 100644
--- a/drivers/gpu/drm/clients/drm_log.c
+++ b/drivers/gpu/drm/clients/drm_log.c
@@ -182,7 +182,7 @@ static u32 drm_log_find_usable_format(struct drm_plane *plane)
int i;
for (i = 0; i < plane->format_count; i++)
- if (drm_draw_color_from_xrgb8888(0xffffff, plane->format_types[i]) != 0)
+ if (drm_draw_can_convert_from_xrgb8888(plane->format_types[i]))
return plane->format_types[i];
return DRM_FORMAT_INVALID;
}
--
2.51.0
next prev parent reply other threads:[~2025-10-14 20:08 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 ` Francesco Valla [this message]
2025-10-15 7:40 ` [PATCH v2 2/3] drm/log: avoid WARN when searching for usable format Jocelyn Falempe
2025-10-14 20:08 ` [PATCH v2 3/3] drm/panic: avoid WARN when checking format support Francesco Valla
2025-10-15 7:40 ` 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-2-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®