]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915/gvt: dec vgpu->running_workload_num after the workload is really done
authorChangbin Du <changbin.du@intel.com>
Thu, 5 Jan 2017 08:49:03 +0000 (16:49 +0800)
committerZhenyu Wang <zhenyuw@linux.intel.com>
Mon, 9 Jan 2017 03:10:43 +0000 (11:10 +0800)
commit08e4f6ca7953625e1fa56eb548b02e453e321e79
tree7679b1dd789545fe8ab5c33e68bc0014bc43c3fc
parent04db83359a4d3be9eea562f3e289e6f427413eb8
drm/i915/gvt: dec vgpu->running_workload_num after the workload is really done

The vgpu->running_workload_num is used to determine whether a vgpu has
any workload running or not. So we should make sure the workload is
really done before we dec running_workload_num. Function
complete_current_workload is not the right place to do it, since this
function is still processing the workload. This patch move the dec op
afterward.

v2: move dec op before wake_up(&scheduler->workload_complete_wq) (Min He)

Signed-off-by: Changbin Du <changbin.du@intel.com>
Reviewed-by: Min He <min.he@intel.com>
Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com>
drivers/gpu/drm/i915/gvt/scheduler.c