From: "Christian König" <christian.koenig@amd.com>
To: Zack Rusin <zack.rusin@broadcom.com>,
Thomas Zimmermann <tzimmermann@suse.de>
Cc: dri-devel@lists.freedesktop.org,
"Alex Deucher" <alexander.deucher@amd.com>,
amd-gfx@lists.freedesktop.org, "Ard Biesheuvel" <ardb@kernel.org>,
"Ce Sun" <cesun102@amd.com>, "Chia-I Wu" <olvaffe@gmail.com>,
"Danilo Krummrich" <dakr@kernel.org>,
"Dave Airlie" <airlied@redhat.com>,
"Deepak Rawat" <drawat.floss@gmail.com>,
"Dmitry Osipenko" <dmitry.osipenko@collabora.com>,
"Gerd Hoffmann" <kraxel@redhat.com>,
"Gurchetan Singh" <gurchetansingh@chromium.org>,
"Hans de Goede" <hansg@kernel.org>,
"Hawking Zhang" <Hawking.Zhang@amd.com>,
"Helge Deller" <deller@gmx.de>,
intel-gfx@lists.freedesktop.org, intel-xe@lists.freedesktop.org,
"Jani Nikula" <jani.nikula@linux.intel.com>,
"Javier Martinez Canillas" <javierm@redhat.com>,
"Jocelyn Falempe" <jfalempe@redhat.com>,
"Joonas Lahtinen" <joonas.lahtinen@linux.intel.com>,
"Lijo Lazar" <lijo.lazar@amd.com>,
linux-efi@vger.kernel.org, linux-fbdev@vger.kernel.org,
linux-hyperv@vger.kernel.org, linux-kernel@vger.kernel.org,
"Lucas De Marchi" <lucas.demarchi@intel.com>,
"Lyude Paul" <lyude@redhat.com>,
"Maarten Lankhorst" <maarten.lankhorst@linux.intel.com>,
"Mario Limonciello (AMD)" <superm1@kernel.org>,
"Mario Limonciello" <mario.limonciello@amd.com>,
"Maxime Ripard" <mripard@kernel.org>,
nouveau@lists.freedesktop.org,
"Rodrigo Vivi" <rodrigo.vivi@intel.com>,
"Simona Vetter" <simona@ffwll.ch>,
spice-devel@lists.freedesktop.org,
"Thomas Hellström" <thomas.hellstrom@linux.intel.com>,
"Timur Kristóf" <timur.kristof@gmail.com>,
"Tvrtko Ursulin" <tursulin@ursulin.net>,
virtualization@lists.linux.dev,
"Vitaly Prosyak" <vitaly.prosyak@amd.com>
Subject: Re: [PATCH 00/12] Recover sysfb after DRM probe failure
Date: Mon, 19 Jan 2026 11:03:00 +0100 [thread overview]
Message-ID: <8ae98c9c-9cea-4c31-b888-9e3fcda42d86@amd.com> (raw)
In-Reply-To: <CABQX2QM0_6DJtrahJS7x9iF_wcSZRc4dohEiPnMCtAg7Vt7JPQ@mail.gmail.com>
On 1/17/26 07:02, Zack Rusin wrote:
> On Fri, Jan 16, 2026 at 2:58 AM Thomas Zimmermann <tzimmermann@suse.de> wrote:
>>
>> Hi
>>
>> Am 16.01.26 um 04:59 schrieb Zack Rusin:
>>> On Thu, Jan 15, 2026 at 6:02 AM Thomas Zimmermann <tzimmermann@suse.de> wrote:
>>>> That's really not going to work. For example, in the current series, you
>>>> invoke devm_aperture_remove_conflicting_pci_devices_done() after
>>>> drm_mode_reset(), drm_dev_register() and drm_client_setup().
>>> That's perfectly fine,
>>> devm_aperture_remove_conflicting_pci_devices_done is removing the
>>> reload behavior not doing anything.
>>>
>>> This series, essentially, just adds a "defer" statement to
>>> aperture_remove_conflicting_pci_devices that says
>>>
>>> "reload sysfb if this driver unloads".
>>>
>>> devm_aperture_remove_conflicting_pci_devices_done just cancels that defer.
>>
>> Exactly. And if that reload happens after the hardware state has been
>> changed, the result is undefined.
>
> This is all predicated on drivers actually cleaning up after
> themselves. I don't think any amount of good will or api design is
> going to fix device specific state mismatches.
>
>> The current recovery/reload is not reliable in any case. A number of
>> high-profile devs have also said that it doesn't work with their driver.
>> The same is true for ast. So the current approach is not going to happen.
>>
>>> There also might be the case of some crazy behavior, e.g. pci bar
>>> resize in the driver makes the vga hardware crash or something, in
>>> which case, yea, we should definitely skip this patch, at least until
>>> those drivers properly cleanup on exit.
>>
>> There's nothing crazy here. It's standard probing code.
>>
>> If you want to to move forward, my suggestion is to look at the proposal
>> with the aperture_funcs callbacks that control sysfb device access. And
>> from there, build a full prototype with one or two drivers.
>
> I don't think that approach is going to work. I don't think there's
> anything that can be done if drivers didn't cleanup everything they've
> done that might have broken sysfb on unload. I'm going to drop it
> then, it's obviously a shame because it works fine with virtualized
> drivers and they're ones that would likely profit from this the most
> but I'm sceptical that I could do full system state set reset in a
> generalized fashion for hw drivers or that the work required would be
> worth the payoff.
Well at least for PCI devices you could try doing a function level reset to get the HW back into some usable state.
This does *not* work for AMD HW since we have HW/FW bugs, but at least for your virtualized use case it might work.
All you need then is an EFI, Vesa or int10 call to re-init the HW to the pre-driver load setup.
I know that is not the easiest thing to do, but still better than a black screen.
Regards,
Christian.
>
> z
prev parent reply other threads:[~2026-01-19 10:03 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-29 21:58 [PATCH 00/12] Recover sysfb after DRM probe failure Zack Rusin
2025-12-29 21:58 ` [PATCH 01/12] video/aperture: Add sysfb restore on " Zack Rusin
2026-01-09 10:34 ` [PATCH 00/12] Recover sysfb after " Thomas Zimmermann
2026-01-10 4:52 ` Zack Rusin
2026-01-15 11:02 ` Thomas Zimmermann
2026-01-15 14:39 ` Christian König
2026-01-15 14:54 ` Thomas Zimmermann
2026-01-15 15:58 ` Christian König
2026-01-15 15:10 ` Ville Syrjälä
2026-01-15 16:36 ` Gerd Hoffmann
2026-01-15 16:39 ` Mario Limonciello
2026-01-16 7:39 ` Thomas Zimmermann
2026-01-16 3:59 ` Zack Rusin
2026-01-16 7:58 ` Thomas Zimmermann
2026-01-17 6:02 ` Zack Rusin
2026-01-19 10:03 ` Christian König [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=8ae98c9c-9cea-4c31-b888-9e3fcda42d86@amd.com \
--to=christian.koenig@amd.com \
--cc=Hawking.Zhang@amd.com \
--cc=airlied@redhat.com \
--cc=alexander.deucher@amd.com \
--cc=amd-gfx@lists.freedesktop.org \
--cc=ardb@kernel.org \
--cc=cesun102@amd.com \
--cc=dakr@kernel.org \
--cc=deller@gmx.de \
--cc=dmitry.osipenko@collabora.com \
--cc=drawat.floss@gmail.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=gurchetansingh@chromium.org \
--cc=hansg@kernel.org \
--cc=intel-gfx@lists.freedesktop.org \
--cc=intel-xe@lists.freedesktop.org \
--cc=jani.nikula@linux.intel.com \
--cc=javierm@redhat.com \
--cc=jfalempe@redhat.com \
--cc=joonas.lahtinen@linux.intel.com \
--cc=kraxel@redhat.com \
--cc=lijo.lazar@amd.com \
--cc=linux-efi@vger.kernel.org \
--cc=linux-fbdev@vger.kernel.org \
--cc=linux-hyperv@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lucas.demarchi@intel.com \
--cc=lyude@redhat.com \
--cc=maarten.lankhorst@linux.intel.com \
--cc=mario.limonciello@amd.com \
--cc=mripard@kernel.org \
--cc=nouveau@lists.freedesktop.org \
--cc=olvaffe@gmail.com \
--cc=rodrigo.vivi@intel.com \
--cc=simona@ffwll.ch \
--cc=spice-devel@lists.freedesktop.org \
--cc=superm1@kernel.org \
--cc=thomas.hellstrom@linux.intel.com \
--cc=timur.kristof@gmail.com \
--cc=tursulin@ursulin.net \
--cc=tzimmermann@suse.de \
--cc=virtualization@lists.linux.dev \
--cc=vitaly.prosyak@amd.com \
--cc=zack.rusin@broadcom.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