lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-Id: <1381478473-18159-6-git-send-email-kraxel@redhat.com>
Date:	Fri, 11 Oct 2013 10:01:12 +0200
From:	Gerd Hoffmann <kraxel@...hat.com>
To:	dri-devel@...ts.freedesktop.org
Cc:	Gerd Hoffmann <kraxel@...hat.com>, David Airlie <airlied@...ux.ie>,
	linux-kernel@...r.kernel.org (open list)
Subject: [PATCH 5/6] [wip] drm/qxl: request regions

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@...hat.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

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ