OSDN Git Service

drm/ttm: fix ttm_bo_swapout
authorChristian König <christian.koenig@amd.com>
Thu, 2 Dec 2021 10:29:08 +0000 (11:29 +0100)
committerChristian König <christian.koenig@amd.com>
Fri, 3 Dec 2021 13:01:46 +0000 (14:01 +0100)
commite485382ea7eb4b81f4b59073cd831084820497de
tree296a70b7eeaaef49db2dc8211c8dcca9ada723f4
parent679d94cd7d900871e5bc9cf780bd5b73af35ab42
drm/ttm: fix ttm_bo_swapout

Commit 7120a447c7fe ("drm/ttm: Double check mem_type of BO while eviction")
made ttm_bo_evict_swapout_allowable() function actually check the
placement, but we always used a dummy placement in ttm_bo_swapout.

Fix this by using the real placement instead.

Signed-off-by: Christian König <christian.koenig@amd.com>
Fixes: 7120a447c7fe ("drm/ttm: Double check mem_type of BO while eviction")
Reviewed-by: Pan, Xinhui <Xinhui.Pan@amd.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20211202103828.44573-1-christian.koenig@amd.com
drivers/gpu/drm/ttm/ttm_bo.c