[Intel-gfx] [PATCH v14 02/35] drm: enum port definition is moved into i915_drm.h

Daniel Vetter daniel at ffwll.ch
Fri Feb 15 17:47:01 UTC 2019


On Fri, Feb 15, 2019 at 02:04:57PM +0530, Ramalingam C wrote:
> For the reusability of the enum port in other driver modules
> (like mei_hdcp), enum port definition is moved from I915 local header
> intel_display.h to drm/i915_drm.h
> 
> Signed-off-by: Ramalingam C <ramalingam.c at intel.com>
> Acked-by: Daniel Vetter <daniel.vetter at ffwll.ch>

Applied to topic/mei-hdcp. I've fixed the subject prefix to drm/i915:
since this isn't a core drm change, only i915 related.

Thanks, Daniel

> ---
>  drivers/gpu/drm/i915/intel_display.h | 16 +---------------
>  include/drm/i915_drm.h               | 15 +++++++++++++++
>  2 files changed, 16 insertions(+), 15 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_display.h b/drivers/gpu/drm/i915/intel_display.h
> index c7c068662288..2220588e86ac 100644
> --- a/drivers/gpu/drm/i915/intel_display.h
> +++ b/drivers/gpu/drm/i915/intel_display.h
> @@ -26,6 +26,7 @@
>  #define _INTEL_DISPLAY_H_
>  
>  #include <drm/drm_util.h>
> +#include <drm/i915_drm.h>
>  
>  enum i915_gpio {
>  	GPIOA,
> @@ -150,21 +151,6 @@ enum plane_id {
>  	for ((__p) = PLANE_PRIMARY; (__p) < I915_MAX_PLANES; (__p)++) \
>  		for_each_if((__crtc)->plane_ids_mask & BIT(__p))
>  
> -enum port {
> -	PORT_NONE = -1,
> -
> -	PORT_A = 0,
> -	PORT_B,
> -	PORT_C,
> -	PORT_D,
> -	PORT_E,
> -	PORT_F,
> -
> -	I915_MAX_PORTS
> -};
> -
> -#define port_name(p) ((p) + 'A')
> -
>  /*
>   * Ports identifier referenced from other drivers.
>   * Expected to remain stable over time
> diff --git a/include/drm/i915_drm.h b/include/drm/i915_drm.h
> index c44703f471b3..7523e9a7b6e2 100644
> --- a/include/drm/i915_drm.h
> +++ b/include/drm/i915_drm.h
> @@ -100,4 +100,19 @@ extern struct resource intel_graphics_stolen_res;
>  #define INTEL_GEN11_BSM_DW1	0xc4
>  #define   INTEL_BSM_MASK	(-(1u << 20))
>  
> +enum port {
> +	PORT_NONE = -1,
> +
> +	PORT_A = 0,
> +	PORT_B,
> +	PORT_C,
> +	PORT_D,
> +	PORT_E,
> +	PORT_F,
> +
> +	I915_MAX_PORTS
> +};
> +
> +#define port_name(p) ((p) + 'A')
> +
>  #endif				/* _I915_DRM_H_ */
> -- 
> 2.7.4
> 

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch


More information about the Intel-gfx mailing list