mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jocelyn Falempe <jfalempe@redhat.com>
To: Francesco Valla <francesco@valla.it>,
	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
Subject: Re: [PATCH v3 0/3] drm/draw: add check API to avoid spurious WARN
Date: Fri, 19 Dec 2025 23:11:10 +0100	[thread overview]
Message-ID: <1ff8c562-2d1a-4e77-85d6-62d9f85a4a31@redhat.com> (raw)
In-Reply-To: <20251217-drm_draw_conv_check-v3-0-15b6f8bc1cbc@valla.it>

On 17/12/2025 09:06, Francesco Valla wrote:
> When using the DRM draw support, the only way to check if a color can be
> converted from XRGB8888 to a target format is currently to attempt an
> actual conversion using drm_draw_color_from_xrgb8888(). This function
> however will print a WARN the first time a conversion cannot be
> performed, leading to two potential issues:
> 
>   - a WARN is emitted without a real reason if the caller is only
>     attempting a conversion to check if a format can be supported (which
>     is the case for two of the current user of this API);
>   - a failing call following the first one is not emitting a WARN, but a
>     "valid" color value (0x00000000) is returned nevertheless.
> 
> The first issue was observed while using drm_log on a Beagleplay, which
> lists AR12 as the first format for its HDMI modesets.
> 
> The target of this patch set is to improve this situation; the first
> patch introduces a new API devoted only to check if a conversion from
> XRGB8888 to the specified format can be performed, while the other two
> substitute drm_draw_color_from_xrgb8888() with this new API in the
> current users (drm_panic and drm_log) where relevant.

I just pushed it to drm-misc/drm-misc-next

Thanks for your contribution.

-- 

Jocelyn

> 
> Signed-off-by: Francesco Valla <francesco@valla.it>
> ---
> Changes in v3:
> - Collected R-b tags from Jocelyn (thank you!)
> - Link to v2: https://lore.kernel.org/r/20251014-drm_draw_conv_check-v2-0-05bef3eb06fb@valla.it
> 
> Changes in v2:
> - Moved to dedicated switch cases in separate functions instead of
>    single one inside common function.
> - Fix copy-paste error in commit message.
> 
> Link to v1: https://lore.kernel.org/r/20251005-drm_draw_conv_check-v1-0-9c814d9362f6@valla.it
> 
> ---
> Francesco Valla (3):
>        drm/draw: add drm_draw_can_convert_from_xrgb8888
>        drm/log: avoid WARN when searching for usable format
>        drm/panic: avoid WARN when checking format support
> 
>   drivers/gpu/drm/clients/drm_log.c   |  2 +-
>   drivers/gpu/drm/drm_draw.c          | 29 +++++++++++++++++++++++++++++
>   drivers/gpu/drm/drm_draw_internal.h |  2 ++
>   drivers/gpu/drm/drm_panic.c         |  2 +-
>   4 files changed, 33 insertions(+), 2 deletions(-)
> ---
> base-commit: ea1013c1539270e372fc99854bc6e4d94eaeff66
> change-id: 20251003-drm_draw_conv_check-9cc3050ebd57
> 
> Best regards,


      parent reply	other threads:[~2025-12-19 22:11 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-12-17  8:06 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 ` [PATCH v3 3/3] drm/panic: avoid WARN when checking format support Francesco Valla
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 [this message]

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=1ff8c562-2d1a-4e77-85d6-62d9f85a4a31@redhat.com \
    --to=jfalempe@redhat.com \
    --cc=airlied@gmail.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=francesco@valla.it \
    --cc=javierm@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®