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 <airlied@redhat.com>
From: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/ZHimf55x/DyXYar1@jlahtine-mobl.ger.corp.intel.com
This commit is contained in:
Dave Airlie 2023-06-02 10:33:29 +10:00
commit b6ccf213d9

View File

@ -877,12 +877,17 @@ static int gen8_append_oa_reports(struct i915_perf_stream *stream,
stream->oa_buffer.last_ctx_id = ctx_id;
}
/*
* Clear out the report id and timestamp as a means to detect unlanded
* reports.
*/
oa_report_id_clear(stream, report32);
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);
oa_timestamp_clear(stream, report32);
} else {
/* Zero out the entire report */
memset(report32, 0, report_size);
}
}
if (start_offset != *offset) {