OSDN Git Service

drm/i915/perf: Clear out entire reports after reading if not power of 2 size
authorAshutosh Dixit <ashutosh.dixit@intel.com>
Tue, 23 May 2023 20:40:42 +0000 (13:40 -0700)
committerJoonas Lahtinen <joonas.lahtinen@linux.intel.com>
Thu, 1 Jun 2023 06:41:58 +0000 (09:41 +0300)
commit62fe398761cd06a428e6f367aba84732a2f1c268
treecfff13a7acbab5cacff913d31ee6d3d885fdd58c
parent7877cb91f1081754a1487c144d85dc0d2e2e7fc4
drm/i915/perf: Clear out entire reports after reading if not power of 2 size

Clearing out report id and timestamp as means to detect unlanded reports
only works if report size is power of 2. That is, only when report size is
a sub-multiple of the OA buffer size can we be certain that reports will
land at the same place each time in the OA buffer (after rewind). If report
size is not a power of 2, we need to zero out the entire report to be able
to detect unlanded reports reliably.

v2: Add Fixes tag (Umesh)

Fixes: 1cc064dce4ed ("drm/i915/perf: Add support for OA media units")
Reviewed-by: Umesh Nerlige Ramappa <umesh.nerlige.ramappa@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Signed-off-by: Ashutosh Dixit <ashutosh.dixit@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230523204042.4180641-1-ashutosh.dixit@intel.com
(cherry picked from commit 09a36015d9a0940214c080f95afc605c47648bbd)
Signed-off-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
drivers/gpu/drm/i915/i915_perf.c