Message ID | Y3OQ5tgZIVxyQ/WV@kili (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | drm/i915: unpin on error in intel_vgpu_shadow_mm_pin() | expand |
On 2022.11.15 16:15:18 +0300, Dan Carpenter wrote: > Call intel_vgpu_unpin_mm() on this error path. > > Fixes: 418741480809 ("drm/i915/gvt: Adding ppgtt to GVT GEM context after shadow pdps settled.") > Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> > --- > drivers/gpu/drm/i915/gvt/scheduler.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/drivers/gpu/drm/i915/gvt/scheduler.c b/drivers/gpu/drm/i915/gvt/scheduler.c > index d6fe94cd0fdb..8342d95f56cb 100644 > --- a/drivers/gpu/drm/i915/gvt/scheduler.c > +++ b/drivers/gpu/drm/i915/gvt/scheduler.c > @@ -696,6 +696,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; > } > -- Thanks, Dan. Looks fine to me. Reviewed-by: Zhenyu Wang <zhenyuw@linux.intel.com>
diff --git a/drivers/gpu/drm/i915/gvt/scheduler.c b/drivers/gpu/drm/i915/gvt/scheduler.c index d6fe94cd0fdb..8342d95f56cb 100644 --- a/drivers/gpu/drm/i915/gvt/scheduler.c +++ b/drivers/gpu/drm/i915/gvt/scheduler.c @@ -696,6 +696,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; }
Call intel_vgpu_unpin_mm() on this error path. Fixes: 418741480809 ("drm/i915/gvt: Adding ppgtt to GVT GEM context after shadow pdps settled.") Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> --- drivers/gpu/drm/i915/gvt/scheduler.c | 1 + 1 file changed, 1 insertion(+)