dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Zimmermann <tzimmermann@suse.de>
To: sashiko-reviews@lists.linux.dev
Cc: linux-hyperv@vger.kernel.org, intel-gfx@lists.freedesktop.org,
	Frank.Li@kernel.org, imx@lists.linux.dev,
	intel-xe@lists.freedesktop.org, ojeda@kernel.org,
	dri-devel@lists.freedesktop.org,
	wsa+renesas@sang-engineering.com
Subject: Re: [PATCH 07/12] drm/panic: Retry in dispatch function if panic output fails
Date: Wed, 19 Aug 2026 10:22:08 +0200	[thread overview]
Message-ID: <b5f0a822-a343-45b2-94de-aeefd870427e@suse.de> (raw)
In-Reply-To: <20260818130547.4FEDF1F00A3A@smtp.kernel.org>



Am 18.08.26 um 15:05 schrieb sashiko-bot@kernel.org:
> Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
> - [Medium] Removing the internal fallback from `draw_panic_screen_qr_code` breaks the `drm_panic` KUnit tests.

I think that's exactly the right thing to do. When we unit-test 
draw_panic_screen_qr_code() , we better not fallback silently to 
something that works; thus masking the error.
> --
>
> --- Patch [7]: [PATCH 07/12] drm/panic: Retry in dispatch function if panic output fails ---
> commit 23392eb57457ad383d9c4741f6fc2f3c107aabb3
> Author: Thomas Zimmermann <tzimmermann@suse.de>
>
> drm/panic: Retry in dispatch function if panic output fails
>
> On failed output of QR codes and kmsg buffers, fall back to a user
> message. QR-code output already did this internally, but now formally
> support it in drm_panic_dispatch(). Streamlines the existing logic.
>
>> --- a/drivers/gpu/drm/drm_panic.c
>> +++ b/drivers/gpu/drm/drm_panic.c
> [ ... ]
>> @@ -816,15 +816,6 @@ static int _draw_panic_screen_qr_code(struct drm_scanout_buffer *sb,
>>   	drm_panic_blit(sb, &r_qr, qr_image, qr_pitch, scale, fg_color);
>>   	return 0;
>>   }
>> -
>> -static int draw_panic_screen_qr_code(struct drm_scanout_buffer *sb,
>> -				     u32 fg_color, u32 bg_color,
>> -				     unsigned int qr_version)
>> -{
>> -	if (_draw_panic_screen_qr_code(sb, fg_color, bg_color, qr_version))
>> -		draw_panic_screen_user(sb, fg_color, bg_color);
>> -	return 0;
>> -}
> [Severity: Medium]
> Does removing this fallback cause the drm_panic KUnit tests to fail?
>
> Looking at the test suite in drivers/gpu/drm/tests/drm_panic_test.c, it
> calls this function directly without going through the new dispatch logic:
>
> static int draw_panic_screen_qr_code_default(struct drm_scanout_buffer *sb)
> {
> 	return draw_panic_screen_qr_code(sb, 0x00ffffff, 0x00000000, 40);
> }
>
> When tested with a small resolution like 300x200, the scale evaluates to 0
> and returns -ENOSPC. Previously, this wrapper caught the error, fell back
> to draw_panic_screen_user, and safely returned 0, satisfying the KUnit
> check.
>
> Since the fallback was moved to draw_panic_dispatch and the test calls
> the lower-level function directly, will this now propagate the -ENOSPC
> error and spuriously fail the test?
>

-- 
--
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Frankenstr. 146, 90461 Nürnberg, Germany, www.suse.com
GF: Jochen Jaser, Andrew McDonald, (HRB 36809, AG Nürnberg)



  reply	other threads:[~2026-08-19  8:22 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-18 12:27 [PATCH 00/12] drm/panic: Split into core and helpers Thomas Zimmermann
2026-08-18 12:27 ` [PATCH 01/12] drm/panic: Allocate QR-code buffers statically Thomas Zimmermann
2026-08-18 13:09   ` sashiko-bot
2026-08-19  9:38   ` Geert Uytterhoeven
2026-08-19 10:45     ` Thomas Zimmermann
2026-08-18 12:28 ` [PATCH 02/12] drm/panic: Make allocation of zlib workspace more robust Thomas Zimmermann
2026-08-18 12:28 ` [PATCH 03/12] drm/panic: Return -EINVAL if font is not available Thomas Zimmermann
2026-08-18 13:04   ` sashiko-bot
2026-08-18 12:28 ` [PATCH 04/12] drm/panic: Return errno codes if panic output fails Thomas Zimmermann
2026-08-18 13:03   ` sashiko-bot
2026-08-18 12:28 ` [PATCH 05/12] drm/panic: Pass colors to draw_panic_dispatch() Thomas Zimmermann
2026-08-18 12:28 ` [PATCH 06/12] drm/panic: Pass global module parameters to drm_panic_dispatch() Thomas Zimmermann
2026-08-18 13:09   ` sashiko-bot
2026-08-19  8:19     ` Thomas Zimmermann
2026-08-18 12:28 ` [PATCH 07/12] drm/panic: Retry in dispatch function if panic output fails Thomas Zimmermann
2026-08-18 13:05   ` sashiko-bot
2026-08-19  8:22     ` Thomas Zimmermann [this message]
2026-08-18 12:28 ` [PATCH 08/12] drm/panic: Split draw_panic_plane() Thomas Zimmermann
2026-08-18 13:14   ` sashiko-bot
2026-08-18 12:28 ` [PATCH 09/12] drm/panic: Display panic screen via per-plane callback Thomas Zimmermann
2026-08-18 13:19   ` sashiko-bot
2026-08-19  9:02     ` Thomas Zimmermann
2026-08-18 12:28 ` [PATCH 10/12] drm/panic: Internalize panic locking in DRM core and helpers Thomas Zimmermann
2026-08-18 12:28 ` [PATCH 11/12] drm/panic: Move panic display code into helper library Thomas Zimmermann
2026-08-18 13:13   ` sashiko-bot
2026-08-18 15:55   ` Randy Dunlap
2026-08-19  6:16     ` Thomas Zimmermann
2026-08-18 12:28 ` [PATCH 12/12] drm/panic: Compile KUnit tests as module Thomas Zimmermann
2026-08-18 13:18   ` sashiko-bot

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=b5f0a822-a343-45b2-94de-aeefd870427e@suse.de \
    --to=tzimmermann@suse.de \
    --cc=Frank.Li@kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=imx@lists.linux.dev \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=linux-hyperv@vger.kernel.org \
    --cc=ojeda@kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    --cc=wsa+renesas@sang-engineering.com \
    /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