Only try to access the VMHUB HW and log the page faut detail
when the VMHUB not is an intermediate HW state.

Signed-off-by: Prike Liang <[email protected]>
---
 drivers/gpu/drm/amd/amdgpu/gmc_v11_0.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v11_0.c 
b/drivers/gpu/drm/amd/amdgpu/gmc_v11_0.c
index f454aff831b0..c4448a6a86bc 100644
--- a/drivers/gpu/drm/amd/amdgpu/gmc_v11_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/gmc_v11_0.c
@@ -113,6 +113,12 @@ static int gmc_v11_0_process_interrupt(struct 
amdgpu_device *adev,
        addr = (u64)entry->src_data[0] << 12;
        addr |= ((u64)entry->src_data[1] & 0xf) << 44;
 
+       if (amdgpu_in_reset(adev) || adev->no_hw_access) {
+               dev_err(adev->dev, " [inaccessiable device] page fault address 
0x%016llx from client %d\n",
+                       addr, entry->client_id);
+               return 0;
+       }
+
        if (retry_fault) {
                int ret = amdgpu_gmc_handle_retry_fault(adev, entry, addr, 0, 0,
                                                        write_fault);
-- 
2.34.1

Reply via email to