drm/i915/perf: add new open param to configure polling of OA buffer
authorLionel Landwerlin <lionel.g.landwerlin@intel.com>
Tue, 24 Mar 2020 18:54:57 +0000 (11:54 -0700)
committerLionel Landwerlin <lionel.g.landwerlin@intel.com>
Fri, 27 Mar 2020 11:10:05 +0000 (13:10 +0200)
commit4ef10fe05ba0b08ce7029c07878afe3c8d5754d8
treec935b28700a1edf0be5f91b7983235f55bf514e6
parentc51dbc6e8f1796d235f308ae365ffc4ad8c54ff9
drm/i915/perf: add new open param to configure polling of OA buffer

This new parameter let's the application choose how often the OA
buffer should be checked on the CPU side for data availability. Longer
polling period tend to reduce CPU overhead if the application does not
care about somewhat real time data collection.

v2: Allow disabling polling completely with 0 value (Lionel)
v3: Version the new parameter (Joonas)
v4: Rebase (Umesh)
v5: Make poll delay value of 0 invalid (Umesh)
v6:
- Describe poll_oa_period (Ashutosh)
- Fix comment for new poll parameter (Lionel)
- Drop open_flags in read_properties_unlocked (Lionel)
- Rename uapi parameter (Ashutosh)
v7: Reword the comment in uapi (Ashutosh)

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Signed-off-by: Umesh Nerlige Ramappa <umesh.nerlige.ramappa@intel.com>
Reviewed-by: Ashutosh Dixit <ashutosh.dixit@intel.com>
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20200324185457.14635-4-umesh.nerlige.ramappa@intel.com
drivers/gpu/drm/i915/i915_perf.c
drivers/gpu/drm/i915/i915_perf_types.h
include/uapi/drm/i915_drm.h