diff mbox

drm/i915/bxt: Use correct live status register for BXT platform

Message ID 1439981919-19127-1-git-send-email-durgadoss.r@intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

durgadoss.r@intel.com Aug. 19, 2015, 10:58 a.m. UTC
BXT platform uses live status bits from 0x44440 register to
obtain DP status on hotplug. The existing g4x_digital_port_connected()
uses a different register and hence misses DP hotplug events on
BXT platform. This patch fixes it by using the appropriate
register(0x44440) and live status bits(3:5).

Signed-off-by: Durgadoss R <durgadoss.r@intel.com>
---
 drivers/gpu/drm/i915/intel_dp.c | 17 ++++++++++++++++-
 1 file changed, 16 insertions(+), 1 deletion(-)

Comments

Jani Nikula Aug. 19, 2015, 12:30 p.m. UTC | #1
Durgadoss' patch made me look at the {ibx,g4x}_digital_port_connected
functions, and I decided those need some love. No point in having the
platform specific code split both to functions and if ladders within
those functions. So add one common top level
intel_digital_port_connected function with one if ladder splitting out
to purely platform specific functions.

BR,
Jani.


Jani Nikula (5):
  drm/i915: move ibx_digital_port_connected to intel_dp.c
  drm/i915: add common intel_digital_port_connected function
  drm/i915: split ibx_digital_port_connected to ibx and cpt variants
  drm/i915: split g4x_digital_port_connected to g4x and vlv variants
  drm/i915/bxt: Use correct live status register for BXT platform

 drivers/gpu/drm/i915/intel_display.c |  45 ---------
 drivers/gpu/drm/i915/intel_dp.c      | 186 +++++++++++++++++++++++++----------
 drivers/gpu/drm/i915/intel_drv.h     |   2 -
 3 files changed, 136 insertions(+), 97 deletions(-)
Shuang He Aug. 28, 2015, 10:30 a.m. UTC | #2
Tested-By: Intel Graphics QA PRTS (Patch Regression Test System Contact: shuang.he@intel.com)
Task id: 7232
-------------------------------------Summary-------------------------------------
Platform          Delta          drm-intel-nightly          Series Applied
ILK                 -1              302/302              301/302
SNB                                  315/315              315/315
IVB                                  336/336              336/336
BYT                 -1              283/283              282/283
HSW                                  378/378              378/378
-------------------------------------Detailed-------------------------------------
Platform  Test                                drm-intel-nightly          Series Applied
*ILK  igt@kms_flip@flip-vs-dpms-interruptible      PASS(1)      DMESG_WARN(1)
*BYT  igt@gem_tiled_partial_pwrite_pread@reads      PASS(1)      FAIL(1)
Note: You need to pay more attention to line start with '*'
diff mbox

Patch

diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
index a1dac9c..821d770 100644
--- a/drivers/gpu/drm/i915/intel_dp.c
+++ b/drivers/gpu/drm/i915/intel_dp.c
@@ -4444,6 +4444,7 @@  static int g4x_digital_port_connected(struct drm_device *dev,
 {
 	struct drm_i915_private *dev_priv = dev->dev_private;
 	uint32_t bit;
+	uint32_t reg = IS_BROXTON(dev) ? GEN8_DE_PORT_ISR : PORT_HOTPLUG_STAT;
 
 	if (IS_VALLEYVIEW(dev)) {
 		switch (intel_dig_port->port) {
@@ -4459,6 +4460,20 @@  static int g4x_digital_port_connected(struct drm_device *dev,
 		default:
 			return -EINVAL;
 		}
+	} else if (IS_BROXTON(dev)) {
+		switch (intel_dig_port->port) {
+		case PORT_A:
+			bit = BXT_DE_PORT_HP_DDIA;
+			break;
+		case PORT_B:
+			bit = BXT_DE_PORT_HP_DDIB;
+			break;
+		case PORT_C:
+			bit = BXT_DE_PORT_HP_DDIC;
+			break;
+		default:
+			return -EINVAL;
+		}
 	} else {
 		switch (intel_dig_port->port) {
 		case PORT_B:
@@ -4475,7 +4490,7 @@  static int g4x_digital_port_connected(struct drm_device *dev,
 		}
 	}
 
-	if ((I915_READ(PORT_HOTPLUG_STAT) & bit) == 0)
+	if ((I915_READ(reg) & bit) == 0)
 		return 0;
 	return 1;
 }