Skip to content

Commit

Permalink
drm/i915: unpin on error in intel_vgpu_shadow_mm_pin()
Browse files Browse the repository at this point in the history
Call intel_vgpu_unpin_mm() on this error path.

Fixes: 4187414 ("drm/i915/gvt: Adding ppgtt to GVT GEM context after shadow pdps settled.")
Signed-off-by: Dan Carpenter <[email protected]>
Signed-off-by: Zhenyu Wang <[email protected]>
Link: http://patchwork.freedesktop.org/patch/msgid/Y3OQ5tgZIVxyQ/WV@kili
Reviewed-by: Zhenyu Wang <[email protected]>
  • Loading branch information
error27 authored and zhenyw committed Jan 4, 2023
1 parent 88603b6 commit 3792fc5
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/gpu/drm/i915/gvt/scheduler.c
Original file line number Diff line number Diff line change
Expand Up @@ -695,6 +695,7 @@ intel_vgpu_shadow_mm_pin(struct intel_vgpu_workload *workload)

if (workload->shadow_mm->type != INTEL_GVT_MM_PPGTT ||
!workload->shadow_mm->ppgtt_mm.shadowed) {
intel_vgpu_unpin_mm(workload->shadow_mm);
gvt_vgpu_err("workload shadow ppgtt isn't ready\n");
return -EINVAL;
}
Expand Down

0 comments on commit 3792fc5

Please sign in to comment.