Re: [PATCH v2 2/3] drm/i915: Move the scheduler feature bits into the purview of the engines

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

 



Quoting Mika Kuoppala (2018-01-31 13:58:17)
> Chris Wilson <chris@xxxxxxxxxxxxxxxxxx> writes:
> 
> > Rather than having the high level ioctl interface guess the underlying
> > implementation details, having the implementation declare what
> > capabilities it exports. We define an intel_driver_caps, similar to the
> > intel_device_info, which instead of trying to describe the HW gives
> > details on what the driver itself supports. This is then populated by
> > the engine backend for the new scheduler capability field for use
> > elsewhere.
> >
> > Signed-off-by: Chris Wilson <chris@xxxxxxxxxxxxxxxxxx>
> > Cc: Tomasz Lis <tomasz.lis@xxxxxxxxx>
> > Cc: Joonas Lahtinen <joonas.lahtinen@xxxxxxxxxxxxxxx>
> > Cc: Tvrtko Ursulin <tvrtko.ursulin@xxxxxxxxx>
> > Cc: Michal Wajdeczko <michal.wajdeczko@xxxxxxxxx>
> > ---
> >  drivers/gpu/drm/i915/i915_drv.c          | 8 +-------
> >  drivers/gpu/drm/i915/i915_drv.h          | 2 ++
> >  drivers/gpu/drm/i915/i915_gem.c          | 3 +++
> >  drivers/gpu/drm/i915/i915_gpu_error.c    | 7 +++++--
> >  drivers/gpu/drm/i915/intel_device_info.c | 6 ++++++
> >  drivers/gpu/drm/i915/intel_device_info.h | 7 +++++++
> >  drivers/gpu/drm/i915/intel_lrc.c         | 6 ++++++
> >  7 files changed, 30 insertions(+), 9 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c
> > index 1ec12add34b2..733f71637914 100644
> > --- a/drivers/gpu/drm/i915/i915_drv.c
> > +++ b/drivers/gpu/drm/i915/i915_drv.c
> > @@ -372,13 +372,7 @@ static int i915_getparam(struct drm_device *dev, void *data,
> >               value = i915_gem_mmap_gtt_version();
> >               break;
> >       case I915_PARAM_HAS_SCHEDULER:
> > -             value = 0;
> > -             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))
> > -                             value |= I915_SCHEDULER_CAP_PREEMPTION;
> > -             }
> > +             value = dev_priv->caps.scheduler;
> 
> Use the shiny CAP_PRIORITY instead of rcs->schedule on the
> I915_CONTEXT_PARAM_PRIORITY validation?

Yeah, that makes sense.
-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