[Intel-gfx] [PATCH] drm/i915: disable set/get_tiling ioctl on gen12+

Chris Wilson chris at chris-wilson.co.uk
Tue Aug 20 19:25:25 UTC 2019


Quoting Daniel Vetter (2019-08-20 20:06:19)
> On Tue, Aug 20, 2019 at 8:55 PM Chris Wilson <chris at chris-wilson.co.uk> wrote:
> >
> > Quoting Daniel Vetter (2019-08-20 18:06:31)
> > > The cpu (de)tiler hw is gone, this stopped being useful. Plus it never
> > > supported any of the fancy new tiling formats, which means userspace
> > > also stopped using the magic side-channel this provides.
> > >
> > > This would totally break a lot of the igts, but they're already broken
> > > for the same reasons as userspace on gen12 would be.
> > >
> > > Cc: Kenneth Graunke <kenneth at whitecape.org>
> > > Cc: Jason Ekstrand <jason at jlekstrand.net>
> > > Cc: Chris Wilson <chris at chris-wilson.co.uk>
> > > Cc: Lucas De Marchi <lucas.demarchi at intel.com>
> > > Signed-off-by: Daniel Vetter <daniel.vetter at intel.com>
> > > ---
> > >  drivers/gpu/drm/i915/gem/i915_gem_tiling.c | 8 ++++++++
> > >  1 file changed, 8 insertions(+)
> > >
> > > diff --git a/drivers/gpu/drm/i915/gem/i915_gem_tiling.c b/drivers/gpu/drm/i915/gem/i915_gem_tiling.c
> > > index ca0c2f451742..2ee96f27a294 100644
> > > --- a/drivers/gpu/drm/i915/gem/i915_gem_tiling.c
> > > +++ b/drivers/gpu/drm/i915/gem/i915_gem_tiling.c
> > > @@ -313,10 +313,15 @@ int
> > >  i915_gem_set_tiling_ioctl(struct drm_device *dev, void *data,
> > >                           struct drm_file *file)
> > >  {
> > > +       struct drm_i915_private *dev_priv = to_i915(dev);
> > >         struct drm_i915_gem_set_tiling *args = data;
> > >         struct drm_i915_gem_object *obj;
> > >         int err;
> > >
> > > +       /* there is no cpu (de)tiling in the hw anymore on gen12+ */
> > > +       if (INTEL_GEN(dev_priv) >= 12)
> >
> > This should be if (!NUM_FENCES(dev_priv)) if anything. You wouldn't even
> > need the comment talking about random features, and instead focus on why
> > not supporting the back channel is worth the maintenance cost of
> > divergence.
> 
> Yeah that's much better.
> 
> > > +               return -EOPNOTSUPP;
> > > +
> > >         obj = i915_gem_object_lookup(file, args->handle);
> > >         if (!obj)
> > >                 return -ENOENT;
> > > @@ -402,6 +407,9 @@ i915_gem_get_tiling_ioctl(struct drm_device *dev, void *data,
> > >         struct drm_i915_gem_object *obj;
> > >         int err = -ENOENT;
> > >
> > > +       if (INTEL_GEN(dev_priv) >= 12)
> > > +               return -EOPNOTSUPP;
> >
> > Not required.
> 
> I figured since we have a lot of old libdrm that loved to do
> get_tiling this would help in catching them. That's why I put it in.
> Plus just some ocd, if the set is gone, kill the get one too. Otoh we
> might stir something up.

If we are using the num_fences as the feature test, they can query that
already via I915_GETPARAM. So this is just left as reporting what the
tiling mode is set on the object, which is then always none.
-Chris


More information about the Intel-gfx mailing list