[PATCH 06/11] fbdev: Remove conflicting devices on PCI bus

Thomas Zimmermann tzimmermann at suse.de
Fri Jul 15 11:52:55 UTC 2022


Hi

Am 11.07.22 um 13:13 schrieb Javier Martinez Canillas:
> On 7/7/22 17:39, Thomas Zimmermann wrote:
>> Remove firmware devices on the PCI bus, by calling
>> aperture_remove_conflicting_pci_devices() in the probe function of
>> each related fbdev driver. iSo far, most of these drivers did not
>> remove conflicting VESA or EFI devices, or outride failed for
>> resource conflicts (i.e., matroxfb.) This must have been broken
>> for quite some time.
>>
>> Signed-off-by: Thomas Zimmermann <tzimmermann at suse.de>
>> ---
> 
> [...]
> 
>> @@ -949,6 +950,10 @@ static int ark_pci_probe(struct pci_dev *dev, const struct pci_device_id *id)
>>   	int rc;
>>   	u8 regval;
>>   
>> +	rc = aperture_remove_conflicting_pci_devices(dev, "arkfb");
>> +	if (rc < 0)
>> +		return rc;
>> +
> 
> I wonder if we could think of a trick to avoid open coding the same check in
> all drivers. Maybe a combination of using KBUILD_MODNAME for the name and
> a probe callback wrapper or something ?

Originally, I tried to hack this into register_framebuffer(), where the 
removal was originally located. But that's too late as there is 
conflicting resource access in most driver's probe function. The top of 
the probe function is the only place where this call can realistically 
be located. It's the same rule as with DRM drivers: the firmware driver 
needs to be gone before the native driver touches hardware.

Best regards
Thomas

> 
> But probably not worth to invest more in the fbdev drivers and could be done
> as a follow-up anyways if someone feels like it.
> 
> Reviewed-by: Javier Martinez Canillas <javierm at redhat.com>
> 

-- 
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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_signature
Type: application/pgp-signature
Size: 840 bytes
Desc: OpenPGP digital signature
URL: <https://lists.freedesktop.org/archives/dri-devel/attachments/20220715/bcb4730f/attachment-0001.sig>


More information about the dri-devel mailing list