]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
drm/amdgpu: Add address checking for uniras
authorJinzhou Su <jinzhou.su@amd.com>
Tue, 2 Dec 2025 08:15:10 +0000 (16:15 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 5 Jan 2026 21:28:01 +0000 (16:28 -0500)
Add address checking for uniras

Signed-off-by: Jinzhou Su <jinzhou.su@amd.com>
Reviewed-by: YiPeng Chai <YiPeng.Chai@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c

index 3d51a3c8852ad36938339e8285641847451da459..4a0e981b900eaddc4938ace27d7e2ab260872a4e 100644 (file)
@@ -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;