]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
drm/amdgpu: validate the flush_gpu_tlb_pasid()
authorPrike Liang <Prike.Liang@amd.com>
Tue, 6 Jan 2026 09:00:57 +0000 (17:00 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 14 Jan 2026 20:06:43 +0000 (15:06 -0500)
Validate flush_gpu_tlb_pasid() availability before flushing tlb.

Signed-off-by: Prike Liang <Prike.Liang@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
(cherry picked from commit f4db9913e4d3dabe9ff3ea6178f2c1bc286012b8)

drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c

index 869bceb0fe2c6d860a6555640f03b87427399c9c..8924380086c84492100a0d9dce94fad6d889f51a 100644 (file)
@@ -732,6 +732,10 @@ int amdgpu_gmc_flush_gpu_tlb_pasid(struct amdgpu_device *adev, uint16_t pasid,
                return 0;
 
        if (!adev->gmc.flush_pasid_uses_kiq || !ring->sched.ready) {
+
+               if (!adev->gmc.gmc_funcs->flush_gpu_tlb_pasid)
+                       return 0;
+
                if (adev->gmc.flush_tlb_needs_extra_type_2)
                        adev->gmc.gmc_funcs->flush_gpu_tlb_pasid(adev, pasid,
                                                                 2, all_hub,