[v8,2/6] drm: port definition is moved back into i915 header
diff mbox series

Message ID 20190822113430.25524-1-ramalingam.c@intel.com
State New
Headers show
Series
  • Untitled series #163713
Related show

Commit Message

Ramalingam C Aug. 22, 2019, 11:34 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.

v2:
  intel_display.h is included in intel_hdcp.h

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 +
 drivers/gpu/drm/i915/display/intel_hdcp.h    |  2 ++
 include/drm/i915_drm.h                       | 18 ------------------
 5 files changed, 23 insertions(+), 18 deletions(-)

Patch
diff mbox series

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/drivers/gpu/drm/i915/display/intel_hdcp.h b/drivers/gpu/drm/i915/display/intel_hdcp.h
index 13555b054930..c46ff19ca2dd 100644
--- a/drivers/gpu/drm/i915/display/intel_hdcp.h
+++ b/drivers/gpu/drm/i915/display/intel_hdcp.h
@@ -10,6 +10,8 @@ 
 
 #include <drm/i915_drm.h>
 
+#include "intel_display.h"
+
 struct drm_connector;
 struct drm_connector_state;
 struct drm_i915_private;
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_ */