]> Git Repo - linux.git/commitdiff
drm/amdgpu: Fix VRAM eviction issue
authorArunpravin Paneer Selvam <[email protected]>
Thu, 22 Sep 2022 15:14:47 +0000 (08:14 -0700)
committerChristian König <[email protected]>
Thu, 22 Sep 2022 17:53:06 +0000 (19:53 +0200)
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 <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
Reviewed-by: Christian König <[email protected]>
Signed-off-by: Christian König <[email protected]>
drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c

index d1a2619fa89f822c7af0db15b31e3249ef1d4f45..73a517bcf5c111e807976422dd8a9d7a8e2ae93d 100644 (file)
@@ -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;
        }
 
This page took 0.063194 seconds and 4 git commands to generate.