diff mbox series

[v14,02/35] drm: enum port definition is moved into i915_drm.h

Message ID 1550219730-17734-3-git-send-email-ramalingam.c@intel.com (mailing list archive)
State New, archived
Headers show
Series drm/i915: Implement HDCP2.2 | expand

Commit Message

Ramalingam C Feb. 15, 2019, 8:34 a.m. UTC
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@intel.com>
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
---
 drivers/gpu/drm/i915/intel_display.h | 16 +---------------
 include/drm/i915_drm.h               | 15 +++++++++++++++
 2 files changed, 16 insertions(+), 15 deletions(-)

Comments

Daniel Vetter Feb. 15, 2019, 5:47 p.m. UTC | #1
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@intel.com>
> Acked-by: Daniel Vetter <daniel.vetter@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
>
diff mbox series

Patch

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_ */