[PATCH libdrm] intel: annotate the intel genx helpers as private

Lucas De Marchi lucas.demarchi at intel.com
Thu Sep 6 17:46:40 UTC 2018


On Thu, Sep 06, 2018 at 04:14:07PM +0100, Emil Velikov wrote:
> From: Emil Velikov <emil.velikov at collabora.com>
> 
> They're used internally and never meant to be part of the API.
> Add the drm_private notation, which should resolve that.
> 
> Cc: Eric Engestrom <eric.engestrom at intel.com>
> Cc: Lucas De Marchi <lucas.demarchi at intel.com>
> Cc: Chris Wilson <chris at chris-wilson.co.uk>
> Cc: Rodrigo Vivi <rodrigo.vivi at intel.com>
> Fixes: 4e81d4f9c9b ("intel: add generic functions to check PCI ID")
> Signed-off-by: Emil Velikov <emil.velikov at collabora.com>
> ---
>  intel/intel_chipset.c | 4 ++--
>  intel/intel_chipset.h | 4 ++--
>  2 files changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/intel/intel_chipset.c b/intel/intel_chipset.c
> index d5c33cc5..5aa4a2f2 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)
> +drm_private bool 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)
> +drm_private bool 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 9b1e64f1..63ddde7a 100644
> --- a/intel/intel_chipset.h
> +++ b/intel/intel_chipset.h
> @@ -330,8 +330,8 @@
>  /* 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);
> +drm_private bool intel_is_genx(unsigned int devid, int gen);
> +drm_private bool 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)
> -- 

As a short-term fix,

Acked-by: Lucas De Marchi <lucas.demarchi at intel.com>


I think we should really migrate to making them hidden by default and
only export the ones we want.  When drm_public was removed, it was
basically a nop since the visibility was still set as default. I will
take a look on this.


Lucas De Marchi

> 2.18.0
> 


More information about the dri-devel mailing list