]> git.itanic.dy.fi Git - linux-stable/commit
drm/amdgpu: fix visible VRAM handling during faults
authorChristian König <christian.koenig@amd.com>
Thu, 4 Apr 2024 14:25:40 +0000 (16:25 +0200)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 17 Apr 2024 15:50:43 +0000 (11:50 -0400)
commita6ff969fe9cbf369e3cd0ac54261fec1122682ec
treee86a766820e2aaffcf223e257d834f8fdfa51a69
parent6fef2d4c00b5b8561ad68dd2b68173f5c6af1e75
drm/amdgpu: fix visible VRAM handling during faults

When we removed the hacky start code check we actually didn't took into
account that *all* VRAM pages needs to be CPU accessible.

Clean up the code and unify the handling into a single helper which
checks if the whole resource is CPU accessible.

The only place where a partial check would make sense is during
eviction, but that is neglitible.

Signed-off-by: Christian König <christian.koenig@amd.com>
Fixes: aed01a68047b ("drm/amdgpu: Remove TTM resource->start visible VRAM condition v2")
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
CC: stable@vger.kernel.org
drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
drivers/gpu/drm/amd/amdgpu/amdgpu_object.h
drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.h