mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-21 20:47:12 +07:00
drm/i915/perf: Invalidate OA TLB on when closing perf stream
On running several back to back perf capture sessions involving closing
and opening the perf stream, invalid OA reports are seen in the
beginning of the OA buffer in some sessions. Fix this by invalidating OA
TLB when the perf stream is closed or disabled on gen12.
Signed-off-by: Umesh Nerlige Ramappa <umesh.nerlige.ramappa@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 00a7f0d715
("drm/i915/tgl: Add perf support on TGL")
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20200309211057.38575-1-umesh.nerlige.ramappa@intel.com
This commit is contained in:
parent
500f9ac302
commit
a639b0c150
@ -2686,6 +2686,14 @@ static void gen12_oa_disable(struct i915_perf_stream *stream)
|
||||
50))
|
||||
drm_err(&stream->perf->i915->drm,
|
||||
"wait for OA to be disabled timed out\n");
|
||||
|
||||
intel_uncore_write(uncore, GEN12_OA_TLB_INV_CR, 1);
|
||||
if (intel_wait_for_register(uncore,
|
||||
GEN12_OA_TLB_INV_CR,
|
||||
1, 0,
|
||||
50))
|
||||
drm_err(&stream->perf->i915->drm,
|
||||
"wait for OA tlb invalidate timed out\n");
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -693,6 +693,8 @@ static inline bool i915_mmio_reg_valid(i915_reg_t reg)
|
||||
#define OABUFFER_SIZE_8M (6 << 3)
|
||||
#define OABUFFER_SIZE_16M (7 << 3)
|
||||
|
||||
#define GEN12_OA_TLB_INV_CR _MMIO(0xceec)
|
||||
|
||||
/* Gen12 OAR unit */
|
||||
#define GEN12_OAR_OACONTROL _MMIO(0x2960)
|
||||
#define GEN12_OAR_OACONTROL_COUNTER_FORMAT_SHIFT 1
|
||||
|
Loading…
Reference in New Issue
Block a user