We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents f9e94d6 + 62fe398 commit b6ccf21Copy full SHA for b6ccf21
drivers/gpu/drm/i915/i915_perf.c
@@ -877,12 +877,17 @@ static int gen8_append_oa_reports(struct i915_perf_stream *stream,
877
stream->oa_buffer.last_ctx_id = ctx_id;
878
}
879
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);
+ if (is_power_of_2(report_size)) {
+ /*
+ * Clear out the report id and timestamp as a means
+ * to detect unlanded reports.
+ */
+ 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
+ }
891
892
893
if (start_offset != *offset) {
0 commit comments