drm/i915/perf: no head/tail ref in gen7_oa_read
authorRobert Bragg <robert@sixbynine.org>
Thu, 11 May 2017 15:43:27 +0000 (16:43 +0100)
committerChris Wilson <chris@chris-wilson.co.uk>
Sat, 13 May 2017 10:00:43 +0000 (11:00 +0100)
commit3bb335c1e73a709c3c1ff0015faa87e60e03d17d
tree324e28c65c80de928bfb876802bccf6ff38ee46e
parentf279020a02c187d352d40e0dc33d7439f0fc2cce
drm/i915/perf: no head/tail ref in gen7_oa_read

This avoids redundantly passing an (inout) head and tail pointer to
gen7_append_oa_reports() from gen7_oa_read which doesn't need to
reference either itself.

Moving the head/tail reads and writes into gen7_append_oa_reports should
have no functional effect except to avoid some redundant head pointer
writes in cases where nothing was copied to userspace.

This is a stepping stone towards updating how the head and tail pointer
state is managed to improve the workaround for the OA unit's tail
pointer race. It reduces the number of places we need to read/write the
head and tail pointers.

Signed-off-by: Robert Bragg <robert@sixbynine.org>
Reviewed-by: Matthew Auld <matthew.auld@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20170511154345.962-5-lionel.g.landwerlin@intel.com
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
drivers/gpu/drm/i915/i915_perf.c