From: Jinzhou Su Date: Tue, 2 Dec 2025 08:15:10 +0000 (+0800) Subject: drm/amdgpu: Add address checking for uniras X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0621f21cf3830c494bf8db8a7dbf9e24fff118d9;p=thirdparty%2Fkernel%2Flinux.git drm/amdgpu: Add address checking for uniras Add address checking for uniras Signed-off-by: Jinzhou Su Reviewed-by: YiPeng Chai Signed-off-by: Alex Deucher --- diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c index 3d51a3c8852a..4a0e981b900e 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c @@ -237,8 +237,13 @@ static int amdgpu_check_address_validity(struct amdgpu_device *adev, (address >= RAS_UMC_INJECT_ADDR_LIMIT)) return -EFAULT; - count = amdgpu_umc_lookup_bad_pages_in_a_row(adev, + if (amdgpu_uniras_enabled(adev)) + count = amdgpu_ras_mgr_lookup_bad_pages_in_a_row(adev, address, + page_pfns, ARRAY_SIZE(page_pfns)); + else + count = amdgpu_umc_lookup_bad_pages_in_a_row(adev, address, page_pfns, ARRAY_SIZE(page_pfns)); + if (count <= 0) return -EPERM;