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 v2 3/3] drm/panic: avoid WARN when checking format support
Date: Wed, 15 Oct 2025 09:40:24 +0200	[thread overview]
Message-ID: <46f046a6-0d51-45b0-8af1-61b4cc2c8127@redhat.com> (raw)
In-Reply-To: <20251014-drm_draw_conv_check-v2-3-05bef3eb06fb@valla.it>

On 14/10/2025 22:08, Francesco Valla wrote:
> 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.
> 

Thanks, it looks good to me.

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 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)
> 


      reply	other threads:[~2025-10-15  7:40 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 ` [PATCH v2 3/3] drm/panic: avoid WARN when checking format support Francesco Valla
2025-10-15  7:40   ` 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=46f046a6-0d51-45b0-8af1-61b4cc2c8127@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®