Skip to contentSkip to conversation

drm/i915: use the correct Haswell DP AUX ch_ctl register

PATCH In review Paulo Zanoni 2 participants 4 messages Dec 6, 2012

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/2 drm/i915: use the correct Haswell DP AUX ch_ctl register

From: Paulo Zanoni <[email protected]>

Otherwise DP won't work.

---
 drivers/gpu/drm/i915/intel_dp.c | 22 +++++++++++++++++++++-
 1 file changed, 21 insertions(+), 1 deletion(-)
drivers/gpu/drm/i915/intel_dp.c +21 -1
index 3ed5f60..3f633ca 100644
@@ -325,12 +325,32 @@ intel_dp_check_edp(struct intel_dp *intel_dp)
 static uint32_t
 intel_dp_aux_wait_done(struct intel_dp *intel_dp, bool has_aux_irq)
 {
-	struct drm_device *dev = intel_dp_to_dev(intel_dp);
+	struct intel_digital_port *intel_dig_port = dp_to_dig_port(intel_dp);
+	struct drm_device *dev = intel_dig_port->base.base.dev;
 	struct drm_i915_private *dev_priv = dev->dev_private;
 	uint32_t ch_ctl = intel_dp->output_reg + 0x10;
 	uint32_t status;
 	bool done;
 
+	if (IS_HASWELL(dev)) {
+		switch (intel_dig_port->port) {
+		case PORT_A:
+			ch_ctl = DPA_AUX_CH_CTL;
+			break;
+		case PORT_B:
+			ch_ctl = PCH_DPB_AUX_CH_CTL;
+			break;
+		case PORT_C:
+			ch_ctl = PCH_DPC_AUX_CH_CTL;
+			break;
+		case PORT_D:
+			ch_ctl = PCH_DPD_AUX_CH_CTL;
+			break;
+		default:
+			BUG();
+		}
+	}
+
 #define C (((status = I915_READ_NOTRACE(ch_ctl)) & DP_AUX_CH_CTL_SEND_BUSY) == 0)
 	if (has_aux_irq)
 		done = wait_event_timeout(dev_priv->gmbus_wait_queue, C, 10);
Signature · 1 line
1.7.11.7
#1 lore raw

PATCH 2/2 drm/i915: be less verbose when handling gmbus/aux irqs

From: Paulo Zanoni <[email protected]>

Having 9500 lines repeated on dmesg does not help me at all.

---
 drivers/gpu/drm/i915/i915_irq.c | 4 ----
 1 file changed, 4 deletions(-)
drivers/gpu/drm/i915/i915_irq.c +0 -4
index 58bb11b..2e1d80d 100644
@@ -529,8 +529,6 @@ static void gmbus_irq_handler(struct drm_device *dev)
 {
 	struct drm_i915_private *dev_priv = (drm_i915_private_t *) dev->dev_private;
 
-	DRM_DEBUG_DRIVER("GMBUS interrupt\n");
-
 	wake_up_all(&dev_priv->gmbus_wait_queue);
 }
 
@@ -538,8 +536,6 @@ static void dp_aux_irq_handler(struct drm_device *dev)
 {
 	struct drm_i915_private *dev_priv = (drm_i915_private_t *) dev->dev_private;
 
-	DRM_DEBUG_DRIVER("AUX channel interrupt\n");
-
 	wake_up_all(&dev_priv->gmbus_wait_queue);
 }
 
Signature · 1 line
1.7.11.7
#2 lore raw

Re: [PATCH 2/2] drm/i915: be less verbose when handling gmbus/aux irqs

Quoted 5 lines · Paulo Zanoni

From: Paulo Zanoni <[email protected]>

Having 9500 lines repeated on dmesg does not help me at all.

Queued for -next, thanks for the patch. In general we might need to rethink our debug logging, we just dump massive amounts of stuff into dmesg, and it's getting unwielding imo ...
-Daniel

Signature · 3 lines
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch