summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/i915/gvt/execlist.c
diff options
context:
space:
mode:
authorfred gao <fred.gao@intel.com>2017-08-18 15:41:07 +0800
committerZhenyu Wang <zhenyuw@linux.intel.com>2017-09-08 14:21:14 +0800
commita3cfdca920b274618d6046d85a474308ee28e5bb (patch)
tree37b523f4a2fbdce4eb74a97b90596edc5e500551 /drivers/gpu/drm/i915/gvt/execlist.c
parent0a53bc07f044c4c51eb0dc1386c504db80ca8d00 (diff)
drm/i915/gvt: Add error handling for intel_gvt_scan_and_shadow_workload
When an error occurs after shadow_indirect_ctx, this patch is to do the proper cleanup and rollback to the original states for shadowed indirect context before the workload is abandoned. v2: - split the mixed several error paths for better review. (Zhenyu) v3: - no return check for clean up functions. (Changbin) v4: - expose and reuse the existing release_shadow_wa_ctx. (Zhenyu) v5: - move the release function to scheduler.c file. (Zhenyu) v6: - move error handling code of intel_gvt_scan_and_shadow_workload to here. (Zhenyu) Signed-off-by: fred gao <fred.gao@intel.com> Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com>
Diffstat (limited to 'drivers/gpu/drm/i915/gvt/execlist.c')
-rw-r--r--drivers/gpu/drm/i915/gvt/execlist.c9
1 files changed, 0 insertions, 9 deletions
diff --git a/drivers/gpu/drm/i915/gvt/execlist.c b/drivers/gpu/drm/i915/gvt/execlist.c
index 1e2c27704be5..cbb2e8da1c7a 100644
--- a/drivers/gpu/drm/i915/gvt/execlist.c
+++ b/drivers/gpu/drm/i915/gvt/execlist.c
@@ -489,15 +489,6 @@ static void release_shadow_batch_buffer(struct intel_vgpu_workload *workload)
}
}
-static void release_shadow_wa_ctx(struct intel_shadow_wa_ctx *wa_ctx)
-{
- if (!wa_ctx->indirect_ctx.obj)
- return;
-
- i915_gem_object_unpin_map(wa_ctx->indirect_ctx.obj);
- i915_gem_object_put(wa_ctx->indirect_ctx.obj);
-}
-
static int complete_execlist_workload(struct intel_vgpu_workload *workload)
{
struct intel_vgpu *vgpu = workload->vgpu;