-----Original Message----- From: Intel-gfx <intel-gfx-bounces@xxxxxxxxxxxxxxxxxxxxx> On Behalf Of Rodrigo Vivi Sent: Thursday, September 12, 2024 10:26 AM To: intel-gfx@xxxxxxxxxxxxxxxxxxxxx Cc: Vivi, Rodrigo <rodrigo.vivi@xxxxxxxxx>; Nikula, Jani <jani.nikula@xxxxxxxxx> Subject: [PATCH 1/3] drm/i915/irq: Remove duplicated irq_enabled variable > > Let's kill this legacy iand almost unused rq_enabled version > in favor of the real one that is checked at > intel_irqs_enabled(). > > The commit 'ac1723c16b66 ("drm/i915: Track IRQ state > in local device state")' shows that this was a legacy > DRM level irq_enabled information that got removed. > > But the driver one already existed under a different > name. > > Cc: Jani Nikula <jani.nikula@xxxxxxxxx> > Signed-off-by: Rodrigo Vivi <rodrigo.vivi@xxxxxxxxx> LGTM. Reviewed-by: Jonathan Cavitt <jonathan.cavitt@xxxxxxxxx> -Jonathan Cavitt > --- > drivers/gpu/drm/i915/i915_drv.h | 2 -- > drivers/gpu/drm/i915/i915_irq.c | 8 ++------ > 2 files changed, 2 insertions(+), 8 deletions(-) > > diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h > index 39f6614a0a99..aa3000349116 100644 > --- a/drivers/gpu/drm/i915/i915_drv.h > +++ b/drivers/gpu/drm/i915/i915_drv.h > @@ -343,8 +343,6 @@ struct drm_i915_private { > > struct intel_pxp *pxp; > > - bool irq_enabled; > - > struct i915_pmu pmu; > > /* The TTM device structure. */ > diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c > index 2321de48d169..9f1a6f692dd1 100644 > --- a/drivers/gpu/drm/i915/i915_irq.c > +++ b/drivers/gpu/drm/i915/i915_irq.c > @@ -1406,14 +1406,12 @@ int intel_irq_install(struct drm_i915_private *dev_priv) > */ > dev_priv->runtime_pm.irqs_enabled = true; > > - dev_priv->irq_enabled = true; > - > intel_irq_reset(dev_priv); > > ret = request_irq(irq, intel_irq_handler(dev_priv), > IRQF_SHARED, DRIVER_NAME, dev_priv); > if (ret < 0) { > - dev_priv->irq_enabled = false; > + dev_priv->runtime_pm.irqs_enabled = false; > return ret; > } > > @@ -1439,11 +1437,9 @@ void intel_irq_uninstall(struct drm_i915_private *dev_priv) > * intel_display_driver_remove() calling us out of sequence. > * Would be nice if it didn't do that... > */ > - if (!dev_priv->irq_enabled) > + if (!dev_priv->runtime_pm.irqs_enabled) > return; > > - dev_priv->irq_enabled = false; > - > intel_irq_reset(dev_priv); > > free_irq(irq, dev_priv); > -- > 2.46.0 > >