* [PATCH V1] accel/amdxdna: Fix major version check on NPU1 platform
@ 2026-03-04 19:50 Lizhi Hou
2026-03-04 19:54 ` Mario Limonciello
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Lizhi Hou @ 2026-03-04 19:50 UTC (permalink / raw)
To: ogabbay, quic_jhugo, dri-devel, maciej.falkowski
Cc: Lizhi Hou, linux-kernel, max.zhen, sonal.santan,
mario.limonciello
Add the missing major number in npu1_fw_feature_table.
Without the major version specified, the firmware feature check fails,
preventing new firmware commands from being enabled on the NPU1
platform.
With the correct major version populated, the driver properly detects
firmware support and enables the new command.
Fixes: f1eac46fe5f7 ("accel/amdxdna: Update firmware version check for latest firmware")
Signed-off-by: Lizhi Hou <lizhi.hou@amd.com>
---
drivers/accel/amdxdna/npu1_regs.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/accel/amdxdna/npu1_regs.c b/drivers/accel/amdxdna/npu1_regs.c
index 6e3d3ca69c04..1320e924e548 100644
--- a/drivers/accel/amdxdna/npu1_regs.c
+++ b/drivers/accel/amdxdna/npu1_regs.c
@@ -67,7 +67,7 @@ const struct dpm_clk_freq npu1_dpm_clk_table[] = {
static const struct aie2_fw_feature_tbl npu1_fw_feature_table[] = {
{ .major = 5, .min_minor = 7 },
- { .features = BIT_U64(AIE2_NPU_COMMAND), .min_minor = 8 },
+ { .features = BIT_U64(AIE2_NPU_COMMAND), .major = 5, .min_minor = 8 },
{ 0 }
};
--
2.34.1
^ permalink raw reply related [flat|nested] 5+ messages in thread* Re: [PATCH V1] accel/amdxdna: Fix major version check on NPU1 platform
2026-03-04 19:50 [PATCH V1] accel/amdxdna: Fix major version check on NPU1 platform Lizhi Hou
@ 2026-03-04 19:54 ` Mario Limonciello
2026-03-04 20:09 ` Lizhi Hou
2026-03-05 3:17 ` Claude review: " Claude Code Review Bot
2026-03-05 3:17 ` Claude Code Review Bot
2 siblings, 1 reply; 5+ messages in thread
From: Mario Limonciello @ 2026-03-04 19:54 UTC (permalink / raw)
To: Lizhi Hou, ogabbay, quic_jhugo, dri-devel, maciej.falkowski
Cc: linux-kernel, max.zhen, sonal.santan
On 3/4/26 1:50 PM, Lizhi Hou wrote:
> Add the missing major number in npu1_fw_feature_table.
>
> Without the major version specified, the firmware feature check fails,
> preventing new firmware commands from being enabled on the NPU1
> platform.
>
> With the correct major version populated, the driver properly detects
> firmware support and enables the new command.
>
> Fixes: f1eac46fe5f7 ("accel/amdxdna: Update firmware version check for latest firmware")
> Signed-off-by: Lizhi Hou <lizhi.hou@amd.com>
Reviewed-by: Mario Limonciello (AMD) <superm1@kernel.org>
> ---
> drivers/accel/amdxdna/npu1_regs.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/accel/amdxdna/npu1_regs.c b/drivers/accel/amdxdna/npu1_regs.c
> index 6e3d3ca69c04..1320e924e548 100644
> --- a/drivers/accel/amdxdna/npu1_regs.c
> +++ b/drivers/accel/amdxdna/npu1_regs.c
> @@ -67,7 +67,7 @@ const struct dpm_clk_freq npu1_dpm_clk_table[] = {
>
> static const struct aie2_fw_feature_tbl npu1_fw_feature_table[] = {
> { .major = 5, .min_minor = 7 },
> - { .features = BIT_U64(AIE2_NPU_COMMAND), .min_minor = 8 },
> + { .features = BIT_U64(AIE2_NPU_COMMAND), .major = 5, .min_minor = 8 },
> { 0 }
> };
>
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [PATCH V1] accel/amdxdna: Fix major version check on NPU1 platform
2026-03-04 19:54 ` Mario Limonciello
@ 2026-03-04 20:09 ` Lizhi Hou
0 siblings, 0 replies; 5+ messages in thread
From: Lizhi Hou @ 2026-03-04 20:09 UTC (permalink / raw)
To: Mario Limonciello, ogabbay, quic_jhugo, dri-devel,
maciej.falkowski
Cc: linux-kernel, max.zhen, sonal.santan
Applied to drm-misc-fixes
On 3/4/26 11:54, Mario Limonciello wrote:
> On 3/4/26 1:50 PM, Lizhi Hou wrote:
>> Add the missing major number in npu1_fw_feature_table.
>>
>> Without the major version specified, the firmware feature check fails,
>> preventing new firmware commands from being enabled on the NPU1
>> platform.
>>
>> With the correct major version populated, the driver properly detects
>> firmware support and enables the new command.
>>
>> Fixes: f1eac46fe5f7 ("accel/amdxdna: Update firmware version check
>> for latest firmware")
>> Signed-off-by: Lizhi Hou <lizhi.hou@amd.com>
> Reviewed-by: Mario Limonciello (AMD) <superm1@kernel.org>
>> ---
>> drivers/accel/amdxdna/npu1_regs.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/accel/amdxdna/npu1_regs.c
>> b/drivers/accel/amdxdna/npu1_regs.c
>> index 6e3d3ca69c04..1320e924e548 100644
>> --- a/drivers/accel/amdxdna/npu1_regs.c
>> +++ b/drivers/accel/amdxdna/npu1_regs.c
>> @@ -67,7 +67,7 @@ const struct dpm_clk_freq npu1_dpm_clk_table[] = {
>> static const struct aie2_fw_feature_tbl npu1_fw_feature_table[] = {
>> { .major = 5, .min_minor = 7 },
>> - { .features = BIT_U64(AIE2_NPU_COMMAND), .min_minor = 8 },
>> + { .features = BIT_U64(AIE2_NPU_COMMAND), .major = 5, .min_minor
>> = 8 },
>> { 0 }
>> };
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Claude review: accel/amdxdna: Fix major version check on NPU1 platform
2026-03-04 19:50 [PATCH V1] accel/amdxdna: Fix major version check on NPU1 platform Lizhi Hou
2026-03-04 19:54 ` Mario Limonciello
@ 2026-03-05 3:17 ` Claude Code Review Bot
2026-03-05 3:17 ` Claude Code Review Bot
2 siblings, 0 replies; 5+ messages in thread
From: Claude Code Review Bot @ 2026-03-05 3:17 UTC (permalink / raw)
To: dri-devel-reviews
Patch Review
**The bug:** In `npu1_fw_feature_table[]`, the second entry is missing `.major = 5`:
```c
static const struct aie2_fw_feature_tbl npu1_fw_feature_table[] = {
{ .major = 5, .min_minor = 7 },
{ .features = BIT_U64(AIE2_NPU_COMMAND), .min_minor = 8 }, // .major defaults to 0
{ 0 }
};
```
The iteration loop in `aie2_pci.c:67` uses `feature->major` as the loop continuation condition:
```c
for (feature = ndev->priv->fw_feature_tbl; feature->major; feature++) {
```
So the missing `.major` causes the entry to be treated as the sentinel/terminator (`{ 0 }`), meaning the `AIE2_NPU_COMMAND` feature is never detected on NPU1 platforms.
**The fix** adds `.major = 5` to match the first entry and be consistent with how `npu4_fw_feature_table` (in `npu4_regs.c:93`) correctly specifies `.major` on every entry:
```c
{ .features = BIT_U64(AIE2_NPU_COMMAND), .major = 6, .min_minor = 15 },
```
**No issues found.** The fix is a one-line data correction, straightforward and obviously correct.
Reviewed-by worthy.
---
Generated by Claude Code Patch Reviewer
^ permalink raw reply [flat|nested] 5+ messages in thread* Claude review: accel/amdxdna: Fix major version check on NPU1 platform
2026-03-04 19:50 [PATCH V1] accel/amdxdna: Fix major version check on NPU1 platform Lizhi Hou
2026-03-04 19:54 ` Mario Limonciello
2026-03-05 3:17 ` Claude review: " Claude Code Review Bot
@ 2026-03-05 3:17 ` Claude Code Review Bot
2 siblings, 0 replies; 5+ messages in thread
From: Claude Code Review Bot @ 2026-03-05 3:17 UTC (permalink / raw)
To: dri-devel-reviews
Overall Series Review
Subject: accel/amdxdna: Fix major version check on NPU1 platform
Author: Lizhi Hou <lizhi.hou@amd.com>
Patches: 3
Reviewed: 2026-03-05T13:17:56.106918
---
This is a single-patch fix for a clear and obvious bug in the `accel/amdxdna` driver. The fix is correct, minimal, and well-justified. The commit message clearly explains the problem and the fix. The `Fixes:` tag correctly identifies the commit that introduced the regression.
**Verdict: This patch looks good and should be accepted.**
---
Generated by Claude Code Patch Reviewer
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2026-03-05 3:17 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-04 19:50 [PATCH V1] accel/amdxdna: Fix major version check on NPU1 platform Lizhi Hou
2026-03-04 19:54 ` Mario Limonciello
2026-03-04 20:09 ` Lizhi Hou
2026-03-05 3:17 ` Claude review: " Claude Code Review Bot
2026-03-05 3:17 ` 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