[PATCH] drm/virtio: Lock the VGA resources during initialization

Dmitry Osipenko dmitry.osipenko at collabora.com
Thu Jan 9 14:33:29 UTC 2025


On 12/11/24 09:43, Vivek Kasireddy wrote:
> +static int __init virtio_gpu_driver_init(void)
> +{
> +	struct pci_dev *pdev;
> +	int ret;
> +
> +	pdev = pci_get_device(PCI_VENDOR_ID_REDHAT_QUMRANET,
> +			      PCI_DEVICE_ID_VIRTIO_GPU,
> +			      NULL);
> +	if (!pdev)
> +		return -ENODEV;

I realized that we likely shouldn't assume that virtio-gpu is always on
PCI bus. It could be MMIO device, AFAICT. And then we shouldn't error
out if PCI not found.

-- 
Best regards,
Dmitry


More information about the dri-devel mailing list