[Intel-gfx] [PATCH i-g-t 09/11] lib: Update igt_chipset docs
Daniel Vetter
daniel.vetter at ffwll.ch
Wed Jul 27 12:38:15 UTC 2016
gtkdoc can't handle aliasing, so let's rename the intel_device_info
function.
Signed-off-by: Daniel Vetter <daniel.vetter at ffwll.ch>
---
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;
}
/*
--
2.8.1
More information about the Intel-gfx
mailing list