Quoting Tvrtko Ursulin (2019-02-05 08:51:19)
>
> On 04/02/2019 13:22, Chris Wilson wrote:
> > We currently track GPU memory usage inside VMA, such that we never
> > release memory used by the GPU until after it has finished accessing it.
> > However, we may want to track other resources aside from VMA, or we may
> > want to split a VMA into multiple independent regions and track each
> > separately. For this purpose, generalise our request tracking (akin to
> > struct reservation_object) so that we can embed it into other objects.
>
> Please add changelog.
Added GEM_BUG_ON for an erroneous overflow. Nah.
> > +static int __live_active_setup(struct drm_i915_private *i915,
> > + struct live_active *active)
> > +{
> > + struct intel_engine_cs *engine;
> > + struct i915_sw_fence *submit;
> > + enum intel_engine_id id;
> > + unsigned int count = 0;
> > + int err = 0;
> > +
> > + i915_active_init(i915, &active->base, __live_active_retire);
> > + active->retired = false;
> > +
> > + if (!i915_active_acquire(&active->base)) {
> > + pr_err("First i915_active_acquire should report being
> > idle\n");
> > + return -EINVAL;
> > + }
> > +
> > + submit = heap_fence_create(GFP_KERNEL);
> > +
> > + for_each_engine(engine, i915, id) {
> > + struct i915_request *rq;
> > +
> > + rq = i915_request_alloc(engine, i915->kernel_context);
> > + if (IS_ERR(rq)) {
> > + err = PTR_ERR(rq);
>
> Add a message here so error cause is clear in the logs.
I haven't, I don't see the point. It doesn't generate the same error and
it doesn't help investigating test failures (as it is not part of the
test).
> request_add could be consolidated into a single call after err =
> i915_sw_fence.., if you want.
I did that yesterday, and even added a v2 for you.
> With the change log and error message:
What changelog? It's meant to be extracting the code from i915_vma.c and
adding a testcase. What existing logic did we need to change?
-Chris
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx