[PATCH] drm/amdgpu: remove invalid resource->start check
Pierre-Eric Pelloux-Prayer
pierre-eric at damsy.net
Thu Mar 21 12:25:35 UTC 2024
Le 20/03/2024 à 13:49, Christian König a écrit :
> The majority of those where removed in the patch aed01a68047b
> drm/amdgpu: Remove TTM resource->start visible VRAM condition v2
>
> But this one was missed because it's working on the resource and not the
> BO. Since we also no longer use a fake start address for visible BOs
> this will now trigger invalid mapping errors.
>
> Fixes: aed01a68047b ("drm/amdgpu: Remove TTM resource->start visible VRAM condition v2")
> Signed-off-by: Christian König <christian.koenig at amd.com>
> CC: stable at vger.kernel.org
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer at amd.com>
Thanks!
> ---
> drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 3 ---
> 1 file changed, 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
> index b0ed10f4de60..6bd7e71c5ff6 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
> @@ -573,9 +573,6 @@ static int amdgpu_ttm_io_mem_reserve(struct ttm_device *bdev,
> break;
> case TTM_PL_VRAM:
> mem->bus.offset = mem->start << PAGE_SHIFT;
> - /* check if it's visible */
> - if ((mem->bus.offset + bus_size) > adev->gmc.visible_vram_size)
> - return -EINVAL;
>
> if (adev->mman.aper_base_kaddr &&
> mem->placement & TTM_PL_FLAG_CONTIGUOUS)
More information about the amd-gfx
mailing list