Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Imre Deak <imre.deak@intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [Intel-gfx] [PATCH 4/9] drm/i915/ddi: Track power reference taken for encoder DDI IO use
Date: Tue, 1 Dec 2020 00:07:16 +0200	[thread overview]
Message-ID: <20201130220716.GC2480925@ideak-desk.fi.intel.com> (raw)
In-Reply-To: <160677363371.12351.7483170084025008582@build.alporthouse.com>

On Mon, Nov 30, 2020 at 10:00:33PM +0000, Chris Wilson wrote:
> Quoting Imre Deak (2020-11-30 21:21:55)
> > Add wakeref tracking for the DDI encoders' DDI_IO display power domain
> > references.
> > 
> > Cc: Chris Wilson <chris@chris-wilson.co.uk>
> > Signed-off-by: Imre Deak <imre.deak@intel.com>
> > ---
> >  drivers/gpu/drm/i915/display/intel_ddi.c      | 38 ++++++++++++-------
> >  .../drm/i915/display/intel_display_types.h    |  1 +
> >  2 files changed, 25 insertions(+), 14 deletions(-)
> > 
> > diff --git a/drivers/gpu/drm/i915/display/intel_ddi.c b/drivers/gpu/drm/i915/display/intel_ddi.c
> > index 92940a0c5ef8..9518d298b0f7 100644
> > --- a/drivers/gpu/drm/i915/display/intel_ddi.c
> > +++ b/drivers/gpu/drm/i915/display/intel_ddi.c
> > @@ -2285,9 +2285,11 @@ static void intel_ddi_get_power_domains(struct intel_encoder *encoder,
> >         dig_port = enc_to_dig_port(encoder);
> >  
> >         if (!intel_phy_is_tc(dev_priv, phy) ||
> > -           dig_port->tc_mode != TC_PORT_TBT_ALT)
> > -               intel_display_power_get(dev_priv,
> > -                                       dig_port->ddi_io_power_domain);
> > +           dig_port->tc_mode != TC_PORT_TBT_ALT) {
> > +               drm_WARN_ON(&dev_priv->drm, dig_port->ddi_io_wakeref);
> > +               dig_port->ddi_io_wakeref = intel_display_power_get(dev_priv,
> > +                                                                  dig_port->ddi_io_power_domain);
> > +       }
> 
> > @@ -3958,8 +3967,9 @@ static void intel_ddi_post_disable_hdmi(struct intel_atomic_state *state,
> >  
> >         intel_disable_ddi_buf(encoder, old_crtc_state);
> >  
> > -       intel_display_power_put_unchecked(dev_priv,
> > -                                         dig_port->ddi_io_power_domain);
> > +       intel_display_power_put(dev_priv,
> > +                               dig_port->ddi_io_power_domain,
> > +                               fetch_and_zero(&dig_port->ddi_io_wakeref));
> 
> I remember that once we had trouble with this being a macro and not
> evaluating the fetch_and_zero() when used as an argument.
> 
> Looks like we still have the same trouble with
> 
> #if !IS_ENABLED(CONFIG_DRM_I915_DEBUG_RUNTIME_PM)
> 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);
> }
> #endif
> 
> will cause the ddi_io_wakeref to not be cleared, and the warn on to be
> hit in non-debug builds.

Arg, screwed it again.

> -Chris
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2020-11-30 22:07 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 [this message]
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
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=20201130220716.GC2480925@ideak-desk.fi.intel.com \
    --to=imre.deak@intel.com \
    --cc=chris@chris-wilson.co.uk \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox