[PATCH 2/2] drm/i915/gvt: set max priority for gvt context

Zhenyu Wang zhenyuw at linux.intel.com
Fri Dec 1 07:10:03 UTC 2017


On 2017.12.01 07:12:21 +0000, Zhang, Xiong Y wrote:
> > This is to workaround guest driver hang regression after preemption enable
> > that gvt hasn't enabled handling of that for guest workload. So in effect this
> > disables preemption for gvt context now.
> > 
> > Signed-off-by: Zhenyu Wang <zhenyuw at linux.intel.com>
> > ---
> >  drivers/gpu/drm/i915/gvt/scheduler.c | 3 +++
> >  1 file changed, 3 insertions(+)
> > 
> > diff --git a/drivers/gpu/drm/i915/gvt/scheduler.c
> > b/drivers/gpu/drm/i915/gvt/scheduler.c
> > index c98669293e77..e5b48fae1826 100644
> > --- a/drivers/gpu/drm/i915/gvt/scheduler.c
> > +++ b/drivers/gpu/drm/i915/gvt/scheduler.c
> > @@ -1039,6 +1039,9 @@ int intel_vgpu_setup_submission(struct intel_vgpu
> > *vgpu)
> >  	if (IS_ERR(s->shadow_ctx))
> >  		return PTR_ERR(s->shadow_ctx);
> > 
> > +	if (INTEL_INFO(vgpu->gvt->dev_priv)->has_logical_ring_preemption)
> > +		s->shadow_ctx->priority = INT_MAX;
> [Zhang, Xiong Y] Better to use i915 macro: 
>      If (HAS_LOGICAL_RING_PREEMPTION(engine->i915))
> 		s->shadow_ctx->priority = I915_PRIORITY_MAX

yeah, but that definition helper isn't in 4.15 that I'd like to
push this to, so still keep original form that can work for all now.

-- 
Open Source Technology Center, Intel ltd.

$gpg --keyserver wwwkeys.pgp.net --recv-keys 4D781827
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 195 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/intel-gvt-dev/attachments/20171201/7c34902e/attachment.sig>


More information about the intel-gvt-dev mailing list