drm/i915/perf: Remove gtt_offset from stream->oa_buffer.head/.tail
authorAshutosh Dixit <ashutosh.dixit@intel.com>
Wed, 20 Sep 2023 04:02:11 +0000 (21:02 -0700)
committerAshutosh Dixit <ashutosh.dixit@intel.com>
Tue, 26 Sep 2023 05:58:12 +0000 (22:58 -0700)
commita383a021804ce5eb8fada3ee83ce8a74077fe9b9
tree6ec24d22a6f4d4a6fb98d5ae815b825aa5fa81cd
parentae0e5e6eaaabd54377fe6f649d49ff5fbbc58d95
drm/i915/perf: Remove gtt_offset from stream->oa_buffer.head/.tail

There is no reason to add gtt_offset to the cached head/tail pointers
stream->oa_buffer.head and stream->oa_buffer.tail. This causes the code to
constantly add gtt_offset and subtract gtt_offset and is error
prone.

It is much simpler to maintain stream->oa_buffer.head and
stream->oa_buffer.tail without adding gtt_offset to them and just allow for
the gtt_offset when reading/writing from/to HW registers.

v2: Minor tweak to commit message due to dropping patch in previous series

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