Re: [PATCH] drm/i915: Only allocate preempt context when required

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Quoting Lis, Tomasz (2018-01-30 18:47:55)
> 
> 
> On 2018-01-27 21:28, Chris Wilson wrote:
> > If we remove some hardcoded assumptions about the preempt context having
> > a fixed id, reserved from use by normal user contexts, we may only
> > allocate the i915_gem_context when required. Then the subsequent
> > decisions on using preemption reduce to having the preempt context
> > available.
> >
> > Signed-off-by: Chris Wilson <chris@xxxxxxxxxxxxxxxxxx>
> > Cc: Michal Winiarski <michal.winiarski@xxxxxxxxx>
> > Cc: Tvrtko Ursulin <tvrtko.ursulin@xxxxxxxxx>
> > Cc: Arkadiusz Hiler <arkadiusz.hiler@xxxxxxxxx>
> > Cc: Mika Kuoppala <mika.kuoppala@xxxxxxxxx>
> > Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@xxxxxxxxx>
> > ---
> >   drivers/gpu/drm/i915/i915_drv.c                  |  2 +-
> >   drivers/gpu/drm/i915/i915_gem_context.c          | 24 +++++++++---------------
> >   drivers/gpu/drm/i915/intel_engine_cs.c           |  6 +++---
> >   drivers/gpu/drm/i915/intel_guc_submission.c      | 24 +++++++++++++-----------
> >   drivers/gpu/drm/i915/intel_lrc.c                 | 15 ++++++++++-----
> >   drivers/gpu/drm/i915/intel_ringbuffer.h          |  5 +++++
> >   drivers/gpu/drm/i915/selftests/mock_gem_device.c |  6 ------
> >   7 files changed, 41 insertions(+), 41 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c
> > index 1ec12add34b2..a7fc87e87fcf 100644
> > --- a/drivers/gpu/drm/i915/i915_drv.c
> > +++ b/drivers/gpu/drm/i915/i915_drv.c
> > @@ -376,7 +376,7 @@ static int i915_getparam(struct drm_device *dev, void *data,
> >               if (dev_priv->engine[RCS] && dev_priv->engine[RCS]->schedule) {
> >                       value |= I915_SCHEDULER_CAP_ENABLED;
> >                       value |= I915_SCHEDULER_CAP_PRIORITY;
> > -                     if (HAS_LOGICAL_RING_PREEMPTION(dev_priv))
> > +                     if (dev_priv->preempt_context)
> >                               value |= I915_SCHEDULER_CAP_PREEMPTION;
> >               }
> >               break;
> We cannot put equality to not having preempt_context and having 
> preemption disabled. The preempt_context will not be required on 
> platforms which support preempting directly to idle.
Sure, but that is not part of the current code. As of today, disabling
the preempt-context means no preemption. And since no one has presented
code that successfully does away with the preempt context...
-Chris
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux