On 29/05/2026 11:30, Timur Kristóf wrote:
This is necessary if we want to make use of the filter CAM.

Signed-off-by: Timur Kristóf <[email protected]>
---
  drivers/gpu/drm/amd/amdgpu/gmc_v12_0.c | 5 ++++-
  1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v12_0.c 
b/drivers/gpu/drm/amd/amdgpu/gmc_v12_0.c
index 7bbf5f848ce1b..90568d8ea0cf6 100644
--- a/drivers/gpu/drm/amd/amdgpu/gmc_v12_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/gmc_v12_0.c
@@ -99,6 +99,7 @@ static int gmc_v12_0_process_interrupt(struct amdgpu_device 
*adev,
        bool write_fault = !!(entry->src_data[1] &
                              AMDGPU_GMC9_FAULT_SOURCE_DATA_WRITE);
        uint32_t status = 0;
+       uint32_t cam_index;
        u64 addr;
addr = (u64)entry->src_data[0] << 12;
@@ -110,7 +111,9 @@ static int gmc_v12_0_process_interrupt(struct amdgpu_device 
*adev,
                hub = &adev->vmhub[AMDGPU_GFXHUB(0)];
if (retry_fault) {
-               int ret = amdgpu_gmc_handle_retry_fault(adev, entry, addr, 0, 0,
+               cam_index = entry->src_data[2] & 0x3ff;
+
+               int ret = amdgpu_gmc_handle_retry_fault(adev, entry, addr, 
cam_index, 0,
                                                        write_fault);
                /* Returning 1 here also prevents sending the IV to the KFD */
                if (ret == 1)

Looks the same as gmc_v9 so I feel more confident to give r-b.

Reviewed-by: Tvrtko Ursulin <[email protected]>

The only tweak I would potentially do is move the cam_index local into the local scope of the if branch. Any apply kernel coding style of leaving a blank line between the declaration block and code.

Regards,

Tvrtko

Reply via email to