Skip to content

Commit b6ccf21

Browse files
committed
Merge tag 'drm-intel-fixes-2023-06-01' of git://anongit.freedesktop.org/drm/drm-intel into drm-fixes
- Fix for OA reporting to allow detecting non-power-of-two reports Signed-off-by: Dave Airlie <[email protected]> From: Joonas Lahtinen <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/ZHimf55x/[email protected]
2 parents f9e94d6 + 62fe398 commit b6ccf21

File tree

1 file changed

+11
-6
lines changed

1 file changed

+11
-6
lines changed

drivers/gpu/drm/i915/i915_perf.c

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -877,12 +877,17 @@ static int gen8_append_oa_reports(struct i915_perf_stream *stream,
877877
stream->oa_buffer.last_ctx_id = ctx_id;
878878
}
879879

880-
/*
881-
* Clear out the report id and timestamp as a means to detect unlanded
882-
* reports.
883-
*/
884-
oa_report_id_clear(stream, report32);
885-
oa_timestamp_clear(stream, report32);
880+
if (is_power_of_2(report_size)) {
881+
/*
882+
* Clear out the report id and timestamp as a means
883+
* to detect unlanded reports.
884+
*/
885+
oa_report_id_clear(stream, report32);
886+
oa_timestamp_clear(stream, report32);
887+
} else {
888+
/* Zero out the entire report */
889+
memset(report32, 0, report_size);
890+
}
886891
}
887892

888893
if (start_offset != *offset) {

0 commit comments

Comments
 (0)