52 lines
1.7 KiB
Diff
52 lines
1.7 KiB
Diff
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||
|
From: Liu Xinyun <xinyun.liu@intel.com>
|
||
|
Date: Sun, 13 Oct 2019 01:24:12 +0800
|
||
|
Subject: [PATCH] drm/i915/gvt: set vgpu request status is done
|
||
|
|
||
|
Split and cherry-pick the patch from below patch
|
||
|
|
||
|
Revert "drm/i915/gvt: removed save/store registers"
|
||
|
This reverts commit 7b25f1946a757a5c67ed45a773ff1f98e0889a97.
|
||
|
|
||
|
It's to prevent workload being blocked
|
||
|
|
||
|
Tracked-On: projectacrn/acrn-hypervisor#3830
|
||
|
Signed-off-by: Liu Xinyun <xinyun.liu@intel.com>
|
||
|
Reviewed-by: Zhao Yakui <yakui.zhao@intel.com>
|
||
|
---
|
||
|
drivers/gpu/drm/i915/gvt/scheduler.c | 10 +++++++++-
|
||
|
1 file changed, 9 insertions(+), 1 deletion(-)
|
||
|
|
||
|
diff --git a/drivers/gpu/drm/i915/gvt/scheduler.c b/drivers/gpu/drm/i915/gvt/scheduler.c
|
||
|
index 37207c12e196..52df3600b835 100644
|
||
|
--- a/drivers/gpu/drm/i915/gvt/scheduler.c
|
||
|
+++ b/drivers/gpu/drm/i915/gvt/scheduler.c
|
||
|
@@ -1054,6 +1054,7 @@ static int workload_thread(void *priv)
|
||
|
struct intel_vgpu_workload *workload = NULL;
|
||
|
struct intel_vgpu *vgpu = NULL;
|
||
|
int ret;
|
||
|
+ long lret;
|
||
|
bool need_force_wake = IS_SKYLAKE(gvt->dev_priv)
|
||
|
|| IS_KABYLAKE(gvt->dev_priv);
|
||
|
DEFINE_WAIT_FUNC(wait, woken_wake_function);
|
||
|
@@ -1099,8 +1100,15 @@ static int workload_thread(void *priv)
|
||
|
|
||
|
gvt_dbg_sched("ring id %d wait workload %p\n",
|
||
|
workload->ring_id, workload);
|
||
|
- i915_request_wait(workload->req, 0, MAX_SCHEDULE_TIMEOUT);
|
||
|
|
||
|
+ lret = i915_request_wait(workload->req, 0,
|
||
|
+ MAX_SCHEDULE_TIMEOUT);
|
||
|
+
|
||
|
+ gvt_dbg_sched("i915_wait_request %p returns %ld\n",
|
||
|
+ workload, lret);
|
||
|
+
|
||
|
+ if (lret >= 0 && workload->status == -EINPROGRESS)
|
||
|
+ workload->status = 0;
|
||
|
/*
|
||
|
* increased guilty_count means that this request triggerred
|
||
|
* a GPU reset, so we need to notify the guest about the
|
||
|
--
|
||
|
https://clearlinux.org
|
||
|
|