]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
drm/i915/gvt: move workload destroy out of execlist complete
authorZhenyu Wang <zhenyuw@linux.intel.com>
Wed, 6 May 2020 09:43:17 +0000 (17:43 +0800)
committerZhenyu Wang <zhenyuw@linux.intel.com>
Fri, 8 May 2020 04:34:12 +0000 (12:34 +0800)
To let execlist.c only handle execlist handling and keep other
workload cleanup function in scheduler.c to align with other
workload specific handling there. This doesn't change current
code behavior.

Reviewed-by: Yan Zhao <yan.y.zhao@intel.com>
Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20200506094318.105604-1-zhenyuw@linux.intel.com
drivers/gpu/drm/i915/gvt/execlist.c
drivers/gpu/drm/i915/gvt/scheduler.c

index dd25c3024370edcb1e52354233dbc8d95cce789f..158873f269b1b24d6cd31804d5f36355cb29bf9b 100644 (file)
@@ -424,8 +424,6 @@ static int complete_execlist_workload(struct intel_vgpu_workload *workload)
 
        ret = emulate_execlist_ctx_schedule_out(execlist, &workload->ctx_desc);
 out:
-       intel_vgpu_unpin_mm(workload->shadow_mm);
-       intel_vgpu_destroy_workload(workload);
        return ret;
 }
 
index 92a055c9d8d891dc18883fc65da2f0b1dd6f86d2..d25fbae87ca9390cffde98b76e1ec998539866bd 100644 (file)
@@ -1014,6 +1014,9 @@ static void complete_current_workload(struct intel_gvt *gvt, int ring_id)
 
        workload->complete(workload);
 
+       intel_vgpu_unpin_mm(workload->shadow_mm);
+       intel_vgpu_destroy_workload(workload);
+
        atomic_dec(&s->running_workload_num);
        wake_up(&scheduler->workload_complete_wq);