[Intel-gfx] [PATCH 2/4] drm/i915: Remove the has_aux_irq = false code path in intel_dp_aux_ch()
Daniel Vetter
daniel at ffwll.ch
Tue Dec 3 17:46:33 CET 2013
On Tue, Dec 03, 2013 at 01:07:46PM -0200, Paulo Zanoni wrote:
> 2013/12/3 Damien Lespiau <damien.lespiau at intel.com>:
> > has_aux_irq is initialized to true and never touched again these days.
> > Just remove it along with the has_aux_irq = false code path.
>
> I have set "has_aux_irq" to false a few times in the last months to
> debug things, like the PC8 interrupts. I'm not sure how much we gain
> just removing the code.
I also expect this to be generally useful for bring-up - one less thing to
have working before edp works. Hence why I've originally left it in.
-Daniel
>
> >
> > Signed-off-by: Damien Lespiau <damien.lespiau at intel.com>
> > ---
> > drivers/gpu/drm/i915/intel_dp.c | 17 ++++++-----------
> > 1 file changed, 6 insertions(+), 11 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
> > index 7c54f62..7a825db 100644
> > --- a/drivers/gpu/drm/i915/intel_dp.c
> > +++ b/drivers/gpu/drm/i915/intel_dp.c
> > @@ -328,7 +328,7 @@ 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)
> > +intel_dp_aux_wait_done(struct intel_dp *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;
> > @@ -338,14 +338,10 @@ intel_dp_aux_wait_done(struct intel_dp *intel_dp, bool has_aux_irq)
> > bool done;
> >
> > #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,
> > - msecs_to_jiffies_timeout(10));
> > - else
> > - done = wait_for_atomic(C, 10) == 0;
> > + done = wait_event_timeout(dev_priv->gmbus_wait_queue, C,
> > + msecs_to_jiffies_timeout(10));
> > if (!done)
> > - DRM_ERROR("dp aux hw did not signal timeout (has irq: %i)!\n",
> > - has_aux_irq);
> > + DRM_ERROR("dp aux hw did not signal timeout!\n");
> > #undef C
> >
> > return status;
> > @@ -404,7 +400,6 @@ intel_dp_aux_ch(struct intel_dp *intel_dp,
> > int i, ret, recv_bytes;
> > uint32_t status;
> > int try, precharge, clock = 0;
> > - bool has_aux_irq = true;
> > uint32_t timeout;
> >
> > /* dp aux is extremely sensitive to irq latency, hence request the
> > @@ -459,7 +454,7 @@ intel_dp_aux_ch(struct intel_dp *intel_dp,
> > /* Send the command and wait for it to complete */
> > I915_WRITE(ch_ctl,
> > DP_AUX_CH_CTL_SEND_BUSY |
> > - (has_aux_irq ? DP_AUX_CH_CTL_INTERRUPT : 0) |
> > + DP_AUX_CH_CTL_INTERRUPT |
> > timeout |
> > (send_bytes << DP_AUX_CH_CTL_MESSAGE_SIZE_SHIFT) |
> > (precharge << DP_AUX_CH_CTL_PRECHARGE_2US_SHIFT) |
> > @@ -468,7 +463,7 @@ intel_dp_aux_ch(struct intel_dp *intel_dp,
> > DP_AUX_CH_CTL_TIME_OUT_ERROR |
> > DP_AUX_CH_CTL_RECEIVE_ERROR);
> >
> > - status = intel_dp_aux_wait_done(intel_dp, has_aux_irq);
> > + status = intel_dp_aux_wait_done(intel_dp);
> >
> > /* Clear done status and any errors */
> > I915_WRITE(ch_ctl,
> > --
> > 1.8.3.1
> >
> > _______________________________________________
> > Intel-gfx mailing list
> > Intel-gfx at lists.freedesktop.org
> > http://lists.freedesktop.org/mailman/listinfo/intel-gfx
>
>
>
> --
> Paulo Zanoni
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx
--
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
More information about the Intel-gfx
mailing list