From: Gustavo Sousa <gustavo.sousa@intel.com>
To: Jani Nikula <jani.nikula@intel.com>,
<intel-gfx@lists.freedesktop.org>,
<intel-xe@lists.freedesktop.org>
Cc: <jani.nikula@intel.com>, <ville.syrjala@linux.intel.com>
Subject: Re: [PATCH 3/8] drm/i915/irq: move locking inside vlv_display_irq_postinstall()
Date: Tue, 6 May 2025 18:39:29 -0300 [thread overview]
Message-ID: <174656756965.1401.5390052837550181265@intel.com> (raw)
In-Reply-To: <93ea785d2d9bdb4e18328aa42a00a492d9d783c0.1746536745.git.jani.nikula@intel.com>
Quoting Jani Nikula (2025-05-06 10:06:45-03:00)
>All users of vlv_display_irq_postinstall() outside of
>intel_display_irq.c have a lock/unlock pair. Move the locking inside the
>function. Add an unlocked variant for internal use, similar to the
>_vlv_display_irq_reset() and vlv_display_irq_reset() functions.
>
>Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Reviewed-by: Gustavo Sousa <gustavo.sousa@intel.com>
>---
> .../gpu/drm/i915/display/intel_display_irq.c | 17 ++++++++++++-----
> drivers/gpu/drm/i915/i915_irq.c | 4 ----
> 2 files changed, 12 insertions(+), 9 deletions(-)
>
>diff --git a/drivers/gpu/drm/i915/display/intel_display_irq.c b/drivers/gpu/drm/i915/display/intel_display_irq.c
>index 3d2294a4d83d..a0e08b8752e7 100644
>--- a/drivers/gpu/drm/i915/display/intel_display_irq.c
>+++ b/drivers/gpu/drm/i915/display/intel_display_irq.c
>@@ -1908,16 +1908,13 @@ static u32 vlv_error_mask(void)
> return VLV_ERROR_PAGE_TABLE;
> }
>
>-void vlv_display_irq_postinstall(struct intel_display *display)
>+static void _vlv_display_irq_postinstall(struct intel_display *display)
> {
> struct drm_i915_private *dev_priv = to_i915(display->drm);
> u32 pipestat_mask;
> u32 enable_mask;
> enum pipe pipe;
>
>- if (!display->irq.vlv_display_irqs_enabled)
>- return;
>-
> if (display->platform.cherryview)
> intel_de_write(display, DPINVGTT,
> DPINVGTT_STATUS_MASK_CHV |
>@@ -1954,6 +1951,16 @@ void vlv_display_irq_postinstall(struct intel_display *display)
> intel_display_irq_regs_init(display, VLV_IRQ_REGS, dev_priv->irq_mask, enable_mask);
> }
>
>+void vlv_display_irq_postinstall(struct intel_display *display)
>+{
>+ struct drm_i915_private *dev_priv = to_i915(display->drm);
>+
>+ spin_lock_irq(&dev_priv->irq_lock);
>+ if (display->irq.vlv_display_irqs_enabled)
>+ _vlv_display_irq_postinstall(display);
>+ spin_unlock_irq(&dev_priv->irq_lock);
>+}
>+
> void ibx_display_irq_reset(struct intel_display *display)
> {
> struct drm_i915_private *i915 = to_i915(display->drm);
>@@ -2126,7 +2133,7 @@ void valleyview_enable_display_irqs(struct intel_display *display)
>
> if (intel_irqs_enabled(dev_priv)) {
> _vlv_display_irq_reset(display);
>- vlv_display_irq_postinstall(display);
>+ _vlv_display_irq_postinstall(display);
> }
>
> out:
>diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c
>index b918b440cbce..19d8a7c29eac 100644
>--- a/drivers/gpu/drm/i915/i915_irq.c
>+++ b/drivers/gpu/drm/i915/i915_irq.c
>@@ -768,9 +768,7 @@ static void valleyview_irq_postinstall(struct drm_i915_private *dev_priv)
>
> gen5_gt_irq_postinstall(to_gt(dev_priv));
>
>- spin_lock_irq(&dev_priv->irq_lock);
> vlv_display_irq_postinstall(display);
>- spin_unlock_irq(&dev_priv->irq_lock);
>
> intel_uncore_write(&dev_priv->uncore, VLV_MASTER_IER, MASTER_INTERRUPT_ENABLE);
> intel_uncore_posting_read(&dev_priv->uncore, VLV_MASTER_IER);
>@@ -827,9 +825,7 @@ static void cherryview_irq_postinstall(struct drm_i915_private *dev_priv)
>
> gen8_gt_irq_postinstall(to_gt(dev_priv));
>
>- spin_lock_irq(&dev_priv->irq_lock);
> vlv_display_irq_postinstall(display);
>- spin_unlock_irq(&dev_priv->irq_lock);
>
> intel_uncore_write(&dev_priv->uncore, GEN8_MASTER_IRQ, GEN8_MASTER_IRQ_CONTROL);
> intel_uncore_posting_read(&dev_priv->uncore, GEN8_MASTER_IRQ);
>--
>2.39.5
>
next prev parent reply other threads:[~2025-05-06 21:39 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-06 13:06 [PATCH 0/8] drm/i915: irq_lock refactoring, move to display Jani Nikula
2025-05-06 13:06 ` [PATCH 1/8] drm/i915/irq: move locking inside vlv_display_irq_reset() Jani Nikula
2025-05-06 21:38 ` Gustavo Sousa
2025-05-06 13:06 ` [PATCH 2/8] drm/i915/irq: move locking inside valleyview_{enable, disable}_display_irqs() Jani Nikula
2025-05-06 21:38 ` Gustavo Sousa
2025-05-06 13:06 ` [PATCH 3/8] drm/i915/irq: move locking inside vlv_display_irq_postinstall() Jani Nikula
2025-05-06 21:39 ` Gustavo Sousa [this message]
2025-05-06 13:06 ` [PATCH 4/8] drm/i915/irq: split out i915_display_irq_postinstall() Jani Nikula
2025-05-06 21:39 ` Gustavo Sousa
2025-05-06 13:06 ` [PATCH 5/8] drm/i915/irq: split out i965_display_irq_postinstall() Jani Nikula
2025-05-06 21:40 ` Gustavo Sousa
2025-05-06 13:06 ` [PATCH 6/8] drm/i915/irq: make i915_enable_asle_pipestat() static Jani Nikula
2025-05-06 21:40 ` Gustavo Sousa
2025-05-06 13:06 ` [PATCH 7/8] drm/i915/rps: refactor display rps support Jani Nikula
2025-05-06 21:41 ` Gustavo Sousa
2025-05-06 13:06 ` [PATCH 8/8] drm/i915/irq: move i915->irq_lock to display->irq.lock Jani Nikula
2025-05-06 21:30 ` Gustavo Sousa
2025-05-07 8:34 ` Jani Nikula
2025-05-06 13:13 ` ✓ CI.Patch_applied: success for drm/i915: irq_lock refactoring, move to display Patchwork
2025-05-06 13:14 ` ✗ CI.checkpatch: warning " Patchwork
2025-05-06 13:15 ` ✓ CI.KUnit: success " Patchwork
2025-05-06 13:23 ` ✓ CI.Build: " Patchwork
2025-05-06 13:26 ` ✓ CI.Hooks: " Patchwork
2025-05-06 13:27 ` ✓ CI.checksparse: " Patchwork
2025-05-06 13:54 ` ✓ Xe.CI.BAT: " Patchwork
2025-05-06 16:15 ` ✗ Xe.CI.Full: failure " Patchwork
2025-05-26 16:00 ` ✗ CI.Patch_applied: " 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=174656756965.1401.5390052837550181265@intel.com \
--to=gustavo.sousa@intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=intel-xe@lists.freedesktop.org \
--cc=jani.nikula@intel.com \
--cc=ville.syrjala@linux.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox