Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] drm/i915: use the correct Haswell DP AUX ch_ctl register
@ 2012-12-06 11:44 Paulo Zanoni
  2012-12-06 11:44 ` [PATCH 2/2] drm/i915: be less verbose when handling gmbus/aux irqs Paulo Zanoni
  2012-12-06 12:19 ` [PATCH 1/2] drm/i915: use the correct Haswell DP AUX ch_ctl register Daniel Vetter
  0 siblings, 2 replies; 4+ messages in thread
From: Paulo Zanoni @ 2012-12-06 11:44 UTC (permalink / raw)
  To: intel-gfx; +Cc: Paulo Zanoni

From: Paulo Zanoni <paulo.r.zanoni@intel.com>

Otherwise DP won't work.

Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
---
 drivers/gpu/drm/i915/intel_dp.c | 22 +++++++++++++++++++++-
 1 file changed, 21 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
index 3ed5f60..3f633ca 100644
--- a/drivers/gpu/drm/i915/intel_dp.c
+++ b/drivers/gpu/drm/i915/intel_dp.c
@@ -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);
-- 
1.7.11.7

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

* [PATCH 2/2] drm/i915: be less verbose when handling gmbus/aux irqs
  2012-12-06 11:44 [PATCH 1/2] drm/i915: use the correct Haswell DP AUX ch_ctl register Paulo Zanoni
@ 2012-12-06 11:44 ` Paulo Zanoni
  2012-12-06 12:25   ` Daniel Vetter
  2012-12-06 12:19 ` [PATCH 1/2] drm/i915: use the correct Haswell DP AUX ch_ctl register Daniel Vetter
  1 sibling, 1 reply; 4+ messages in thread
From: Paulo Zanoni @ 2012-12-06 11:44 UTC (permalink / raw)
  To: intel-gfx; +Cc: Paulo Zanoni

From: Paulo Zanoni <paulo.r.zanoni@intel.com>

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

Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
---
 drivers/gpu/drm/i915/i915_irq.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c
index 58bb11b..2e1d80d 100644
--- a/drivers/gpu/drm/i915/i915_irq.c
+++ b/drivers/gpu/drm/i915/i915_irq.c
@@ -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);
 }
 
-- 
1.7.11.7

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

* Re: [PATCH 1/2] drm/i915: use the correct Haswell DP AUX ch_ctl register
  2012-12-06 11:44 [PATCH 1/2] drm/i915: use the correct Haswell DP AUX ch_ctl register Paulo Zanoni
  2012-12-06 11:44 ` [PATCH 2/2] drm/i915: be less verbose when handling gmbus/aux irqs Paulo Zanoni
@ 2012-12-06 12:19 ` Daniel Vetter
  1 sibling, 0 replies; 4+ messages in thread
From: Daniel Vetter @ 2012-12-06 12:19 UTC (permalink / raw)
  To: Paulo Zanoni; +Cc: intel-gfx, Paulo Zanoni

On Thu, Dec 06, 2012 at 09:44:51AM -0200, Paulo Zanoni wrote:
> From: Paulo Zanoni <paulo.r.zanoni@intel.com>
> 
> Otherwise DP won't work.
> 
> Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>

/me feels ashamed.

Squashed in with the original patch, thanks for tracking this down.
-Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch

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

* Re: [PATCH 2/2] drm/i915: be less verbose when handling gmbus/aux irqs
  2012-12-06 11:44 ` [PATCH 2/2] drm/i915: be less verbose when handling gmbus/aux irqs Paulo Zanoni
@ 2012-12-06 12:25   ` Daniel Vetter
  0 siblings, 0 replies; 4+ messages in thread
From: Daniel Vetter @ 2012-12-06 12:25 UTC (permalink / raw)
  To: Paulo Zanoni; +Cc: intel-gfx, Paulo Zanoni

On Thu, Dec 06, 2012 at 09:44:52AM -0200, Paulo Zanoni wrote:
> From: Paulo Zanoni <paulo.r.zanoni@intel.com>
> 
> Having 9500 lines repeated on dmesg does not help me at all.
> 
> Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
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
-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch

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

end of thread, other threads:[~2012-12-06 12:23 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-12-06 11:44 [PATCH 1/2] drm/i915: use the correct Haswell DP AUX ch_ctl register Paulo Zanoni
2012-12-06 11:44 ` [PATCH 2/2] drm/i915: be less verbose when handling gmbus/aux irqs Paulo Zanoni
2012-12-06 12:25   ` Daniel Vetter
2012-12-06 12:19 ` [PATCH 1/2] drm/i915: use the correct Haswell DP AUX ch_ctl register Daniel Vetter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox