drm/i915/perf: Handle non-power-of-2 reports
authorUmesh Nerlige Ramappa <umesh.nerlige.ramappa@intel.com>
Thu, 23 Mar 2023 22:58:57 +0000 (15:58 -0700)
committerUmesh Nerlige Ramappa <umesh.nerlige.ramappa@intel.com>
Fri, 24 Mar 2023 15:49:42 +0000 (08:49 -0700)
commit3c67ce061b2136e0578734bae82fdf85c2c76217
tree27246b5d4a9f298f70dcc60ce67ce00b97caf846
parentdbc9a5fb168deb140722c12d8332b25754def017
drm/i915/perf: Handle non-power-of-2 reports

Some of the newer OA formats are not powers of 2. For those formats,
adjust the hw_tail accordingly when checking for new reports.

v2: (Ashutosh)
- Switch to OA_TAKEN for diff calculation
- Use OA_BUFFER_SIZE instead of the vma size
- Update comments

Signed-off-by: Umesh Nerlige Ramappa <umesh.nerlige.ramappa@intel.com>
Reviewed-by: Ashutosh Dixit <ashutosh.dixit@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230323225901.3743681-8-umesh.nerlige.ramappa@intel.com
drivers/gpu/drm/i915/i915_perf.c