diff mbox series

[v7,2/6] drm: port definition is moved back into i915 header

Message ID 20190822111445.29350-3-ramalingam.c@intel.com (mailing list archive)
State New, archived
Headers show
Series drm/i915: Enable HDCP 1.4 and 2.2 on Gen12+ | expand

Commit Message

Ramalingam C Aug. 22, 2019, 11:14 a.m. UTC
Handled the need for exposing enum port to mei_hdcp driver, by
converting the port into ddi index as per ME FW.

Hence enum port definition moved into I915 driver itself.

Signed-off-by: Ramalingam C <ramalingam.c@intel.com>
---
 drivers/gpu/drm/i915/display/intel_bios.h    |  2 ++
 drivers/gpu/drm/i915/display/intel_display.h | 18 ++++++++++++++++++
 drivers/gpu/drm/i915/display/intel_dp.h      |  1 +
 include/drm/i915_drm.h                       | 18 ------------------
 4 files changed, 21 insertions(+), 18 deletions(-)

Comments

Jani Nikula Aug. 22, 2019, 11:42 a.m. UTC | #1
On Thu, 22 Aug 2019, Ramalingam C <ramalingam.c@intel.com> wrote:
> Handled the need for exposing enum port to mei_hdcp driver, by
> converting the port into ddi index as per ME FW.
>
> Hence enum port definition moved into I915 driver itself.

For future reference, please consider using the imperative style in the
commit message. For example, "move port definition back to i915 header",
"Hence move enum port definition into i915 driver itself", etc.

There were some complaints from CI, please make sure this builds with
CONFIG_DRM_I915_WERROR=y.

Reviewed-by: Jani Nikula <jani.nikula@intel.com>

>
> Signed-off-by: Ramalingam C <ramalingam.c@intel.com>
> ---
>  drivers/gpu/drm/i915/display/intel_bios.h    |  2 ++
>  drivers/gpu/drm/i915/display/intel_display.h | 18 ++++++++++++++++++
>  drivers/gpu/drm/i915/display/intel_dp.h      |  1 +
>  include/drm/i915_drm.h                       | 18 ------------------
>  4 files changed, 21 insertions(+), 18 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_bios.h b/drivers/gpu/drm/i915/display/intel_bios.h
> index 4969189e620f..9415e22435ba 100644
> --- a/drivers/gpu/drm/i915/display/intel_bios.h
> +++ b/drivers/gpu/drm/i915/display/intel_bios.h
> @@ -34,6 +34,8 @@
>  
>  #include <drm/i915_drm.h>
>  
> +#include "intel_display.h"
> +
>  struct drm_i915_private;
>  
>  enum intel_backlight_type {
> diff --git a/drivers/gpu/drm/i915/display/intel_display.h b/drivers/gpu/drm/i915/display/intel_display.h
> index e57e6969051d..40610d51327e 100644
> --- a/drivers/gpu/drm/i915/display/intel_display.h
> +++ b/drivers/gpu/drm/i915/display/intel_display.h
> @@ -182,6 +182,24 @@ 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,
> +	PORT_G,
> +	PORT_H,
> +	PORT_I,
> +
> +	I915_MAX_PORTS
> +};
> +
> +#define port_name(p) ((p) + 'A')
> +
>  /*
>   * Ports identifier referenced from other drivers.
>   * Expected to remain stable over time
> diff --git a/drivers/gpu/drm/i915/display/intel_dp.h b/drivers/gpu/drm/i915/display/intel_dp.h
> index 657bbb1f5ed0..ca05ae799d6e 100644
> --- a/drivers/gpu/drm/i915/display/intel_dp.h
> +++ b/drivers/gpu/drm/i915/display/intel_dp.h
> @@ -11,6 +11,7 @@
>  #include <drm/i915_drm.h>
>  
>  #include "i915_reg.h"
> +#include "intel_display.h"
>  
>  enum pipe;
>  struct drm_connector_state;
> diff --git a/include/drm/i915_drm.h b/include/drm/i915_drm.h
> index 23274cf92712..6722005884db 100644
> --- a/include/drm/i915_drm.h
> +++ b/include/drm/i915_drm.h
> @@ -100,22 +100,4 @@ 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,
> -	PORT_G,
> -	PORT_H,
> -	PORT_I,
> -
> -	I915_MAX_PORTS
> -};
> -
> -#define port_name(p) ((p) + 'A')
> -
>  #endif				/* _I915_DRM_H_ */
diff mbox series

Patch

diff --git a/drivers/gpu/drm/i915/display/intel_bios.h b/drivers/gpu/drm/i915/display/intel_bios.h
index 4969189e620f..9415e22435ba 100644
--- a/drivers/gpu/drm/i915/display/intel_bios.h
+++ b/drivers/gpu/drm/i915/display/intel_bios.h
@@ -34,6 +34,8 @@ 
 
 #include <drm/i915_drm.h>
 
+#include "intel_display.h"
+
 struct drm_i915_private;
 
 enum intel_backlight_type {
diff --git a/drivers/gpu/drm/i915/display/intel_display.h b/drivers/gpu/drm/i915/display/intel_display.h
index e57e6969051d..40610d51327e 100644
--- a/drivers/gpu/drm/i915/display/intel_display.h
+++ b/drivers/gpu/drm/i915/display/intel_display.h
@@ -182,6 +182,24 @@  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,
+	PORT_G,
+	PORT_H,
+	PORT_I,
+
+	I915_MAX_PORTS
+};
+
+#define port_name(p) ((p) + 'A')
+
 /*
  * Ports identifier referenced from other drivers.
  * Expected to remain stable over time
diff --git a/drivers/gpu/drm/i915/display/intel_dp.h b/drivers/gpu/drm/i915/display/intel_dp.h
index 657bbb1f5ed0..ca05ae799d6e 100644
--- a/drivers/gpu/drm/i915/display/intel_dp.h
+++ b/drivers/gpu/drm/i915/display/intel_dp.h
@@ -11,6 +11,7 @@ 
 #include <drm/i915_drm.h>
 
 #include "i915_reg.h"
+#include "intel_display.h"
 
 enum pipe;
 struct drm_connector_state;
diff --git a/include/drm/i915_drm.h b/include/drm/i915_drm.h
index 23274cf92712..6722005884db 100644
--- a/include/drm/i915_drm.h
+++ b/include/drm/i915_drm.h
@@ -100,22 +100,4 @@  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,
-	PORT_G,
-	PORT_H,
-	PORT_I,
-
-	I915_MAX_PORTS
-};
-
-#define port_name(p) ((p) + 'A')
-
 #endif				/* _I915_DRM_H_ */