2013/12/3 Damien Lespiau <damien.lespiau@xxxxxxxxx>: > 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. > > Signed-off-by: Damien Lespiau <damien.lespiau@xxxxxxxxx> > --- > 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@xxxxxxxxxxxxxxxxxxxxx > http://lists.freedesktop.org/mailman/listinfo/intel-gfx -- Paulo Zanoni _______________________________________________ Intel-gfx mailing list Intel-gfx@xxxxxxxxxxxxxxxxxxxxx http://lists.freedesktop.org/mailman/listinfo/intel-gfx