From: Stanislaw Gruszka <stanislaw.gruszka@linux.intel.com>
To: dri-devel@lists.freedesktop.org
Cc: Karol Wachowski <karol.wachowski@linux.intel.com>,
Oded Gabbay <ogabbay@kernel.org>,
Jeffrey Hugo <quic_jhugo@quicinc.com>,
Jacek Lawrynowicz <jacek.lawrynowicz@linux.intel.com>
Subject: Re: [PATCH] accel/ivpu/37xx: Fix missing VPUIP interrupts
Date: Thu, 26 Oct 2023 07:49:08 +0200 [thread overview]
Message-ID: <20231026054908.GA741663@linux.intel.com> (raw)
In-Reply-To: <20231024161952.759914-1-stanislaw.gruszka@linux.intel.com>
On Tue, Oct 24, 2023 at 06:19:52PM +0200, Stanislaw Gruszka wrote:
> From: Karol Wachowski <karol.wachowski@linux.intel.com>
>
> Move sequence of masking and unmasking global interrupts from buttress
> interrupt handler to generic one that handles both VPUIP and BTRS
> interrupts. Unmasking global interrupts will re-trigger MSI for any
> pending interrupts.
>
> Lack of this sequence will cause the driver to miss any
> VPUIP interrupt that comes after reading VPU_37XX_HOST_SS_ICB_STATUS_0
> and before clearing all active interrupt sources.
>
> Signed-off-by: Karol Wachowski <karol.wachowski@linux.intel.com>
> Reviewed-by: Stanislaw Gruszka <stanislaw.gruszka@linux.intel.com>
> Signed-off-by: Stanislaw Gruszka <stanislaw.gruszka@linux.intel.com>
Added:
Fixes: 35b137630f08 ("accel/ivpu: Introduce a new DRM driver for Intel VPU")
Cc: stable@vger.kernel.org
and applied to drm-misc-fixes
Thanks
Stanislaw
> ---
> drivers/accel/ivpu/ivpu_hw_37xx.c | 11 +++++------
> 1 file changed, 5 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/accel/ivpu/ivpu_hw_37xx.c b/drivers/accel/ivpu/ivpu_hw_37xx.c
> index 7e4e87aa7602..5c0246b9e522 100644
> --- a/drivers/accel/ivpu/ivpu_hw_37xx.c
> +++ b/drivers/accel/ivpu/ivpu_hw_37xx.c
> @@ -906,9 +906,6 @@ static u32 ivpu_hw_37xx_irqb_handler(struct ivpu_device *vdev, int irq)
> if (status == 0)
> return 0;
>
> - /* Disable global interrupt before handling local buttress interrupts */
> - REGB_WR32(VPU_37XX_BUTTRESS_GLOBAL_INT_MASK, 0x1);
> -
> if (REG_TEST_FLD(VPU_37XX_BUTTRESS_INTERRUPT_STAT, FREQ_CHANGE, status))
> ivpu_dbg(vdev, IRQ, "FREQ_CHANGE irq: %08x",
> REGB_RD32(VPU_37XX_BUTTRESS_CURRENT_PLL));
> @@ -940,9 +937,6 @@ static u32 ivpu_hw_37xx_irqb_handler(struct ivpu_device *vdev, int irq)
> else
> REGB_WR32(VPU_37XX_BUTTRESS_INTERRUPT_STAT, status);
>
> - /* Re-enable global interrupt */
> - REGB_WR32(VPU_37XX_BUTTRESS_GLOBAL_INT_MASK, 0x0);
> -
> if (schedule_recovery)
> ivpu_pm_schedule_recovery(vdev);
>
> @@ -954,9 +948,14 @@ static irqreturn_t ivpu_hw_37xx_irq_handler(int irq, void *ptr)
> struct ivpu_device *vdev = ptr;
> u32 ret_irqv, ret_irqb;
>
> + REGB_WR32(VPU_37XX_BUTTRESS_GLOBAL_INT_MASK, 0x1);
> +
> ret_irqv = ivpu_hw_37xx_irqv_handler(vdev, irq);
> ret_irqb = ivpu_hw_37xx_irqb_handler(vdev, irq);
>
> + /* Re-enable global interrupts to re-trigger MSI for pending interrupts */
> + REGB_WR32(VPU_37XX_BUTTRESS_GLOBAL_INT_MASK, 0x0);
> +
> return IRQ_RETVAL(ret_irqb | ret_irqv);
> }
>
> --
> 2.25.1
>
prev parent reply other threads:[~2023-10-26 5:49 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-24 16:19 [PATCH] accel/ivpu/37xx: Fix missing VPUIP interrupts Stanislaw Gruszka
2023-10-26 5:49 ` Stanislaw Gruszka [this message]
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=20231026054908.GA741663@linux.intel.com \
--to=stanislaw.gruszka@linux.intel.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=jacek.lawrynowicz@linux.intel.com \
--cc=karol.wachowski@linux.intel.com \
--cc=ogabbay@kernel.org \
--cc=quic_jhugo@quicinc.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.