Message ID | 1457607814-18751-2-git-send-email-derek.j.morton@intel.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On 10/03/16 11:03, Derek Morton wrote: > For tests that use multiple rings to test interactions it is > useful to know if a ring exists without triggering the test to skip. > > Signed-off-by: Derek Morton <derek.j.morton@intel.com> > --- > lib/ioctl_wrappers.c | 2 +- > lib/ioctl_wrappers.h | 1 + > 2 files changed, 2 insertions(+), 1 deletion(-) > > diff --git a/lib/ioctl_wrappers.c b/lib/ioctl_wrappers.c > index 5d49729..f42e2c9 100644 > --- a/lib/ioctl_wrappers.c > +++ b/lib/ioctl_wrappers.c > @@ -1396,7 +1396,7 @@ void gem_require_caching(int fd) > errno = 0; > } > > -static int gem_has_ring(int fd, int ring) > +int gem_has_ring(int fd, int ring) If this becomes non-static it will need documentation, also to explain how it differs from gem_has_enable_ring. Regards, Daniele > { > uint32_t bbe = MI_BATCH_BUFFER_END; > struct drm_i915_gem_execbuffer2 execbuf; > diff --git a/lib/ioctl_wrappers.h b/lib/ioctl_wrappers.h > index f59eafb..e095c41 100644 > --- a/lib/ioctl_wrappers.h > +++ b/lib/ioctl_wrappers.h > @@ -150,6 +150,7 @@ uint64_t gem_global_aperture_size(int fd); > uint64_t gem_mappable_aperture_size(void); > bool gem_has_softpin(int fd); > > +int gem_has_ring(int fd, int ring); > /* check functions which auto-skip tests by calling igt_skip() */ > void gem_require_caching(int fd); > void gem_require_ring(int fd, int ring_id);
> >-----Original Message----- >From: Ceraolo Spurio, Daniele >Sent: Monday, March 14, 2016 12:30 PM >To: Morton, Derek J <derek.j.morton@intel.com>; intel-gfx@lists.freedesktop.org >Subject: Re: [PATCH i-g-t v3 1/6] ioctl_wrappers: make gem_has_ring non static > > > >On 10/03/16 11:03, Derek Morton wrote: >> For tests that use multiple rings to test interactions it is useful to >> know if a ring exists without triggering the test to skip. >> >> Signed-off-by: Derek Morton <derek.j.morton@intel.com> >> --- >> lib/ioctl_wrappers.c | 2 +- >> lib/ioctl_wrappers.h | 1 + >> 2 files changed, 2 insertions(+), 1 deletion(-) >> >> diff --git a/lib/ioctl_wrappers.c b/lib/ioctl_wrappers.c index >> 5d49729..f42e2c9 100644 >> --- a/lib/ioctl_wrappers.c >> +++ b/lib/ioctl_wrappers.c >> @@ -1396,7 +1396,7 @@ void gem_require_caching(int fd) >> errno = 0; >> } >> >> -static int gem_has_ring(int fd, int ring) >> +int gem_has_ring(int fd, int ring) > >If this becomes non-static it will need documentation, also to explain how it differs from gem_has_enable_ring. This patch is no longer needed. Chris Wilson has separately pushed a patch which makes this function non static. Chase him for the documentation :-) //Derek > >Regards, >Daniele > >> { >> uint32_t bbe = MI_BATCH_BUFFER_END; >> struct drm_i915_gem_execbuffer2 execbuf; diff --git >> a/lib/ioctl_wrappers.h b/lib/ioctl_wrappers.h index f59eafb..e095c41 >> 100644 >> --- a/lib/ioctl_wrappers.h >> +++ b/lib/ioctl_wrappers.h >> @@ -150,6 +150,7 @@ uint64_t gem_global_aperture_size(int fd); >> uint64_t gem_mappable_aperture_size(void); >> bool gem_has_softpin(int fd); >> >> +int gem_has_ring(int fd, int ring); >> /* check functions which auto-skip tests by calling igt_skip() */ >> void gem_require_caching(int fd); >> void gem_require_ring(int fd, int ring_id); > >
diff --git a/lib/ioctl_wrappers.c b/lib/ioctl_wrappers.c index 5d49729..f42e2c9 100644 --- a/lib/ioctl_wrappers.c +++ b/lib/ioctl_wrappers.c @@ -1396,7 +1396,7 @@ void gem_require_caching(int fd) errno = 0; } -static int gem_has_ring(int fd, int ring) +int gem_has_ring(int fd, int ring) { uint32_t bbe = MI_BATCH_BUFFER_END; struct drm_i915_gem_execbuffer2 execbuf; diff --git a/lib/ioctl_wrappers.h b/lib/ioctl_wrappers.h index f59eafb..e095c41 100644 --- a/lib/ioctl_wrappers.h +++ b/lib/ioctl_wrappers.h @@ -150,6 +150,7 @@ uint64_t gem_global_aperture_size(int fd); uint64_t gem_mappable_aperture_size(void); bool gem_has_softpin(int fd); +int gem_has_ring(int fd, int ring); /* check functions which auto-skip tests by calling igt_skip() */ void gem_require_caching(int fd); void gem_require_ring(int fd, int ring_id);
For tests that use multiple rings to test interactions it is useful to know if a ring exists without triggering the test to skip. Signed-off-by: Derek Morton <derek.j.morton@intel.com> --- lib/ioctl_wrappers.c | 2 +- lib/ioctl_wrappers.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-)