Skip to content

Commit 7eeaedf

Browse files
committed
drm/i915/perf: Determine context valid in OA reports
When supporting OA for TGL, it was seen that the context valid bit in the report ID was not defined, however revisiting the spec seems to have this bit defined. The bit is used to determine if a context is valid on a context switch and is essential to determine active and idle periods for a context. Re-enable the context valid bit for gen12 platforms. BSpec: 52196 (description of report_id) v2: Include BSpec reference (Ashutosh) Fixes: 00a7f0d ("drm/i915/tgl: Add perf support on TGL") Signed-off-by: Umesh Nerlige Ramappa <[email protected]> Reviewed-by: Ashutosh Dixit <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
1 parent 5fde104 commit 7eeaedf

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/gpu/drm/i915/i915_perf.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -483,8 +483,7 @@ static void oa_report_id_clear(struct i915_perf_stream *stream, u32 *report)
483483
static bool oa_report_ctx_invalid(struct i915_perf_stream *stream, void *report)
484484
{
485485
return !(oa_report_id(stream, report) &
486-
stream->perf->gen8_valid_ctx_bit) &&
487-
GRAPHICS_VER(stream->perf->i915) <= 11;
486+
stream->perf->gen8_valid_ctx_bit);
488487
}
489488

490489
static u64 oa_timestamp(struct i915_perf_stream *stream, void *report)
@@ -5047,6 +5046,7 @@ static void i915_perf_init_info(struct drm_i915_private *i915)
50475046
perf->gen8_valid_ctx_bit = BIT(16);
50485047
break;
50495048
case 12:
5049+
perf->gen8_valid_ctx_bit = BIT(16);
50505050
/*
50515051
* Calculate offset at runtime in oa_pin_context for gen12 and
50525052
* cache the value in perf->ctx_oactxctrl_offset.

0 commit comments

Comments
 (0)