From: Jani Nikula <jani.nikula@intel.com>
To: Rodrigo Vivi <rodrigo.vivi@intel.com>, intel-gfx@lists.freedesktop.org
Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
Subject: Re: [PATCH 1/3] drm/i915/irq: Remove duplicated irq_enabled variable
Date: Fri, 13 Sep 2024 13:54:00 +0300 [thread overview]
Message-ID: <87h6ajesdz.fsf@intel.com> (raw)
In-Reply-To: <20240912172539.418957-1-rodrigo.vivi@intel.com>
On Thu, 12 Sep 2024, Rodrigo Vivi <rodrigo.vivi@intel.com> wrote:
> 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@intel.com>
> Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
> ---
> 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)
I think we should just stick a
if (drm_WARN_ON(&dev_priv->drm, !dev_priv->runtime_pm.irqs_enabled))
here and remove the FIXME. I don't see a path like that anywhere,
anymore.
BR,
Jani.
> return;
>
> - dev_priv->irq_enabled = false;
> -
> intel_irq_reset(dev_priv);
>
> free_irq(irq, dev_priv);
--
Jani Nikula, Intel
next prev parent reply other threads:[~2024-09-13 10:54 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-12 17:25 [PATCH 1/3] drm/i915/irq: Remove duplicated irq_enabled variable Rodrigo Vivi
2024-09-12 17:25 ` [PATCH 2/3] drm/i915/irq: Move irqs_enabled out of runtime_pm Rodrigo Vivi
2024-09-12 20:03 ` Cavitt, Jonathan
2024-09-13 9:05 ` Andi Shyti
2024-09-12 17:25 ` [PATCH 3/3] drm/i915/irq: Rename suspend/resume funcitons Rodrigo Vivi
2024-09-12 20:21 ` Cavitt, Jonathan
2024-09-13 9:07 ` Andi Shyti
2024-09-16 15:37 ` Rodrigo Vivi
2024-09-12 19:58 ` [PATCH 1/3] drm/i915/irq: Remove duplicated irq_enabled variable Cavitt, Jonathan
2024-09-12 21:44 ` ✗ Fi.CI.SPARSE: warning for series starting with [1/3] " Patchwork
2024-09-12 21:52 ` ✓ Fi.CI.BAT: success " Patchwork
2024-09-13 9:01 ` [PATCH 1/3] " Andi Shyti
2024-09-13 10:54 ` Jani Nikula [this message]
2024-09-13 18:12 ` ✗ Fi.CI.IGT: failure for series starting with [1/3] " Patchwork
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=87h6ajesdz.fsf@intel.com \
--to=jani.nikula@intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=rodrigo.vivi@intel.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.