From: Roger He <Hongbo.He@amd.com>
Date: Fri, 8 Dec 2017 11:36:46 +0800
Subject: drm/ttm: add allow_reserved_eviction and resv into ttm_operation_ctx
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Git-commit: 8836e4b8d3a04a5097a83c5f9b25662fa6a9ebbc
Patch-mainline: v4.16-rc1
References: FATE#326289 FATE#326079 FATE#326049 FATE#322398 FATE#326166
allow_reserved_eviction: Allow eviction of reserved BOs
resv: Reservation object to allow reserved evictions with
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Roger He <Hongbo.He@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Acked-by: Petr Tesarik <ptesarik@suse.com>
---
include/drm/ttm/ttm_bo_api.h | 4 ++++
1 file changed, 4 insertions(+)
--- a/include/drm/ttm/ttm_bo_api.h
+++ b/include/drm/ttm/ttm_bo_api.h
@@ -263,6 +263,8 @@ struct ttm_bo_kmap_obj {
*
* @interruptible: Sleep interruptible if sleeping.
* @no_wait_gpu: Return immediately if the GPU is busy.
+ * @allow_reserved_eviction: Allow eviction of reserved BOs.
+ * @resv: Reservation object to allow reserved evictions with.
*
* Context for TTM operations like changing buffer placement or general memory
* allocation.
@@ -270,6 +272,8 @@ struct ttm_bo_kmap_obj {
struct ttm_operation_ctx {
bool interruptible;
bool no_wait_gpu;
+ bool allow_reserved_eviction;
+ struct reservation_object *resv;
uint64_t bytes_moved;
};