All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chris Wilson <chris@chris-wilson.co.uk>
To: Imre Deak <imre.deak@intel.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [Intel-gfx] [PATCH 9/9] drm/i915: Make intel_display_power_put_unchecked() an internal-only function
Date: Tue, 01 Dec 2020 11:13:38 +0000	[thread overview]
Message-ID: <160682121868.17248.514046911489151009@build.alporthouse.com> (raw)
In-Reply-To: <20201201105222.GA2849269@ideak-desk.fi.intel.com>

Quoting Imre Deak (2020-12-01 10:52:22)
> On Tue, Dec 01, 2020 at 08:14:40AM +0000, Chris Wilson wrote:
> > Quoting Imre Deak (2020-11-30 22:47:08)
> > > On Mon, Nov 30, 2020 at 10:07:01PM +0000, Chris Wilson wrote:
> > > > Quoting Imre Deak (2020-11-30 21:22:00)
> > > > > All the display power domain references are wakeref tracked now, so we
> > > > > can mark intel_display_power_put_unchecked() as an internal function
> > > > > (for suppressing wakeref tracking in non-debug builds).
> > > > > 
> > > > > Cc: Chris Wilson <chris@chris-wilson.co.uk>
> > > > > Signed-off-by: Imre Deak <imre.deak@intel.com>
> > > > 
> > > > Ok, after all previous patches it will only be called from the header
> > > > after throwing away the wakeref.
> > > > 
> > > > I have a sneaky suspicion you might take another path after reviewing
> > > > the danger caused by the debug build, 
> > > 
> > > Yes, how about also adding:
> > > 
> > > +static inline void
> > > +____intel_display_power_put(struct drm_i915_private *i915,
> > > +                           enum intel_display_power_domain domain,
> > > +                           intel_wakeref_t wakeref)
> > > +{
> > > +       intel_display_power_put_unchecked(i915, domain);
> > > +}
> > > +
> > >  static inline void
> > >  intel_display_power_put(struct drm_i915_private *i915,
> > >                         enum intel_display_power_domain domain,
> > >                         intel_wakeref_t wakeref)
> > >  {
> > > -       intel_display_power_put_unchecked(i915, domain);
> > > +       ____intel_display_power_put(i915, domain, wakeref);
> > >  }
> > > 
> > > (and similar change for intel_display_power_put_async()) ?
> > 
> > Hmm. The compiler shouldn't DCE the wakeref since it has a side-effect.
> > We can but see.
> 
> Yes, arguments passed to functions are evaluated exactly once. The above
> extra call doesn't make sense anyway.
> 
> Are you ok with patch 4 then?

If you've done a quick non-debug test run, then I'm convinced I was
barking up the wrong tree.

The remaining patches are
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
(since they were all blocked by the uncertainty in behaviour of the
fetch_and_zero).
-Chris
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2020-12-01 11:13 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-30 21:21 [Intel-gfx] [PATCH 0/9] drm/i915: Add the missing wakeref tracking for display power references Imre Deak
2020-11-30 21:21 ` [Intel-gfx] [PATCH 1/9] drm/i915: Use CRTC index consistently during getting/putting CRTC power domains Imre Deak
2020-11-30 21:50   ` Chris Wilson
2020-11-30 21:21 ` [Intel-gfx] [PATCH 2/9] drm/i915: Factor out helpers to get/put a set of tracked " Imre Deak
2020-11-30 21:48   ` Chris Wilson
2020-12-01 16:13   ` [Intel-gfx] [PATCH v2 " Imre Deak
2020-11-30 21:21 ` [Intel-gfx] [PATCH 3/9] drm/i915: Track power references taken for enabled CRTCs Imre Deak
2020-11-30 21:57   ` Chris Wilson
2020-11-30 21:21 ` [Intel-gfx] [PATCH 4/9] drm/i915/ddi: Track power reference taken for encoder DDI IO use Imre Deak
2020-11-30 22:00   ` Chris Wilson
2020-11-30 22:07     ` Imre Deak
2020-11-30 23:39       ` Imre Deak
2020-12-01 11:08         ` Chris Wilson
2020-11-30 21:21 ` [Intel-gfx] [PATCH 5/9] drm/i915/ddi: Track power reference taken for encoder main lane AUX use Imre Deak
2020-11-30 21:21 ` [Intel-gfx] [PATCH 6/9] drm/i915: Track power reference taken for eDP VDD Imre Deak
2020-11-30 21:21 ` [Intel-gfx] [PATCH 7/9] drm/i915: Rename power_domains.wakeref to init_wakeref Imre Deak
2020-11-30 22:01   ` Chris Wilson
2020-11-30 21:21 ` [Intel-gfx] [PATCH 8/9] drm/i915: Track power reference taken to disable power well functionality Imre Deak
2020-12-01 16:13   ` [Intel-gfx] [PATCH v2 " Imre Deak
2020-11-30 21:22 ` [Intel-gfx] [PATCH 9/9] drm/i915: Make intel_display_power_put_unchecked() an internal-only function Imre Deak
2020-11-30 22:07   ` Chris Wilson
2020-11-30 22:47     ` Imre Deak
2020-12-01  8:14       ` Chris Wilson
2020-12-01 10:52         ` Imre Deak
2020-12-01 11:13           ` Chris Wilson [this message]
2020-12-01 11:32             ` Imre Deak
2020-12-01  2:17 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for drm/i915: Add the missing wakeref tracking for display power references Patchwork
2020-12-01  2:48 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2020-12-01 15:42 ` [Intel-gfx] ✓ Fi.CI.IGT: " Patchwork
2020-12-01 18:54 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for drm/i915: Add the missing wakeref tracking for display power references (rev3) Patchwork
2020-12-01 19:25 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2020-12-02 15:33 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for drm/i915: Add the missing wakeref tracking for display power references (rev4) Patchwork
2020-12-02 19:57 ` [Intel-gfx] ✓ Fi.CI.IGT: success " Patchwork
2020-12-03 10:44 ` [Intel-gfx] ✓ Fi.CI.IGT: success for drm/i915: Add the missing wakeref tracking for display power references (rev3) Patchwork
2020-12-03 13:41   ` Imre Deak

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=160682121868.17248.514046911489151009@build.alporthouse.com \
    --to=chris@chris-wilson.co.uk \
    --cc=imre.deak@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    /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.