<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/gpu/drm/drm_panic.c, branch v7.0-rc7</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v7.0-rc7</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v7.0-rc7'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2026-01-09T08:53:27+00:00</updated>
<entry>
<title>drm/panic: Fix expected string for QR_CODE in drm_panic_type_map</title>
<updated>2026-01-09T08:53:27+00:00</updated>
<author>
<name>Nathan Chancellor</name>
<email>nathan@kernel.org</email>
</author>
<published>2026-01-06T06:19:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=6abb6a0e1104279763d1561b8110c1db442c5fac'/>
<id>urn:sha1:6abb6a0e1104279763d1561b8110c1db442c5fac</id>
<content type='text'>
The help text of CONFIG_DRM_PANIC_SCREEN_QR_CODE documents the expected
value to CONFIG_DRM_PANIC_SCREEN as "qr_code" but drm_panic_type_map
checks for "qr". Adjust drm_panic_type_map and the module description to
match so that existing configurations do not stop working.

Fixes: e85e9ccf3f84 ("drm/panic: Report invalid or unsupported panic modes")
Signed-off-by: Nathan Chancellor &lt;nathan@kernel.org&gt;
Reviewed-by: Tvrtko Ursulin &lt;tvrtko.ursulin@igalia.com&gt;
Reviewed-by: Jocelyn Falempe &lt;jfalempe@redhat.com&gt;
Signed-off-by: Tvrtko Ursulin &lt;tursulin@ursulin.net&gt;
Link: https://lore.kernel.org/r/20260105-drm_panic-handle-invalid-drm_panic_screen-v1-2-55228bd4b0f8@kernel.org
</content>
</entry>
<entry>
<title>drm/panic: Ensure drm_panic_type is initialized to a valid value</title>
<updated>2026-01-09T08:53:27+00:00</updated>
<author>
<name>Nathan Chancellor</name>
<email>nathan@kernel.org</email>
</author>
<published>2026-01-06T06:19:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=6419fc157e55665dc8680deb1737dc4c53c33f94'/>
<id>urn:sha1:6419fc157e55665dc8680deb1737dc4c53c33f94</id>
<content type='text'>
If a user has set an invalid CONFIG_DRM_PANIC_SCREEN value (such as
"qr_code" without CONFIG_DRM_PANIC_SCREEN_QR_CODE=y due to missing or
incorrect Rust dependencies), there is a panic when accessing
/sys/module/drm/parameters/panic_screen:

  [   12.218375] BUG: unable to handle page fault for address: 0000000796dd8818
  [   12.219737] #PF: supervisor read access in kernel mode
  ...
  [   12.227167] RIP: 0010:drm_panic_type_get+0x1b/0x30

If drm_panic_type_set() does not find a valid drm_panic_type enumeration
in drm_panic_type_map based on the provided value, it does not change
drm_panic_type from the default -1 value, which is not a valid index for
accessing drm_panic_type_map in drm_panic_type_get(), resulting in the
crash.

Validate the value of CONFIG_DRM_PANIC_SCREEN at boot time via the
return value of drm_panic_type_set() in drm_panic_init() and explicitly
fall back to the default of "user" with a message to the user so that
they can adjust their configuration or fix missing dependencies.

  [    0.800697] Unsupported value for CONFIG_DRM_PANIC_SCREEN ('qr_code'), falling back to 'user'...

Fixes: e85e9ccf3f84 ("drm/panic: Report invalid or unsupported panic modes")
Signed-off-by: Nathan Chancellor &lt;nathan@kernel.org&gt;
Reviewed-by: Tvrtko Ursulin &lt;tvrtko.ursulin@igalia.com&gt;
Reviewed-by: Jocelyn Falempe &lt;jfalempe@redhat.com&gt;
Signed-off-by: Tvrtko Ursulin &lt;tursulin@ursulin.net&gt;
Link: https://lore.kernel.org/r/20260105-drm_panic-handle-invalid-drm_panic_screen-v1-1-55228bd4b0f8@kernel.org
</content>
</entry>
<entry>
<title>drm/panic: Add kunit tests for drm_panic</title>
<updated>2026-01-05T09:03:41+00:00</updated>
<author>
<name>Jocelyn Falempe</name>
<email>jfalempe@redhat.com</email>
</author>
<published>2025-12-16T08:20:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=91ce41427d468cd103a08970b448a42430f9e52f'/>
<id>urn:sha1:91ce41427d468cd103a08970b448a42430f9e52f</id>
<content type='text'>
Add kunit tests for drm_panic.
They check that drawing the panic screen doesn't crash, but they
don't check the correctness of the resulting image.

Reviewed-by: Maxime Ripard &lt;mripard@kernel.org&gt;
Link: https://patch.msgid.link/20251216082524.115980-3-jfalempe@redhat.com
Signed-off-by: Jocelyn Falempe &lt;jfalempe@redhat.com&gt;
</content>
</entry>
<entry>
<title>drm/panic: Rename draw_panic_static_* to draw_panic_screen_*</title>
<updated>2026-01-05T08:59:13+00:00</updated>
<author>
<name>Jocelyn Falempe</name>
<email>jfalempe@redhat.com</email>
</author>
<published>2025-12-16T08:20:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=5555a3074921285f8ba0346208db29f335e45b95'/>
<id>urn:sha1:5555a3074921285f8ba0346208db29f335e45b95</id>
<content type='text'>
I called them "static" because the panic screen is drawn only once,
but this can be confused with the static meaning in C.
Also remove some unnecessary braces in draw_panic_dispatch().
No functionnal change.

Reviewed-by: Javier Martinez Canillas &lt;javierm@redhat.com&gt;
Link: https://patch.msgid.link/20251216082524.115980-2-jfalempe@redhat.com
Signed-off-by: Jocelyn Falempe &lt;jfalempe@redhat.com&gt;
</content>
</entry>
<entry>
<title>drm/panic: avoid WARN when checking format support</title>
<updated>2025-12-19T22:06:41+00:00</updated>
<author>
<name>Francesco Valla</name>
<email>francesco@valla.it</email>
</author>
<published>2025-12-17T08:06:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=4f1b30fe9ef550651ea353714d1119431e76824a'/>
<id>urn:sha1:4f1b30fe9ef550651ea353714d1119431e76824a</id>
<content type='text'>
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 &lt;jfalempe@redhat.com&gt;
Signed-off-by: Francesco Valla &lt;francesco@valla.it&gt;
Link: https://patch.msgid.link/20251217-drm_draw_conv_check-v3-3-15b6f8bc1cbc@valla.it
Signed-off-by: Jocelyn Falempe &lt;jfalempe@redhat.com&gt;
</content>
</entry>
<entry>
<title>Merge drm/drm-next into drm-misc-next</title>
<updated>2025-12-15T08:27:39+00:00</updated>
<author>
<name>Maxime Ripard</name>
<email>mripard@kernel.org</email>
</author>
<published>2025-12-15T08:27:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=7f790dd21a931c61167f7bdc327aecf2cebad327'/>
<id>urn:sha1:7f790dd21a931c61167f7bdc327aecf2cebad327</id>
<content type='text'>
Let's kickstart the v6.20 (7.0?) release cycle.

Signed-off-by: Maxime Ripard &lt;mripard@kernel.org&gt;
</content>
</entry>
<entry>
<title>drm/panic: Report invalid or unsupported panic modes</title>
<updated>2025-11-28T15:20:34+00:00</updated>
<author>
<name>Tvrtko Ursulin</name>
<email>tvrtko.ursulin@igalia.com</email>
</author>
<published>2025-11-27T09:03:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=e85e9ccf3f8404007f62dff9a02273fcdeb44206'/>
<id>urn:sha1:e85e9ccf3f8404007f62dff9a02273fcdeb44206</id>
<content type='text'>
Currently the user can write anything into the drm.panic_screen modparam,
either at runtime via sysfs, or as a kernel boot time argument. Invalid
strings will be silently accepted and ignored at use time by defaulting to
the 'user' panic mode.

Let instead add some validation in order to have immediate feedback when
something has been mistyped, or not compiled in.

For example during kernel boot:

 Booting kernel: `bsod' invalid for parameter `drm.panic_screen'

Or at runtime:

 # echo -n bsod &gt; /sys/module/drm/parameters/panic_screen
 -bash: echo: write error: Invalid argument

Change of behavior is that when invalid mode is attempted to be
configured, currently the code will default to the 'user' mode, while with
this change the code will ignore it, and default to the mode set at kernel
build time via CONFIG_DRM_PANIC_SCREEN.

While at it lets also fix the module parameter description to include all
compiled in modes.

Signed-off-by: Tvrtko Ursulin &lt;tvrtko.ursulin@igalia.com&gt;
Cc: Jocelyn Falempe &lt;jfalempe@redhat.com&gt;
Cc: Javier Martinez Canillas &lt;javierm@redhat.com&gt;
Reviewed-by: Javier Martinez Canillas &lt;javierm@redhat.com&gt;
Reviewed-by: Jocelyn Falempe &lt;jfalempe@redhat.com&gt;
Signed-off-by: Tvrtko Ursulin &lt;tursulin@ursulin.net&gt;
Link: https://lore.kernel.org/r/20251127090349.92717-1-tvrtko.ursulin@igalia.com
</content>
</entry>
<entry>
<title>drm/panic: Fix 24bit pixel crossing page boundaries</title>
<updated>2025-10-21T09:28:03+00:00</updated>
<author>
<name>Jocelyn Falempe</name>
<email>jfalempe@redhat.com</email>
</author>
<published>2025-10-09T12:24:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=23437509a69476d4f896891032d62ac868731668'/>
<id>urn:sha1:23437509a69476d4f896891032d62ac868731668</id>
<content type='text'>
When using page list framebuffer, and using RGB888 format, some
pixels can cross the page boundaries, and this case was not handled,
leading to writing 1 or 2 bytes on the next virtual address.

Add a check and a specific function to handle this case.

Fixes: c9ff2808790f0 ("drm/panic: Add support to scanout buffer as array of pages")
Reviewed-by: Javier Martinez Canillas &lt;javierm@redhat.com&gt;
Link: https://lore.kernel.org/r/20251009122955.562888-7-jfalempe@redhat.com
Signed-off-by: Jocelyn Falempe &lt;jfalempe@redhat.com&gt;
</content>
</entry>
<entry>
<title>drm/panic: Fix divide by 0 if the screen width &lt; font width</title>
<updated>2025-10-21T09:28:03+00:00</updated>
<author>
<name>Jocelyn Falempe</name>
<email>jfalempe@redhat.com</email>
</author>
<published>2025-10-09T12:24:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=2e337dd278c6c38982b520c309f36e0f88696e6e'/>
<id>urn:sha1:2e337dd278c6c38982b520c309f36e0f88696e6e</id>
<content type='text'>
In the unlikely case that the screen is tiny, and smaller than the
font width, it leads to a divide by 0:

draw_line_with_wrap()
chars_per_row = sb-&gt;width / font-&gt;width = 0
line_wrap.len = line-&gt;len % chars_per_row;

This will trigger a divide by 0

Reviewed-by: Javier Martinez Canillas &lt;javierm@redhat.com&gt;
Link: https://lore.kernel.org/r/20251009122955.562888-6-jfalempe@redhat.com
Signed-off-by: Jocelyn Falempe &lt;jfalempe@redhat.com&gt;
</content>
</entry>
<entry>
<title>drm/panic: Fix kmsg text drawing rectangle</title>
<updated>2025-10-21T09:28:03+00:00</updated>
<author>
<name>Jocelyn Falempe</name>
<email>jfalempe@redhat.com</email>
</author>
<published>2025-10-09T12:24:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=e9b36fe0630046e61224216dc92513a69f72b5f0'/>
<id>urn:sha1:e9b36fe0630046e61224216dc92513a69f72b5f0</id>
<content type='text'>
The rectangle height was larger than the screen size. This has no
real impact.

Reviewed-by: Javier Martinez Canillas &lt;javierm@redhat.com&gt;
Link: https://lore.kernel.org/r/20251009122955.562888-5-jfalempe@redhat.com
Signed-off-by: Jocelyn Falempe &lt;jfalempe@redhat.com&gt;
</content>
</entry>
</feed>
