diff options
author | Kent Russell <kent.russell@amd.com> | 2024-10-16 14:26:33 -0400 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2024-10-24 18:06:51 -0400 |
commit | 3c0be69badcec81577f75c314596371138d7e49f (patch) | |
tree | 4a528843cf823d07db44addc93f1cd70f41a1484 /drivers/gpu/drm/amd/amdgpu/gmc_v10_0.c | |
parent | 5605a0d363f1283e10985aa81000e63e5b783fc4 (diff) | |
download | linux-3c0be69badcec81577f75c314596371138d7e49f.tar.gz linux-3c0be69badcec81577f75c314596371138d7e49f.tar.bz2 linux-3c0be69badcec81577f75c314596371138d7e49f.zip |
amdgpu: Don't print L2 status if there's nothing to print
If a 2nd fault comes in before the 1st is handled, the 1st fault will
clear out the FAULT STATUS registers before the 2nd fault is handled.
Thus we get a lot of zeroes. If status=0, just skip the L2 fault status
information, to avoid confusion of why some VM fault status prints in
dmesg are all zeroes.
Signed-off-by: Kent Russell <kent.russell@amd.com>
Reviewed-by: Felix Kuehling <felix.kuehling@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/gmc_v10_0.c')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/gmc_v10_0.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v10_0.c b/drivers/gpu/drm/amd/amdgpu/gmc_v10_0.c index 3c9b7f88a6cd..697599c46240 100644 --- a/drivers/gpu/drm/amd/amdgpu/gmc_v10_0.c +++ b/drivers/gpu/drm/amd/amdgpu/gmc_v10_0.c @@ -175,7 +175,10 @@ static int gmc_v10_0_process_interrupt(struct amdgpu_device *adev, addr, entry->client_id, soc15_ih_clientid_name[entry->client_id]); - if (!amdgpu_sriov_vf(adev)) + /* Only print L2 fault status if the status register could be read and + * contains useful information + */ + if (status != 0) hub->vmhub_funcs->print_l2_protection_fault_status(adev, status); |