summaryrefslogtreecommitdiffstats
path: root/drivers/gpu
diff options
context:
space:
mode:
authorPing Gao <ping.a.gao@intel.com>2016-10-26 13:36:41 +0800
committerZhenyu Wang <zhenyuw@linux.intel.com>2016-10-26 13:36:41 +0800
commit0a8b66e3adbe302a02bb33e1a662416281ade616 (patch)
treefad073bb536e12ba7830b701db4afcfc62dac2fb /drivers/gpu
parent40d2428b3a6aaa3d6ba0de0e8780c4b4eb53426c (diff)
downloadblackbird-op-linux-0a8b66e3adbe302a02bb33e1a662416281ade616.tar.gz
blackbird-op-linux-0a8b66e3adbe302a02bb33e1a662416281ade616.zip
drm/i915/gvt: correct the reset logic
The current_vgpu will set to NULL after stopping the scheduler when the reset is triggered by current vgpu, so here need change the judgement condition for current vgpu detection. Signed-off-by: Ping Gao <ping.a.gao@intel.com> Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com>
Diffstat (limited to 'drivers/gpu')
-rw-r--r--drivers/gpu/drm/i915/gvt/handlers.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/gpu/drm/i915/gvt/handlers.c b/drivers/gpu/drm/i915/gvt/handlers.c
index 52af51728cc1..7832e49ed5b3 100644
--- a/drivers/gpu/drm/i915/gvt/handlers.c
+++ b/drivers/gpu/drm/i915/gvt/handlers.c
@@ -239,7 +239,11 @@ static int handle_device_reset(struct intel_vgpu *vgpu, unsigned int offset,
vgpu->resetting = true;
intel_vgpu_stop_schedule(vgpu);
- if (scheduler->current_vgpu == vgpu) {
+ /*
+ * The current_vgpu will set to NULL after stopping the
+ * scheduler when the reset is triggered by current vgpu.
+ */
+ if (scheduler->current_vgpu == NULL) {
mutex_unlock(&vgpu->gvt->lock);
intel_gvt_wait_vgpu_idle(vgpu);
mutex_lock(&vgpu->gvt->lock);
OpenPOWER on IntegriCloud