Skip to content

Commit

Permalink
drm/vboxvideo: Add PCI region request
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Philipp Stanner authored and Bjorn Helgaas committed Aug 9, 2024
1 parent 7ff7509 commit 89121e5
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions drivers/gpu/drm/vboxvideo/vbox_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 89121e5

Please sign in to comment.