aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoger He <Hongbo.He@amd.com>2018-02-06 02:00:06 -0500
committerAlex Deucher <alexander.deucher@amd.com>2018-02-26 23:09:34 -0500
commit40d5250dbb468ecf1d4a1aa5f5597358e33de95c (patch)
treecbccf3285198012acb99894cfa1b874c4b131e15
parentaa7662b67bf6f56cd0d678da6732e26f1b4bf0ed (diff)
drm/ttm: set TTM_OPT_FLAG_FORCE_ALLOC in ttm_bo_force_list_clean
Because ttm_bo_force_list_clean() is only called on two occasions: 1. By ttm_bo_evict_mm() during suspend. 2. By ttm_bo_clean_mm() when the driver unloads. On both cases we absolutely don't want any memory allocation failure. Signed-off-by: Roger He <Hongbo.He@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
-rw-r--r--drivers/gpu/drm/ttm/ttm_bo.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/gpu/drm/ttm/ttm_bo.c b/drivers/gpu/drm/ttm/ttm_bo.c
index a907311afe1a..2bde37291e3e 100644
--- a/drivers/gpu/drm/ttm/ttm_bo.c
+++ b/drivers/gpu/drm/ttm/ttm_bo.c
@@ -1344,7 +1344,11 @@ EXPORT_SYMBOL(ttm_bo_create);
1344static int ttm_bo_force_list_clean(struct ttm_bo_device *bdev, 1344static int ttm_bo_force_list_clean(struct ttm_bo_device *bdev,
1345 unsigned mem_type) 1345 unsigned mem_type)
1346{ 1346{
1347 struct ttm_operation_ctx ctx = { false, false }; 1347 struct ttm_operation_ctx ctx = {
1348 .interruptible = false,
1349 .no_wait_gpu = false,
1350 .flags = TTM_OPT_FLAG_FORCE_ALLOC
1351 };
1348 struct ttm_mem_type_manager *man = &bdev->man[mem_type]; 1352 struct ttm_mem_type_manager *man = &bdev->man[mem_type];
1349 struct ttm_bo_global *glob = bdev->glob; 1353 struct ttm_bo_global *glob = bdev->glob;
1350 struct dma_fence *fence; 1354 struct dma_fence *fence;