return 0;
}
-static int get_ppgtt(struct i915_gem_context *ctx,
+static int get_ppgtt(struct drm_i915_file_private *file_priv,
+ struct i915_gem_context *ctx,
struct drm_i915_gem_context_param *args)
{
- struct drm_i915_file_private *file_priv = ctx->file_priv;
struct i915_hw_ppgtt *ppgtt;
int ret;
return 0;
}
-static int set_ppgtt(struct i915_gem_context *ctx,
+static int set_ppgtt(struct drm_i915_file_private *file_priv,
+ struct i915_gem_context *ctx,
struct drm_i915_gem_context_param *args)
{
- struct drm_i915_file_private *file_priv = ctx->file_priv;
struct i915_hw_ppgtt *ppgtt, *old;
int err;
return 0;
}
-static int ctx_setparam(struct i915_gem_context *ctx,
+static int ctx_setparam(struct drm_i915_file_private *fpriv,
+ struct i915_gem_context *ctx,
struct drm_i915_gem_context_param *args)
{
int ret = 0;
break;
case I915_CONTEXT_PARAM_VM:
- ret = set_ppgtt(ctx, args);
+ ret = set_ppgtt(fpriv, ctx, args);
break;
case I915_CONTEXT_PARAM_BAN_PERIOD:
if (local.param.ctx_id)
return -EINVAL;
- return ctx_setparam(arg->ctx, &local.param);
+ return ctx_setparam(arg->fpriv, arg->ctx, &local.param);
}
static const i915_user_extension_fn create_extensions[] = {
break;
case I915_CONTEXT_PARAM_VM:
- ret = get_ppgtt(ctx, args);
+ ret = get_ppgtt(file_priv, ctx, args);
break;
case I915_CONTEXT_PARAM_BAN_PERIOD:
if (!ctx)
return -ENOENT;
- ret = ctx_setparam(ctx, args);
+ ret = ctx_setparam(file_priv, ctx, args);
i915_gem_context_put(ctx);
return ret;