drm/i915/gvt: set max priority for gvt context
authorZhenyu Wang <zhenyuw@linux.intel.com>
Mon, 4 Dec 2017 02:42:58 +0000 (10:42 +0800)
committerZhenyu Wang <zhenyuw@linux.intel.com>
Mon, 4 Dec 2017 03:24:35 +0000 (11:24 +0800)
This is to workaround guest driver hang regression after
preemption enable that gvt hasn't enabled handling of that
for guest workload. So in effect this disables preemption
for gvt context now.

Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com>
drivers/gpu/drm/i915/gvt/scheduler.c

index 9100aebcb105b5fe4ef525d3f895f1c93412b0df..ab9a500ba3e90a9dcccf4a86a8ccada432ac973b 100644 (file)
@@ -1038,6 +1038,9 @@ int intel_vgpu_setup_submission(struct intel_vgpu *vgpu)
        if (IS_ERR(s->shadow_ctx))
                return PTR_ERR(s->shadow_ctx);
 
+       if (HAS_LOGICAL_RING_PREEMPTION(vgpu->gvt->dev_priv))
+               s->shadow_ctx->priority = INT_MAX;
+
        bitmap_zero(s->shadow_ctx_desc_updated, I915_NUM_ENGINES);
 
        s->workloads = kmem_cache_create("gvt-g_vgpu_workload",