On 10/10/2019 18:44, Chris Wilson wrote:
Quoting Lionel Landwerlin (2019-10-10 16:22:25)
On 10/10/2019 00:19, Chris Wilson wrote:
From: Lionel Landwerlin <lionel.g.landwerlin@xxxxxxxxx>
Introduce a new perf_ioctl command to change the OA configuration of the
active stream. This allows the OA stream to be reconfigured between
batch buffers, giving greater flexibility in sampling. We inject a
request into the OA context to reconfigure the stream asynchronously on
the GPU in between and ordered with execbuffer calls.
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@xxxxxxxxx>
So much simpler :)
Indeed, it all came together into a much more coherent story.
---
/**
* i915_perf_ioctl - support ioctl() usage with i915 perf stream FDs
* @stream: An i915 perf stream
@@ -2879,6 +2901,8 @@ static long i915_perf_ioctl_locked(struct i915_perf_stream *stream,
case I915_PERF_IOCTL_DISABLE:
i915_perf_disable_locked(stream);
return 0;
+ case I915_PERF_IOCTL_CONFIG:
+ return i915_perf_config_locked(stream, arg);
For REMOVE_CONFIG we passed a pointer to an u64, not sure whether we
should reuse the same pattern here?
Aiui, the user creates oa-config handles, and/or queries them. If we are
simpler talking handles that fit inside unsigned long (so assume u32)
then I don't see the harm in passing an id rather than a pointer.
The alternative is this takes an uuid string? Or you want to always use
u64 handles?
I guess you will have a better idea what works better after playing
around with userspace.
-Chris
Yeah, that's a fine interface actually.
This should really have you as the author.
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@xxxxxxxxx>
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx