Re: F42 Change Proposal: Enable Drm Panic (system-wide)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





On 16/07/2024 14:53, Neal Gompa wrote:
On Tue, Jul 16, 2024 at 8:35 AM Jocelyn Falempe <jfalempe@xxxxxxxxxx> wrote:



On 16/07/2024 14:05, Neal Gompa wrote:
On Tue, Jul 16, 2024 at 7:49 AM Jocelyn Falempe <jfalempe@xxxxxxxxxx> wrote:

I've made a test kernel build with drm_panic enabled (and VT_CONSOLE
disabled):

https://koji.fedoraproject.org/koji/taskinfo?taskID=120544794

I've backported a few patches, that are not in v6.10, like:
short panic description:
https://patchwork.freedesktop.org/series/135356/
kmsg panic_screen:
https://patchwork.freedesktop.org/series/134286/
draft nouveau support (tested on 1650X, might be garbage on other GPU):
https://patchwork.freedesktop.org/series/133963/
And also virtio-gpu support, so you can test it easily on a VM.

To install the test kernel, download the rpms kernel, kernel-core,
kernel-modules, kernel-modules-core, kernel-modules-extra, and install
them with dnf.
It's a Fedora rawhide kernel, but can be installed on F40.

i915, amdgpu, and nvidia are not yet supported, so you need to blacklist
them, in order to use simpledrm, if you want to see the panic screen.


Do you expect to see the rest of the drivers supported by the time
Fedora 42 rolls around? Because if it only works with nouveau, it's
probably not worth enabling.


I think it's a bit of a chicken and egg problem. If no distro enables
it, there will be little incentive for the drivers to add support.

Also, on all hardware, simpledrm is used at boot, so common kernel panic
like "unable to mount /", or "failed to execute /init", will use drm_panic.

FYI, I opened an issue for amdgpu here:
https://gitlab.freedesktop.org/drm/amd/-/issues/3340

And for i915 here:
https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/10954


Forgive me for the potentially dumb question, but why does every
driver have to individually implement support for it? DRM is a
framework, right? So how come it's not implemented in a way such that
all DRM drivers get it "for free"?

My first RFC used the drm client API, so it was GPU agnostic.
The problem is that it is not safe to use it in a panic handler.
The DRM framework uses a lot of locks, kmalloc(), workqueues, ... that you can't use in a panic handler. Any call to sleep, will hang the CPU.

Also each hardware is specific, for example on nouveau, only the GPU writes to the framebuffer. But when you panic, you can't send GPU commands, because you don't know in which state the GPU is, so you have to write directly to the framebuffer from the CPU. And it becomes tricky because the GPU uses tiling for best performance, and you have to do the same from the CPU. (and each GPU has its own tiling format, so it can't be shared with other drivers).

The only case where it works well, is for drivers using GEM_DMA, there is a generic function to make them work for drm_panic, that allowed to add support for imx, tidss, renesas rcar-du and renesas shmobile, with minimal code change (those are ARM display controllers):
https://patchwork.freedesktop.org/series/134923/
https://patchwork.freedesktop.org/series/134084/
https://patchwork.freedesktop.org/series/134083/

Best regards,

--

Jocelyn

--
_______________________________________________
devel mailing list -- devel@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/devel@xxxxxxxxxxxxxxxxxxxxxxx
Do not reply to spam, report it: https://pagure.io/fedora-infrastructure/new_issue




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Users]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]

  Powered by Linux