Skip to content

Commit 4bc14b9

Browse files
unerligejlahtine-intel
authored andcommitted
i915/perf: Remove code to update PWR_CLK_STATE for gen12
PWR_CLK_STATE only needs to be modified up until gen11. For gen12 this code is not applicable. Remove code to update context image with PWR_CLK_STATE for gen12. 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] (cherry picked from commit 7b5bdae) Signed-off-by: Joonas Lahtinen <[email protected]>
1 parent 8400291 commit 4bc14b9

File tree

1 file changed

+0
-33
lines changed

1 file changed

+0
-33
lines changed

drivers/gpu/drm/i915/i915_perf.c

Lines changed: 0 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -2748,26 +2748,6 @@ oa_configure_all_contexts(struct i915_perf_stream *stream,
27482748
return 0;
27492749
}
27502750

2751-
static int
2752-
gen12_configure_all_contexts(struct i915_perf_stream *stream,
2753-
const struct i915_oa_config *oa_config,
2754-
struct i915_active *active)
2755-
{
2756-
struct flex regs[] = {
2757-
{
2758-
GEN8_R_PWR_CLK_STATE(RENDER_RING_BASE),
2759-
CTX_R_PWR_CLK_STATE,
2760-
},
2761-
};
2762-
2763-
if (stream->engine->class != RENDER_CLASS)
2764-
return 0;
2765-
2766-
return oa_configure_all_contexts(stream,
2767-
regs, ARRAY_SIZE(regs),
2768-
active);
2769-
}
2770-
27712751
static int
27722752
lrc_configure_all_contexts(struct i915_perf_stream *stream,
27732753
const struct i915_oa_config *oa_config,
@@ -2874,7 +2854,6 @@ gen12_enable_metric_set(struct i915_perf_stream *stream,
28742854
{
28752855
struct drm_i915_private *i915 = stream->perf->i915;
28762856
struct intel_uncore *uncore = stream->uncore;
2877-
struct i915_oa_config *oa_config = stream->oa_config;
28782857
bool periodic = stream->periodic;
28792858
u32 period_exponent = stream->period_exponent;
28802859
u32 sqcnt1;
@@ -2918,15 +2897,6 @@ gen12_enable_metric_set(struct i915_perf_stream *stream,
29182897

29192898
intel_uncore_rmw(uncore, GEN12_SQCNT1, 0, sqcnt1);
29202899

2921-
/*
2922-
* Update all contexts prior writing the mux configurations as we need
2923-
* to make sure all slices/subslices are ON before writing to NOA
2924-
* registers.
2925-
*/
2926-
ret = gen12_configure_all_contexts(stream, oa_config, active);
2927-
if (ret)
2928-
return ret;
2929-
29302900
/*
29312901
* For Gen12, performance counters are context
29322902
* saved/restored. Only enable it for the context that
@@ -2980,9 +2950,6 @@ static void gen12_disable_metric_set(struct i915_perf_stream *stream)
29802950
_MASKED_BIT_DISABLE(GEN12_DISABLE_DOP_GATING));
29812951
}
29822952

2983-
/* Reset all contexts' slices/subslices configurations. */
2984-
gen12_configure_all_contexts(stream, NULL, NULL);
2985-
29862953
/* disable the context save/restore or OAR counters */
29872954
if (stream->ctx)
29882955
gen12_configure_oar_context(stream, NULL);

0 commit comments

Comments
 (0)