Re: [Intel-gfx] [igt-dev] [PATCH i-g-t 24/25] gem_wsim: Discover engines

2019-05-17 Thread Chris Wilson
Quoting Tvrtko Ursulin (2019-05-17 12:51:06) > > On 17/05/2019 12:39, Andi Shyti wrote: > > Hi Tvrtko, > > > >> +static int > >> +__i915_query(int i915, struct drm_i915_query *q) > >> +{ > >> +if (igt_ioctl(i915, DRM_IOCTL_I915_QUERY, q)) > >> +return -errno; > >> +return 0;

Re: [Intel-gfx] [igt-dev] [PATCH i-g-t 24/25] gem_wsim: Discover engines

2019-05-17 Thread Tvrtko Ursulin
On 17/05/2019 14:02, Andi Shyti wrote: +static void query_engines(void) +{ + struct i915_engine_class_instance *engines; + unsigned int num; + + if (__engines_queried) + return; + + __engines_queried = true; + + if (!has_query(fd) ||

Re: [Intel-gfx] [igt-dev] [PATCH i-g-t 24/25] gem_wsim: Discover engines

2019-05-17 Thread Andi Shyti
> > > +static void query_engines(void) > > > +{ > > > + struct i915_engine_class_instance *engines; > > > + unsigned int num; > > > + > > > + if (__engines_queried) > > > + return; > > > + > > > + __engines_queried = true; > > > + > > > + if (!has_query(fd) || !has_engine_query(fd)) {

Re: [Intel-gfx] [igt-dev] [PATCH i-g-t 24/25] gem_wsim: Discover engines

2019-05-17 Thread Tvrtko Ursulin
On 17/05/2019 13:10, Andi Shyti wrote: On Fri, May 17, 2019 at 12:25:25PM +0100, Tvrtko Ursulin wrote: From: Tvrtko Ursulin Instead of hardcoding the VCS balancing engines, discover, both with the new engines query, or with the legacy get_param in the fallback case, so class based addressing

Re: [Intel-gfx] [igt-dev] [PATCH i-g-t 24/25] gem_wsim: Discover engines

2019-05-17 Thread Andi Shyti
On Fri, May 17, 2019 at 12:25:25PM +0100, Tvrtko Ursulin wrote: > From: Tvrtko Ursulin > > Instead of hardcoding the VCS balancing engines, discover, both with the > new engines query, or with the legacy get_param in the fallback case, so > class based addressing always works. > >

Re: [Intel-gfx] [igt-dev] [PATCH i-g-t 24/25] gem_wsim: Discover engines

2019-05-17 Thread Andi Shyti
Hi Tvrtko, > > > +static int > > > +__i915_query(int i915, struct drm_i915_query *q) > > > +{ > > > + if (igt_ioctl(i915, DRM_IOCTL_I915_QUERY, q)) > > > + return -errno; > > > + return 0; > > > +} > > > + > > > +static int > > > +__i915_query_items(int i915, struct drm_i915_query_item

Re: [Intel-gfx] [igt-dev] [PATCH i-g-t 24/25] gem_wsim: Discover engines

2019-05-17 Thread Tvrtko Ursulin
On 17/05/2019 12:39, Andi Shyti wrote: Hi Tvrtko, +static int +__i915_query(int i915, struct drm_i915_query *q) +{ + if (igt_ioctl(i915, DRM_IOCTL_I915_QUERY, q)) + return -errno; + return 0; +} + +static int +__i915_query_items(int i915, struct drm_i915_query_item

Re: [Intel-gfx] [igt-dev] [PATCH i-g-t 24/25] gem_wsim: Discover engines

2019-05-17 Thread Andi Shyti
Hi Tvrtko, > +static int > +__i915_query(int i915, struct drm_i915_query *q) > +{ > + if (igt_ioctl(i915, DRM_IOCTL_I915_QUERY, q)) > + return -errno; > + return 0; > +} > + > +static int > +__i915_query_items(int i915, struct drm_i915_query_item *items, uint32_t > n_items) >