All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/i915/bxt: Use correct live status register for BXT platform
@ 2015-08-19 10:58 Durgadoss R
  2015-08-19 12:30 ` [PATCH 0/5] drm/i915: clean up *_digital_port_connected Jani Nikula
  2015-08-28 10:30 ` [PATCH] " shuang.he
  0 siblings, 2 replies; 13+ messages in thread
From: Durgadoss R @ 2015-08-19 10:58 UTC (permalink / raw)
  To: intel-gfx

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(-)

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;
 }
-- 
1.9.1

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2015-08-28 10:30 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-08-19 10:58 [PATCH] drm/i915/bxt: Use correct live status register for BXT platform Durgadoss R
2015-08-19 12:30 ` [PATCH 0/5] drm/i915: clean up *_digital_port_connected Jani Nikula
2015-08-19 12:30   ` [PATCH 1/5] drm/i915: move ibx_digital_port_connected to intel_dp.c Jani Nikula
2015-08-19 17:42     ` R, Durgadoss
2015-08-19 12:30   ` [PATCH 2/5] drm/i915: add common intel_digital_port_connected function Jani Nikula
2015-08-19 12:34     ` Jani Nikula
2015-08-19 17:50       ` R, Durgadoss
2015-08-19 18:10         ` Jani Nikula
2015-08-19 18:12         ` Ville Syrjälä
2015-08-19 12:30   ` [PATCH 3/5] drm/i915: split ibx_digital_port_connected to ibx and cpt variants Jani Nikula
2015-08-19 12:30   ` [PATCH 4/5] drm/i915: split g4x_digital_port_connected to g4x and vlv variants Jani Nikula
2015-08-19 12:30   ` [PATCH 5/5] drm/i915/bxt: Use correct live status register for BXT platform Jani Nikula
2015-08-28 10:30 ` [PATCH] " shuang.he

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.