Documentation/process/debugging/kgdb.rst | 28 ----- drivers/gpu/drm/amd/amdgpu/dce_v10_0.c | 35 ++----- drivers/gpu/drm/amd/amdgpu/dce_v6_0.c | 35 ++----- drivers/gpu/drm/amd/amdgpu/dce_v8_0.c | 35 ++----- drivers/gpu/drm/drm_fb_helper.c | 108 -------------------- drivers/gpu/drm/nouveau/dispnv04/crtc.c | 24 +---- drivers/gpu/drm/radeon/atombios_crtc.c | 74 ++++---------- drivers/gpu/drm/radeon/radeon_legacy_crtc.c | 23 ++--- drivers/gpu/drm/radeon/radeon_mode.h | 10 +- drivers/video/fbdev/core/fbcon.c | 24 ----- drivers/video/fbdev/core/fbcon.h | 1 - include/drm/drm_fb_helper.h | 21 ---- include/drm/drm_modeset_helper_vtables.h | 23 ----- include/linux/fb.h | 4 - 14 files changed, 63 insertions(+), 382 deletions(-)
Remove the rest of the kbd support from DRM. Driver support has been
broken for years without anyone complaining.
Kdb cannot use regular DRM mode setting, so DRM drivers have to
implement an additional hook to make it work (in theory). As outlined
by Sima in commit 9c79e0b1d096 ("drm/fb-helper: Give up on kgdb for
atomic drivers") from 2017, kdb is not compatible with DRM atomic mode
setting. Non-atomic mode setting meanwhile has become rare.
Only 3 DRM drivers implement the hooks for kdb support. Amdgpu and
nouveau use non-atomic mode setting on older devices. But both drivers
have switched to generic fbdev emulation, which isn't compatible with
kdb. Radeon still runs kdb, but it doesn't work in practice. See the
commits in this series for details
Therefore remove the remaining support for kdb from the DRM drivers
and from DRM fbdev emulation. Also remove the hooks from fbdev, as
there are no fbdev drivers with kdb support.
If we ever want to address kdb support within DRM drivers, a place to
start would be the scanout buffers used by DRM's panic screen. These
use the current display mode. They can be written and flushed without
mode setting involved.
Note: kdb over serial lines is not affected by this series and continues
to work as before.
Thomas Zimmermann (5):
drm/amdgpu: Do not implement mode_set_base_atomic callback
drm/nouveau: Do not implement mode_set_base_atomic callback
drm/radeon: Do not implement mode_set_base_atomic callback
drm/fbdev-helper: Remove drm_fb_helper_debug_enter/_leave()
fbcon: Remove fb_debug_enter/_leave from struct fb_ops
Documentation/process/debugging/kgdb.rst | 28 -----
drivers/gpu/drm/amd/amdgpu/dce_v10_0.c | 35 ++-----
drivers/gpu/drm/amd/amdgpu/dce_v6_0.c | 35 ++-----
drivers/gpu/drm/amd/amdgpu/dce_v8_0.c | 35 ++-----
drivers/gpu/drm/drm_fb_helper.c | 108 --------------------
drivers/gpu/drm/nouveau/dispnv04/crtc.c | 24 +----
drivers/gpu/drm/radeon/atombios_crtc.c | 74 ++++----------
drivers/gpu/drm/radeon/radeon_legacy_crtc.c | 23 ++---
drivers/gpu/drm/radeon/radeon_mode.h | 10 +-
drivers/video/fbdev/core/fbcon.c | 24 -----
drivers/video/fbdev/core/fbcon.h | 1 -
include/drm/drm_fb_helper.h | 21 ----
include/drm/drm_modeset_helper_vtables.h | 23 -----
include/linux/fb.h | 4 -
14 files changed, 63 insertions(+), 382 deletions(-)
base-commit: 0a21e96e0b6840d2a4e0b45a957679eeddeb4362
--
2.51.1
Series has been acked by Sima via IRC. Patches 4 and 5 have been r-b'ed.
https://people.freedesktop.org/~cbrill/dri-log/?channel=dri-devel&highlight_names=&date=2025-12-01&show_html=true
Am 25.11.25 um 13:52 schrieb Thomas Zimmermann:
> Remove the rest of the kbd support from DRM. Driver support has been
> broken for years without anyone complaining.
>
> Kdb cannot use regular DRM mode setting, so DRM drivers have to
> implement an additional hook to make it work (in theory). As outlined
> by Sima in commit 9c79e0b1d096 ("drm/fb-helper: Give up on kgdb for
> atomic drivers") from 2017, kdb is not compatible with DRM atomic mode
> setting. Non-atomic mode setting meanwhile has become rare.
>
> Only 3 DRM drivers implement the hooks for kdb support. Amdgpu and
> nouveau use non-atomic mode setting on older devices. But both drivers
> have switched to generic fbdev emulation, which isn't compatible with
> kdb. Radeon still runs kdb, but it doesn't work in practice. See the
> commits in this series for details
>
> Therefore remove the remaining support for kdb from the DRM drivers
> and from DRM fbdev emulation. Also remove the hooks from fbdev, as
> there are no fbdev drivers with kdb support.
>
> If we ever want to address kdb support within DRM drivers, a place to
> start would be the scanout buffers used by DRM's panic screen. These
> use the current display mode. They can be written and flushed without
> mode setting involved.
>
> Note: kdb over serial lines is not affected by this series and continues
> to work as before.
>
> Thomas Zimmermann (5):
> drm/amdgpu: Do not implement mode_set_base_atomic callback
> drm/nouveau: Do not implement mode_set_base_atomic callback
> drm/radeon: Do not implement mode_set_base_atomic callback
> drm/fbdev-helper: Remove drm_fb_helper_debug_enter/_leave()
> fbcon: Remove fb_debug_enter/_leave from struct fb_ops
>
> Documentation/process/debugging/kgdb.rst | 28 -----
> drivers/gpu/drm/amd/amdgpu/dce_v10_0.c | 35 ++-----
> drivers/gpu/drm/amd/amdgpu/dce_v6_0.c | 35 ++-----
> drivers/gpu/drm/amd/amdgpu/dce_v8_0.c | 35 ++-----
> drivers/gpu/drm/drm_fb_helper.c | 108 --------------------
> drivers/gpu/drm/nouveau/dispnv04/crtc.c | 24 +----
> drivers/gpu/drm/radeon/atombios_crtc.c | 74 ++++----------
> drivers/gpu/drm/radeon/radeon_legacy_crtc.c | 23 ++---
> drivers/gpu/drm/radeon/radeon_mode.h | 10 +-
> drivers/video/fbdev/core/fbcon.c | 24 -----
> drivers/video/fbdev/core/fbcon.h | 1 -
> include/drm/drm_fb_helper.h | 21 ----
> include/drm/drm_modeset_helper_vtables.h | 23 -----
> include/linux/fb.h | 4 -
> 14 files changed, 63 insertions(+), 382 deletions(-)
>
>
> base-commit: 0a21e96e0b6840d2a4e0b45a957679eeddeb4362
--
--
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Frankenstr. 146, 90461 Nürnberg, Germany, www.suse.com
GF: Jochen Jaser, Andrew McDonald, Werner Knoblich, (HRB 36809, AG Nürnberg)
Hey,
I'm glad to see the old kdb handler gone.
Could we perhaps extend the drm panic handler somehow for this to work?
Restore could potentially be simply duplicating and committing the current state.
Kind regards,
~Maarten Lankhorst
Den 2025-11-25 kl. 13:52, skrev Thomas Zimmermann:
> Remove the rest of the kbd support from DRM. Driver support has been
> broken for years without anyone complaining.
>
> Kdb cannot use regular DRM mode setting, so DRM drivers have to
> implement an additional hook to make it work (in theory). As outlined
> by Sima in commit 9c79e0b1d096 ("drm/fb-helper: Give up on kgdb for
> atomic drivers") from 2017, kdb is not compatible with DRM atomic mode
> setting. Non-atomic mode setting meanwhile has become rare.
>
> Only 3 DRM drivers implement the hooks for kdb support. Amdgpu and
> nouveau use non-atomic mode setting on older devices. But both drivers
> have switched to generic fbdev emulation, which isn't compatible with
> kdb. Radeon still runs kdb, but it doesn't work in practice. See the
> commits in this series for details
>
> Therefore remove the remaining support for kdb from the DRM drivers
> and from DRM fbdev emulation. Also remove the hooks from fbdev, as
> there are no fbdev drivers with kdb support.
>
> If we ever want to address kdb support within DRM drivers, a place to
> start would be the scanout buffers used by DRM's panic screen. These
> use the current display mode. They can be written and flushed without
> mode setting involved.
>
> Note: kdb over serial lines is not affected by this series and continues
> to work as before.
>
> Thomas Zimmermann (5):
> drm/amdgpu: Do not implement mode_set_base_atomic callback
> drm/nouveau: Do not implement mode_set_base_atomic callback
> drm/radeon: Do not implement mode_set_base_atomic callback
> drm/fbdev-helper: Remove drm_fb_helper_debug_enter/_leave()
> fbcon: Remove fb_debug_enter/_leave from struct fb_ops
>
> Documentation/process/debugging/kgdb.rst | 28 -----
> drivers/gpu/drm/amd/amdgpu/dce_v10_0.c | 35 ++-----
> drivers/gpu/drm/amd/amdgpu/dce_v6_0.c | 35 ++-----
> drivers/gpu/drm/amd/amdgpu/dce_v8_0.c | 35 ++-----
> drivers/gpu/drm/drm_fb_helper.c | 108 --------------------
> drivers/gpu/drm/nouveau/dispnv04/crtc.c | 24 +----
> drivers/gpu/drm/radeon/atombios_crtc.c | 74 ++++----------
> drivers/gpu/drm/radeon/radeon_legacy_crtc.c | 23 ++---
> drivers/gpu/drm/radeon/radeon_mode.h | 10 +-
> drivers/video/fbdev/core/fbcon.c | 24 -----
> drivers/video/fbdev/core/fbcon.h | 1 -
> include/drm/drm_fb_helper.h | 21 ----
> include/drm/drm_modeset_helper_vtables.h | 23 -----
> include/linux/fb.h | 4 -
> 14 files changed, 63 insertions(+), 382 deletions(-)
>
>
> base-commit: 0a21e96e0b6840d2a4e0b45a957679eeddeb4362
Hi
Am 25.11.25 um 17:25 schrieb Maarten Lankhorst:
> Hey,
>
> I'm glad to see the old kdb handler gone.
>
> Could we perhaps extend the drm panic handler somehow for this to work?
> Restore could potentially be simply duplicating and committing the current state.
Yeah, I briefly outlined this in the cover letter. If we wanted to
support kdb, we could get the scanout buffer and use the buffer's simple
display update for showing the debugger. I think this still requires
quite some work, but would avoid all the issues with the current approach.
Best regards
Thomas
>
> Kind regards,
> ~Maarten Lankhorst
>
> Den 2025-11-25 kl. 13:52, skrev Thomas Zimmermann:
>> Remove the rest of the kbd support from DRM. Driver support has been
>> broken for years without anyone complaining.
>>
>> Kdb cannot use regular DRM mode setting, so DRM drivers have to
>> implement an additional hook to make it work (in theory). As outlined
>> by Sima in commit 9c79e0b1d096 ("drm/fb-helper: Give up on kgdb for
>> atomic drivers") from 2017, kdb is not compatible with DRM atomic mode
>> setting. Non-atomic mode setting meanwhile has become rare.
>>
>> Only 3 DRM drivers implement the hooks for kdb support. Amdgpu and
>> nouveau use non-atomic mode setting on older devices. But both drivers
>> have switched to generic fbdev emulation, which isn't compatible with
>> kdb. Radeon still runs kdb, but it doesn't work in practice. See the
>> commits in this series for details
>>
>> Therefore remove the remaining support for kdb from the DRM drivers
>> and from DRM fbdev emulation. Also remove the hooks from fbdev, as
>> there are no fbdev drivers with kdb support.
>>
>> If we ever want to address kdb support within DRM drivers, a place to
>> start would be the scanout buffers used by DRM's panic screen. These
>> use the current display mode. They can be written and flushed without
>> mode setting involved.
>>
>> Note: kdb over serial lines is not affected by this series and continues
>> to work as before.
>>
>> Thomas Zimmermann (5):
>> drm/amdgpu: Do not implement mode_set_base_atomic callback
>> drm/nouveau: Do not implement mode_set_base_atomic callback
>> drm/radeon: Do not implement mode_set_base_atomic callback
>> drm/fbdev-helper: Remove drm_fb_helper_debug_enter/_leave()
>> fbcon: Remove fb_debug_enter/_leave from struct fb_ops
>>
>> Documentation/process/debugging/kgdb.rst | 28 -----
>> drivers/gpu/drm/amd/amdgpu/dce_v10_0.c | 35 ++-----
>> drivers/gpu/drm/amd/amdgpu/dce_v6_0.c | 35 ++-----
>> drivers/gpu/drm/amd/amdgpu/dce_v8_0.c | 35 ++-----
>> drivers/gpu/drm/drm_fb_helper.c | 108 --------------------
>> drivers/gpu/drm/nouveau/dispnv04/crtc.c | 24 +----
>> drivers/gpu/drm/radeon/atombios_crtc.c | 74 ++++----------
>> drivers/gpu/drm/radeon/radeon_legacy_crtc.c | 23 ++---
>> drivers/gpu/drm/radeon/radeon_mode.h | 10 +-
>> drivers/video/fbdev/core/fbcon.c | 24 -----
>> drivers/video/fbdev/core/fbcon.h | 1 -
>> include/drm/drm_fb_helper.h | 21 ----
>> include/drm/drm_modeset_helper_vtables.h | 23 -----
>> include/linux/fb.h | 4 -
>> 14 files changed, 63 insertions(+), 382 deletions(-)
>>
>>
>> base-commit: 0a21e96e0b6840d2a4e0b45a957679eeddeb4362
--
--
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Frankenstr. 146, 90461 Nürnberg, Germany, www.suse.com
GF: Jochen Jaser, Andrew McDonald, Werner Knoblich, (HRB 36809, AG Nürnberg)
Hi,
On Tue, Nov 25, 2025 at 5:06 AM Thomas Zimmermann <tzimmermann@suse.de> wrote:
>
> Remove the rest of the kbd support from DRM. Driver support has been
> broken for years without anyone complaining.
>
> Kdb cannot use regular DRM mode setting, so DRM drivers have to
> implement an additional hook to make it work (in theory). As outlined
> by Sima in commit 9c79e0b1d096 ("drm/fb-helper: Give up on kgdb for
> atomic drivers") from 2017, kdb is not compatible with DRM atomic mode
> setting. Non-atomic mode setting meanwhile has become rare.
>
> Only 3 DRM drivers implement the hooks for kdb support. Amdgpu and
> nouveau use non-atomic mode setting on older devices. But both drivers
> have switched to generic fbdev emulation, which isn't compatible with
> kdb. Radeon still runs kdb, but it doesn't work in practice. See the
> commits in this series for details
>
> Therefore remove the remaining support for kdb from the DRM drivers
> and from DRM fbdev emulation. Also remove the hooks from fbdev, as
> there are no fbdev drivers with kdb support.
>
> If we ever want to address kdb support within DRM drivers, a place to
> start would be the scanout buffers used by DRM's panic screen. These
> use the current display mode. They can be written and flushed without
> mode setting involved.
>
> Note: kdb over serial lines is not affected by this series and continues
> to work as before.
>
> Thomas Zimmermann (5):
> drm/amdgpu: Do not implement mode_set_base_atomic callback
> drm/nouveau: Do not implement mode_set_base_atomic callback
> drm/radeon: Do not implement mode_set_base_atomic callback
> drm/fbdev-helper: Remove drm_fb_helper_debug_enter/_leave()
> fbcon: Remove fb_debug_enter/_leave from struct fb_ops
Personally, I've never worked with kdb over anything other than
serial, so this won't bother any of my normal workflows. That being
said, at least as of a year ago someone on the lists was talking about
using kdb with a keyboard and (presumably) a display. You can see a
thread here:
http://lore.kernel.org/r/20241031192350.GA26688@lichtman.org
Daniel may also have comments here?
-Doug
On Tue, Nov 25, 2025 at 07:26:33AM -0800, Doug Anderson wrote:
> On Tue, Nov 25, 2025 at 5:06 AM Thomas Zimmermann <tzimmermann@suse.de> wrote:
> > <snip>
> > Therefore remove the remaining support for kdb from the DRM drivers
> > and from DRM fbdev emulation. Also remove the hooks from fbdev, as
> > there are no fbdev drivers with kdb support.
> >
> > If we ever want to address kdb support within DRM drivers, a place to
> > start would be the scanout buffers used by DRM's panic screen. These
> > use the current display mode. They can be written and flushed without
> > mode setting involved.
> >
> > Note: kdb over serial lines is not affected by this series and continues
> > to work as before.
> >
> > Thomas Zimmermann (5):
> > drm/amdgpu: Do not implement mode_set_base_atomic callback
> > drm/nouveau: Do not implement mode_set_base_atomic callback
> > drm/radeon: Do not implement mode_set_base_atomic callback
> > drm/fbdev-helper: Remove drm_fb_helper_debug_enter/_leave()
> > fbcon: Remove fb_debug_enter/_leave from struct fb_ops
>
> Personally, I've never worked with kdb over anything other than
> serial, so this won't bother any of my normal workflows. That being
> said, at least as of a year ago someone on the lists was talking about
> using kdb with a keyboard and (presumably) a display. You can see a
> thread here:
>
> http://lore.kernel.org/r/20241031192350.GA26688@lichtman.org
>
> Daniel may also have comments here?
TL;DR - I'm pretty relaxed about these changes... but I'd like
to know how to test the changes.
Like Doug I only really use kdb via serial but, since I'm maintain
the thing I do occasionally test kdb works on the qemu console. I don't
do it very often though because it's a manual test!
I'd assume that will still work since it won't involve any of the
drivers above. I'm afraid I can't double check that since patch 4
doesn't apply cleanly in v6.18-rc7 (nor to linux-next... and neither
does the base-commit appear in linux-next).
Anyhow, the only testing I do for kgdboc=kms,kdb is to boot an x86-64
defconfig+kgdb+kdb kernel in qemu with something like the following
command line, which FWIW does still work:
qemu-system-x86_64 -enable-kvm -m 1G -smp 2 \
-kernel arch/x86/boot/bzImage \
-monitor none -chardev stdio,id=mon,mux=on,signal=off \
-serial chardev:mon \
-initrd rootfs.cpio.gz \
-append " console=tty0 console=ttyS0,115200 kgdboc=kms,kbd,ttyS0 kgdbwait"
The reason I'm fairly relaxed about changes here is that the kbd driver
only works on PCs with legacy keyboard interfaces. If the kernel is
talking to the keyboard using USB or I2C (which almost all PCs do) then
kdb cannot be used anyway.
So... it would be a "cool project"[1] to get kdb running on
a special interrupt-free I2C mode and with the DRM panic code so you
can do live analysis if your laptop/chomebook crashes. However it is
simply not "real enough" to justify slowing down other developers.
Daniel.
[1] ... but not quite cool enough that I see myself spending time on it
though!
Hi Am 26.11.25 um 13:19 schrieb Daniel Thompson: > On Tue, Nov 25, 2025 at 07:26:33AM -0800, Doug Anderson wrote: >> On Tue, Nov 25, 2025 at 5:06 AM Thomas Zimmermann <tzimmermann@suse.de> wrote: >>> <snip> >>> Therefore remove the remaining support for kdb from the DRM drivers >>> and from DRM fbdev emulation. Also remove the hooks from fbdev, as >>> there are no fbdev drivers with kdb support. >>> >>> If we ever want to address kdb support within DRM drivers, a place to >>> start would be the scanout buffers used by DRM's panic screen. These >>> use the current display mode. They can be written and flushed without >>> mode setting involved. >>> >>> Note: kdb over serial lines is not affected by this series and continues >>> to work as before. >>> >>> Thomas Zimmermann (5): >>> drm/amdgpu: Do not implement mode_set_base_atomic callback >>> drm/nouveau: Do not implement mode_set_base_atomic callback >>> drm/radeon: Do not implement mode_set_base_atomic callback >>> drm/fbdev-helper: Remove drm_fb_helper_debug_enter/_leave() >>> fbcon: Remove fb_debug_enter/_leave from struct fb_ops >> Personally, I've never worked with kdb over anything other than >> serial, so this won't bother any of my normal workflows. That being >> said, at least as of a year ago someone on the lists was talking about >> using kdb with a keyboard and (presumably) a display. You can see a >> thread here: >> >> http://lore.kernel.org/r/20241031192350.GA26688@lichtman.org >> >> Daniel may also have comments here? > TL;DR - I'm pretty relaxed about these changes... but I'd like > to know how to test the changes. > > Like Doug I only really use kdb via serial but, since I'm maintain > the thing I do occasionally test kdb works on the qemu console. I don't > do it very often though because it's a manual test! > > I'd assume that will still work since it won't involve any of the > drivers above. I'm afraid I can't double check that since patch 4 > doesn't apply cleanly in v6.18-rc7 (nor to linux-next... and neither > does the base-commit appear in linux-next). To test its effects, ignore this series and simply clear the two calbacks at [1]. This is where the debugger invokes fbcon. The series removes their implementation in the final patch. [1] https://elixir.bootlin.com/linux/v6.17.9/source/drivers/video/fbdev/core/fbcon.c#L3202 Best regards Thomas > > Anyhow, the only testing I do for kgdboc=kms,kdb is to boot an x86-64 > defconfig+kgdb+kdb kernel in qemu with something like the following > command line, which FWIW does still work: > > qemu-system-x86_64 -enable-kvm -m 1G -smp 2 \ > -kernel arch/x86/boot/bzImage \ > -monitor none -chardev stdio,id=mon,mux=on,signal=off \ > -serial chardev:mon \ > -initrd rootfs.cpio.gz \ > -append " console=tty0 console=ttyS0,115200 kgdboc=kms,kbd,ttyS0 kgdbwait" > > The reason I'm fairly relaxed about changes here is that the kbd driver > only works on PCs with legacy keyboard interfaces. If the kernel is > talking to the keyboard using USB or I2C (which almost all PCs do) then > kdb cannot be used anyway. > > So... it would be a "cool project"[1] to get kdb running on > a special interrupt-free I2C mode and with the DRM panic code so you > can do live analysis if your laptop/chomebook crashes. However it is > simply not "real enough" to justify slowing down other developers. > > > Daniel. > > > [1] ... but not quite cool enough that I see myself spending time on it > though! > -- -- Thomas Zimmermann Graphics Driver Developer SUSE Software Solutions Germany GmbH Frankenstr. 146, 90461 Nürnberg, Germany, www.suse.com GF: Jochen Jaser, Andrew McDonald, Werner Knoblich, (HRB 36809, AG Nürnberg)
On Wed, Nov 26, 2025 at 02:32:32PM +0100, Thomas Zimmermann wrote: > Hi > > Am 26.11.25 um 13:19 schrieb Daniel Thompson: > > On Tue, Nov 25, 2025 at 07:26:33AM -0800, Doug Anderson wrote: > > > On Tue, Nov 25, 2025 at 5:06 AM Thomas Zimmermann <tzimmermann@suse.de> wrote: > > > > <snip> > > > > Therefore remove the remaining support for kdb from the DRM drivers > > > > and from DRM fbdev emulation. Also remove the hooks from fbdev, as > > > > there are no fbdev drivers with kdb support. > > > > > > > > If we ever want to address kdb support within DRM drivers, a place to > > > > start would be the scanout buffers used by DRM's panic screen. These > > > > use the current display mode. They can be written and flushed without > > > > mode setting involved. > > > > > > > > Note: kdb over serial lines is not affected by this series and continues > > > > to work as before. > > > > > > > > Thomas Zimmermann (5): > > > > drm/amdgpu: Do not implement mode_set_base_atomic callback > > > > drm/nouveau: Do not implement mode_set_base_atomic callback > > > > drm/radeon: Do not implement mode_set_base_atomic callback > > > > drm/fbdev-helper: Remove drm_fb_helper_debug_enter/_leave() > > > > fbcon: Remove fb_debug_enter/_leave from struct fb_ops > > > Personally, I've never worked with kdb over anything other than > > > serial, so this won't bother any of my normal workflows. That being > > > said, at least as of a year ago someone on the lists was talking about > > > using kdb with a keyboard and (presumably) a display. You can see a > > > thread here: > > > > > > http://lore.kernel.org/r/20241031192350.GA26688@lichtman.org > > > > > > Daniel may also have comments here? > > TL;DR - I'm pretty relaxed about these changes... but I'd like > > to know how to test the changes. > > > > Like Doug I only really use kdb via serial but, since I'm maintain > > the thing I do occasionally test kdb works on the qemu console. I don't > > do it very often though because it's a manual test! > > > > I'd assume that will still work since it won't involve any of the > > drivers above. I'm afraid I can't double check that since patch 4 > > doesn't apply cleanly in v6.18-rc7 (nor to linux-next... and neither > > does the base-commit appear in linux-next). > > To test its effects, ignore this series and simply clear the two calbacks at > [1]. This is where the debugger invokes fbcon. The series removes their > implementation in the final patch. > > [1] https://elixir.bootlin.com/linux/v6.17.9/source/drivers/video/fbdev/core/fbcon.c#L3202 Thanks. Explanation in original cover letter was great and there's certainly been no harm to QEMU. Acked-by: Daniel Thompson (RISCstar) <danielt@kernel.org> Daniel.
Hi
Am 25.11.25 um 16:26 schrieb Doug Anderson:
> Hi,
>
> On Tue, Nov 25, 2025 at 5:06 AM Thomas Zimmermann <tzimmermann@suse.de> wrote:
>> Remove the rest of the kbd support from DRM. Driver support has been
>> broken for years without anyone complaining.
>>
>> Kdb cannot use regular DRM mode setting, so DRM drivers have to
>> implement an additional hook to make it work (in theory). As outlined
>> by Sima in commit 9c79e0b1d096 ("drm/fb-helper: Give up on kgdb for
>> atomic drivers") from 2017, kdb is not compatible with DRM atomic mode
>> setting. Non-atomic mode setting meanwhile has become rare.
>>
>> Only 3 DRM drivers implement the hooks for kdb support. Amdgpu and
>> nouveau use non-atomic mode setting on older devices. But both drivers
>> have switched to generic fbdev emulation, which isn't compatible with
>> kdb. Radeon still runs kdb, but it doesn't work in practice. See the
>> commits in this series for details
>>
>> Therefore remove the remaining support for kdb from the DRM drivers
>> and from DRM fbdev emulation. Also remove the hooks from fbdev, as
>> there are no fbdev drivers with kdb support.
>>
>> If we ever want to address kdb support within DRM drivers, a place to
>> start would be the scanout buffers used by DRM's panic screen. These
>> use the current display mode. They can be written and flushed without
>> mode setting involved.
>>
>> Note: kdb over serial lines is not affected by this series and continues
>> to work as before.
>>
>> Thomas Zimmermann (5):
>> drm/amdgpu: Do not implement mode_set_base_atomic callback
>> drm/nouveau: Do not implement mode_set_base_atomic callback
>> drm/radeon: Do not implement mode_set_base_atomic callback
>> drm/fbdev-helper: Remove drm_fb_helper_debug_enter/_leave()
>> fbcon: Remove fb_debug_enter/_leave from struct fb_ops
> Personally, I've never worked with kdb over anything other than
> serial, so this won't bother any of my normal workflows. That being
> said, at least as of a year ago someone on the lists was talking about
> using kdb with a keyboard and (presumably) a display. You can see a
> thread here:
>
> http://lore.kernel.org/r/20241031192350.GA26688@lichtman.org
I wonder which driver or kernel that person was using. None of the
current drivers would be working.
Best regards
Thomas
>
> Daniel may also have comments here?
>
> -Doug
>
--
--
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Frankenstr. 146, 90461 Nürnberg, Germany, www.suse.com
GF: Jochen Jaser, Andrew McDonald, Werner Knoblich, (HRB 36809, AG Nürnberg)
On 11/25/25 13:52, Thomas Zimmermann wrote:
> Remove the rest of the kbd support from DRM. Driver support has been
> broken for years without anyone complaining.
>
> Kdb cannot use regular DRM mode setting, so DRM drivers have to
> implement an additional hook to make it work (in theory). As outlined
> by Sima in commit 9c79e0b1d096 ("drm/fb-helper: Give up on kgdb for
> atomic drivers") from 2017, kdb is not compatible with DRM atomic mode
> setting. Non-atomic mode setting meanwhile has become rare.
>
> Only 3 DRM drivers implement the hooks for kdb support. Amdgpu and
> nouveau use non-atomic mode setting on older devices. But both drivers
> have switched to generic fbdev emulation, which isn't compatible with
> kdb. Radeon still runs kdb, but it doesn't work in practice. See the
> commits in this series for details
Amdgpu is heavily pushing on switching to atomic for older GPUs as well. Timur and our DC guys have made quite some progress on that recently.
Feel free to add Acked-by: Christian König <christian.koenig@amd.com> to the amdgpu and radeon changes.
Regards,
Christian.
>
> Therefore remove the remaining support for kdb from the DRM drivers
> and from DRM fbdev emulation. Also remove the hooks from fbdev, as
> there are no fbdev drivers with kdb support.
>
> If we ever want to address kdb support within DRM drivers, a place to
> start would be the scanout buffers used by DRM's panic screen. These
> use the current display mode. They can be written and flushed without
> mode setting involved.
>
> Note: kdb over serial lines is not affected by this series and continues
> to work as before.
>
> Thomas Zimmermann (5):
> drm/amdgpu: Do not implement mode_set_base_atomic callback
> drm/nouveau: Do not implement mode_set_base_atomic callback
> drm/radeon: Do not implement mode_set_base_atomic callback
> drm/fbdev-helper: Remove drm_fb_helper_debug_enter/_leave()
> fbcon: Remove fb_debug_enter/_leave from struct fb_ops
>
> Documentation/process/debugging/kgdb.rst | 28 -----
> drivers/gpu/drm/amd/amdgpu/dce_v10_0.c | 35 ++-----
> drivers/gpu/drm/amd/amdgpu/dce_v6_0.c | 35 ++-----
> drivers/gpu/drm/amd/amdgpu/dce_v8_0.c | 35 ++-----
> drivers/gpu/drm/drm_fb_helper.c | 108 --------------------
> drivers/gpu/drm/nouveau/dispnv04/crtc.c | 24 +----
> drivers/gpu/drm/radeon/atombios_crtc.c | 74 ++++----------
> drivers/gpu/drm/radeon/radeon_legacy_crtc.c | 23 ++---
> drivers/gpu/drm/radeon/radeon_mode.h | 10 +-
> drivers/video/fbdev/core/fbcon.c | 24 -----
> drivers/video/fbdev/core/fbcon.h | 1 -
> include/drm/drm_fb_helper.h | 21 ----
> include/drm/drm_modeset_helper_vtables.h | 23 -----
> include/linux/fb.h | 4 -
> 14 files changed, 63 insertions(+), 382 deletions(-)
>
>
> base-commit: 0a21e96e0b6840d2a4e0b45a957679eeddeb4362
Hi
Am 25.11.25 um 14:16 schrieb Christian König:
> On 11/25/25 13:52, Thomas Zimmermann wrote:
>> Remove the rest of the kbd support from DRM. Driver support has been
>> broken for years without anyone complaining.
>>
>> Kdb cannot use regular DRM mode setting, so DRM drivers have to
>> implement an additional hook to make it work (in theory). As outlined
>> by Sima in commit 9c79e0b1d096 ("drm/fb-helper: Give up on kgdb for
>> atomic drivers") from 2017, kdb is not compatible with DRM atomic mode
>> setting. Non-atomic mode setting meanwhile has become rare.
>>
>> Only 3 DRM drivers implement the hooks for kdb support. Amdgpu and
>> nouveau use non-atomic mode setting on older devices. But both drivers
>> have switched to generic fbdev emulation, which isn't compatible with
>> kdb. Radeon still runs kdb, but it doesn't work in practice. See the
>> commits in this series for details
> Amdgpu is heavily pushing on switching to atomic for older GPUs as well. Timur and our DC guys have made quite some progress on that recently.
From what I've seen, I really like the work they are doing there.
>
> Feel free to add Acked-by: Christian König <christian.koenig@amd.com> to the amdgpu and radeon changes.
Thanks.
Best regards
Thomas
>
> Regards,
> Christian.
>
>> Therefore remove the remaining support for kdb from the DRM drivers
>> and from DRM fbdev emulation. Also remove the hooks from fbdev, as
>> there are no fbdev drivers with kdb support.
>>
>> If we ever want to address kdb support within DRM drivers, a place to
>> start would be the scanout buffers used by DRM's panic screen. These
>> use the current display mode. They can be written and flushed without
>> mode setting involved.
>>
>> Note: kdb over serial lines is not affected by this series and continues
>> to work as before.
>>
>> Thomas Zimmermann (5):
>> drm/amdgpu: Do not implement mode_set_base_atomic callback
>> drm/nouveau: Do not implement mode_set_base_atomic callback
>> drm/radeon: Do not implement mode_set_base_atomic callback
>> drm/fbdev-helper: Remove drm_fb_helper_debug_enter/_leave()
>> fbcon: Remove fb_debug_enter/_leave from struct fb_ops
>>
>> Documentation/process/debugging/kgdb.rst | 28 -----
>> drivers/gpu/drm/amd/amdgpu/dce_v10_0.c | 35 ++-----
>> drivers/gpu/drm/amd/amdgpu/dce_v6_0.c | 35 ++-----
>> drivers/gpu/drm/amd/amdgpu/dce_v8_0.c | 35 ++-----
>> drivers/gpu/drm/drm_fb_helper.c | 108 --------------------
>> drivers/gpu/drm/nouveau/dispnv04/crtc.c | 24 +----
>> drivers/gpu/drm/radeon/atombios_crtc.c | 74 ++++----------
>> drivers/gpu/drm/radeon/radeon_legacy_crtc.c | 23 ++---
>> drivers/gpu/drm/radeon/radeon_mode.h | 10 +-
>> drivers/video/fbdev/core/fbcon.c | 24 -----
>> drivers/video/fbdev/core/fbcon.h | 1 -
>> include/drm/drm_fb_helper.h | 21 ----
>> include/drm/drm_modeset_helper_vtables.h | 23 -----
>> include/linux/fb.h | 4 -
>> 14 files changed, 63 insertions(+), 382 deletions(-)
>>
>>
>> base-commit: 0a21e96e0b6840d2a4e0b45a957679eeddeb4362
--
--
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Frankenstr. 146, 90461 Nürnberg, Germany, www.suse.com
GF: Jochen Jaser, Andrew McDonald, Werner Knoblich, (HRB 36809, AG Nürnberg)
Am 25.11.25 um 13:52 schrieb Thomas Zimmermann:
> Remove the rest of the kbd support from DRM. Driver support has been
s/kbd/kdb/g as in 'kernel debugger'
> broken for years without anyone complaining.
>
> Kdb cannot use regular DRM mode setting, so DRM drivers have to
> implement an additional hook to make it work (in theory). As outlined
> by Sima in commit 9c79e0b1d096 ("drm/fb-helper: Give up on kgdb for
> atomic drivers") from 2017, kdb is not compatible with DRM atomic mode
> setting. Non-atomic mode setting meanwhile has become rare.
>
> Only 3 DRM drivers implement the hooks for kdb support. Amdgpu and
> nouveau use non-atomic mode setting on older devices. But both drivers
> have switched to generic fbdev emulation, which isn't compatible with
> kdb. Radeon still runs kdb, but it doesn't work in practice. See the
> commits in this series for details
>
> Therefore remove the remaining support for kdb from the DRM drivers
> and from DRM fbdev emulation. Also remove the hooks from fbdev, as
> there are no fbdev drivers with kdb support.
>
> If we ever want to address kdb support within DRM drivers, a place to
> start would be the scanout buffers used by DRM's panic screen. These
> use the current display mode. They can be written and flushed without
> mode setting involved.
>
> Note: kdb over serial lines is not affected by this series and continues
> to work as before.
>
> Thomas Zimmermann (5):
> drm/amdgpu: Do not implement mode_set_base_atomic callback
> drm/nouveau: Do not implement mode_set_base_atomic callback
> drm/radeon: Do not implement mode_set_base_atomic callback
> drm/fbdev-helper: Remove drm_fb_helper_debug_enter/_leave()
> fbcon: Remove fb_debug_enter/_leave from struct fb_ops
>
> Documentation/process/debugging/kgdb.rst | 28 -----
> drivers/gpu/drm/amd/amdgpu/dce_v10_0.c | 35 ++-----
> drivers/gpu/drm/amd/amdgpu/dce_v6_0.c | 35 ++-----
> drivers/gpu/drm/amd/amdgpu/dce_v8_0.c | 35 ++-----
> drivers/gpu/drm/drm_fb_helper.c | 108 --------------------
> drivers/gpu/drm/nouveau/dispnv04/crtc.c | 24 +----
> drivers/gpu/drm/radeon/atombios_crtc.c | 74 ++++----------
> drivers/gpu/drm/radeon/radeon_legacy_crtc.c | 23 ++---
> drivers/gpu/drm/radeon/radeon_mode.h | 10 +-
> drivers/video/fbdev/core/fbcon.c | 24 -----
> drivers/video/fbdev/core/fbcon.h | 1 -
> include/drm/drm_fb_helper.h | 21 ----
> include/drm/drm_modeset_helper_vtables.h | 23 -----
> include/linux/fb.h | 4 -
> 14 files changed, 63 insertions(+), 382 deletions(-)
>
>
> base-commit: 0a21e96e0b6840d2a4e0b45a957679eeddeb4362
--
--
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Frankenstr. 146, 90461 Nürnberg, Germany, www.suse.com
GF: Jochen Jaser, Andrew McDonald, Werner Knoblich, (HRB 36809, AG Nürnberg)
© 2016 - 2025 Red Hat, Inc.