Message ID | 20230111154112.90575-5-daniel.vetter@ffwll.ch (mailing list archive) |
---|---|
State | Handled Elsewhere |
Headers | show |
Series | [01/11] drm/ast: Use drm_aperture_remove_conflicting_pci_framebuffers | expand |
Hi Am 11.01.23 um 16:41 schrieb Daniel Vetter: > Otherwise it's bit silly, and we might throw out the driver for the > screen the user is actually looking at. I haven't found a bug report > for this case yet, but we did get bug reports for the analog case > where we're throwing out the efifb driver. > > References: https://bugzilla.kernel.org/show_bug.cgi?id=216303 > Signed-off-by: Daniel Vetter <daniel.vetter@intel.com> > Cc: Thomas Zimmermann <tzimmermann@suse.de> > Cc: Javier Martinez Canillas <javierm@redhat.com> > Cc: Helge Deller <deller@gmx.de> > Cc: linux-fbdev@vger.kernel.org > --- > drivers/video/aperture.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/drivers/video/aperture.c b/drivers/video/aperture.c > index 3d8c925c7365..6f351a58f6c6 100644 > --- a/drivers/video/aperture.c > +++ b/drivers/video/aperture.c > @@ -341,6 +341,9 @@ int aperture_remove_conflicting_pci_devices(struct pci_dev *pdev, const char *na > return ret; > } > > + if (!primary) > + return 0; > + The original code from fbdev didn't do this, so this code didn't either. It appears more to be a special case than an early-out branch. So can we write it as if (primary) { // kick_vgacon } ? Best regards Thomas > /* > * WARNING: Apparently we must kick fbdev drivers before vgacon, > * otherwise the vga fbdev driver falls over.
On Wed, Jan 11, 2023 at 05:03:02PM +0100, Thomas Zimmermann wrote: > Hi > > Am 11.01.23 um 16:41 schrieb Daniel Vetter: > > Otherwise it's bit silly, and we might throw out the driver for the > > screen the user is actually looking at. I haven't found a bug report > > for this case yet, but we did get bug reports for the analog case > > where we're throwing out the efifb driver. > > > > References: https://bugzilla.kernel.org/show_bug.cgi?id=216303 > > Signed-off-by: Daniel Vetter <daniel.vetter@intel.com> > > Cc: Thomas Zimmermann <tzimmermann@suse.de> > > Cc: Javier Martinez Canillas <javierm@redhat.com> > > Cc: Helge Deller <deller@gmx.de> > > Cc: linux-fbdev@vger.kernel.org > > --- > > drivers/video/aperture.c | 3 +++ > > 1 file changed, 3 insertions(+) > > > > diff --git a/drivers/video/aperture.c b/drivers/video/aperture.c > > index 3d8c925c7365..6f351a58f6c6 100644 > > --- a/drivers/video/aperture.c > > +++ b/drivers/video/aperture.c > > @@ -341,6 +341,9 @@ int aperture_remove_conflicting_pci_devices(struct pci_dev *pdev, const char *na > > return ret; > > } > > + if (!primary) > > + return 0; > > + > > The original code from fbdev didn't do this, so this code didn't either. > > It appears more to be a special case than an early-out branch. So can we > write it as Yeah I think this was a mistake going way back to when I added this to i915 originally. It is a real change, but also I guess the people who have machines without efifb or vesafb are ... really not many :-) Iirc you had some very funny kernels going way back when vgacon was considered the only safe choice to even hit this stuff. > if (primary) { > // kick_vgacon > } Yeah, but next patch adds the vga aperture, and then I think it makes a bit more sense. -Daniel > > ? > > Best regards > Thomas > > > /* > > * WARNING: Apparently we must kick fbdev drivers before vgacon, > > * otherwise the vga fbdev driver falls over. > > -- > Thomas Zimmermann > Graphics Driver Developer > SUSE Software Solutions Germany GmbH > Maxfeldstr. 5, 90409 Nürnberg, Germany > (HRB 36809, AG Nürnberg) > Geschäftsführer: Ivo Totev
diff --git a/drivers/video/aperture.c b/drivers/video/aperture.c index 3d8c925c7365..6f351a58f6c6 100644 --- a/drivers/video/aperture.c +++ b/drivers/video/aperture.c @@ -341,6 +341,9 @@ int aperture_remove_conflicting_pci_devices(struct pci_dev *pdev, const char *na return ret; } + if (!primary) + return 0; + /* * WARNING: Apparently we must kick fbdev drivers before vgacon, * otherwise the vga fbdev driver falls over.
Otherwise it's bit silly, and we might throw out the driver for the screen the user is actually looking at. I haven't found a bug report for this case yet, but we did get bug reports for the analog case where we're throwing out the efifb driver. References: https://bugzilla.kernel.org/show_bug.cgi?id=216303 Signed-off-by: Daniel Vetter <daniel.vetter@intel.com> Cc: Thomas Zimmermann <tzimmermann@suse.de> Cc: Javier Martinez Canillas <javierm@redhat.com> Cc: Helge Deller <deller@gmx.de> Cc: linux-fbdev@vger.kernel.org --- drivers/video/aperture.c | 3 +++ 1 file changed, 3 insertions(+)