From: Philipp Stanner <pstanner@redhat.com>
To: Hans de Goede <hdegoede@redhat.com>,
Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
Maxime Ripard <mripard@kernel.org>,
Thomas Zimmermann <tzimmermann@suse.de>,
David Airlie <airlied@gmail.com>, Daniel Vetter <daniel@ffwll.ch>,
Bjorn Helgaas <bhelgaas@google.com>
Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org,
linux-pci@vger.kernel.org, Philipp Stanner <pstanner@redhat.com>
Subject: [PATCH 2/2] drm/vboxvideo: Add PCI region request
Date: Mon, 29 Jul 2024 11:36:27 +0200 [thread overview]
Message-ID: <20240729093625.17561-5-pstanner@redhat.com> (raw)
In-Reply-To: <20240729093625.17561-2-pstanner@redhat.com>
vboxvideo currently does not reserve its PCI BAR through a region
request.
Implement the request through the managed function
pcim_request_region().
Signed-off-by: Philipp Stanner <pstanner@redhat.com>
---
drivers/gpu/drm/vboxvideo/vbox_main.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/gpu/drm/vboxvideo/vbox_main.c b/drivers/gpu/drm/vboxvideo/vbox_main.c
index d4ade9325401..7f686a0190e6 100644
--- a/drivers/gpu/drm/vboxvideo/vbox_main.c
+++ b/drivers/gpu/drm/vboxvideo/vbox_main.c
@@ -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);
--
2.45.2
next prev parent reply other threads:[~2024-07-29 9:37 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-29 9:36 [PATCH 0/2] Use pcim_request_region() in vboxvideo Philipp Stanner
2024-07-29 9:36 ` [PATCH 1/2] PCI: Make pcim_request_region() a public function Philipp Stanner
2024-07-29 9:36 ` Philipp Stanner [this message]
2024-07-31 19:36 ` [PATCH 0/2] Use pcim_request_region() in vboxvideo Bjorn Helgaas
2024-08-01 15:15 ` Hans de Goede
2024-08-01 15:14 ` Hans de Goede
2024-08-01 17:04 ` Bjorn Helgaas
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240729093625.17561-5-pstanner@redhat.com \
--to=pstanner@redhat.com \
--cc=airlied@gmail.com \
--cc=bhelgaas@google.com \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=hdegoede@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=maarten.lankhorst@linux.intel.com \
--cc=mripard@kernel.org \
--cc=tzimmermann@suse.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox