drm/i915/gvt: Fix unnecessary schedule timer when no vGPU exits
authorZhenyu Wang <zhenyuw@linux.intel.com>
Tue, 3 Mar 2020 05:54:12 +0000 (13:54 +0800)
committerZhenyu Wang <zhenyuw@linux.intel.com>
Tue, 3 Mar 2020 06:09:26 +0000 (14:09 +0800)
commit04d6067f1f19e70a418f92fa3170cf7fe53b7fdf
treeb35830d3feed3b8046f6b079e9cbd0068015ce77
parentb549c252b1292aea959cd9b83537fcb9384a6112
drm/i915/gvt: Fix unnecessary schedule timer when no vGPU exits

From commit f25a49ab8ab9 ("drm/i915/gvt: Use vgpu_lock to protect per
vgpu access") the vgpu idr destroy is moved later than vgpu resource
destroy, then it would fail to stop timer for schedule policy clean
which to check vgpu idr for any left vGPU. So this trys to destroy
vgpu idr earlier.

Cc: Colin Xu <colin.xu@intel.com>
Fixes: f25a49ab8ab9 ("drm/i915/gvt: Use vgpu_lock to protect per vgpu access")
Acked-by: Colin Xu <colin.xu@intel.com>
Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20200229055445.31481-1-zhenyuw@linux.intel.com
drivers/gpu/drm/i915/gvt/vgpu.c