Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 318589
b: refs/heads/master
c: dfabbcb
h: refs/heads/master
i:
  318587: 1516385
v: v3
  • Loading branch information
Ben Widawsky authored and Daniel Vetter committed Jun 14, 2012
1 parent 287d941 commit d509791
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 12b0286f49947a6cdc9285032d918466a8c3f5f9
refs/heads/master: dfabbcb4f6a277992037fe199bcc1bf6bd44a996
10 changes: 10 additions & 0 deletions trunk/drivers/gpu/drm/i915/i915_gem_context.c
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,8 @@

static struct i915_hw_context *
i915_gem_context_get(struct drm_i915_file_private *file_priv, u32 id);
static int do_switch(struct drm_i915_gem_object *from_obj,
struct i915_hw_context *to, u32 seqno);

static int get_context_size(struct drm_device *dev)
{
Expand Down Expand Up @@ -225,6 +227,14 @@ static int create_default_context(struct drm_i915_private *dev_priv)
return ret;
}

ret = do_switch(NULL, ctx, 0);
if (ret) {
i915_gem_object_unpin(ctx->obj);
do_destroy(ctx);
} else {
DRM_DEBUG_DRIVER("Default HW context loaded\n");
}

return ret;
}

Expand Down

0 comments on commit d509791

Please sign in to comment.