drm/i915/gvt: release shadow batch buffer and wa_ctx before destroy one workload
authorWeinan Li <weinan.z.li@intel.com>
Tue, 22 Jan 2019 05:46:27 +0000 (13:46 +0800)
committerZhenyu Wang <zhenyuw@linux.intel.com>
Wed, 23 Jan 2019 05:58:46 +0000 (13:58 +0800)
commit0f75551216091223efe1f18295f655aff6415385
tree5396a32f35e6245ef04fb424adafba0619d14bf2
parent51b00d8509dc69c98740da2ad07308b630d3eb7d
drm/i915/gvt: release shadow batch buffer and wa_ctx before destroy one workload

GVT-g will shadow the privilege batch buffer and the indirect context
during command scan, move the release process into
intel_vgpu_destroy_workload() to ensure the resources are recycled
properly.

Fixes: 0cce2823ed37 ("drm/i915/gvt/kvmgt:Refine error handling for prepare_execlist_workload")
Reviewed-by: Zhenyu Wang <zhenyuw@linux.intel.com>
Signed-off-by: Weinan Li <weinan.z.li@intel.com>
Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com>
drivers/gpu/drm/i915/gvt/scheduler.c