[Intel-gfx] [PATCH 1/3] i-g-t: check whether kernel has dual bsd ring

Daniel Vetter daniel at ffwll.ch
Wed Dec 3 01:11:26 PST 2014


On Tue, Dec 02, 2014 at 10:44:28AM -0800, Rodrigo Vivi wrote:
> On Thu, Aug 7, 2014 at 12:49 AM, Zhipeng Gong <zhipeng.gong at intel.com> wrote:
> > Signed-off-by: Zhipeng Gong <zhipeng.gong at intel.com>
> > ---
> >  lib/ioctl_wrappers.c | 16 ++++++++++++++++
> >  lib/ioctl_wrappers.h |  1 +
> >  2 files changed, 17 insertions(+)
> >
> > diff --git a/lib/ioctl_wrappers.c b/lib/ioctl_wrappers.c
> > index c4e1080..03163a0 100644
> > --- a/lib/ioctl_wrappers.c
> > +++ b/lib/ioctl_wrappers.c
> > @@ -754,6 +754,22 @@ bool gem_has_vebox(int fd)
> >         return gem_has_enable_ring(fd,LOCAL_I915_PARAM_HAS_VEBOX);
> >  }
> >
> > +#define LOCAL_I915_PARAM_HAS_BSD2 29
> > +/**
> > + * gem_has_bsd2:
> > + * @fd: open i915 drm file descriptor
> > + *
> > + * Feature test macro to query whether the BSD2 ring is available. This is simply
> > + * a specific version of gem_has_enable_ring() for the BSD2 ring.
> > + *
> > + * Note that recent Bspec calls this the VCS ring for Video Command Submission.
> > + *
> > + * Returns: Whether the BSD ring is avaible or not.
> > + */
> > +bool gem_has_bsd2(int fd)
> > +{
> > +       return gem_has_enable_ring(fd,I915_PARAM_HAS_BSD2);
> 
> You add a LOCAL_ but execute without it. Compilation fails without
> libdrm patches I just sent:
> http://lists.freedesktop.org/archives/intel-gfx/2014-December/056568.html
> http://lists.freedesktop.org/archives/intel-gfx/2014-December/056569.html
> 
> So, or use the local or remove it considering that it is on libdrm.
> Thomas, how do you prefer it?

We need the LOCAL_ otherwise we have a big depency chain for merging
(since i-g-t can only depend upon stuff in released libdrm versions).

After a few libdrm releases you can clean up and remove the LOCAL_ stuff
(and bump the libdrm dep in igt ofc).
-Daniel

> 
> With that fixed feel free to use:
> Reviewed-by: Rodrigo Vivi <rodrigo.vivi at intel.com>
> Tested-by: Rodrigo Vivi <rodrigo.vivi at intel.com>
> 
> > +}
> >  /**
> >   * gem_available_aperture_size:
> >   * @fd: open i915 drm file descriptor
> > diff --git a/lib/ioctl_wrappers.h b/lib/ioctl_wrappers.h
> > index 310d82e..2979634 100644
> > --- a/lib/ioctl_wrappers.h
> > +++ b/lib/ioctl_wrappers.h
> > @@ -83,6 +83,7 @@ bool gem_has_enable_ring(int fd,int param);
> >  bool gem_has_bsd(int fd);
> >  bool gem_has_blt(int fd);
> >  bool gem_has_vebox(int fd);
> > +bool gem_has_bsd2(int fd);
> >  bool gem_uses_aliasing_ppgtt(int fd);
> >  int gem_available_fences(int fd);
> >  uint64_t gem_available_aperture_size(int fd);
> > --
> > 2.0.3
> >
> > _______________________________________________
> > Intel-gfx mailing list
> > Intel-gfx at lists.freedesktop.org
> > http://lists.freedesktop.org/mailman/listinfo/intel-gfx
> 
> 
> 
> -- 
> Rodrigo Vivi
> Blog: http://blog.vivi.eng.br
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx

-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch



More information about the Intel-gfx mailing list