]> Pileus Git - ~andy/linux/blobdiff - drivers/gpu/drm/i915/i915_gem_context.c
drm/i915: Add VM to pin
[~andy/linux] / drivers / gpu / drm / i915 / i915_gem_context.c
index 2470206a4d07490979ac66e2f2597eebbdf3aa32..d1cb28cbc71e9fabe36573c6f7fde961c75252af 100644 (file)
@@ -214,7 +214,7 @@ static int create_default_context(struct drm_i915_private *dev_priv)
         * default context.
         */
        dev_priv->ring[RCS].default_context = ctx;
-       ret = i915_gem_object_pin(ctx->obj, CONTEXT_ALIGN, false, false);
+       ret = i915_gem_obj_ggtt_pin(ctx->obj, CONTEXT_ALIGN, false, false);
        if (ret) {
                DRM_DEBUG_DRIVER("Couldn't pin %d\n", ret);
                goto err_destroy;
@@ -400,7 +400,7 @@ static int do_switch(struct i915_hw_context *to)
        if (from == to)
                return 0;
 
-       ret = i915_gem_object_pin(to->obj, CONTEXT_ALIGN, false, false);
+       ret = i915_gem_obj_ggtt_pin(to->obj, CONTEXT_ALIGN, false, false);
        if (ret)
                return ret;