From patchwork Fri Oct 11 08:01:12 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gerd Hoffmann X-Patchwork-Id: 3022281 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 51EF09F1E1 for ; Fri, 11 Oct 2013 10:44:08 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 2D33F2034D for ; Fri, 11 Oct 2013 10:44:07 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id AB22D20343 for ; Fri, 11 Oct 2013 10:44:05 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id F09EE4376D for ; Fri, 11 Oct 2013 03:44:04 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by gabe.freedesktop.org (Postfix) with ESMTP id A48A6E7D7D for ; Fri, 11 Oct 2013 01:01:34 -0700 (PDT) Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r9B81XHr000540 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 11 Oct 2013 04:01:33 -0400 Received: from nilsson.home.kraxel.org (vpn1-4-76.ams2.redhat.com [10.36.4.76]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id r9B81WXa019675; Fri, 11 Oct 2013 04:01:32 -0400 Received: by nilsson.home.kraxel.org (Postfix, from userid 500) id 8920081712; Fri, 11 Oct 2013 10:01:30 +0200 (CEST) From: Gerd Hoffmann To: dri-devel@lists.freedesktop.org Subject: [PATCH 5/6] [wip] drm/qxl: request regions Date: Fri, 11 Oct 2013 10:01:12 +0200 Message-Id: <1381478473-18159-6-git-send-email-kraxel@redhat.com> In-Reply-To: <1381478473-18159-1-git-send-email-kraxel@redhat.com> References: <1381478473-18159-1-git-send-email-kraxel@redhat.com> X-Scanned-By: MIMEDefang 2.67 on 10.5.11.11 X-Mailman-Approved-At: Fri, 11 Oct 2013 03:25:32 -0700 Cc: Gerd Hoffmann , open list X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: dri-devel-bounces+patchwork-dri-devel=patchwork.kernel.org@lists.freedesktop.org Errors-To: dri-devel-bounces+patchwork-dri-devel=patchwork.kernel.org@lists.freedesktop.org X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 --- 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)