From patchwork Fri Aug 5 15:59:59 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Piotr_Pi=C3=B3rkowski?= X-Patchwork-Id: 12937520 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 01322C00140 for ; Fri, 5 Aug 2022 16:02:10 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 2ABC511A6CC; Fri, 5 Aug 2022 16:01:48 +0000 (UTC) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by gabe.freedesktop.org (Postfix) with ESMTPS id EED858CFC5; Fri, 5 Aug 2022 16:01:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1659715290; x=1691251290; h=from:to:cc:subject:date:message-id:in-reply-to: references:content-transfer-encoding:mime-version; bh=6njxYTDdzpMHLojrHDFMze77mQaREE49BSXeLqzmeFc=; b=eXcFVMYrcsSGBw3eeMTr3SOZzhXA1wyLSRStT2Ogc+7VEQoYImxGLOcF rmdR0YOUbhpwHCNLtEl9DGIAojPuHPxQ3sTG58I7d84W2rqGHYO+t7V8y cl6kGfCpOn665NDz5Yv8G07AgMMYahU+qihF/MGOtAA+L4YZ1J1V33fDn tW0BC02f5mf8H+tKuwtvD//rnEhyWU0HJ2a6TZtm7tHkxbmOEX6vz+HLy ZvP1meLLDVUSYh78Bbu5svL0LB7y9JasfjN+DMVzHmiUAw7Phu9lB/FJR 5RAXOP2QOKBg5ugp3IamgAtDYkZZrkTAZG4IEEOYx3baI7hChJ5gRY1wB w==; X-IronPort-AV: E=McAfee;i="6400,9594,10430"; a="316123321" X-IronPort-AV: E=Sophos;i="5.93,216,1654585200"; d="scan'208";a="316123321" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Aug 2022 09:01:09 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.93,216,1654585200"; d="scan'208";a="632057692" Received: from orsmsx604.amr.corp.intel.com ([10.22.229.17]) by orsmga008.jf.intel.com with ESMTP; 05 Aug 2022 09:01:08 -0700 Received: from orsmsx608.amr.corp.intel.com (10.22.229.21) by ORSMSX604.amr.corp.intel.com (10.22.229.17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.28; Fri, 5 Aug 2022 09:01:08 -0700 Received: from orsmsx607.amr.corp.intel.com (10.22.229.20) by ORSMSX608.amr.corp.intel.com (10.22.229.21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.28; Fri, 5 Aug 2022 09:01:08 -0700 Received: from orsedg603.ED.cps.intel.com (10.7.248.4) by orsmsx607.amr.corp.intel.com (10.22.229.20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.28 via Frontend Transport; Fri, 5 Aug 2022 09:01:08 -0700 Received: from NAM11-DM6-obe.outbound.protection.outlook.com (104.47.57.172) by edgegateway.intel.com (134.134.137.100) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2375.28; Fri, 5 Aug 2022 09:01:04 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=VgW13l+8Xhm2FgdLcSAM34/uHYOOM1qjUWgndLYuq9tZ2O4MEzvAxGlacFw0pNXTxpPPk8n286IkbRRPi7IXNgBA7ThVG00lJz5KefBeidzBFh7yuev9zeaY4DRyqYF4l0Skbg9gMUcaqDgGMaqp6sgMjgExPECn2tcbzMWRzPrxUAFb5lvrZJRdy6A+1PRQhpQKL1kwITXUitv1Oht7jTb/4qLqE+daazVknX+PyJMbJZeROxZnquSjnz5J8Pzc0kWnNdPjZAjKw0czzCxSNoCFjkPtQPaLjOGJIG07jSp68B/RPKuumKBnl0aM9eLUsmVwFPFvlMzmNOdqRkq0Yg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=V7WnDrQipR0PE3fTWyDx0XDMy9aurRWHpnLGywp8cjo=; b=Ri8CsEYEpTtg16e0f3GuHEqInVWBYHmJNAPQ9nDTt3p+z9N9aMVaY83Zna2k7pAOu62j9rKUI39bqbt2ecMBwtxcFUdD94Sf2FtozPIcPhkIEtWmUZzyl7Fx2dMnRXtpiJjBOjDU9JX/FnA7587cqqbGpB6RXTyuQeZenPgM5VrJ8W7/+TUSXIMPbq1Ty5MZqM1kMLihGWpxuFly6h+84QOurVkeO6z7/F8+bbhNcmR+T1kdU96bVRVGiNMPDAT7yga3X94Xzdg2AombCsWhINM1bZ3awqxSE/33GmRQTIQs4T3gaOYb2pMfsXFsg0rqHoJcPmE2NGNnk1h0X5Kc/g== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; Received: from DM5PR11MB1372.namprd11.prod.outlook.com (2603:10b6:3:11::14) by DM5PR1101MB2075.namprd11.prod.outlook.com (2603:10b6:4:5a::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5504.14; Fri, 5 Aug 2022 16:00:45 +0000 Received: from DM5PR11MB1372.namprd11.prod.outlook.com ([fe80::bc9e:4951:a404:5507]) by DM5PR11MB1372.namprd11.prod.outlook.com ([fe80::bc9e:4951:a404:5507%3]) with mapi id 15.20.5504.016; Fri, 5 Aug 2022 16:00:45 +0000 From: "Piorkowski, Piotr" To: , Date: Fri, 5 Aug 2022 17:59:59 +0200 Message-ID: <20220805155959.1983584-3-piotr.piorkowski@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220805155959.1983584-1-piotr.piorkowski@intel.com> References: <20220805155959.1983584-1-piotr.piorkowski@intel.com> X-ClientProxiedBy: FR3P281CA0174.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:a0::17) To DM5PR11MB1372.namprd11.prod.outlook.com (2603:10b6:3:11::14) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 406c523b-80c3-4843-1d1c-08da76fb9f29 X-MS-TrafficTypeDiagnostic: DM5PR1101MB2075:EE_ X-LD-Processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: CrEjMJQaorftnKi9L7z7pAC1nLRxhQlDcBUjypIFWmfCxm/imSa2CKbVYkC5oT48rO7YHJ/k8E3oogfvTyrA3App3SaWECdkWfB8SDc0hR8XCrgNDIWzO77CVdhUCZVtC5LEjIfvlf0ygDJGcP7+OFelT2KRrkqTuySwNBrdP+ilzBChRc4ncNcX+Y2ZymR30OsfMWp1iDKc1QJPByUyZfy8Pp21bvzJOT03dbqsdhRnQ8BxHrVHnwnpvV1dvDWW0GpYGU0yO18LVS3C6cDOW61AomjkUYMlBBel6Nq40RjDbXenlaYllLcqR7ar5IRnw6FLDvGvoq0k8MwYBaq1XwpoFgCWu6cdO1L1bslfE2YsKNNlPeZGlymv89n7nNYT21u5cbn1hSommm7dU8n0CFCovqkTIEITTPYz8sJdJJVHxEu1z1I2XyNCu1IqT/eofcG2SPmfh3Wlx4pS8ZXzuyoFdWs16d1/UT5A35v77CZc1H34SODe7TsVcvfOuIjex2387BCfnqzO22HyPiTyYDyYBIch7RBGS8c+57Q+HLTkGBdYcrCtRur7pZCeF5y7bB3/CAmJ4r/OyM/s8PoEc+ajVw5Y1ViCEiXWcSp01Wm2bmqdkZ8OLBVx3F169ccVIMd82AHIY2WvN/u/uuEFmx9U89/VXgLbf/LisBY6LP/kr7VAfnilBdVQvT4wEOsx5HQ8gwCOageKg+vloJPIoY1IZ3E8CImjqz4dQZqXBiP0VbPD3K9cGVkGkLHyucpE X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM5PR11MB1372.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230016)(136003)(346002)(396003)(39860400002)(376002)(366004)(2906002)(83380400001)(82960400001)(38100700002)(6486002)(316002)(66574015)(5660300002)(66556008)(54906003)(66476007)(66946007)(8676002)(4326008)(6512007)(186003)(1076003)(2616005)(8936002)(86362001)(41300700001)(6506007)(478600001)(36756003)(6666004)(26005); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?alHae/SdgOfNXDAowRRH8uqx9+l6?= =?utf-8?q?0o+uNZjgZqjoivbCsazqK+e8l2XoGASgWMB43BBrs8td1NR9KLqAsbJo6GwOrah9v?= =?utf-8?q?DvZ1L7ZdSuX94M06fwQmveWUi82FTKkhJNCppSpr/ftpigz2v7T9eCUxEr3nM9Fbx?= =?utf-8?q?IdE72UUxG0AdycpWR3lITpYwNbyU1oeQZKmvQXI++cl1Z+0dcYBKBqSSfTLeNmWqj?= =?utf-8?q?a4Lk5D0BmoqbhV+yf5IkPMBmiOaKWbvqAT4TK2OqpZ06Q1cdAgKB1N2QoKMMX1Ase?= =?utf-8?q?hBD0Rl5XrTgtd3GE/MwZiZntHFbsEg2qIEgjW7DuG0rapEfZ/Z7bTRRZHW3Iq/QQe?= =?utf-8?q?mg4ZUNx/02b/uDU3o0VO5HsAQOnDaG1KP72oo1JluTs5dZVbRChucKSjQQEdOfMfV?= =?utf-8?q?o+2Pn2iZfcssySrmfpWx9vporx3algTFNXtvC3wJNvimhAEDq8PLaXrMLZ+EhmwyR?= =?utf-8?q?23eEHXAKOkikBYdkkPjV9QXvqrJadbW/VMUyTpqSnZjrhM6qIaGBIrzG9YzA0RJMD?= =?utf-8?q?e4sAkxu16TujjYXDu/NrWmzjUSCYqEj5cIrnpUvQbBOk240HMZWyXksgVRuvMxYE/?= =?utf-8?q?nfr7MvPo6MPso7kGkvyDRI0dsbgaSM6CAanI5dL+Xtl1RtlZ6xsoS/xHDiD3DJ3sM?= =?utf-8?q?LlMPqwQrbwGn29hZx5jfCWz4AGAMmUW/snZuYcoaVO1OPqHAPP4qPctJ8xTMjCYA0?= =?utf-8?q?AMTxVj1nRdiafp+fYLF4oCmU1bKk5uyoibuflY/W/dm16oJA1+VgseWWFAtbd+JMB?= =?utf-8?q?IYYqIkdnt3N0ARVbUtH8FKWvyBlzMVvdDCkdKa1Gp4HhI8arak+EKVVBf/pHInT/E?= =?utf-8?q?y8XVBf+aPxq1RWjEOXVjsG/KiezZ3/+/oCwFjdF5p9TXPMJDU9xs7zIy8I6ZJweG2?= =?utf-8?q?GpgdnKQyHlP8asIm5qn1ziS3psMoQVVlvulJMLBHnoUoSfxl/dK8b1pA3m4SGpWuL?= =?utf-8?q?ytUqb+mBaOnsvkpQFoIpaklU2pFuhTID3htSmvVDmK1CRwKipzR45SC6GT2eqj9nx?= =?utf-8?q?2yhO14cUV5lajwdqcrnPG65OjsfKsznAfi7J9OjfyXjS+MZbk2nZcoztzPiwwbd63?= =?utf-8?q?+6DYIKsxIPf8a9ZzSs8VypeJsHGYeJtiu7gxM364xAIkrdyB2VObMBrE2aT5SBGh7?= =?utf-8?q?NVQPDg+1EWaBlaykUGeMDdkwKLH6oDw+Z/9jmGdVyEpPnNzJbaxAgyL/GQVa8sGnM?= =?utf-8?q?TW/NyQWVXqKpx0vpL/mQE7yLy5iSWiJYb8MOdUWfyNRXiu88Q85wPoOgFtHD5tP9l?= =?utf-8?q?HgnheDIqmMvj1fOHtGOMdO3Q0TZQE+RA3Tc0txnnltdnLOeT3s3cMEK1KWy5+/QxH?= =?utf-8?q?vHnL1kdAupZgPCmIlW42sSU4MUmvom87wR0Ja3ReXeGcG337tWM1IrgJ3jbSpYy8J?= =?utf-8?q?Uf5Nw4e3iKIr6PsE3bD6JlSDpXT8TKT7B1fdr8Wu+CcLk1HZ23Zv9XwuZJIaQmy1Y?= =?utf-8?q?PthuQRFoeWzIMUN2wtq5WRSNgh1c5jFzNqvlhVNtJspVMg3VLHIBDJfUZUJa1yGzJ?= =?utf-8?q?+CRNYPoHsk+stwj9K5W6xXGA8Kz8SZZtSQ=3D=3D?= X-MS-Exchange-CrossTenant-Network-Message-Id: 406c523b-80c3-4843-1d1c-08da76fb9f29 X-MS-Exchange-CrossTenant-AuthSource: DM5PR11MB1372.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Aug 2022 16:00:30.7986 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: kqfQsqQxaIlpC8veinSUWVgzUmay4Cts4A5nfqUroQh96ytmoMwhlabWrpBZFHTrmTrAxzGbTSYlOgwaE6JO9s3kl3Fw3RUrNHpkdjB/+oU= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR1101MB2075 X-OriginatorOrg: intel.com Subject: [Intel-gfx] [PATCH v3 2/2] drm/i915: Sanitycheck PCI BARs X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Jani Nikula , Lucas De Marchi Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" From: Piotr PiĆ³rkowski For proper operation of i915 we need usable PCI GTTMMADDR BAR 0 (1 for GEN2). In most cases we also need usable PCI GFXMEM BAR 2. Let's add functions to check if BARs are set, and that it have a size greater than 0. In case GTTMMADDR BAR, let's validate at the beginning of i915 initialization. For other BARs, let's validate before first use. Signed-off-by: Piotr PiĆ³rkowski Cc: Jani Nikula Cc: Lucas De Marchi Cc: Matt Roper Reviewed-by: Jani Nikula --- drivers/gpu/drm/i915/gem/i915_gem_stolen.c | 4 ++++ drivers/gpu/drm/i915/gt/intel_ggtt.c | 7 ++++++ drivers/gpu/drm/i915/gt/intel_region_lmem.c | 4 ++++ drivers/gpu/drm/i915/i915_pci.c | 25 +++++++++++++++++++++ drivers/gpu/drm/i915/i915_pci.h | 6 +++++ 5 files changed, 46 insertions(+) diff --git a/drivers/gpu/drm/i915/gem/i915_gem_stolen.c b/drivers/gpu/drm/i915/gem/i915_gem_stolen.c index c369cfd185bc..4f4c9461a23b 100644 --- a/drivers/gpu/drm/i915/gem/i915_gem_stolen.c +++ b/drivers/gpu/drm/i915/gem/i915_gem_stolen.c @@ -18,6 +18,7 @@ #include "gt/intel_region_lmem.h" #include "i915_drv.h" #include "i915_gem_stolen.h" +#include "i915_pci.h" #include "i915_reg.h" #include "i915_utils.h" #include "i915_vgpu.h" @@ -828,6 +829,9 @@ i915_gem_stolen_lmem_setup(struct drm_i915_private *i915, u16 type, if (WARN_ON_ONCE(instance)) return ERR_PTR(-ENODEV); + if (!i915_pci_resource_valid(pdev, GEN12_LMEM_BAR)) + return ERR_PTR(-ENXIO); + /* Use DSM base address instead for stolen memory */ dsm_base = intel_uncore_read64(uncore, GEN12_DSMBASE); if (IS_DG1(uncore->i915)) { diff --git a/drivers/gpu/drm/i915/gt/intel_ggtt.c b/drivers/gpu/drm/i915/gt/intel_ggtt.c index 8214e07a0f5b..30cf5c3369d9 100644 --- a/drivers/gpu/drm/i915/gt/intel_ggtt.c +++ b/drivers/gpu/drm/i915/gt/intel_ggtt.c @@ -18,6 +18,7 @@ #include "intel_gt_regs.h" #include "intel_pci_config.h" #include "i915_drv.h" +#include "i915_pci.h" #include "i915_scatterlist.h" #include "i915_utils.h" #include "i915_vgpu.h" @@ -931,6 +932,9 @@ static int gen8_gmch_probe(struct i915_ggtt *ggtt) u16 snb_gmch_ctl; if (!HAS_LMEM(i915)) { + if (!i915_pci_resource_valid(pdev, GTT_APERTURE_BAR)) + return -ENXIO; + ggtt->gmadr = pci_resource(pdev, GTT_APERTURE_BAR); ggtt->mappable_end = resource_size(&ggtt->gmadr); } @@ -1085,6 +1089,9 @@ static int gen6_gmch_probe(struct i915_ggtt *ggtt) unsigned int size; u16 snb_gmch_ctl; + if (!i915_pci_resource_valid(pdev, GTT_APERTURE_BAR)) + return -ENXIO; + ggtt->gmadr = pci_resource(pdev, GTT_APERTURE_BAR); ggtt->mappable_end = resource_size(&ggtt->gmadr); diff --git a/drivers/gpu/drm/i915/gt/intel_region_lmem.c b/drivers/gpu/drm/i915/gt/intel_region_lmem.c index 1e79d3c8b126..f3ad93db0b21 100644 --- a/drivers/gpu/drm/i915/gt/intel_region_lmem.c +++ b/drivers/gpu/drm/i915/gt/intel_region_lmem.c @@ -4,6 +4,7 @@ */ #include "i915_drv.h" +#include "i915_pci.h" #include "i915_reg.h" #include "intel_memory_region.h" #include "intel_pci_config.h" @@ -201,6 +202,9 @@ static struct intel_memory_region *setup_lmem(struct intel_gt *gt) if (!IS_DGFX(i915)) return ERR_PTR(-ENODEV); + if (!i915_pci_resource_valid(pdev, GEN12_LMEM_BAR)) + return ERR_PTR(-ENXIO); + if (HAS_FLAT_CCS(i915)) { resource_size_t lmem_range; u64 tile_stolen, flat_ccs_base; diff --git a/drivers/gpu/drm/i915/i915_pci.c b/drivers/gpu/drm/i915/i915_pci.c index aacc10f2e73f..9fd788e147a3 100644 --- a/drivers/gpu/drm/i915/i915_pci.c +++ b/drivers/gpu/drm/i915/i915_pci.c @@ -30,6 +30,7 @@ #include "i915_drv.h" #include "i915_pci.h" #include "i915_reg.h" +#include "intel_pci_config.h" #define PLATFORM(x) .platform = (x) #define GEN(x) \ @@ -1262,6 +1263,27 @@ static bool force_probe(u16 device_id, const char *devices) return ret; } +bool i915_pci_resource_valid(struct pci_dev *pdev, int bar) +{ + if (!pci_resource_flags(pdev, bar)) + return false; + + if (pci_resource_flags(pdev, bar) & IORESOURCE_UNSET) + return false; + + if (!pci_resource_len(pdev, bar)) + return false; + + return true; +} + +static bool intel_mmio_bar_valid(struct pci_dev *pdev, struct intel_device_info *intel_info) +{ + int gttmmaddr_bar = intel_info->graphics.ver == 2 ? GEN2_GTTMMADR_BAR : GTTMMADR_BAR; + + return i915_pci_resource_valid(pdev, gttmmaddr_bar); +} + static int i915_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent) { struct intel_device_info *intel_info = @@ -1287,6 +1309,9 @@ static int i915_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent) if (PCI_FUNC(pdev->devfn)) return -ENODEV; + if (!intel_mmio_bar_valid(pdev, intel_info)) + return -ENXIO; + /* Detect if we need to wait for other drivers early on */ if (intel_modeset_probe_defer(pdev)) return -EPROBE_DEFER; diff --git a/drivers/gpu/drm/i915/i915_pci.h b/drivers/gpu/drm/i915/i915_pci.h index ee048c238174..8dfe19f9a775 100644 --- a/drivers/gpu/drm/i915/i915_pci.h +++ b/drivers/gpu/drm/i915/i915_pci.h @@ -6,7 +6,13 @@ #ifndef __I915_PCI_H__ #define __I915_PCI_H__ +#include + +struct pci_dev; + int i915_pci_register_driver(void); void i915_pci_unregister_driver(void); +bool i915_pci_resource_valid(struct pci_dev *pdev, int bar); + #endif /* __I915_PCI_H__ */