Re: drm/i915/display: Fix warning callstack for imbalance wakeref

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

 



> >  drivers/gpu/drm/i915/i915_driver.c | 16 ++++++++++++----
> >  1 file changed, 12 insertions(+), 4 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/i915/i915_driver.c
> > b/drivers/gpu/drm/i915/i915_driver.c
> > index 1332c70370a6..281bf6cd5e4c 100644
> > --- a/drivers/gpu/drm/i915/i915_driver.c
> > +++ b/drivers/gpu/drm/i915/i915_driver.c
> > @@ -953,7 +953,11 @@ int i915_driver_probe(struct pci_dev *pdev, const
> > struct pci_device_id *ent)
> >
> >  void i915_driver_remove(struct drm_i915_private *i915)  {
> > -	disable_rpm_wakeref_asserts(&i915->runtime_pm);
> > +	intel_wakeref_t wakeref = 0;
> 
> Initing wakeref right before assigning to it is redundant.
> 
> > +	/*
> > +	 * Resuming Device if already suspended to complete driver
> unregistration
> > +	 */
> 
> No need for the above comment, which the function name makes clear
> already.
> 
> > +	wakeref = intel_runtime_pm_get(&i915->runtime_pm);
> >
> >  	i915_driver_unregister(i915);
> >
> > @@ -977,18 +981,20 @@ void i915_driver_remove(struct
> drm_i915_private
> > *i915)
> >
> >  	i915_driver_hw_remove(i915);
> >
> > -	enable_rpm_wakeref_asserts(&i915->runtime_pm);
> > +	if (wakeref)
> > +		intel_runtime_pm_put(&i915->runtime_pm, wakeref);
> 
> wakeref can't be 0, so the call can be unconditional.
> 
> >  }
> >
> >  static void i915_driver_release(struct drm_device *dev)  {
> >  	struct drm_i915_private *dev_priv = to_i915(dev);
> >  	struct intel_runtime_pm *rpm = &dev_priv->runtime_pm;
> > +	intel_wakeref_t wakeref = 0;
> >
> >  	if (!dev_priv->do_release)
> >  		return;
> >
> > -	disable_rpm_wakeref_asserts(rpm);
> > +	wakeref = intel_runtime_pm_get(rpm);
> >
> >  	i915_gem_driver_release(dev_priv);
> >
> > @@ -999,7 +1005,9 @@ static void i915_driver_release(struct drm_device
> > *dev)
> >
> >  	i915_driver_mmio_release(dev_priv);
> >
> > -	enable_rpm_wakeref_asserts(rpm);
> > +	if (wakeref)
> > +		intel_runtime_pm_put(rpm, wakeref);
> > +
> >  	intel_runtime_pm_driver_release(rpm);
> >
> >  	i915_driver_late_release(dev_priv);


Hi Imre,

Thanks. Addressed above comments and pushed changes with new revision:7. 
https://patchwork.freedesktop.org/series/107211/




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

  Powered by Linux