public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Daniel Vetter <daniel@ffwll.ch>
To: Paulo Zanoni <przanoni@gmail.com>
Cc: Intel Graphics Development <intel-gfx@lists.freedesktop.org>
Subject: Re: [PATCH 2/4] drm/i915: Remove the has_aux_irq = false code path in intel_dp_aux_ch()
Date: Tue, 3 Dec 2013 17:46:33 +0100	[thread overview]
Message-ID: <20131203164633.GI27344@phenom.ffwll.local> (raw)
In-Reply-To: <CA+gsUGSjEhBqvQoLMf0jxPq-KfhGx1PgPo82AirCYLHnrke1Wg@mail.gmail.com>

On Tue, Dec 03, 2013 at 01:07:46PM -0200, Paulo Zanoni wrote:
> 2013/12/3 Damien Lespiau <damien.lespiau@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@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@lists.freedesktop.org
> > http://lists.freedesktop.org/mailman/listinfo/intel-gfx
> 
> 
> 
> -- 
> Paulo Zanoni
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@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

  reply	other threads:[~2013-12-03 16:45 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-03 13:46 Some DisplayPort clean-ups Damien Lespiau
2013-12-03 13:46 ` [PATCH 1/4] drm/i915: Fix copy/paste DP vs eDP error in comment Damien Lespiau
2013-12-03 13:46 ` [PATCH 2/4] drm/i915: Remove the has_aux_irq = false code path in intel_dp_aux_ch() Damien Lespiau
2013-12-03 15:07   ` Paulo Zanoni
2013-12-03 16:46     ` Daniel Vetter [this message]
2013-12-03 13:47 ` [PATCH 3/4] drm/i915: Remove if 0'ed static arrays Damien Lespiau
2013-12-03 17:01   ` Daniel Vetter
2013-12-03 13:47 ` [PATCH 4/4] drm/i915: Cleanup the DP_AUX_CTL macros Damien Lespiau

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20131203164633.GI27344@phenom.ffwll.local \
    --to=daniel@ffwll.ch \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=przanoni@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox