]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
drm/virtio: Don't return error if virtio-gpu PCI dev is not found
authorVivek Kasireddy <vivek.kasireddy@intel.com>
Tue, 14 Jan 2025 07:57:59 +0000 (23:57 -0800)
committerDmitry Osipenko <dmitry.osipenko@collabora.com>
Sun, 19 Jan 2025 12:24:27 +0000 (15:24 +0300)
commit6568d423cb3000789b2b8493049883fcec09c329
tree15f37005a4f52c4240e41480cccdfc4f49175bc5
parentc03dd019f0b56c40f42fa0e7785eaa109e0bdcd6
drm/virtio: Don't return error if virtio-gpu PCI dev is not found

While fixing a shared VGA resource ownership issue, commit 5dd8b536bbda
("drm/virtio: Lock the VGA resources during initialization") wrongly
assumed that there is always a PCI device associated with virtio-gpu
and it would return error if this device is not found during init.

This is incorrect, as virtio-gpu can be operated in MMIO mode (M68K)
where a PCI device would probably not be created for it. Therefore,
fix this issue by not erroring out if the associated PCI device is
not found during initialization.

Fixes: 5dd8b536bbda ("drm/virtio: Lock the VGA resources during initialization")
Suggested-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
Cc: Gerd Hoffmann <kraxel@redhat.com>
Cc: Gurchetan Singh <gurchetansingh@chromium.org>
Cc: Chia-I Wu <olvaffe@gmail.com>
Signed-off-by: Vivek Kasireddy <vivek.kasireddy@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20250114075759.2616551-1-vivek.kasireddy@intel.com
Reviewed-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
Signed-off-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20250114075759.2616551-1-vivek.kasireddy@intel.com
drivers/gpu/drm/virtio/virtgpu_drv.c