Commit b6ccf213 authored by Dave Airlie's avatar Dave Airlie
Browse files

Merge tag 'drm-intel-fixes-2023-06-01' of...

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: default avatarDave 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
parents f9e94d6c 62fe3987
Loading
Loading
Loading
Loading
+11 −6
Original line number Diff line number Diff line
@@ -877,12 +877,17 @@ static int gen8_append_oa_reports(struct i915_perf_stream *stream,
			stream->oa_buffer.last_ctx_id = ctx_id;
		}

		if (is_power_of_2(report_size)) {
			/*
		 * Clear out the report id and timestamp as a means to detect unlanded
		 * reports.
			 * 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) {