Commit a5a6d92f authored by Umesh Nerlige Ramappa's avatar Umesh Nerlige Ramappa Committed by John Harrison

drm/i915/perf: Simply use stream->ctx

Earlier code used exclusive_stream to check for user passed context.
Simplify this by accessing stream->ctx.
Signed-off-by: default avatarUmesh Nerlige Ramappa <umesh.nerlige.ramappa@intel.com>
Reviewed-by: default avatarLionel Landwerlin <lionel.g.landwerlin@intel.com>
Signed-off-by: default avatarJohn Harrison <John.C.Harrison@Intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20221026222102.5526-7-umesh.nerlige.ramappa@intel.com
parent cceb0849
...@@ -776,7 +776,7 @@ static int gen8_append_oa_reports(struct i915_perf_stream *stream, ...@@ -776,7 +776,7 @@ static int gen8_append_oa_reports(struct i915_perf_stream *stream,
* switches since it's not-uncommon for periodic samples to * switches since it's not-uncommon for periodic samples to
* identify a switch before any 'context switch' report. * identify a switch before any 'context switch' report.
*/ */
if (!stream->perf->exclusive_stream->ctx || if (!stream->ctx ||
stream->specific_ctx_id == ctx_id || stream->specific_ctx_id == ctx_id ||
stream->oa_buffer.last_ctx_id == stream->specific_ctx_id || stream->oa_buffer.last_ctx_id == stream->specific_ctx_id ||
reason & OAREPORT_REASON_CTX_SWITCH) { reason & OAREPORT_REASON_CTX_SWITCH) {
...@@ -785,7 +785,7 @@ static int gen8_append_oa_reports(struct i915_perf_stream *stream, ...@@ -785,7 +785,7 @@ static int gen8_append_oa_reports(struct i915_perf_stream *stream,
* While filtering for a single context we avoid * While filtering for a single context we avoid
* leaking the IDs of other contexts. * leaking the IDs of other contexts.
*/ */
if (stream->perf->exclusive_stream->ctx && if (stream->ctx &&
stream->specific_ctx_id != ctx_id) { stream->specific_ctx_id != ctx_id) {
report32[2] = INVALID_CTX_ID; report32[2] = INVALID_CTX_ID;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment