Quoting Tvrtko Ursulin (2018-12-14 12:34:47) > +static int get_sseu(struct i915_gem_context *ctx, > + struct drm_i915_gem_context_param *args) > +{ > + struct drm_i915_gem_context_param_sseu user_sseu; > + struct intel_engine_cs *engine; > + struct intel_context *ce; > + int ret; > + > + if (args->size == 0) > + goto out; > + else if (args->size < sizeof(user_sseu)) > + return -EINVAL; > + > + if (copy_from_user(&user_sseu, u64_to_user_ptr(args->value), > + sizeof(user_sseu))) > + return -EFAULT; > + > + if (user_sseu.rsvd1 || user_sseu.rsvd2) > + return -EINVAL; I'd vote for s/rsvd2/flags/ straight away as already I can suggest we allow for USE_CTX_ENGINE to swap class/instance for engine-id so that we can set rpcs for, and not least, a virtual engine. > + > + engine = intel_engine_lookup_user(ctx->i915, > + user_sseu.class, > + user_sseu.instance); > + if (!engine) > + return -EINVAL; -Chris _______________________________________________ Intel-gfx mailing list Intel-gfx@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/intel-gfx