* [PATCH] accel/ivpu: Add disable clock relinquish workaround for NVL-A0
@ 2026-03-23 9:50 Karol Wachowski
2026-03-23 16:53 ` Lizhi Hou
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Karol Wachowski @ 2026-03-23 9:50 UTC (permalink / raw)
To: dri-devel
Cc: oded.gabbay, jeff.hugo, maciej.falkowski, lizhi.hou,
andrzej.kacprowski, Karol Wachowski, stable
Turn on disable clock relinquish workaround for Nova Lake A0.
Without this workaround NPU may not power off correctly after
inference, leading to unexpected system behavior.
Fixes: 550f4dd2cedd ("accel/ivpu: Add support for Nova Lake's NPU")
Cc: <stable@vger.kernel.org> # v6.19+
Signed-off-by: Karol Wachowski <karol.wachowski@linux.intel.com>
---
drivers/accel/ivpu/ivpu_drv.h | 1 +
drivers/accel/ivpu/ivpu_hw.c | 6 ++++--
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/drivers/accel/ivpu/ivpu_drv.h b/drivers/accel/ivpu/ivpu_drv.h
index 5b34b6f50e69..f1b6155065ff 100644
--- a/drivers/accel/ivpu/ivpu_drv.h
+++ b/drivers/accel/ivpu/ivpu_drv.h
@@ -35,6 +35,7 @@
#define IVPU_HW_IP_60XX 60
#define IVPU_HW_IP_REV_LNL_B0 4
+#define IVPU_HW_IP_REV_NVL_A0 0
#define IVPU_HW_BTRS_MTL 1
#define IVPU_HW_BTRS_LNL 2
diff --git a/drivers/accel/ivpu/ivpu_hw.c b/drivers/accel/ivpu/ivpu_hw.c
index d69cd0d93569..d4a9bcda4100 100644
--- a/drivers/accel/ivpu/ivpu_hw.c
+++ b/drivers/accel/ivpu/ivpu_hw.c
@@ -70,8 +70,10 @@ static void wa_init(struct ivpu_device *vdev)
if (ivpu_hw_btrs_gen(vdev) == IVPU_HW_BTRS_MTL)
vdev->wa.interrupt_clear_with_0 = ivpu_hw_btrs_irqs_clear_with_0_mtl(vdev);
- if (ivpu_device_id(vdev) == PCI_DEVICE_ID_LNL &&
- ivpu_revision(vdev) < IVPU_HW_IP_REV_LNL_B0)
+ if ((ivpu_device_id(vdev) == PCI_DEVICE_ID_LNL &&
+ ivpu_revision(vdev) < IVPU_HW_IP_REV_LNL_B0) ||
+ (ivpu_device_id(vdev) == PCI_DEVICE_ID_NVL &&
+ ivpu_revision(vdev) == IVPU_HW_IP_REV_NVL_A0))
vdev->wa.disable_clock_relinquish = true;
if (ivpu_test_mode & IVPU_TEST_MODE_CLK_RELINQ_ENABLE)
--
2.43.0
^ permalink raw reply related [flat|nested] 5+ messages in thread* Re: [PATCH] accel/ivpu: Add disable clock relinquish workaround for NVL-A0
2026-03-23 9:50 [PATCH] accel/ivpu: Add disable clock relinquish workaround for NVL-A0 Karol Wachowski
@ 2026-03-23 16:53 ` Lizhi Hou
2026-03-24 8:32 ` Karol Wachowski
2026-03-24 22:00 ` Claude review: " Claude Code Review Bot
2026-03-24 22:00 ` Claude Code Review Bot
2 siblings, 1 reply; 5+ messages in thread
From: Lizhi Hou @ 2026-03-23 16:53 UTC (permalink / raw)
To: Karol Wachowski, dri-devel
Cc: oded.gabbay, jeff.hugo, maciej.falkowski, andrzej.kacprowski,
stable
On 3/23/26 02:50, Karol Wachowski wrote:
> Turn on disable clock relinquish workaround for Nova Lake A0.
> Without this workaround NPU may not power off correctly after
> inference, leading to unexpected system behavior.
>
> Fixes: 550f4dd2cedd ("accel/ivpu: Add support for Nova Lake's NPU")
> Cc: <stable@vger.kernel.org> # v6.19+
>
> Signed-off-by: Karol Wachowski <karol.wachowski@linux.intel.com>
> ---
> drivers/accel/ivpu/ivpu_drv.h | 1 +
> drivers/accel/ivpu/ivpu_hw.c | 6 ++++--
> 2 files changed, 5 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/accel/ivpu/ivpu_drv.h b/drivers/accel/ivpu/ivpu_drv.h
> index 5b34b6f50e69..f1b6155065ff 100644
> --- a/drivers/accel/ivpu/ivpu_drv.h
> +++ b/drivers/accel/ivpu/ivpu_drv.h
> @@ -35,6 +35,7 @@
> #define IVPU_HW_IP_60XX 60
>
> #define IVPU_HW_IP_REV_LNL_B0 4
> +#define IVPU_HW_IP_REV_NVL_A0 0
>
> #define IVPU_HW_BTRS_MTL 1
> #define IVPU_HW_BTRS_LNL 2
> diff --git a/drivers/accel/ivpu/ivpu_hw.c b/drivers/accel/ivpu/ivpu_hw.c
> index d69cd0d93569..d4a9bcda4100 100644
> --- a/drivers/accel/ivpu/ivpu_hw.c
> +++ b/drivers/accel/ivpu/ivpu_hw.c
> @@ -70,8 +70,10 @@ static void wa_init(struct ivpu_device *vdev)
> if (ivpu_hw_btrs_gen(vdev) == IVPU_HW_BTRS_MTL)
> vdev->wa.interrupt_clear_with_0 = ivpu_hw_btrs_irqs_clear_with_0_mtl(vdev);
>
> - if (ivpu_device_id(vdev) == PCI_DEVICE_ID_LNL &&
> - ivpu_revision(vdev) < IVPU_HW_IP_REV_LNL_B0)
> + if ((ivpu_device_id(vdev) == PCI_DEVICE_ID_LNL &&
> + ivpu_revision(vdev) < IVPU_HW_IP_REV_LNL_B0) ||
> + (ivpu_device_id(vdev) == PCI_DEVICE_ID_NVL &&
> + ivpu_revision(vdev) == IVPU_HW_IP_REV_NVL_A0))
Reviewed-by: Lizhi.hou <lizhi.hou@amd.com>
> vdev->wa.disable_clock_relinquish = true;
>
> if (ivpu_test_mode & IVPU_TEST_MODE_CLK_RELINQ_ENABLE)
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [PATCH] accel/ivpu: Add disable clock relinquish workaround for NVL-A0
2026-03-23 16:53 ` Lizhi Hou
@ 2026-03-24 8:32 ` Karol Wachowski
0 siblings, 0 replies; 5+ messages in thread
From: Karol Wachowski @ 2026-03-24 8:32 UTC (permalink / raw)
To: Lizhi Hou, dri-devel
Cc: oded.gabbay, jeff.hugo, maciej.falkowski, andrzej.kacprowski,
stable
On 3/23/2026 5:53 PM, Lizhi Hou wrote:
>
> On 3/23/26 02:50, Karol Wachowski wrote:
>> Turn on disable clock relinquish workaround for Nova Lake A0.
>> Without this workaround NPU may not power off correctly after
>> inference, leading to unexpected system behavior.
>>
>> Fixes: 550f4dd2cedd ("accel/ivpu: Add support for Nova Lake's NPU")
>> Cc: <stable@vger.kernel.org> # v6.19+
>>
>> Signed-off-by: Karol Wachowski <karol.wachowski@linux.intel.com>
>> ---
>> drivers/accel/ivpu/ivpu_drv.h | 1 +
>> drivers/accel/ivpu/ivpu_hw.c | 6 ++++--
>> 2 files changed, 5 insertions(+), 2 deletions(-)
>>
>> diff --git a/drivers/accel/ivpu/ivpu_drv.h b/drivers/accel/ivpu/
>> ivpu_drv.h
>> index 5b34b6f50e69..f1b6155065ff 100644
>> --- a/drivers/accel/ivpu/ivpu_drv.h
>> +++ b/drivers/accel/ivpu/ivpu_drv.h
>> @@ -35,6 +35,7 @@
>> #define IVPU_HW_IP_60XX 60
>> #define IVPU_HW_IP_REV_LNL_B0 4
>> +#define IVPU_HW_IP_REV_NVL_A0 0
>> #define IVPU_HW_BTRS_MTL 1
>> #define IVPU_HW_BTRS_LNL 2
>> diff --git a/drivers/accel/ivpu/ivpu_hw.c b/drivers/accel/ivpu/ivpu_hw.c
>> index d69cd0d93569..d4a9bcda4100 100644
>> --- a/drivers/accel/ivpu/ivpu_hw.c
>> +++ b/drivers/accel/ivpu/ivpu_hw.c
>> @@ -70,8 +70,10 @@ static void wa_init(struct ivpu_device *vdev)
>> if (ivpu_hw_btrs_gen(vdev) == IVPU_HW_BTRS_MTL)
>> vdev->wa.interrupt_clear_with_0 =
>> ivpu_hw_btrs_irqs_clear_with_0_mtl(vdev);
>> - if (ivpu_device_id(vdev) == PCI_DEVICE_ID_LNL &&
>> - ivpu_revision(vdev) < IVPU_HW_IP_REV_LNL_B0)
>> + if ((ivpu_device_id(vdev) == PCI_DEVICE_ID_LNL &&
>> + ivpu_revision(vdev) < IVPU_HW_IP_REV_LNL_B0) ||
>> + (ivpu_device_id(vdev) == PCI_DEVICE_ID_NVL &&
>> + ivpu_revision(vdev) == IVPU_HW_IP_REV_NVL_A0))
> Reviewed-by: Lizhi.hou <lizhi.hou@amd.com>
Thank you, applied to drm-misc-fixes.
Karol
>> vdev->wa.disable_clock_relinquish = true;
>> if (ivpu_test_mode & IVPU_TEST_MODE_CLK_RELINQ_ENABLE)
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Claude review: accel/ivpu: Add disable clock relinquish workaround for NVL-A0
2026-03-23 9:50 [PATCH] accel/ivpu: Add disable clock relinquish workaround for NVL-A0 Karol Wachowski
2026-03-23 16:53 ` Lizhi Hou
@ 2026-03-24 22:00 ` Claude Code Review Bot
2026-03-24 22:00 ` Claude Code Review Bot
2 siblings, 0 replies; 5+ messages in thread
From: Claude Code Review Bot @ 2026-03-24 22:00 UTC (permalink / raw)
To: dri-devel-reviews
Overall Series Review
Subject: accel/ivpu: Add disable clock relinquish workaround for NVL-A0
Author: Karol Wachowski <karol.wachowski@linux.intel.com>
Patches: 3
Reviewed: 2026-03-25T08:00:05.287679
---
This is a single, straightforward hardware workaround patch for the Intel VPU (IVPU) accelerator driver. It extends an existing workaround (`disable_clock_relinquish`) — already applied to LNL (Lunar Lake) pre-B0 silicon — to also cover Nova Lake A0 stepping. The commit message clearly explains the problem (NPU may not power off correctly after inference) and references the original NVL support commit as the Fixes tag. The patch is minimal, correct, and appropriate for stable backporting.
**Verdict: Looks good. No issues found.**
---
Generated by Claude Code Patch Reviewer
^ permalink raw reply [flat|nested] 5+ messages in thread
* Claude review: accel/ivpu: Add disable clock relinquish workaround for NVL-A0
2026-03-23 9:50 [PATCH] accel/ivpu: Add disable clock relinquish workaround for NVL-A0 Karol Wachowski
2026-03-23 16:53 ` Lizhi Hou
2026-03-24 22:00 ` Claude review: " Claude Code Review Bot
@ 2026-03-24 22:00 ` Claude Code Review Bot
2 siblings, 0 replies; 5+ messages in thread
From: Claude Code Review Bot @ 2026-03-24 22:00 UTC (permalink / raw)
To: dri-devel-reviews
Patch Review
**Change summary:** Defines `IVPU_HW_IP_REV_NVL_A0` as 0 in `ivpu_drv.h` and extends the `wa_init()` condition in `ivpu_hw.c` to also enable the `disable_clock_relinquish` workaround for NVL A0 devices.
**Review:**
1. **`IVPU_HW_IP_REV_NVL_A0 0` definition** — Placed logically next to the existing `IVPU_HW_IP_REV_LNL_B0` define. Fine.
2. **Condition logic in `wa_init()`:**
```c
if ((ivpu_device_id(vdev) == PCI_DEVICE_ID_LNL &&
ivpu_revision(vdev) < IVPU_HW_IP_REV_LNL_B0) ||
(ivpu_device_id(vdev) == PCI_DEVICE_ID_NVL &&
ivpu_revision(vdev) == IVPU_HW_IP_REV_NVL_A0))
```
The LNL case uses `<` (all revisions before B0) while NVL uses `==` (only A0). This is intentional — NVL A0 revision is 0, so using `<` would match nothing (`< 0` is impossible for what is presumably an unsigned value). Using `==` is the correct approach here, and it also signals that only the A0 stepping needs the workaround, not future revisions.
3. **Cc: stable with version tag** — The `Cc: <stable@vger.kernel.org> # v6.19+` is correct since that's when NVL support was added via commit `550f4dd2cedd`.
4. **Fixes tag** — Points to the NVL support commit, which is appropriate — the workaround should have been included when NVL was first added.
No issues. The patch is clean, minimal, and correct.
---
Generated by Claude Code Patch Reviewer
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2026-03-24 22:00 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-23 9:50 [PATCH] accel/ivpu: Add disable clock relinquish workaround for NVL-A0 Karol Wachowski
2026-03-23 16:53 ` Lizhi Hou
2026-03-24 8:32 ` Karol Wachowski
2026-03-24 22:00 ` Claude review: " Claude Code Review Bot
2026-03-24 22:00 ` Claude Code Review Bot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox