[PATCH v3 1/2] drm/i915/gvt: move workload destroy out of execlist complete
Yan Zhao
yan.y.zhao at intel.com
Fri May 8 02:35:10 UTC 2020
Reviewed-by: Yan Zhao <yan.y.zhao at intel.com>
On Wed, May 06, 2020 at 05:43:17PM +0800, Zhenyu Wang wrote:
> 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.
>
> Signed-off-by: Zhenyu Wang <zhenyuw at linux.intel.com>
> ---
> drivers/gpu/drm/i915/gvt/execlist.c | 2 --
> drivers/gpu/drm/i915/gvt/scheduler.c | 3 +++
> 2 files changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/gvt/execlist.c b/drivers/gpu/drm/i915/gvt/execlist.c
> index dd25c3024370..158873f269b1 100644
> --- a/drivers/gpu/drm/i915/gvt/execlist.c
> +++ b/drivers/gpu/drm/i915/gvt/execlist.c
> @@ -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;
> }
>
> diff --git a/drivers/gpu/drm/i915/gvt/scheduler.c b/drivers/gpu/drm/i915/gvt/scheduler.c
> index 35ad540622ac..6e59c7d61397 100644
> --- a/drivers/gpu/drm/i915/gvt/scheduler.c
> +++ b/drivers/gpu/drm/i915/gvt/scheduler.c
> @@ -1013,6 +1013,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);
>
> --
> 2.26.2
>
> _______________________________________________
> intel-gvt-dev mailing list
> intel-gvt-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gvt-dev
More information about the intel-gvt-dev
mailing list