From patchwork Wed Jul 27 12:38:15 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Vetter X-Patchwork-Id: 9249757 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 70CD5607D8 for ; Wed, 27 Jul 2016 12:39:22 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 624CF26253 for ; Wed, 27 Jul 2016 12:39:22 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 56A02271FD; Wed, 27 Jul 2016 12:39:22 +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=-4.1 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D690D26253 for ; Wed, 27 Jul 2016 12:39:21 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 8E1F06E6B7; Wed, 27 Jul 2016 12:39:04 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail-wm0-x244.google.com (mail-wm0-x244.google.com [IPv6:2a00:1450:400c:c09::244]) by gabe.freedesktop.org (Postfix) with ESMTPS id E02066E6B1 for ; Wed, 27 Jul 2016 12:38:37 +0000 (UTC) Received: by mail-wm0-x244.google.com with SMTP id x83so6257223wma.3 for ; Wed, 27 Jul 2016 05:38:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ffwll.ch; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=xADtpjKTBrW+dom0/xk8TjaJddUJj9DUuAlpB2ID5Nw=; b=GJGk5boaSbV8nSbUZEXkYizMGGcQcl+QIU4WEYtz7AfA6E/ZGhuc5B1BzbVaJhlot6 cJaiy515X+qQ2P/YL8qsXHbQPA8mHMvvXjW3rcr6QvuVtiy/nsfg1IDO6J5Z5yja7LUq 5TzrH0P46555BgOu2vxCg0T+QLXEsbRnQmJSM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=xADtpjKTBrW+dom0/xk8TjaJddUJj9DUuAlpB2ID5Nw=; b=eufCj4sbZICv7WbccnSgaG/vyRBSddVVdfOhIQzY7vHl/cvl+csQ5WvoX7av4RveEY kICibwkGDAsK9cpmYREsIDYQwEYCbZfV2fK+xjCaqc1Y35LQebA6M++pJ6j9E7LIRv2x Hg5QJpFCY+dqGb90/hvpDN/IfhIy1LjRXkSspE24iMHV5XDE+pF8duBmQWIZ1uuXyl4u 1UG5BMHATBtRN1kYmpQuRQXvW9iXm3EVre49NDwlmOyFLEntpJovbZ+kDm0nnpQnsMKu asn65431uyctY1b7MZLgoBlywapkDSWzhLgu+RAZcu4b3sXn8aDVY78fUnnvSPDevKQ0 8TWw== X-Gm-Message-State: AEkoouuxgC8OkFxgRROMUArPoZMrVYuGtVMS7RENtQqEyUcW28MqNsP5b4KmGrzRFl0LzQ== X-Received: by 10.194.102.72 with SMTP id fm8mr27517686wjb.50.1469623114745; Wed, 27 Jul 2016 05:38:34 -0700 (PDT) Received: from phenom.ffwll.local ([2a02:168:56b5:0:ac27:b86c:7764:9429]) by smtp.gmail.com with ESMTPSA id p23sm6979002wme.8.2016.07.27.05.38.33 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 27 Jul 2016 05:38:34 -0700 (PDT) From: Daniel Vetter To: Intel Graphics Development Date: Wed, 27 Jul 2016 14:38:15 +0200 Message-Id: <1469623097-26044-10-git-send-email-daniel.vetter@ffwll.ch> X-Mailer: git-send-email 2.8.1 In-Reply-To: <1469623097-26044-1-git-send-email-daniel.vetter@ffwll.ch> References: <1469623097-26044-1-git-send-email-daniel.vetter@ffwll.ch> Cc: Daniel Vetter Subject: [Intel-gfx] [PATCH i-g-t 09/11] lib: Update igt_chipset docs X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" X-Virus-Scanned: ClamAV using ClamSMTP gtkdoc can't handle aliasing, so let's rename the intel_device_info function. Signed-off-by: Daniel Vetter --- lib/intel_chipset.h | 54 +++++++++++++++++++++++++----------------------- lib/intel_device_info.c | 8 +++---- tools/intel_audio_dump.c | 2 +- tools/intel_reg.c | 2 +- 4 files changed, 34 insertions(+), 32 deletions(-) diff --git a/lib/intel_chipset.h b/lib/intel_chipset.h index fe4928acce20..1003266fd657 100644 --- a/lib/intel_chipset.h +++ b/lib/intel_chipset.h @@ -34,7 +34,7 @@ struct pci_device *intel_get_pci_device(void); uint32_t intel_get_drm_devid(int fd); -const struct intel_device_info { +struct intel_device_info { unsigned gen; bool is_mobile : 1; bool is_whitney : 1; @@ -64,7 +64,9 @@ const struct intel_device_info { bool is_broxton : 1; bool is_kabylake : 1; const char *codename; -} *intel_device_info(uint16_t devid) __attribute__((pure)); +}; + +const struct intel_device_info *intel_get_device_info(uint16_t devid) __attribute__((pure)); unsigned intel_gen(uint16_t devid) __attribute__((pure)); unsigned intel_gt(uint16_t devid) __attribute__((pure)); @@ -120,42 +122,42 @@ void intel_check_pch(void); #endif /* __GTK_DOC_IGNORE__ */ -#define IS_915G(devid) (intel_device_info(devid)->is_grantsdale) -#define IS_915GM(devid) (intel_device_info(devid)->is_alviso) +#define IS_915G(devid) (intel_get_device_info(devid)->is_grantsdale) +#define IS_915GM(devid) (intel_get_device_info(devid)->is_alviso) #define IS_915(devid) (IS_915G(devid) || IS_915GM(devid)) -#define IS_945G(devid) (intel_device_info(devid)->is_lakeport) -#define IS_945GM(devid) (intel_device_info(devid)->is_calistoga) +#define IS_945G(devid) (intel_get_device_info(devid)->is_lakeport) +#define IS_945GM(devid) (intel_get_device_info(devid)->is_calistoga) #define IS_945(devid) (IS_945G(devid) || \ IS_945GM(devid) || \ IS_G33(devid)) -#define IS_PINEVIEW(devid) (intel_device_info(devid)->is_pineview) -#define IS_G33(devid) (intel_device_info(devid)->is_bearlake || \ - intel_device_info(devid)->is_pineview) +#define IS_PINEVIEW(devid) (intel_get_device_info(devid)->is_pineview) +#define IS_G33(devid) (intel_get_device_info(devid)->is_bearlake || \ + intel_get_device_info(devid)->is_pineview) -#define IS_BROADWATER(devid) (intel_device_info(devid)->is_broadwater) -#define IS_CRESTLINE(devid) (intel_device_info(devid)->is_crestline) +#define IS_BROADWATER(devid) (intel_get_device_info(devid)->is_broadwater) +#define IS_CRESTLINE(devid) (intel_get_device_info(devid)->is_crestline) -#define IS_GM45(devid) (intel_device_info(devid)->is_cantiga) -#define IS_G45(devid) (intel_device_info(devid)->is_eaglelake) +#define IS_GM45(devid) (intel_get_device_info(devid)->is_cantiga) +#define IS_G45(devid) (intel_get_device_info(devid)->is_eaglelake) #define IS_G4X(devid) (IS_G45(devid) || IS_GM45(devid)) -#define IS_IRONLAKE(devid) (intel_device_info(devid)->is_ironlake) -#define IS_ARRANDALE(devid) (intel_device_info(devid)->is_arrandale) -#define IS_IVYBRIDGE(devid) (intel_device_info(devid)->is_ivybridge) -#define IS_VALLEYVIEW(devid) (intel_device_info(devid)->is_valleyview) -#define IS_HASWELL(devid) (intel_device_info(devid)->is_haswell) -#define IS_BROADWELL(devid) (intel_device_info(devid)->is_broadwell) -#define IS_CHERRYVIEW(devid) (intel_device_info(devid)->is_cherryview) -#define IS_KABYLAKE(devid) (intel_device_info(devid)->is_kabylake) -#define IS_SKYLAKE(devid) (intel_device_info(devid)->is_skylake) -#define IS_BROXTON(devid) (intel_device_info(devid)->is_broxton) +#define IS_IRONLAKE(devid) (intel_get_device_info(devid)->is_ironlake) +#define IS_ARRANDALE(devid) (intel_get_device_info(devid)->is_arrandale) +#define IS_IVYBRIDGE(devid) (intel_get_device_info(devid)->is_ivybridge) +#define IS_VALLEYVIEW(devid) (intel_get_device_info(devid)->is_valleyview) +#define IS_HASWELL(devid) (intel_get_device_info(devid)->is_haswell) +#define IS_BROADWELL(devid) (intel_get_device_info(devid)->is_broadwell) +#define IS_CHERRYVIEW(devid) (intel_get_device_info(devid)->is_cherryview) +#define IS_KABYLAKE(devid) (intel_get_device_info(devid)->is_kabylake) +#define IS_SKYLAKE(devid) (intel_get_device_info(devid)->is_skylake) +#define IS_BROXTON(devid) (intel_get_device_info(devid)->is_broxton) -#define IS_GEN(devid, x) (intel_device_info(devid)->gen & (1u << ((x)-1))) -#define AT_LEAST_GEN(devid, x) (intel_device_info(devid)->gen & -(1u << ((x)-1))) +#define IS_GEN(devid, x) (intel_get_device_info(devid)->gen & (1u << ((x)-1))) +#define AT_LEAST_GEN(devid, x) (intel_get_device_info(devid)->gen & -(1u << ((x)-1))) #define IS_GEN2(devid) IS_GEN(devid, 2) #define IS_GEN3(devid) IS_GEN(devid, 3) @@ -166,7 +168,7 @@ void intel_check_pch(void); #define IS_GEN8(devid) IS_GEN(devid, 8) #define IS_GEN9(devid) IS_GEN(devid, 9) -#define IS_MOBILE(devid) (intel_device_info(devid)->is_mobile) +#define IS_MOBILE(devid) (intel_get_device_info(devid)->is_mobile) #define IS_965(devid) AT_LEAST_GEN(devid, 4) #define HAS_BSD_RING(devid) AT_LEAST_GEN(devid, 5) diff --git a/lib/intel_device_info.c b/lib/intel_device_info.c index 3cab6faf35c7..5aab6846546a 100644 --- a/lib/intel_device_info.c +++ b/lib/intel_device_info.c @@ -243,15 +243,15 @@ static const struct pci_id_match intel_device_match[] = { }; /** - * intel_device_info: + * intel_get_device_info: * @devid: pci device id * * Looks up the Intel GFX device info for the given device id. * * Returns: - * The associated intel_device_info + * The associated intel_get_device_info */ -const struct intel_device_info *intel_device_info(uint16_t devid) +const struct intel_device_info *intel_get_device_info(uint16_t devid) { static const struct intel_device_info *cache = &intel_generic_info; static uint16_t cached_devid; @@ -284,7 +284,7 @@ out: */ unsigned intel_gen(uint16_t devid) { - return ffs(intel_device_info(devid)->gen); + return ffs(intel_get_device_info(devid)->gen); } /** diff --git a/tools/intel_audio_dump.c b/tools/intel_audio_dump.c index 6d49756fbfdf..c8d369b548cb 100644 --- a/tools/intel_audio_dump.c +++ b/tools/intel_audio_dump.c @@ -2476,7 +2476,7 @@ int main(int argc, char **argv) else intel_mmio_use_pci_bar(pci_dev); - printf("%s audio registers:\n\n", intel_device_info(devid)->codename); + printf("%s audio registers:\n\n", intel_get_device_info(devid)->codename); if (IS_VALLEYVIEW(devid)) { dump_ironlake(); } else if (IS_CHERRYVIEW(devid)) { diff --git a/tools/intel_reg.c b/tools/intel_reg.c index 73fbd6da2de6..98dea0faa0e0 100644 --- a/tools/intel_reg.c +++ b/tools/intel_reg.c @@ -657,7 +657,7 @@ static int intel_reg_help(struct config *config, int argc, char *argv[]) */ static const char *get_codename(uint32_t devid) { - return intel_device_info(devid)->codename; + return intel_get_device_info(devid)->codename; } /*