[Intel-gfx] [PATCH 2/2] drm/i915/gvt: Stop waiting whilst holding struct_mutex

Matthew Auld matthew.william.auld at gmail.com
Wed Oct 19 08:55:49 UTC 2016


On 19 October 2016 at 09:12, Chris Wilson <chris at chris-wilson.co.uk> wrote:
> For whatever reason, the gvt scheduler runs synchronously. At the very
> least, lets run synchronously without holding the struct_mutex.
>
> Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
> ---
>  drivers/gpu/drm/i915/gvt/scheduler.c | 13 ++++++-------
>  1 file changed, 6 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/gvt/scheduler.c b/drivers/gpu/drm/i915/gvt/scheduler.c
> index 4cedd3274da7..aa83dd3381a3 100644
> --- a/drivers/gpu/drm/i915/gvt/scheduler.c
> +++ b/drivers/gpu/drm/i915/gvt/scheduler.c
> @@ -420,10 +420,6 @@ static int workload_thread(void *priv)
>
>                 intel_runtime_pm_get(gvt->dev_priv);
>
> -               /*
> -                * Always take i915 big lock first
> -                */
> -               mutex_lock(&gvt->dev_priv->drm.struct_mutex);
>
>                 gvt_dbg_sched("ring id %d will dispatch workload %p\n",
>                                 workload->ring_id, workload);
> @@ -432,7 +428,10 @@ static int workload_thread(void *priv)
>                         intel_uncore_forcewake_get(gvt->dev_priv,
>                                         FORCEWAKE_ALL);
>
> +               mutex_lock(&gvt->dev_priv->drm.struct_mutex);
>                 ret = dispatch_workload(workload);
> +               mutex_lock(&gvt->dev_priv->drm.struct_mutex);
mutex_unlock...


More information about the Intel-gfx mailing list