All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/ttm: fix ttm_bo_unreserve
@ 2019-06-04 15:23 Christian König
       [not found] ` <20190604152306.1804-1-christian.koenig-5C7GfCeVMHo@public.gmane.org>
  0 siblings, 1 reply; 8+ messages in thread
From: Christian König @ 2019-06-04 15:23 UTC (permalink / raw)
  To: dri-devel, amd-gfx

Since we now keep BOs on the LRU we need to make sure
that they are removed when they are pinned.

Signed-off-by: Christian König <christian.koenig@amd.com>
---
 include/drm/ttm/ttm_bo_driver.h | 14 ++++++--------
 1 file changed, 6 insertions(+), 8 deletions(-)

diff --git a/include/drm/ttm/ttm_bo_driver.h b/include/drm/ttm/ttm_bo_driver.h
index 9f54cf9c60df..c9b8ba492f24 100644
--- a/include/drm/ttm/ttm_bo_driver.h
+++ b/include/drm/ttm/ttm_bo_driver.h
@@ -767,14 +767,12 @@ static inline int ttm_bo_reserve_slowpath(struct ttm_buffer_object *bo,
  */
 static inline void ttm_bo_unreserve(struct ttm_buffer_object *bo)
 {
-	if (!(bo->mem.placement & TTM_PL_FLAG_NO_EVICT)) {
-		spin_lock(&bo->bdev->glob->lru_lock);
-		if (list_empty(&bo->lru))
-			ttm_bo_add_to_lru(bo);
-		else
-			ttm_bo_move_to_lru_tail(bo, NULL);
-		spin_unlock(&bo->bdev->glob->lru_lock);
-	}
+	spin_lock(&bo->bdev->glob->lru_lock);
+	if (list_empty(&bo->lru))
+		ttm_bo_add_to_lru(bo);
+	else
+		ttm_bo_move_to_lru_tail(bo, NULL);
+	spin_unlock(&bo->bdev->glob->lru_lock);
 	reservation_object_unlock(bo->resv);
 }
 
-- 
2.17.1

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2019-06-05 17:59 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-04 15:23 [PATCH] drm/ttm: fix ttm_bo_unreserve Christian König
     [not found] ` <20190604152306.1804-1-christian.koenig-5C7GfCeVMHo@public.gmane.org>
2019-06-04 18:46   ` Kuehling, Felix
2019-06-04 19:03     ` Zeng, Oak
     [not found]       ` <BL0PR12MB2580B3E88C17043DE402CF3280150-b4cIHhjg/p/XzH18dTCKOgdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
2019-06-05 11:24         ` Christian König
     [not found]           ` <5a0f4e09-2614-5bbc-b8a2-53746bbb0b15-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2019-06-05 13:56             ` Michel Dänzer
2019-06-05 14:33               ` Kuehling, Felix
2019-06-05 17:59                 ` Koenig, Christian
2019-06-05 14:39           ` Zeng, Oak

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.