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: Christian König <christian.koenig@amd.com> Reviewed-by: Matthew Auld <matthew.auld@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20221125102137.1801-7-christian.koenig@amd.com
This commit is contained in:
parent
38c8389011
commit
58377de46e
@ -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)
|
||||
{
|
||||
struct ttm_buffer_object *bo = i915_gem_to_ttm(obj);
|
||||
int err;
|
||||
long err;
|
||||
|
||||
WARN_ON_ONCE(obj->mm.madv == I915_MADV_WILLNEED);
|
||||
|
||||
err = ttm_bo_wait(bo, true, false);
|
||||
if (err)
|
||||
err = dma_resv_wait_timeout(bo->base.resv, DMA_RESV_USAGE_BOOKKEEP,
|
||||
true, 15 * HZ);
|
||||
if (err < 0)
|
||||
return err;
|
||||
if (err == 0)
|
||||
return -EBUSY;
|
||||
|
||||
err = i915_ttm_move_notify(bo);
|
||||
if (err)
|
||||
|
Loading…
x
Reference in New Issue
Block a user