Daniel Vetter <daniel@xxxxxxxx> writes: > On Wed, Apr 05, 2023 at 04:32:19PM +0200, Thomas Zimmermann wrote: [...] >> > > > /* >> > > > * WARNING: Apparently we must kick fbdev drivers before vgacon, >> > > > * otherwise the vga fbdev driver falls over. >> > > > */ >> > > > ret = vga_remove_vgacon(pdev); >> > >> > This isn't enough, we also nuke stuff that's mapping the vga fb range. Ah, also need aperture_detach_devices(VGA_FB_PHYS_BASE, VGA_FB_PHYS_SIZE) then. [...] >> int aperture_remove_legacy_vga_devices(struct pci_dev *pdev) >> { >> aperture_detach_devices(VGA_FB_PHYS_BASE, VGA_FB_PHYS_SIZE); >> >> return vga_remove_vgacon(pdev); >> } >> >> And that can be called from gma500 and the pci aperture helper. > > But you still pass a pci_dev to that helper. Which just doesn't make any > sense to me (assuming your entire point is that this isn't just a normal > pci device but some special legacy vga thing), but if we go with (void) > then there's more refactoring to do because the vga_remove_vgacon also > wants a pdev. > > All so that we don't call aperture_detach_devices() on a bunch of pci > bars, which apparently is not problem for any other driver, but absolutely > is a huge problem for gma500 somehow. > > I don't understand why. > Yeah, agreed that if vga_remove_vgacon() isn't enough and another helper is needed then starts to get a little silly. Maybe one option is to add a 3rd param to aperture_remove_conflicting_pci_devices() and skip the logic to iterate over PCI bars and call aperture_remove_conflicting_devices() ? > Consider this me throwing in the towel. If you&Javier are convinced this > makes sense please type it up and merge it, but I'm not going to type > something that just doesn't make sense to me. Honestly, I would just go with the double drm_aperture_remove_*() helper calls (your original patch) unless that causes real issues. There is no point on blocking all your series just for this IMO. Then latter if Thomas has strong opinions can send a follow-up patch for the gma500 driver and the aperture helpers. > -Daniel > -- Best regards, Javier Martinez Canillas Core Platforms Red Hat