diff options
| author | Timur Kristóf <timur.kristof@gmail.com> | 2026-09-17 00:55:49 +0200 |
|---|---|---|
| committer | Alex Deucher <alexander.deucher@amd.com> | 2026-10-01 11:09:05 -0400 |
| commit | e39fa5e667c70f790c7983c848edaf50ffa93cf7 (patch) | |
| tree | 4b654e8a35eaab77c15568c27488cbc15295ca7c /drivers/gpu | |
| parent | b6b813e046e475bb3fe209d74f1df70033b5b98e (diff) | |
| download | linux-next-e39fa5e667c70f790c7983c848edaf50ffa93cf7.tar.gz linux-next-e39fa5e667c70f790c7983c848edaf50ffa93cf7.zip | |
drm/amdgpu/gmc: Use amdgpu_gmc_handle_retry_fault() for GMC v12.1
Use the same helper for GMC v12.1 that is used by other
GMC IP block versions.
No functional changes intended. Just code cleanup.
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@igalia.com>
Acked-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu')
| -rw-r--r-- | drivers/gpu/drm/amd/amdgpu/gmc_v12_1.c | 45 |
1 files changed, 7 insertions, 38 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v12_1.c b/drivers/gpu/drm/amd/amdgpu/gmc_v12_1.c index 3349e8bc1c20..cfc46f912d47 100644 --- a/drivers/gpu/drm/amd/amdgpu/gmc_v12_1.c +++ b/drivers/gpu/drm/amd/amdgpu/gmc_v12_1.c @@ -131,7 +131,7 @@ static int gmc_v12_1_process_interrupt(struct amdgpu_device *adev, struct amdgpu_vmhub *hub; uint32_t cam_index = 0; const char *hub_name; - int ret, xcc_id = 0; + int xcc_id = 0; uint32_t status = 0, status_hi = 0; const char *die_name; char die_name_buf[32]; @@ -164,44 +164,13 @@ static int gmc_v12_1_process_interrupt(struct amdgpu_device *adev, hub = &adev->vmhub[vmhub]; if (retry_fault) { - if (adev->irq.retry_cam_enabled) { - /* Delegate it to a different ring if the hardware hasn't - * already done it. - */ - if (entry->ih == &adev->irq.ih) { - amdgpu_irq_delegate(adev, entry, 8); - return 1; - } - - cam_index = entry->src_data[3] & 0x3ff; - - ret = amdgpu_vm_handle_fault(adev, entry->pasid, entry->vmid, node_id, - addr, entry->timestamp, write_fault); - WDOORBELL32(adev->irq.retry_cam_doorbell_index, cam_index); - if (ret) - return 1; - } else { - /* Process it onyl if it's the first fault for this address */ - if (entry->ih != &adev->irq.ih_soft && - amdgpu_gmc_filter_faults(adev, entry->ih, addr, entry->pasid, - entry->timestamp)) - return 1; - - /* Delegate it to a different ring if the hardware hasn't - * already done it. - */ - if (entry->ih == &adev->irq.ih) { - amdgpu_irq_delegate(adev, entry, 8); - return 1; - } + cam_index = entry->src_data[3] & 0x3ff; - /* Try to handle the recoverable page faults by filling page - * tables - */ - if (amdgpu_vm_handle_fault(adev, entry->pasid, entry->vmid, node_id, - addr, entry->timestamp, write_fault)) - return 1; - } + int ret = amdgpu_gmc_handle_retry_fault(adev, entry, addr, cam_index, node_id, + write_fault); + /* Returning 1 here also prevents sending the IV to the KFD */ + if (ret == 1) + return 1; } if (kgd2kfd_vmfault_fast_path(adev, entry, retry_fault)) |
