Commit 58377de4 authored by Christian König's avatar Christian König

drm/i915: stop using ttm_bo_wait

TTM is just wrapping core DMA functionality here, remove the mid-layer.
No functional change.
Signed-off-by: default avatarChristian König <christian.koenig@amd.com>
Reviewed-by: default avatarMatthew Auld <matthew.auld@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20221125102137.1801-7-christian.koenig@amd.com
parent 38c83890
...@@ -599,13 +599,16 @@ i915_ttm_resource_get_st(struct drm_i915_gem_object *obj, ...@@ -599,13 +599,16 @@ i915_ttm_resource_get_st(struct drm_i915_gem_object *obj,
static int i915_ttm_truncate(struct drm_i915_gem_object *obj) static int i915_ttm_truncate(struct drm_i915_gem_object *obj)
{ {
struct ttm_buffer_object *bo = i915_gem_to_ttm(obj); struct ttm_buffer_object *bo = i915_gem_to_ttm(obj);
int err; long err;
WARN_ON_ONCE(obj->mm.madv == I915_MADV_WILLNEED); WARN_ON_ONCE(obj->mm.madv == I915_MADV_WILLNEED);
err = ttm_bo_wait(bo, true, false); err = dma_resv_wait_timeout(bo->base.resv, DMA_RESV_USAGE_BOOKKEEP,
if (err) true, 15 * HZ);
if (err < 0)
return err; return err;
if (err == 0)
return -EBUSY;
err = i915_ttm_move_notify(bo); err = i915_ttm_move_notify(bo);
if (err) if (err)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment