Skip to contentSkip to conversation

intel: use drm namespace for exported functions

PATCH In review Eric Engestrom 2 participants 2 messages Sep 6, 2018

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 intel: use drm namespace for exported functions

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 <[email protected]>
Cc Rodrigo Vivi <[email protected]>

---
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(-)
intel/intel-symbol-check +2 -0
index 4d30a4b15feb94e9523d..339240a1bce7f9673cd3 100755
@@ -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)
intel/intel_bufmgr_gem.c +1 -1
index d6587b76ac004aa4a5a5..3190cb249acda0ae19ab 100644
@@ -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;
intel/intel_chipset.c +2 -2
index d5c33cc59002e1f150e8..89f69ed9e6ed67d8c3fc 100644
@@ -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]);
intel/intel_chipset.h +6 -6
index 9b1e64f1f4bd19b3cf38..01488be2fb34fd08a876 100644
@@ -330,12 +330,12 @@
 /* New platforms use kernel pci ids */
 #include <stdbool.h>
 
-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 */
intel/intel_decode.c +1 -1
index 0ff095bc6285d03f4fed..4a493cbfa8f84591b994 100644
@@ -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;
Signature · 7 lines
Cheers,
  Eric

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
#1 lore raw
Quoted 11 lines · Eric Engestrom

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 <[email protected]>
Cc Rodrigo Vivi <[email protected]>

---
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.

The function isn't one part of the public API.
So I'd keep the name and add the drm_private notation (adds visibility=hidden)

-Emil
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel