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_id_match(struct i915_perf_stream *stream, + u32 masked_ctx_id) +{ + return bsearch(&masked_ctx_id,You might as well just (void *)(uintptr_t)masked_ctx_id andstatic int ctx_id_cmp(const void *key, const void *elem) { const struct i915_perf_context_detail *details = elem; return details->id - (uinptr_t)key; }
Oops, forgot to add that change. I have it locally and it works fine, will resend tomorrow. -Lionel _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
