initialised is fixup by the GVT shadow context as true to avoid the init
from the host because it cannot take the settings from the host. Add a
check to let host driver only overwrite it when the init callback is NULL

Cc: Chris Wilson <ch...@chris-wilson.co.uk>
Signed-off-by: Chuanxiao Dong <chuanxiao.d...@intel.com>
---
 drivers/gpu/drm/i915/intel_lrc.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/intel_lrc.c b/drivers/gpu/drm/i915/intel_lrc.c
index 319d9a8..d0e9b61 100644
--- a/drivers/gpu/drm/i915/intel_lrc.c
+++ b/drivers/gpu/drm/i915/intel_lrc.c
@@ -1956,7 +1956,8 @@ static int execlists_context_deferred_alloc(struct 
i915_gem_context *ctx,
 
        ce->ring = ring;
        ce->state = vma;
-       ce->initialised = engine->init_context == NULL;
+       if (!engine->init_context)
+               ce->initialised = true;
 
        return 0;
 
-- 
2.7.4

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

Reply via email to