Commit 0d402a24 authored by Chuanxiao Dong's avatar Chuanxiao Dong Committed by Chris Wilson

drm/i915: set initialised only when init_context callback is NULL

During execlist_context_deferred_alloc() we presumed that the context is
uninitialised (we only just allocated the state object for it!) and
chose to optimise away the later call to engine->init_context() if
engine->init_context were NULL. This breaks with GVT's contexts that are
marked as pre-initialised to avoid us annoyingly calling
engine->init_context(). The fix is to not override ce->initialised if it
is already true.

Cc: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: default avatarChuanxiao Dong <chuanxiao.dong@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1494497262-24855-1-git-send-email-chuanxiao.dong@intel.comReviewed-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
parent 73cc0b9a
...@@ -1956,7 +1956,7 @@ static int execlists_context_deferred_alloc(struct i915_gem_context *ctx, ...@@ -1956,7 +1956,7 @@ static int execlists_context_deferred_alloc(struct i915_gem_context *ctx,
ce->ring = ring; ce->ring = ring;
ce->state = vma; ce->state = vma;
ce->initialised = engine->init_context == NULL; ce->initialised |= engine->init_context == NULL;
return 0; return 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment