Re: [RFC PATCH 13/42] drm/i915: support object clearing via blitter engine

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Quoting Matthew Auld (2019-02-14 14:57:11)
> +static int i915_gem_object_fill_blt(struct i915_gem_context *ctx,
> +                                   struct drm_i915_gem_object *obj,
> +                                   u32 value)
> +{
> +       struct drm_i915_private *i915 = to_i915(obj->base.dev);
> +       struct i915_address_space *vm = ctx->ppgtt ? &ctx->ppgtt->vm : &i915->ggtt.vm;
> +       struct i915_vma *vma;
> +       int err;
> +
> +       lockdep_assert_held(&i915->drm.struct_mutex);
> +
> +       vma = i915_vma_instance(obj, vm, NULL);
> +       if (IS_ERR(vma))
> +               return PTR_ERR(vma);
> +
> +       err = i915_vma_pin(vma, 0, 0, PIN_USER);
> +       if (err) {
> +               i915_vma_close(vma);
> +               return err;
> +       }
> +
> +       err = i915_gem_fill_blt(ctx, vma, value);
> +       i915_vma_unpin(vma);
> +       if (err)
> +               return err;
> +
> +       return i915_gem_object_wait(obj,
> +                                   I915_WAIT_LOCKED |
> +                                   I915_WAIT_ALL,
> +                                   MAX_SCHEDULE_TIMEOUT);

Oh no, don't even start by making this synchronous.
-Chris
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux