All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Rodrigo Vivi <rodrigo.vivi@gmail.com>
Cc: intel-gfx <intel-gfx@lists.freedesktop.org>,
	Rodrigo Vivi <rodrigo.vivi@intel.com>
Subject: Re: [PATCH 2/4] drm/i915: Remove PSR HW tracking.
Date: Fri, 5 Sep 2014 12:14:53 +0300	[thread overview]
Message-ID: <20140905091453.GT4193@intel.com> (raw)
In-Reply-To: <CABVU7+sFNDiQx-WjN001K_-CpB0-JJd7C+6bEdwMiJXjTg6=+g@mail.gmail.com>

On Thu, Sep 04, 2014 at 12:53:39PM -0700, Rodrigo Vivi wrote:
> On Thu, Sep 4, 2014 at 1:06 AM, Ville Syrjälä <ville.syrjala@linux.intel.com
> > wrote:
> 
> > On Wed, Sep 03, 2014 at 10:49:57PM -0400, Rodrigo Vivi wrote:
> > > Now that we are tracking psr states on Software side we don't need HW
> > help anymore.
> > > So we can clean up the code a bit and avoid unecessary sets.
> > >
> > > Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
> > > ---
> > >  drivers/gpu/drm/i915/intel_dp.c | 12 ------------
> > >  1 file changed, 12 deletions(-)
> > >
> > > diff --git a/drivers/gpu/drm/i915/intel_dp.c
> > b/drivers/gpu/drm/i915/intel_dp.c
> > > index a796831..9414e67 100644
> > > --- a/drivers/gpu/drm/i915/intel_dp.c
> > > +++ b/drivers/gpu/drm/i915/intel_dp.c
> > > @@ -1778,10 +1778,7 @@ static void intel_edp_psr_enable_sink(struct
> > intel_dp *intel_dp)
> > >  {
> > >       struct intel_digital_port *dig_port = dp_to_dig_port(intel_dp);
> > >       struct drm_device *dev = dig_port->base.base.dev;
> > > -     struct drm_i915_private *dev_priv = dev->dev_private;
> > >       uint32_t aux_clock_divider;
> > > -     int precharge = 0x3;
> > > -     int msg_size = 5;       /* Header(4) + Message(1) */
> > >       bool only_standby = false;
> > >
> > >       aux_clock_divider = intel_dp->get_aux_clock_divider(intel_dp, 0);
> > > @@ -1796,15 +1793,6 @@ static void intel_edp_psr_enable_sink(struct
> > intel_dp *intel_dp)
> > >       else
> > >               drm_dp_dpcd_writeb(&intel_dp->aux, DP_PSR_EN_CFG,
> > >                                  DP_PSR_ENABLE |
> > DP_PSR_MAIN_LINK_ACTIVE);
> > > -
> > > -     /* Setup AUX registers */
> > > -     I915_WRITE(EDP_PSR_AUX_DATA1(dev), EDP_PSR_DPCD_COMMAND);
> > > -     I915_WRITE(EDP_PSR_AUX_DATA2(dev), EDP_PSR_DPCD_NORMAL_OPERATION);
> > > -     I915_WRITE(EDP_PSR_AUX_CTL(dev),
> > > -                DP_AUX_CH_CTL_TIME_OUT_400us |
> > > -                (msg_size << DP_AUX_CH_CTL_MESSAGE_SIZE_SHIFT) |
> > > -                (precharge << DP_AUX_CH_CTL_PRECHARGE_2US_SHIFT) |
> > > -                (aux_clock_divider <<
> > DP_AUX_CH_CTL_BIT_CLOCK_2X_SHIFT));
> >
> > As I said I blieve FBC is the one that does the hw tracking. I think the
> > hardware will still do the entry/exit (including automagic link
> > re-train) but now you've not told it how to wake up the sink. So I don't
> > understand how this can even work.
> >
> 
> Per spec we have to program aux "registers for HW assist PSR Exit Support."

And how do you exit w/o HW assist exactly? You never do the DPCD write
manually so I don't see how it can work.

> 
> With the exit being made on SW side we don't need HW help anymore.
> Same reason why this works with VLV.
> 
> But there is no way to claim full control. So automagically triggers still
> exist.
> So I couldn't remove the W/As that mask events on srd_debug. :(
> 
> But withouth these aux sets we are fine and it just works.

Looks like these magic numbers are in fact just the SET_POWER(D0) DPCD
write. Might be good to clarify this with Art, but I think what is happening
is that you're using link standby, so just the PSR SDP sent inline on the
main link is enough to exit PSR. But if you'd use the main link off mode
then you'd need this AUX stuff.

We should probably kill the magic numbers here and just assemble the AUX
data like we would do for normal AUX. At least that way people would
understand what it's meant to do from just reading the code. Right now
it looks like black magic and the define names don't really help either.

> 
> 
> >
> > >  }
> > >
> > >  static void intel_edp_psr_enable_source(struct intel_dp *intel_dp)
> > > --
> > > 1.9.3
> > >
> > > _______________________________________________
> > > Intel-gfx mailing list
> > > Intel-gfx@lists.freedesktop.org
> > > http://lists.freedesktop.org/mailman/listinfo/intel-gfx
> >
> > --
> > Ville Syrjälä
> > Intel OTC
> > _______________________________________________
> > Intel-gfx mailing list
> > Intel-gfx@lists.freedesktop.org
> > http://lists.freedesktop.org/mailman/listinfo/intel-gfx
> >
> 
> 
> 
> -- 
> Rodrigo Vivi
> Blog: http://blog.vivi.eng.br

-- 
Ville Syrjälä
Intel OTC

  reply	other threads:[~2014-09-05  9:15 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-04  2:49 [PATCH 1/4] drm/i915: Increase PSR Idle Frame to 2 Rodrigo Vivi
2014-09-04  2:49 ` [PATCH 2/4] drm/i915: Remove PSR HW tracking Rodrigo Vivi
     [not found]   ` <20140904080643.GC4193@intel.com>
2014-09-04 19:53     ` Rodrigo Vivi
2014-09-05  9:14       ` Ville Syrjälä [this message]
2014-09-04  2:49 ` [PATCH 3/4] drm/i915: Move PSR w/as to enable source Rodrigo Vivi
2014-09-04  2:49 ` [PATCH 4/4] drm/i915: Rename psr setup vsc function and set it always Rodrigo Vivi
     [not found] ` <20140904075516.GB4193@intel.com>
2014-09-04 18:18   ` [PATCH 1/4] drm/i915: Increase PSR Idle Frame to 2 Rodrigo Vivi
     [not found]   ` <20140904092916.GF15520@phenom.ffwll.local>
     [not found]     ` <20140904100427.GD4193@intel.com>
     [not found]       ` <20140904101819.GE4193@intel.com>
2014-09-04 11:04         ` Daniel Vetter
2014-09-04 18:26           ` Rodrigo Vivi
2014-09-04 18:22       ` Rodrigo Vivi
     [not found] ` <87wq9jg62e.fsf@intel.com>
2014-09-04 18:18   ` Rodrigo Vivi
     [not found] ` <20140904092253.GD15520@phenom.ffwll.local>
2014-09-04 18:20   ` Rodrigo Vivi
2014-09-04 19:05     ` Daniel Vetter
2014-09-04 19:16       ` Rodrigo Vivi
2014-09-04 20:20         ` Daniel Vetter
2014-09-05  0:40           ` Rodrigo Vivi
2014-09-05  8:37             ` Daniel Vetter
2014-09-13  0:29               ` Rodrigo Vivi
2014-09-15  9:08                 ` Daniel Vetter

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=20140905091453.GT4193@intel.com \
    --to=ville.syrjala@linux.intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=rodrigo.vivi@gmail.com \
    --cc=rodrigo.vivi@intel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.