Re: [PATCH] snd/hda, drm/i915: Track the display_power_status using a cookie

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Quoting Mika Kuoppala (2019-02-14 13:14:08)
> Chris Wilson <chris@xxxxxxxxxxxxxxxxxx> writes:
> 
> > drm/i915 is tracking all wakeref owners with a cookie in order to
> > identify leaks. To that end, each rpm acquisition ops->get_power is
> > assigned a cookie which should be passed to ops->put_power to signify
> > its release (and removal from the list of wakeref owners). As snd/hda is
> > already using a bool to track current status of display_power extending
> > that to an unsigned long to hold the boolean cookie is a trivial
> > extension, and will quell all doubt that snd/hda is the cause of the
> > device runtime pm leaks.
> >
> > v2: Keep using the power abstraction for local wakeref tracking.
> >
> > Signed-off-by: Chris Wilson <chris@xxxxxxxxxxxxxxxxxx>
> > Cc: Takashi Iwai <tiwai@xxxxxxx>
> > Cc: Jani Nikula <jani.nikula@xxxxxxxxx>
> > ---
> >  drivers/gpu/drm/i915/intel_audio.c | 20 +++++++++++---------
> >  include/drm/drm_audio_component.h  |  7 +++++--
> >  include/sound/hdaudio.h            |  2 +-
> >  sound/hda/hdac_component.c         | 18 ++++++++++++------
> >  4 files changed, 29 insertions(+), 18 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/i915/intel_audio.c b/drivers/gpu/drm/i915/intel_audio.c
> > index 5104c6bbd66f..a1e60370eb34 100644
> > --- a/drivers/gpu/drm/i915/intel_audio.c
> > +++ b/drivers/gpu/drm/i915/intel_audio.c
> > @@ -741,27 +741,28 @@ void intel_init_audio_hooks(struct drm_i915_private *dev_priv)
> >       }
> >  }
> >  
> > -static void i915_audio_component_get_power(struct device *kdev)
> > +static unsigned long i915_audio_component_get_power(struct device *kdev)
> >  {
> > -     intel_display_power_get(kdev_to_i915(kdev), POWER_DOMAIN_AUDIO);
> > +     return intel_display_power_get(kdev_to_i915(kdev), POWER_DOMAIN_AUDIO);
> >  }
> >  
> > -static void i915_audio_component_put_power(struct device *kdev)
> > +static void i915_audio_component_put_power(struct device *kdev,
> > +                                        unsigned long cookie)
> 
> Changing the name and type is warranted as the layer changes.
> 
> We discussed on irc about catching the possible future type
> mismatches with build bug on.

Turns out depot_stack_handle_t (aka intel_wakeref_t) is just a u32, so I
went with your suggestion of sizeof(unsigned long) <
sizeof(intel_wakeref_t).

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




[Index of Archives]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux