Chris Wilson <chris@xxxxxxxxxxxxxxxxxx> writes: > Keep track of the temporary rpm wakeref inside hotplug detection, so > that we can cancel it immediately upon release and so clearly identify > leaks. > > Signed-off-by: Chris Wilson <chris@xxxxxxxxxxxxxxxxxx> > Cc: Jani Nikula <jani.nikula@xxxxxxxxx> Reviewed-by: Mika Kuoppala <mika.kuoppala@xxxxxxxxxxxxxxx> > --- > drivers/gpu/drm/i915/intel_hotplug.c | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) > > diff --git a/drivers/gpu/drm/i915/intel_hotplug.c b/drivers/gpu/drm/i915/intel_hotplug.c > index 067277ca7cff..6df8820b8b80 100644 > --- a/drivers/gpu/drm/i915/intel_hotplug.c > +++ b/drivers/gpu/drm/i915/intel_hotplug.c > @@ -227,9 +227,10 @@ static void intel_hpd_irq_storm_reenable_work(struct work_struct *work) > container_of(work, typeof(*dev_priv), > hotplug.reenable_work.work); > struct drm_device *dev = &dev_priv->drm; > + intel_wakeref_t wakeref; > enum hpd_pin pin; > > - intel_runtime_pm_get(dev_priv); > + wakeref = intel_runtime_pm_get(dev_priv); > > spin_lock_irq(&dev_priv->irq_lock); > for_each_hpd_pin(pin) { > @@ -262,7 +263,7 @@ static void intel_hpd_irq_storm_reenable_work(struct work_struct *work) > dev_priv->display.hpd_irq_setup(dev_priv); > spin_unlock_irq(&dev_priv->irq_lock); > > - intel_runtime_pm_put_unchecked(dev_priv); > + intel_runtime_pm_put(dev_priv, wakeref); > } > > bool intel_encoder_hotplug(struct intel_encoder *encoder, > -- > 2.20.1 > > _______________________________________________ > Intel-gfx mailing list > Intel-gfx@xxxxxxxxxxxxxxxxxxxxx > https://lists.freedesktop.org/mailman/listinfo/intel-gfx _______________________________________________ Intel-gfx mailing list Intel-gfx@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/intel-gfx