[PATCH AUTOSEL 6.19-6.6] drm/amdgpu: add support for HDP IP version 6.1.1

Sasha Levin
2026-02-14T01:06:17Z

From: Tim Huang <tim.huang@amd.com>

[ Upstream commit e2fd14f579b841f54a9b7162fef15234d8c0627a ]

This initializes HDP IP version 6.1.1.

Reviewed-by: Mario Limonciello <mario.limonciello@amd.com>
Signed-off-by: Tim Huang <tim.huang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---

LLM Generated explanations, may be completely bogus:

I see SMU 14.0.4 and 14.0.5 in the soc21 reset path - these are likely
the same series of GPUs (Strix Point) that use HDP 6.1.1.

Now let me summarize the analysis:

## Analysis

### 1. Commit Message Analysis

The commit subject is "drm/amdgpu: add support for HDP IP version 6.1.1"
and the body says "This initializes HDP IP version 6.1.1." It was
authored by Tim Huang and reviewed by Mario Limonciello, both AMD
engineers. Signed off by Alex Deucher, the AMD GPU subsystem maintainer.

### 2. Code Change Analysis

The change is a **single line addition**: adding `case IP_VERSION(6, 1,
1):` as a fall-through case before `adev->hdp.funcs = &hdp_v6_0_funcs;`
in the HDP version switch statement in
`amdgpu_discovery_set_ip_blocks()`.

### 3. The Bug

This is not merely "new hardware enablement" — it's a **missing case
label fix**. Here's the critical analysis:

- **SDMA 6.1.1** was added in commit `a02cfac90fbd4` (v6.9-rc1)
- **VPE 6.1.1** was added in commit `155d46835c316` (v6.9-rc1)
- **HDP 6.1.1** was never added

This means since v6.9, a GPU with these IP versions can be discovered
and probed, but the HDP function table is left as **NULL** (because HDP
6.1.1 falls through to the `default: break;` case).

### 4. Impact - NULL Pointer Dereference

When `soc21_common_get_clockgating_state()` (`soc21.c:1011`) is called,
it unconditionally dereferences
`adev->hdp.funcs->get_clock_gating_state()` without a NULL check.
Similarly, `soc21_common_set_clockgating_state()` (`soc21.c:978`)
dereferences `adev->hdp.funcs->update_clock_gating()` without a NULL
check for NBIO 7.11.x GPUs.

With `adev->hdp.funcs` being NULL, these will cause a **kernel NULL
pointer dereference crash** (oops/panic) on any system with the affected
GPU hardware.

### 5. Scope and Risk

- **One line change**: Minimal risk of regression
- **Well-understood pattern**: Adding a case label to an existing switch
fall-through, identical to how 6.0.0, 6.0.1, and 6.1.0 are handled
- **Uses existing code**: Maps to the already-tested `hdp_v6_0_funcs`
function table
- **No new APIs, no new features, no behavioral changes** for existing
hardware

### 6. Stable Tree Relevance

The bug was introduced in v6.9 when SDMA 6.1.1 and VPE 6.1.1 were added
without a corresponding HDP 6.1.1 entry. Any stable tree from 6.9 onward
(6.12.y, 6.6.y if SDMA 6.1.1 was backported there, etc.) that has the
SDMA/VPE 6.1.1 support but lacks HDP 6.1.1 would be affected. The fix is
trivial to backport.

### 7. Classification

This falls under the **device ID / hardware variant** exception for
stable. It's a one-line addition of a new IP version to an existing
driver's switch statement, using an already-existing function table.
More importantly, it **fixes a NULL pointer dereference** crash on
affected hardware.

### 8. Note on hdp_v6_0.c Register Handling

There's a minor concern: `hdp_v6_0_update_clock_gating()` currently
checks `IP_VERSION(6, 1, 0)` specifically to use `regHDP_CLK_CNTL_V6_1`.
HDP 6.1.1 would use `regHDP_CLK_CNTL` (the `else` path) which may or may
not be correct. However, this is orthogonal to the commit — at worst,
clock gating configuration may be incorrect for this variant, but the
kernel won't crash. The more critical issue is that without this commit,
the kernel **will crash** with a NULL pointer dereference.

### Conclusion

This is a small, surgical, obviously correct fix that prevents a NULL
pointer dereference crash on hardware with HDP IP version 6.1.1. The
one-line change maps the new version to an existing function table,
following an established pattern. The bug was introduced in v6.9 when
other IP blocks for the same GPU were added without the corresponding
HDP entry. It meets all stable kernel criteria: fixes a real crash bug,
is obviously correct, is small and contained, and introduces no new
features.

**YES**

drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c
index fa2a22dfa0487..f9e0e80c4c186 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c
@@ -3059,6 +3059,7 @@ int amdgpu_discovery_set_ip_blocks(struct amdgpu_device *adev)
case IP_VERSION(6, 0, 0):
case IP_VERSION(6, 0, 1):
case IP_VERSION(6, 1, 0):
+ case IP_VERSION(6, 1, 1):
adev->hdp.funcs = &hdp_v6_0_funcs;
break;
case IP_VERSION(7, 0, 0):
--
2.51.0