diff options
author | Dave Airlie <airlied@redhat.com> | 2020-09-23 13:04:49 +1000 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2020-09-24 06:41:32 +1000 |
commit | 0ef1ed813e6b13d29331088070c7f554b350a266 (patch) | |
tree | 061c6e02b01721aed98a74de333ead0d418a9b08 /include/drm/ttm/ttm_bo_api.h | |
parent | 5466186745937e950bd17ee66f3f59cc329b6b71 (diff) |
drm/ttm: add bo wait that takes a ctx wrapper.
I'm thinking of pushing the wait into the drivers.
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20200923030454.362731-6-airlied@gmail.com
Diffstat (limited to 'include/drm/ttm/ttm_bo_api.h')
-rw-r--r-- | include/drm/ttm/ttm_bo_api.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/drm/ttm/ttm_bo_api.h b/include/drm/ttm/ttm_bo_api.h index 0f7cd21d6d74..6f544b6d70a3 100644 --- a/include/drm/ttm/ttm_bo_api.h +++ b/include/drm/ttm/ttm_bo_api.h @@ -261,6 +261,11 @@ ttm_bo_get_unless_zero(struct ttm_buffer_object *bo) */ int ttm_bo_wait(struct ttm_buffer_object *bo, bool interruptible, bool no_wait); +static inline int ttm_bo_wait_ctx(struct ttm_buffer_object *bo, struct ttm_operation_ctx *ctx) +{ + return ttm_bo_wait(bo, ctx->interruptible, ctx->no_wait_gpu); +} + /** * ttm_bo_mem_compat - Check if proposed placement is compatible with a bo * |