]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
drm/vboxvideo: Add PCI region request
authorPhilipp Stanner <pstanner@redhat.com>
Mon, 29 Jul 2024 09:36:27 +0000 (11:36 +0200)
committerBjorn Helgaas <bhelgaas@google.com>
Fri, 9 Aug 2024 20:08:26 +0000 (15:08 -0500)
vboxvideo currently does not reserve its PCI BAR through a region request.

Implement the request through the managed function pcim_request_region().

Link: https://lore.kernel.org/r/20240729093625.17561-5-pstanner@redhat.com
Signed-off-by: Philipp Stanner <pstanner@redhat.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Tested-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Hans de Goede <hdegoede@redhat.com>
drivers/gpu/drm/vboxvideo/vbox_main.c

index d4ade9325401d77701ad47c0834292280c98493f..7f686a0190e6376cc012bd0496937a2ed130d1c3 100644 (file)
@@ -114,6 +114,10 @@ int vbox_hw_init(struct vbox_private *vbox)
 
        DRM_INFO("VRAM %08x\n", vbox->full_vram_size);
 
+       ret = pcim_request_region(pdev, 0, "vboxvideo");
+       if (ret)
+               return ret;
+
        /* Map guest-heap at end of vram */
        vbox->guest_heap = pcim_iomap_range(pdev, 0,
                        GUEST_HEAP_OFFSET(vbox), GUEST_HEAP_SIZE);