This flag seems to work around a "fault priority problem"
and is necessary for handling faults on GFX12.
The kernel seems unable to mitigate retry faults on GFX12
without this flag.

For reference see:
amdgpu_vm_pte_update_flags() that explains the problem
svm_range_get_pte_flags() that uses the flag on GFX12

Signed-off-by: Timur Kristóf <[email protected]>
---
 drivers/gpu/drm/amd/amdgpu/gmc_v12_0.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v12_0.c 
b/drivers/gpu/drm/amd/amdgpu/gmc_v12_0.c
index 299fe960b99e..c210e2463a27 100644
--- a/drivers/gpu/drm/amd/amdgpu/gmc_v12_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/gmc_v12_0.c
@@ -644,11 +644,12 @@ static int gmc_v12_0_early_init(struct amdgpu_ip_block 
*ip_block)
                adev->gmc.xgmi.connected_to_cpu =
                        adev->smuio.funcs->is_host_gpu_xgmi_supported(adev);
 
+       adev->gmc.init_pte_flags = AMDGPU_PTE_IS_PTE;
+
        switch (amdgpu_ip_version(adev, GC_HWIP, 0)) {
        case IP_VERSION(12, 1, 0):
                gmc_v12_1_set_gmc_funcs(adev);
                gmc_v12_1_set_irq_funcs(adev);
-               adev->gmc.init_pte_flags = AMDGPU_PTE_IS_PTE;
                break;
        default:
                gmc_v12_0_set_gmc_funcs(adev);
-- 
2.54.0

Reply via email to