summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/ttm
diff options
context:
space:
mode:
authorChristian König <christian.koenig@amd.com>2019-05-13 15:36:08 +0200
committerAlex Deucher <alexander.deucher@amd.com>2019-05-31 10:39:34 -0500
commitb2f7a6161972a4ccd19ea14ea8d9afbdbda5c51d (patch)
treefc8b6d0d706b94942355a0737a6c76b2408c53aa /drivers/gpu/drm/ttm
parent6e58ab7ac7fac61acd7705a8abf1632462c1512a (diff)
drm/ttm: return immediately in case of a signal
When a signal arrives we should return immediately for handling it and not try other placements first. Signed-off-by: Christian König <christian.koenig@amd.com> Acked-by: Chunming Zhou <david1.zhou@amd.com> Tested-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/ttm')
-rw-r--r--drivers/gpu/drm/ttm/ttm_bo.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/gpu/drm/ttm/ttm_bo.c b/drivers/gpu/drm/ttm/ttm_bo.c
index 06bbcd2679b2..7b59e5ecde7f 100644
--- a/drivers/gpu/drm/ttm/ttm_bo.c
+++ b/drivers/gpu/drm/ttm/ttm_bo.c
@@ -979,7 +979,6 @@ int ttm_bo_mem_space(struct ttm_buffer_object *bo,
uint32_t cur_flags = 0;
bool type_found = false;
bool type_ok = false;
- bool has_erestartsys = false;
int i, ret;
ret = reservation_object_reserve_shared(bo->resv, 1);
@@ -1070,8 +1069,8 @@ int ttm_bo_mem_space(struct ttm_buffer_object *bo,
mem->placement = cur_flags;
return 0;
}
- if (ret == -ERESTARTSYS)
- has_erestartsys = true;
+ if (ret && ret != -EBUSY)
+ return ret;
}
if (!type_found) {
@@ -1079,7 +1078,7 @@ int ttm_bo_mem_space(struct ttm_buffer_object *bo,
return -EINVAL;
}
- return (has_erestartsys) ? -ERESTARTSYS : -ENOMEM;
+ return -ENOMEM;
}
EXPORT_SYMBOL(ttm_bo_mem_space);