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

From: Gerd Hoffmann
Date: Fri Oct 11 2013 - 04:03:39 EST


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@xxxxxxxxxx>
---
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

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/