[PATCH 5/6] [wip] drm/qxl: request regions

Gerd Hoffmann kraxel at redhat.com
Fri Oct 11 10:01:12 CEST 2013


So they show up in /proc/{iomem,ioports}.

No error checking (yet?).  Doesn't make things
worse than they are now, but still not nice.

Known issue: Doesn't work for qxl-vram (vesafb conflict?).

Signed-off-by: Gerd Hoffmann <kraxel at redhat.com>
---
 drivers/gpu/drm/qxl/qxl_kms.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/gpu/drm/qxl/qxl_kms.c b/drivers/gpu/drm/qxl/qxl_kms.c
index e5ca498..d430f3c 100644
--- a/drivers/gpu/drm/qxl/qxl_kms.c
+++ b/drivers/gpu/drm/qxl/qxl_kms.c
@@ -264,6 +264,11 @@ int qxl_device_init(struct qxl_device *qdev,
 	if (r)
 		return r;
 
+	r = pci_request_region(pdev, 0, "qxl-vram");
+	r = pci_request_region(pdev, 2, "qxl-rom");
+	r = pci_request_region(pdev, 3, "qxl-io");
+	r = pci_request_region(pdev, sb, "qxl-surface");
+
 	return 0;
 }
 
@@ -289,6 +294,7 @@ static void qxl_device_fini(struct qxl_device *qdev)
 	qdev->mode_info.modes = NULL;
 	qdev->mode_info.num_modes = 0;
 	qxl_debugfs_remove_files(qdev);
+	pci_release_regions(qdev->pdev);
 }
 
 int qxl_driver_unload(struct drm_device *dev)
-- 
1.8.3.1



More information about the dri-devel mailing list