mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-08 11:50:43 +09:00
drm/ttm: Make sure BOs being swapped out are cacheable
am: 55f47122c2
Change-Id: Ic2b524170b46affcd1ccf2b52d2210f8aa011a50
This commit is contained in:
@@ -1654,7 +1654,6 @@ static int ttm_bo_swapout(struct ttm_mem_shrink *shrink)
|
||||
struct ttm_buffer_object *bo;
|
||||
int ret = -EBUSY;
|
||||
int put_count;
|
||||
uint32_t swap_placement = (TTM_PL_FLAG_CACHED | TTM_PL_FLAG_SYSTEM);
|
||||
|
||||
spin_lock(&glob->lru_lock);
|
||||
list_for_each_entry(bo, &glob->swap_lru, swap) {
|
||||
@@ -1685,7 +1684,8 @@ static int ttm_bo_swapout(struct ttm_mem_shrink *shrink)
|
||||
* Move to system cached
|
||||
*/
|
||||
|
||||
if ((bo->mem.placement & swap_placement) != swap_placement) {
|
||||
if (bo->mem.mem_type != TTM_PL_SYSTEM ||
|
||||
bo->ttm->caching_state != tt_cached) {
|
||||
struct ttm_mem_reg evict_mem;
|
||||
|
||||
evict_mem = bo->mem;
|
||||
|
||||
Reference in New Issue
Block a user