]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915: set initialised only when init_context callback is NULL
authorChuanxiao Dong <chuanxiao.dong@intel.com>
Thu, 11 May 2017 10:07:42 +0000 (18:07 +0800)
committerChris Wilson <chris@chris-wilson.co.uk>
Fri, 12 May 2017 10:11:11 +0000 (11:11 +0100)
commit1407849b556460df8b84b5dcf9d1bc8f8de156d8
treec06ba57b5cf04166d489a99b4206718f117c777f
parente5dc55ff52f1c94d6c52e788d38912223c2e5b4b
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: Chuanxiao Dong <chuanxiao.dong@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1494497262-24855-1-git-send-email-chuanxiao.dong@intel.com
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
drivers/gpu/drm/i915/intel_lrc.c