From patchwork Thu Sep 6 13:52:18 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eric Engestrom X-Patchwork-Id: 10590653 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 941685A4 for ; Thu, 6 Sep 2018 13:52:30 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 709A72AC42 for ; Thu, 6 Sep 2018 13:52:30 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 64A512AC4E; Thu, 6 Sep 2018 13:52:30 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id C61E92AC42 for ; Thu, 6 Sep 2018 13:52:29 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id B71F26E69F; Thu, 6 Sep 2018 13:52:27 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by gabe.freedesktop.org (Postfix) with ESMTPS id D42446E69F for ; Thu, 6 Sep 2018 13:52:26 +0000 (UTC) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 06 Sep 2018 06:52:26 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.53,338,1531810800"; d="scan'208";a="230721587" Received: from rkrzyszt-mobl2.ger.corp.intel.com (HELO eengestr-dev.ger.corp.intel.com) ([10.252.5.248]) by orsmga004.jf.intel.com with ESMTP; 06 Sep 2018 06:52:24 -0700 From: Eric Engestrom To: dri-devel@lists.freedesktop.org Subject: [PATCH libdrm] intel: use drm namespace for exported functions Date: Thu, 6 Sep 2018 14:52:18 +0100 Message-Id: <20180906135218.4700-1-eric.engestrom@intel.com> X-Mailer: git-send-email 2.18.0 Organization: Intel Corp UK X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Lucas De Marchi , Emil Velikov , Rodrigo Vivi MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP And add them to the list of exported function to fix the tests. Fixes: 4e81d4f9c9b7fd6510cf "intel: add generic functions to check PCI ID" Cc: Lucas De Marchi Cc: Rodrigo Vivi Signed-off-by: Eric Engestrom --- Lucas, I'm assuming you meant to export those functions (and macros, like `IS_GEN11()`), right? If so, you need to namespace them, and add them to the list of allowed exports. --- intel/intel-symbol-check | 2 ++ intel/intel_bufmgr_gem.c | 2 +- intel/intel_chipset.c | 4 ++-- intel/intel_chipset.h | 12 ++++++------ intel/intel_decode.c | 2 +- 5 files changed, 12 insertions(+), 10 deletions(-) diff --git a/intel/intel-symbol-check b/intel/intel-symbol-check index 4d30a4b15feb94e9523d..339240a1bce7f9673cd3 100755 --- a/intel/intel-symbol-check +++ b/intel/intel-symbol-check @@ -87,11 +87,13 @@ drm_intel_gem_context_destroy drm_intel_gem_context_get_id drm_intel_get_aperture_sizes drm_intel_get_eu_total +drm_intel_get_genx drm_intel_get_min_eu_in_pool drm_intel_get_pipe_from_crtc_id drm_intel_get_pooled_eu drm_intel_get_reset_stats drm_intel_get_subslice_total +drm_intel_is_genx drm_intel_reg_read EOF done) diff --git a/intel/intel_bufmgr_gem.c b/intel/intel_bufmgr_gem.c index d6587b76ac004aa4a5a5..3190cb249acda0ae19ab 100644 --- a/intel/intel_bufmgr_gem.c +++ b/intel/intel_bufmgr_gem.c @@ -3656,7 +3656,7 @@ drm_intel_bufmgr_gem_init(int fd, int batch_size) bufmgr_gem->gen = 7; else if (IS_GEN8(bufmgr_gem->pci_device)) bufmgr_gem->gen = 8; - else if (!intel_get_genx(bufmgr_gem->pci_device, &bufmgr_gem->gen)) { + else if (!drm_intel_get_genx(bufmgr_gem->pci_device, &bufmgr_gem->gen)) { free(bufmgr_gem); bufmgr_gem = NULL; goto exit; diff --git a/intel/intel_chipset.c b/intel/intel_chipset.c index d5c33cc59002e1f150e8..89f69ed9e6ed67d8c3fc 100644 --- a/intel/intel_chipset.c +++ b/intel/intel_chipset.c @@ -44,7 +44,7 @@ static const struct pci_device { INTEL_SKL_IDS(9), }; -bool intel_is_genx(unsigned int devid, int gen) +bool drm_intel_is_genx(unsigned int devid, int gen) { const struct pci_device *p, *pend = pciids + sizeof(pciids) / sizeof(pciids[0]); @@ -66,7 +66,7 @@ bool intel_is_genx(unsigned int devid, int gen) return false; } -bool intel_get_genx(unsigned int devid, int *gen) +bool drm_intel_get_genx(unsigned int devid, int *gen) { const struct pci_device *p, *pend = pciids + sizeof(pciids) / sizeof(pciids[0]); diff --git a/intel/intel_chipset.h b/intel/intel_chipset.h index 9b1e64f1f4bd19b3cf38..01488be2fb34fd08a876 100644 --- a/intel/intel_chipset.h +++ b/intel/intel_chipset.h @@ -330,12 +330,12 @@ /* New platforms use kernel pci ids */ #include -bool intel_is_genx(unsigned int devid, int gen); -bool intel_get_genx(unsigned int devid, int *gen); +bool drm_intel_is_genx(unsigned int devid, int gen); +bool drm_intel_get_genx(unsigned int devid, int *gen); -#define IS_GEN9(devid) intel_is_genx(devid, 9) -#define IS_GEN10(devid) intel_is_genx(devid, 10) -#define IS_GEN11(devid) intel_is_genx(devid, 11) +#define IS_GEN9(devid) drm_intel_is_genx(devid, 9) +#define IS_GEN10(devid) drm_intel_is_genx(devid, 10) +#define IS_GEN11(devid) drm_intel_is_genx(devid, 11) #define IS_9XX(dev) (IS_GEN3(dev) || \ IS_GEN4(dev) || \ @@ -343,6 +343,6 @@ bool intel_get_genx(unsigned int devid, int *gen); IS_GEN6(dev) || \ IS_GEN7(dev) || \ IS_GEN8(dev) || \ - intel_get_genx(dev, NULL)) + drm_intel_get_genx(dev, NULL)) #endif /* _INTEL_CHIPSET_H */ diff --git a/intel/intel_decode.c b/intel/intel_decode.c index 0ff095bc6285d03f4fed..4a493cbfa8f84591b994 100644 --- a/intel/intel_decode.c +++ b/intel/intel_decode.c @@ -3823,7 +3823,7 @@ drm_intel_decode_context_alloc(uint32_t devid) ctx->devid = devid; ctx->out = stdout; - if (intel_get_genx(devid, &ctx->gen)) + if (drm_intel_get_genx(devid, &ctx->gen)) ; else if (IS_GEN8(devid)) ctx->gen = 8;