[PATCH] drm/amdgpu: Fix VRAM eviction issue

Christian König christian.koenig at amd.com
Thu Sep 22 15:31:16 UTC 2022


Am 22.09.22 um 17:14 schrieb Arunpravin Paneer Selvam:
> A user reported that when he starts a game (MTGA) with wine,
> he observed an error msg failed to pin framebuffer with error -12.
> Found an issue with the VRAM mem type eviction decision condition
> logic. This patch will fix the if condition code error.
>
> Gitlab bug link:
> https://gitlab.freedesktop.org/drm/amd/-/issues/2159
>
> Fixes: ded910f368a5 ("drm/amdgpu: Implement intersect/compatible functions")
> Signed-off-by: Arunpravin Paneer Selvam <Arunpravin.PaneerSelvam at amd.com>

Reviewed-by: Christian König <christian.koenig at amd.com>

Can you push it yourself now?

> ---
>   drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c
> index d1a2619fa89f..73a517bcf5c1 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c
> @@ -746,7 +746,7 @@ static bool amdgpu_vram_mgr_intersects(struct ttm_resource_manager *man,
>   			(amdgpu_vram_mgr_block_size(block) >> PAGE_SHIFT);
>   
>   		if (place->fpfn < lpfn &&
> -		    (place->lpfn && place->lpfn > fpfn))
> +		    (!place->lpfn || place->lpfn > fpfn))
>   			return true;
>   	}
>   



More information about the amd-gfx mailing list