[Intel-gfx] [PATCH 5/5] drm/i915: Cancel non-persistent contexts on close
Chris Wilson
chris at chris-wilson.co.uk
Tue Aug 6 14:11:27 UTC 2019
Quoting Chris Wilson (2019-08-06 14:47:25)
> +static int
> +set_persistence(struct i915_gem_context *ctx,
> + const struct drm_i915_gem_context_param *args)
> +{
> + if (args->size)
> + return -EINVAL;
> +
> + if (!args->value) {
> + i915_gem_context_clear_persistence(ctx);
> + return 0;
> + }
> +
> + if (!(ctx->i915->caps.scheduler & I915_SCHEDULER_CAP_PREEMPTION))
> + return -ENODEV;
> +
> + i915_gem_context_set_persistence(ctx);
> + return 0;
> +}
Oops, that is back-to-front. We can only switch off persistent behaviour if
we can do the preempt.
-Chris
More information about the Intel-gfx
mailing list