]> git.karo-electronics.de Git - linux-beck.git/commitdiff
drm/i915/gvt: Fix workload status after wait
authorZhenyu Wang <zhenyuw@linux.intel.com>
Wed, 2 Nov 2016 07:00:15 +0000 (15:00 +0800)
committerZhenyu Wang <zhenyuw@linux.intel.com>
Mon, 7 Nov 2016 06:17:00 +0000 (14:17 +0800)
From commit e95433c73a11759203af1cae5958f998c9673370, workload status setting
was changed to only capture on error path, but we need to set it properly in
normal path too, otherwise we'll fail to complete workload which could lead
guest VM vGPU reset.

v2: uses braces and add Fixes tag.

Fixes: e95433c73a11 ("drm/i915: Rearrange i915_wait_request() accounting with callers")
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com>
drivers/gpu/drm/i915/gvt/scheduler.c

index 18acb45dd14dedc99f0c663561697ac94e4d3d6f..843a5de4300d16653f6b0606fc981f8fa37ee04c 100644 (file)
@@ -455,6 +455,8 @@ static int workload_thread(void *priv)
                if (lret < 0) {
                        workload->status = lret;
                        gvt_err("fail to wait workload, skip\n");
+               } else {
+                       workload->status = 0;
                }
 
 complete: