]> www.infradead.org Git - users/dwmw2/linux.git/commit
drm/amdgpu: fix check in gmc_v9_0_get_vm_pte()
authorChristian König <christian.koenig@amd.com>
Thu, 31 Oct 2024 09:04:17 +0000 (10:04 +0100)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 8 Nov 2024 16:45:29 +0000 (11:45 -0500)
commit1b4ca8546f5b5c482717bedb8e031227b1541539
tree1b116eaf7cf88e92ebb1f419bef25847d9ca8baa
parentd4be16ccfd5bf822176740a51ff2306679a2247e
drm/amdgpu: fix check in gmc_v9_0_get_vm_pte()

The coherency flags can only be determined when the BO is locked and that
in turn is only guaranteed when the mapping is validated.

Fix the check, move the resource check into the function and add an assert
that the BO is locked.

Signed-off-by: Christian König <christian.koenig@amd.com>
Fixes: d1a372af1c3d ("drm/amdgpu: Set MTYPE in PTE based on BO flags")
Acked-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c