[06/10] drm/i915/tc: un-inline intel_tc_port_ref_held()

Submitted by Jani Nikula on Aug. 6, 2019, 10:07 a.m.

Details

Message ID 850d80046088b0505bbbd74a345b5e393389e6f5.1565085691.git.jani.nikula@intel.com
State New
Headers show
Series "drm/i915: some more header juggling" ( rev: 1 ) in Intel GFX

Not browsing as part of any series.

Commit Message

Jani Nikula Aug. 6, 2019, 10:07 a.m.
Avoid including the intel_drv.h mega header from other header files to
make further header cleanup easier.

Signed-off-by: Jani Nikula <jani.nikula@intel.com>
---
 drivers/gpu/drm/i915/display/intel_tc.c |  7 +++++++
 drivers/gpu/drm/i915/display/intel_tc.h | 10 ++--------
 2 files changed, 9 insertions(+), 8 deletions(-)

Patch hide | download patch | download mbox

diff --git a/drivers/gpu/drm/i915/display/intel_tc.c b/drivers/gpu/drm/i915/display/intel_tc.c
index c96a81c2416c..a4d3d2d541c4 100644
--- a/drivers/gpu/drm/i915/display/intel_tc.c
+++ b/drivers/gpu/drm/i915/display/intel_tc.c
@@ -7,6 +7,7 @@ 
 #include "intel_display.h"
 #include "intel_dp_mst.h"
 #include "intel_tc.h"
+#include "intel_drv.h"
 
 static const char *tc_port_mode_name(enum tc_port_mode mode)
 {
@@ -503,6 +504,12 @@  void intel_tc_port_unlock(struct intel_digital_port *dig_port)
 				      wakeref);
 }
 
+bool intel_tc_port_ref_held(struct intel_digital_port *dig_port)
+{
+	return mutex_is_locked(&dig_port->tc_lock) ||
+	       dig_port->tc_link_refcount;
+}
+
 void intel_tc_port_get_link(struct intel_digital_port *dig_port,
 			    int required_lanes)
 {
diff --git a/drivers/gpu/drm/i915/display/intel_tc.h b/drivers/gpu/drm/i915/display/intel_tc.h
index 22fe922ac9cf..836d7b3e53d6 100644
--- a/drivers/gpu/drm/i915/display/intel_tc.h
+++ b/drivers/gpu/drm/i915/display/intel_tc.h
@@ -7,9 +7,8 @@ 
 #define __INTEL_TC_H__
 
 #include <linux/mutex.h>
-#include <linux/types.h>
 
-#include "intel_drv.h"
+struct intel_digital_port;
 
 bool intel_tc_port_connected(struct intel_digital_port *dig_port);
 u32 intel_tc_port_get_lane_mask(struct intel_digital_port *dig_port);
@@ -23,12 +22,7 @@  void intel_tc_port_unlock(struct intel_digital_port *dig_port);
 void intel_tc_port_get_link(struct intel_digital_port *dig_port,
 			    int required_lanes);
 void intel_tc_port_put_link(struct intel_digital_port *dig_port);
-
-static inline int intel_tc_port_ref_held(struct intel_digital_port *dig_port)
-{
-	return mutex_is_locked(&dig_port->tc_lock) ||
-	       dig_port->tc_link_refcount;
-}
+bool intel_tc_port_ref_held(struct intel_digital_port *dig_port);
 
 void intel_tc_port_init(struct intel_digital_port *dig_port, bool is_legacy);