Re: [Intel-gfx] [PATCH v7 3/4] drm/i915/perf: prepare driver to receive multiple ctx handles

2020-04-28 Thread Lionel Landwerlin
On 28/04/2020 13:23, Chris Wilson wrote: Quoting Lionel Landwerlin (2020-04-28 11:08:15) +static int ctx_id_equal(const void *key, const void *elem) +{ + const struct i915_perf_context_detail *details = elem; + + return ((int)details->id) - *((int *)key); +} + +static inline bool ctx

Re: [Intel-gfx] [PATCH v7 3/4] drm/i915/perf: prepare driver to receive multiple ctx handles

2020-04-28 Thread Chris Wilson
Quoting Lionel Landwerlin (2020-04-28 11:08:15) > +static int ctx_id_equal(const void *key, const void *elem) > +{ > + const struct i915_perf_context_detail *details = elem; > + > + return ((int)details->id) - *((int *)key); > +} > + > +static inline bool ctx_id_match(struct i915_perf_s

[Intel-gfx] [PATCH v7 3/4] drm/i915/perf: prepare driver to receive multiple ctx handles

2020-04-28 Thread Lionel Landwerlin
Make all the internal necessary changes before we flip the switch. v2: Use an unlimited number of intel contexts (Chris) v3: Handle GEM context with multiple RCS0 logical contexts (Chris) Signed-off-by: Lionel Landwerlin --- drivers/gpu/drm/i915/i915_perf.c | 553 +++-