diff mbox

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

Message ID 1381478473-18159-6-git-send-email-kraxel@redhat.com (mailing list archive)
State New, archived
Headers show

Commit Message

Gerd Hoffmann Oct. 11, 2013, 8:01 a.m. UTC
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@redhat.com>
---
 drivers/gpu/drm/qxl/qxl_kms.c | 6 ++++++
 1 file changed, 6 insertions(+)
diff mbox

Patch

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)