Enable OA unit for Gen 8 and 9 in i915 perf
Subsystems (3)
cover Enable OA unit for Gen 8 and 9 in i915 perf
This extends i915 perf to support periodic sampling of OA metrics for BDW, CHV, SKL and BXT.
I've recently been working through a number of issues that were uncovered once I started adapting the gen7 IGT tests. Some further issues were also noticed by others using INTEL_performance_query in Mesa. So compared to earlier Gen8+ OA series sent out a few notable updates are:
* Implements tail race handling like we have for gen 7
* On SKL we disable automatic reports for slice/unslice clock ratio changes because the hardware can generate so many redundant reports (no ratio change) that buffer overflows can start to become a problem and userspace ends up doing an unreasonable amount of work to keep up.
* WaDisableDopClockGating:bdw is no longer handled in i915_perf.c
* Flex EU register updates within the register state context were using incorrect offsets before.
* The generated per-gen config initialization code wasn't initializing the flex eu register state.
* While filtering for a single context we weren't forwarding userspace the reports it needed to bookend around context switches so that it can discount the progress of the counters associated with other contexts.
* Even opening a stream for single context filtered OA metrics requires dev.i915.perf_stream_paranoid == 0 since we can no longer reliably hide the progress of system-wide metrics, now that filtering is done based on tagging reports with an ID instead of physically clock gating the OA unit off for other contests.
In case anyone wants to take a look at the IGT tests so far they can be found here:
https://github.com/rib/intel-gpu-tools/commits/wip/rib/i915-perf-tests
I should probably write a few additional tests specific to changes made for gen8+, but I've at least adapted the existing tests for gen7.
I can only say I've tested on Skylake recently, so although we can hopefully review these patches with an eye towards upstreaming, they do still need some broader testing across more hardware.
Considering the large number of configs for Gen 8 and 9, and how unsure I am about the maturity of all the various configs I do have some doubt about whether we should upstream them all together if someone hasn't looked at the unique counters for each set against a relevant workload to see that the numbers look plausible (so ignoring the common A counters). On the other hand being optimistic means we can make more sets available faster and even makes it more likely they will be tested across a broader range of workloads. We can add replacement configs if needs be or even stop advertising configs considering how they are advertised to userspace dynamically.
Note: these patches are based on the patches I sent out to update the tail pointer race workaround for Haswell in i915 perf.
Regards,
- Robert
Robert Bragg (6):
drm/i915: expose _SLICE_MASK GETPARM
drm/i915: expose _SUBSLICE_MASK GETPARM drm/i915: Add uncore mmio api for per-context registers drm/i915: Add 'render basic' Gen8+ OA unit configs drm/i915: Add OA unit support for Gen 8+ drm/i915: Add more OA configs for BDW, CHV, SKL + BXT
drivers/gpu/drm/i915/Makefile | 8 +- drivers/gpu/drm/i915/i915_drv.c | 10 + drivers/gpu/drm/i915/i915_drv.h | 20 + drivers/gpu/drm/i915/i915_gem_context.h | 1 + drivers/gpu/drm/i915/i915_oa_bdw.c | 4954 +++++++++++++++++++++++++++++++ drivers/gpu/drm/i915/i915_oa_bdw.h | 38 + drivers/gpu/drm/i915/i915_oa_bxt.c | 2541 ++++++++++++++++ drivers/gpu/drm/i915/i915_oa_bxt.h | 38 + drivers/gpu/drm/i915/i915_oa_chv.c | 2730 +++++++++++++++++ drivers/gpu/drm/i915/i915_oa_chv.h | 38 + drivers/gpu/drm/i915/i915_oa_sklgt2.c | 3303 +++++++++++++++++++++ drivers/gpu/drm/i915/i915_oa_sklgt2.h | 38 + drivers/gpu/drm/i915/i915_oa_sklgt3.c | 2856 ++++++++++++++++++ drivers/gpu/drm/i915/i915_oa_sklgt3.h | 38 + drivers/gpu/drm/i915/i915_oa_sklgt4.c | 2910 ++++++++++++++++++ drivers/gpu/drm/i915/i915_oa_sklgt4.h | 38 + drivers/gpu/drm/i915/i915_perf.c | 1067 ++++++- drivers/gpu/drm/i915/i915_reg.h | 12 + drivers/gpu/drm/i915/intel_lrc.c | 4 + drivers/gpu/drm/i915/intel_uncore.c | 73 + include/uapi/drm/i915_drm.h | 21 +- 21 files changed, 20667 insertions(+), 71 deletions(-) create mode 100644 drivers/gpu/drm/i915/i915_oa_bdw.c create mode 100644 drivers/gpu/drm/i915/i915_oa_bdw.h create mode 100644 drivers/gpu/drm/i915/i915_oa_bxt.c create mode 100644 drivers/gpu/drm/i915/i915_oa_bxt.h create mode 100644 drivers/gpu/drm/i915/i915_oa_chv.c create mode 100644 drivers/gpu/drm/i915/i915_oa_chv.h create mode 100644 drivers/gpu/drm/i915/i915_oa_sklgt2.c create mode 100644 drivers/gpu/drm/i915/i915_oa_sklgt2.h create mode 100644 drivers/gpu/drm/i915/i915_oa_sklgt3.c create mode 100644 drivers/gpu/drm/i915/i915_oa_sklgt3.h create mode 100644 drivers/gpu/drm/i915/i915_oa_sklgt4.c create mode 100644 drivers/gpu/drm/i915/i915_oa_sklgt4.h
Signature · 6 lines
2.11.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 1/6 drm/i915: expose _SLICE_MASK GETPARM
Enables userspace to determine the number of slices enabled and also know what specific slices are enabled. This information is required, for example, to be able to analyse some OA counter reports where the counter configuration depends on the HW slice configuration.
--- drivers/gpu/drm/i915/i915_drv.c | 5 +++++ include/uapi/drm/i915_drm.h | 1 + 2 files changed, 6 insertions(+)
drivers/gpu/drm/i915/i915_drv.c +5 -0
@@ -359,6 +359,11 @@ static int i915_getparam(struct drm_device *dev, void *data,*/ value =1 ;break ; +case I915_PARAM_SLICE_MASK : + value =INTEL_INFO (dev_priv)->sseu.slice_mask; +if (!value) +return -ENODEV ; +break ;default :DRM_DEBUG ("Unknown parameter %d\n" , param->param);return -EINVAL ;
include/uapi/drm/i915_drm.h +1 -0
@@ -392,6 +392,7 @@ typedef struct drm_i915_irq_wait {#define I915_PARAM_HAS_POOLED_EU 38#define I915_PARAM_MIN_EU_IN_POOL 39#define I915_PARAM_MMAP_GTT_VERSION 40 +#define I915_PARAM_SLICE_MASK 45/* XXX: rebase before landing */ /* Query whether DRM_I915_GEM_EXECBUFFER2 supports user defined execution * priorities and the driver will attempt to execute batches in priority order.
Signature · 6 lines
2.11.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 2/6 drm/i915: expose _SUBSLICE_MASK GETPARM
In reply to Robert BraggAssuming a uniform mask across all slices, this enables userspace to determine the specific sub slices enabled. This information is required, for example, to be able to analyse some OA counter reports where the counter configuration depends on the HW sub slice configuration.
--- drivers/gpu/drm/i915/i915_drv.c | 5 +++++ include/uapi/drm/i915_drm.h | 1 + 2 files changed, 6 insertions(+)
drivers/gpu/drm/i915/i915_drv.c +5 -0
@@ -364,6 +364,11 @@ static int i915_getparam(struct drm_device *dev, void *data,if (!value)return -ENODEV ;break ; +case I915_PARAM_SUBSLICE_MASK : + value =INTEL_INFO (dev_priv)->sseu.subslice_mask; +if (!value) +return -ENODEV ; +break ;default :DRM_DEBUG ("Unknown parameter %d\n" , param->param);return -EINVAL ;
include/uapi/drm/i915_drm.h +1 -0
@@ -393,6 +393,7 @@ typedef struct drm_i915_irq_wait {#define I915_PARAM_MIN_EU_IN_POOL 39#define I915_PARAM_MMAP_GTT_VERSION 40#define I915_PARAM_SLICE_MASK 45/* XXX: rebase before landing */ +#define I915_PARAM_SUBSLICE_MASK 46/* Query whether DRM_I915_GEM_EXECBUFFER2 supports user defined execution * priorities and the driver will attempt to execute batches in priority order.
Signature · 6 lines
2.11.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 3/6 drm/i915: Add uncore mmio api for per-context registers
In reply to Robert BraggSince the exponent for periodic OA counter sampling is maintained in a per-context register while we want to treat it as if it were global state we need to be able to safely issue an mmio write to a per-context register and affect any currently running context.
We have to take some extra care in this case and this adds a utility api to encapsulate what's required.
--- drivers/gpu/drm/i915/i915_drv.h | 4 ++ drivers/gpu/drm/i915/i915_reg.h | 3 ++ drivers/gpu/drm/i915/intel_uncore.c | 73 +++++++++++++++++++++++++++++++++++++ 3 files changed, 80 insertions(+)
drivers/gpu/drm/i915/i915_drv.h +4 -0
@@ -718,6 +718,7 @@ intel_uncore_forcewake_for_reg(struct drm_i915_private *dev_priv, i915_reg_t reg, unsigned int op);struct intel_uncore_funcs { +int (*wait_for_rcs_busy)(struct drm_i915_private *dev_priv);void (*force_wake_get)(struct drm_i915_private *dev_priv,enum forcewake_domains domains); void (*force_wake_put)(struct drm_i915_private *dev_priv,
@@ -751,6 +752,7 @@ struct intel_uncore {struct intel_uncore_funcs funcs; +atomic_t hold_rcs_busy_count;unsigned fifo_count;enum forcewake_domains fw_domains;
@@ -3139,6 +3141,8 @@ static inline bool intel_vgpu_active(struct drm_i915_private *dev_priv) {return dev_priv->vgpu.active; } +int intel_uncore_begin_ctx_mmio (struct drm_i915_private *dev_priv); +void intel_uncore_end_ctx_mmio (struct drm_i915_private *dev_priv); void i915_enable_pipestat(struct drm_i915_private *dev_priv, enum pipe pipe,
drivers/gpu/drm/i915/i915_reg.h +3 -0
@@ -2313,6 +2313,9 @@ enum skl_disp_power_wells {#define GEN8_RC_SEMA_IDLE_MSG_DISABLE (1 << 12)#define GEN8_FF_DOP_CLOCK_GATE_DISABLE (1<<10) +#define GEN6_RCS_PWR_FSM _MMIO(0x22ac) +#define GEN9_RCS_FE_FSM2 _MMIO(0x22a4) +/* Fuse readout registers for GT */ #define CHV_FUSE_GT _MMIO(VLV_DISPLAY_BASE + 0x2168)#define CHV_FGT_DISABLE_SS0 (1 << 10)
drivers/gpu/drm/i915/intel_uncore.c +73 -0
97 lines not on this page · raw message
Signature · 6 lines
2.11.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH 3/6] drm/i915: Add uncore mmio api for per-context registers
Quoted 7 lines · Robert Bragg
Since the exponent for periodic OA counter sampling is maintained in a per-context register while we want to treat it as if it were global state we need to be able to safely issue an mmio write to a per-context register and affect any currently running context.
We have to take some extra care in this case and this adds a utility api to encapsulate what's required.
Been waying up the pros/cons of having this in uncore. It doesn't attempt to be generic nor replace the existing instance, so atm I think it might be better as local to i915_perf.
Quoted 103 lines
Signed-off-by Robert Bragg <[email protected]>--- drivers/gpu/drm/i915/i915_drv.h | 4 ++ drivers/gpu/drm/i915/i915_reg.h | 3 ++ drivers/gpu/drm/i915/intel_uncore.c | 73 +++++++++++++++++++++++++++++++++++++ 3 files changed, 80 insertions(+)drivers/gpu/drm/i915/i915_drv.h +4
-0@@ -718,6 +718,7 @@ intel_uncore_forcewake_for_reg(struct drm_i915_private *dev_priv, i915_reg_t reg, unsigned int op);struct intel_uncore_funcs { +int (*wait_for_rcs_busy)(struct drm_i915_private *dev_priv);void (*force_wake_get)(struct drm_i915_private *dev_priv,enum forcewake_domains domains); void (*force_wake_put)(struct drm_i915_private *dev_priv,@@ -751,6 +752,7 @@ struct intel_uncore {struct intel_uncore_funcs funcs; +atomic_t hold_rcs_busy_count;unsigned fifo_count;enum forcewake_domains fw_domains;@@ -3139,6 +3141,8 @@ static inline bool intel_vgpu_active(struct drm_i915_private *dev_priv) {return dev_priv->vgpu.active; } +int intel_uncore_begin_ctx_mmio (struct drm_i915_private *dev_priv); +void intel_uncore_end_ctx_mmio (struct drm_i915_private *dev_priv); void i915_enable_pipestat(struct drm_i915_private *dev_priv, enum pipe pipe,drivers/gpu/drm/i915/i915_reg.h +3
-0@@ -2313,6 +2313,9 @@ enum skl_disp_power_wells {#define GEN8_RC_SEMA_IDLE_MSG_DISABLE (1 << 12)#define GEN8_FF_DOP_CLOCK_GATE_DISABLE (1<<10) +#define GEN6_RCS_PWR_FSM _MMIO(0x22ac) +#define GEN9_RCS_FE_FSM2 _MMIO(0x22a4) +/* Fuse readout registers for GT */ #define CHV_FUSE_GT _MMIO(VLV_DISPLAY_BASE + 0x2168)#define CHV_FGT_DISABLE_SS0 (1 << 10)drivers/gpu/drm/i915/intel_uncore.c +24
-0@@ -1274,6 +1274,16 @@ static void intel_uncore_fw_domains_init(struct drm_i915_private *dev_priv)WARN_ON (dev_priv->uncore.fw_domains ==0 ); } +static int gen8_wait_for_rcs_busy (struct drm_i915_private *dev_priv) +{ +return wait_for ((I915_READ (GEN6_RCS_PWR_FSM ) &0x3f ) ==0x30 ,50 ); +} + +static int gen9_wait_for_rcs_busy (struct drm_i915_private *dev_priv) +{ +return wait_for ((I915_READ (GEN9_RCS_FE_FSM2 ) &0x3f ) ==0x30 ,50 ); +} +#define ASSIGN_FW_DOMAINS_TABLE (d) \ { \ dev_priv->uncore.fw_domains_table = \@@ -1305,6 +1315,8 @@ void intel_uncore_init(struct drm_i915_private *dev_priv) dev_priv->uncore.funcs.mmio_writel = gen9_decoupled_write32; } + dev_priv->uncore.funcs.wait_for_rcs_busy = + gen9_wait_for_rcs_busy;break ;case 8 :if (IS_CHERRYVIEW (dev_priv)) {@@ -1316,6 +1328,8 @@ void intel_uncore_init(struct drm_i915_private *dev_priv)ASSIGN_WRITE_MMIO_VFUNCS (gen8);ASSIGN_READ_MMIO_VFUNCS (gen6); } + dev_priv->uncore.funcs.wait_for_rcs_busy = + gen8_wait_for_rcs_busy;break ;case 7 :case 6 :@@ -1858,6 +1872,65 @@ intel_uncore_forcewake_for_reg(struct drm_i915_private *dev_priv,return fw_domains; } +static int hold_rcs_busy (struct drm_i915_private *dev_priv) +{ +int ret =0 ; + +if (atomic_inc_and_test (&dev_priv->uncore.hold_rcs_busy_count)) { +I915_WRITE (GEN6_RC_SLEEP_PSMI_CONTROL , +_MASKED_BIT_ENABLE (GEN6_PSMI_SLEEP_MSG_DISABLE )); + + ret = dev_priv->uncore.funcs.wait_for_rcs_busy (dev_priv); + }
drivers/gpu/drm/i915/intel_uncore.c intel_uncore_forcewake_for_reg(struct drm_i915_private *dev_priv, · line 1894
Quoted 10 lines
drivers/gpu/drm/i915/intel_uncore.c +10
-0+ +return ret; +} + +static void release_rcs_busy (struct drm_i915_private *dev_priv) +{ +if (!atomic_dec_and_test (&dev_priv->uncore.hold_rcs_busy_count)) { +I915_WRITE (GEN6_RC_SLEEP_PSMI_CONTROL , +_MASKED_BIT_DISABLE (GEN6_PSMI_SLEEP_MSG_DISABLE )); + }
atomic_inc_and_test is correct, but atomic_dec_and_test is backwards. Besides if you just extend the irq spinlock slightly, you get:
+int intel_uncore_begin_ctx_mmio(struct drm_i915_private *dev_priv) +{
+ unsigned long flags; + i915_reg_t reg; + int ret;
+
+ if (INTEL_GEN(dev_priv) < 8)
+ return 0;
+
+ spin_lock_irqsave(&dev_priv->uncore.lock, flags);
+ __intel_uncore_forcewake_get(dev_priv, FORCEWAKE_RENDER);
+
+ if (!dev_priv->uncore.rcs_hold_count++)
+ I915_WRITE_FW(GEN6_RC_SLEEP_PSMI_CONTROL,
+ _MASKED_BIT_ENABLE(GEN6_PSMI_SLEEP_MSG_DISABLE));
+
+ if (INTEL_GEN(dev_priv) == 8)
+ reg = GEN6_RCS_PWR_FSM;
+ else
+ reg = GEN9_RCS_FE_FSM2;
+
+ ret = wait_for_atomic((__raw_i915_read32(dev_priv, reg) & 0x3f) == 0x30,
+ 50);
+ if (ret)
+ __intel_uncore_forcewake_put(dev_priv, FORCEWAKE_RENDER);
+ spin_unlock_irqrestore(&dev_priv->uncore.lock, flags);
+
+ return ret;
+}
+
+void intel_uncore_end_ctx_mmio(struct drm_i915_private *dev_priv) +{
+ unsigned long flags;
+
+ if (INTEL_GEN(dev_priv) < 8)
+ return;
+
+ spin_lock_irqsave(&dev_priv->uncore.lock, flags);
+
+ if (!--dev_priv->uncore.rcs_hold_count)
+ I915_WRITE_FW(GEN6_RC_SLEEP_PSMI_CONTROL,
+ _MASKED_BIT_DISABLE(GEN6_PSMI_SLEEP_MSG_DISABLE));
+ __intel_uncore_forcewake_put(dev_priv, FORCEWAKE_RENDER);
+
+ spin_unlock_irqrestore(&dev_priv->uncore.lock, flags);
+}
Note as well you need to think about serialising the wakeup, not just the hold count.
-Chris
Signature · 5 lines
Chris Wilson, Intel Open Source Technology Centre _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH 3/6] drm/i915: Add uncore mmio api for per-context registers
Quoted 6 lines · Chris Wilson
Quoted 5 lines · Robert Bragg
Since the exponent for periodic OA counter sampling is maintained in a per-context register while we want to treat it as if it were global state we need to be able to safely issue an mmio write to a per-context register and affect any currently running context.
Quoted 6 lines
Quoted 2 lines
We have to take some extra care in this case and this adds a utility api to encapsulate what's required.
Been waying up the pros/cons of having this in uncore. It doesn't attempt to be generic nor replace the existing instance, so atm I think it might be better as local to
i915_perf.
Thanks. Can you maybe clarify for me what "the existing instance" that's not replaced is in this context?
Quoted 108 lines
Quoted 108 lines
Signed-off-by Robert Bragg <[email protected]>--- drivers/gpu/drm/i915/i915_drv.h | 4 ++ drivers/gpu/drm/i915/i915_reg.h | 3 ++ drivers/gpu/drm/i915/intel_uncore.c | 73 +++++++++++++++++++++++++++++++++++++ 3 files changed, 80 insertions(+)drivers/gpu/drm/i915/i915_drv.h +4
-0@@ -718,6 +718,7 @@ intel_uncore_forcewake_for_reg(struct drm_i915_private *dev_priv, i915_reg_t reg, unsigned int op);struct intel_uncore_funcs { +int (*wait_for_rcs_busy)(struct drm_i915_private *dev_priv);void (*force_wake_get)(struct drm_i915_private *dev_priv,enum forcewake_domains domains); void (*force_wake_put)(struct drm_i915_private *dev_priv,@@ -751,6 +752,7 @@ struct intel_uncore {struct intel_uncore_funcs funcs; +atomic_t hold_rcs_busy_count;unsigned fifo_count;enum forcewake_domains fw_domains;@@ -3139,6 +3141,8 @@ static inline bool intel_vgpu_active(struct drm_i915_private *dev_priv) {return dev_priv->vgpu.active; } +int intel_uncore_begin_ctx_mmio (struct drm_i915_private *dev_priv); +void intel_uncore_end_ctx_mmio (struct drm_i915_private *dev_priv); void i915_enable_pipestat(struct drm_i915_private *dev_priv, enum pipe pipe,drivers/gpu/drm/i915/i915_reg.h +3
-0@@ -2313,6 +2313,9 @@ enum skl_disp_power_wells {#define GEN8_RC_SEMA_IDLE_MSG_DISABLE (1 << 12)#define GEN8_FF_DOP_CLOCK_GATE_DISABLE (1<<10) +#define GEN6_RCS_PWR_FSM _MMIO(0x22ac) +#define GEN9_RCS_FE_FSM2 _MMIO(0x22a4) +/* Fuse readout registers for GT */ #define CHV_FUSE_GT _MMIO(VLV_DISPLAY_BASE + 0x2168)#define CHV_FGT_DISABLE_SS0 (1 << 10)drivers/gpu/drm/i915/intel_uncore.c +28
-0@@ -1274,6 +1274,16 @@ static void intel_uncore_fw_domains_init(struct drm_i915_private *dev_priv)WARN_ON (dev_priv->uncore.fw_domains ==0 ); } +static int gen8_wait_for_rcs_busy (struct drm_i915_private *dev_priv) +{ +return wait_for ((I915_READ (GEN6_RCS_PWR_FSM ) &0x3f ) ==0x30 ,50 ); +} + +static int gen9_wait_for_rcs_busy (struct drm_i915_private *dev_priv) +{ +return wait_for ((I915_READ (GEN9_RCS_FE_FSM2 ) &0x3f ) ==0x30 ,50 ); +} +#define ASSIGN_FW_DOMAINS_TABLE (d) \ { \ dev_priv->uncore.fw_domains_table = \@@ -1305,6 +1315,8 @@ void intel_uncore_init(struct drm_i915_private *dev_priv) dev_priv->uncore.funcs.mmio_writel = gen9_decoupled_write32; } + dev_priv->uncore.funcs.wait_for_rcs_busy = + gen9_wait_for_rcs_busy;break ;case 8 :if (IS_CHERRYVIEW (dev_priv)) {@@ -1316,6 +1328,8 @@ void intel_uncore_init(struct drm_i915_private *dev_priv)ASSIGN_WRITE_MMIO_VFUNCS (gen8);ASSIGN_READ_MMIO_VFUNCS (gen6); } + dev_priv->uncore.funcs.wait_for_rcs_busy = + gen8_wait_for_rcs_busy;break ;case 7 :case 6 :@@ -1858,6 +1872,65 @@ intel_uncore_forcewake_for_reg(struct drm_i915_private *dev_priv,return fw_domains; } +static int hold_rcs_busy (struct drm_i915_private *dev_priv) +{ +int ret =0 ; + +if (atomic_inc_and_test (&dev_priv->uncore.hold_rcs_busy_count)) { +I915_WRITE (GEN6_RC_SLEEP_PSMI_CONTROL , +_MASKED_BIT_ENABLE (GEN6_PSMI_SLEEP_MSG_DISABLE )); + + ret = dev_priv->uncore.funcs.wait_for_rcs_busy (dev_priv); + } + +return ret; +} +
Quoted 8 lines
drivers/gpu/drm/i915/intel_uncore.c intel_uncore_forcewake_for_reg(struct drm_i915_private *dev_priv, · line 1894
Quoted 6 lines
drivers/gpu/drm/i915/intel_uncore.c +6
-0+static void release_rcs_busy (struct drm_i915_private *dev_priv) +{ +if (!atomic_dec_and_test (&dev_priv->uncore.hold_rcs_busy_count)) { +I915_WRITE (GEN6_RC_SLEEP_PSMI_CONTROL , +_MASKED_BIT_DISABLE (GEN6_PSMI_SLEEP_MSG_DISABLE )); + }
atomic_inc_and_testis correct, butatomic_dec_and_testis backwards.
Hmm, it's not the mirror and the first is wrong too, sorry I clearly didn't verify this - though I vaguely recall explicitly testing the behaviour of the wait_for_rcs_busy at some point in the past :-/
atomic_inc_and_test() is equivalent to (atomic_inc_return(v) == 0) and atomic_inc_return() evaluates to the post-increment value. The intention here is to only explicitly wait when the rcs_busy_count changes from zero to one, but the first atomic_inc_and_test will fail for that transition and then pass for each subsequent nested hold_rcs_busy(). The second atomic_dec_and_test() check would have been ok without that misplaced negation :-/
Adding some printk debugging to this implementation as is and then nesting hold/release_rcs_busy() calls like:
hold_rcs_busy();hold_rcs_busy();release_rcs_busy();release_rcs_busy();
I got this incorrect output:
[ 205.747836] Skipping redundant wake up for per-ctx mmio [ 205.747840] Skipping redundant wake up for per-ctx mmio [ 205.747844] Explicitly relinquishing wake up hold for per-ctx mmio [ 205.747845] Not relinquishing hold for per-ctx mmio yet
Looking at this again, I think I now prefer avoiding these _and_test macros() and instead having something like:
+if (atomic_dec_return(&dev_priv->uncore.hold_rcs_busy_count) == 0) {
I believe this fixes the ref counting control flow here:
+static int hold_rcs_busy(struct drm_i915_private *dev_priv) +{
+ int ret = 0;
+
+ /* Only explicitly enact a hold if it's not already being held */
+ if (atomic_inc_return(&dev_priv->uncore.hold_rcs_busy_count) == 1) {
+ I915_WRITE(GEN6_RC_SLEEP_PSMI_CONTROL,
+ _MASKED_BIT_ENABLE(GEN6_PSMI_SLEEP_MSG_DISABLE));
+
+ /* If waiting didn't succeed, decrement counter to allow retries */ + ret = dev_priv->uncore.funcs.wait_for_rcs_busy(dev_priv); + if (ret)
+ atomic_dec(&dev_priv->uncore.hold_rcs_busy_count);
+ }
+
+ return ret;
+}
+
+static void release_rcs_busy(struct drm_i915_private *dev_priv) +{
+ /* Only drop the hold if nothing else needs it */
+ if (atomic_dec_return(&dev_priv->uncore.hold_rcs_busy_count) == 0) {
+ I915_WRITE(GEN6_RC_SLEEP_PSMI_CONTROL,
+ _MASKED_BIT_DISABLE(GEN6_PSMI_SLEEP_MSG_DISABLE));
+ }
+}
With the same kind of prink debugging with nested calls, I double checked I got the expected output of:
[ 68.375183] Explicitly waiting for wake up for per-ctx mmio [ 68.375190] Skipping redundant wake up for per-ctx mmio [ 68.375196] Not relinquishing hold for per-ctx mmio yet [ 68.375197] Explicitly relinquishing wake up hold for per-ctx mmio
Quoted 21 lines
Besides if you just extend the irq spinlock slightly, you get:
(quoted diff) +19
-0+int intel_uncore_begin_ctx_mmio(struct drm_i915_private *dev_priv) +{ + unsigned long flags; + i915_reg_t reg; + int ret; + + if (INTEL_GEN(dev_priv) < 8) + return 0; + + spin_lock_irqsave(&dev_priv->uncore.lock, flags); + __intel_uncore_forcewake_get(dev_priv, FORCEWAKE_RENDER); + + if (!dev_priv->uncore.rcs_hold_count++) + I915_WRITE_FW(GEN6_RC_SLEEP_PSMI_CONTROL, + _MASKED_BIT_ENABLE(GEN6_PSMI_SLEEP_MSG_DISABLE)); + + if (INTEL_GEN(dev_priv) == 8) + reg = GEN6_RCS_PWR_FSM; + else
Review
Quoted 10 lines
(quoted diff) +10
-0+ reg = GEN9_RCS_FE_FSM2; + + ret = wait_for_atomic((__raw_i915_read32(dev_priv, reg) & 0x3f) == 0x30, + 50); + if (ret) + __intel_uncore_forcewake_put(dev_priv, FORCEWAKE_RENDER); + spin_unlock_irqrestore(&dev_priv->uncore.lock, flags); + + return ret; +}
Thanks for writing this out.
With regards to your earlier comment about not being general/replacing the existing instance, would the same still apply to something along these lines - or you'd still suggest something along these lines would live in i915_perf.c?
I have a couple of concerns about this atm:
I don't really know what kind of worst case latencies to expect while waiting for the _FSM status, which makes me wonder about the repercussions of taking the uncore.lock and updating the implementation to be able to run in atomic context. I'd be a little worried an OA configuration ioctl might end up blocking something much more important.
For i915_perf.c we currently only ever need to set these while in process context.
Another issue with my previous code, carried over here is not dropping the rcs_hold_count if the wait_for fails.
Quoted 18 lines
(quoted diff) +17
-0+ +void intel_uncore_end_ctx_mmio(struct drm_i915_private *dev_priv) +{ + unsigned long flags; + + if (INTEL_GEN(dev_priv) < 8) + return; + + spin_lock_irqsave(&dev_priv->uncore.lock, flags); + + if (!--dev_priv->uncore.rcs_hold_count) + I915_WRITE_FW(GEN6_RC_SLEEP_PSMI_CONTROL, + _MASKED_BIT_DISABLE(GEN6_PSMI_SLEEP_MSG_DISABLE)); + __intel_uncore_forcewake_put(dev_priv, FORCEWAKE_RENDER); + + spin_unlock_irqrestore(&dev_priv->uncore.lock, flags); +}
Quoted 2 lines
Note as well you need to think about serialising the wakeup, not just the hold count.
Hmm, right, if there were an overlapping _begin_ctx_mmio it could quite possibly return (before the wake up completes) with no error just because something else initiated a begin_ctx_mmio.
I think at this point, if I just put something specific to i915 perf into i915_perf.c then the requirements become so much simpler.
Considering i915 perf is currently the only drm/i915 code needing to do this, then in this case we also only ever need to do this from process context from a single non-reentrant ioctl.
Thanks for looking at this,
- Robert
Quoted 4 lines
-Chris
--
Chris Wilson, Intel Open Source Technology Centre
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 4/6 drm/i915: Add 'render basic' Gen8+ OA unit configs
In reply to Robert BraggAdds a static OA unit, MUX, B Counter + Flex EU configurations for basic render metrics on Broadwell, Cherryview, Skylake and Broxton. These are auto generated from an XML description of metric sets, currently maintained in gputop, ref:
Quoted 2 lines
gputop-data/oa-*.xmlscripts/i915-perf-kernelgen.py
$ make -C gputop-data -f Makefile.xml WHITELIST=RenderBasic
--- drivers/gpu/drm/i915/Makefile | 8 +- drivers/gpu/drm/i915/i915_drv.h | 2 + drivers/gpu/drm/i915/i915_oa_bdw.c | 371 ++++++++++++++++++++++++++++++++++ drivers/gpu/drm/i915/i915_oa_bdw.h | 38 ++++ drivers/gpu/drm/i915/i915_oa_bxt.c | 322 +++++++++++++++++++++++++++++ drivers/gpu/drm/i915/i915_oa_bxt.h | 38 ++++ drivers/gpu/drm/i915/i915_oa_chv.c | 214 ++++++++++++++++++++ drivers/gpu/drm/i915/i915_oa_chv.h | 38 ++++ drivers/gpu/drm/i915/i915_oa_sklgt2.c | 228 +++++++++++++++++++++ drivers/gpu/drm/i915/i915_oa_sklgt2.h | 38 ++++ drivers/gpu/drm/i915/i915_oa_sklgt3.c | 236 +++++++++++++++++++++ drivers/gpu/drm/i915/i915_oa_sklgt3.h | 38 ++++ drivers/gpu/drm/i915/i915_oa_sklgt4.c | 247 ++++++++++++++++++++++ drivers/gpu/drm/i915/i915_oa_sklgt4.h | 38 ++++ 14 files changed, 1855 insertions(+), 1 deletion(-) create mode 100644 drivers/gpu/drm/i915/i915_oa_bdw.c create mode 100644 drivers/gpu/drm/i915/i915_oa_bdw.h create mode 100644 drivers/gpu/drm/i915/i915_oa_bxt.c create mode 100644 drivers/gpu/drm/i915/i915_oa_bxt.h create mode 100644 drivers/gpu/drm/i915/i915_oa_chv.c create mode 100644 drivers/gpu/drm/i915/i915_oa_chv.h create mode 100644 drivers/gpu/drm/i915/i915_oa_sklgt2.c create mode 100644 drivers/gpu/drm/i915/i915_oa_sklgt2.h create mode 100644 drivers/gpu/drm/i915/i915_oa_sklgt3.c create mode 100644 drivers/gpu/drm/i915/i915_oa_sklgt3.h create mode 100644 drivers/gpu/drm/i915/i915_oa_sklgt4.c create mode 100644 drivers/gpu/drm/i915/i915_oa_sklgt4.h
drivers/gpu/drm/i915/Makefile +7 -1
@@ -127,7 +127,13 @@ i915-y += i915_vgpu.o # perf code i915-y += i915_perf.o \ - i915_oa_hsw.o + i915_oa_hsw.o \ + i915_oa_bdw.o \ + i915_oa_chv.o \ + i915_oa_sklgt2.o \ + i915_oa_sklgt3.o \ + i915_oa_sklgt4.o \ + i915_oa_bxt.o ifeq ($(CONFIG_DRM_I915_GVT),y) i915-y += intel_gvt.o
drivers/gpu/drm/i915/i915_drv.h +2 -0
@@ -2437,6 +2437,8 @@ struct drm_i915_private {int mux_regs_len;const struct i915_oa_reg *b_counter_regs;int b_counter_regs_len; +const struct i915_oa_reg *flex_regs; +int flex_regs_len;struct {struct i915_vma *vma;
drivers/gpu/drm/i915/i915_oa_bdw.c new file +371 -0
371 lines not on this page · raw message
drivers/gpu/drm/i915/i915_oa_bdw.h new file +38 -0
@@ -0,0 +1,38 @@ +/* +* Autogenerated file, DO NOT EDIT manually! +* +* Copyright (c) 2015 Intel Corporation +* +* Permission is hereby granted, free of charge, to any person obtaining a +* copy of this software and associated documentation files (the "Software"), +* to deal in the Software without restriction, including without limitation +* the rights to use, copy, modify, merge, publish, distribute, sublicense, +* and/or sell copies of the Software, and to permit persons to whom the +* Software is furnished to do so, subject to the following conditions: +* +* The above copyright notice and this permission notice (including the next +* paragraph) shall be included in all copies or substantial portions of the +* Software. +* +* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +* IN THE SOFTWARE. +* +*/ + +#ifndef __I915_OA_BDW_H__ +#define __I915_OA_BDW_H__ + +extern int i915_oa_n_builtin_metric_sets_bdw; + +extern int i915_oa_select_metric_set_bdw (struct drm_i915_private *dev_priv); + +extern int i915_perf_register_sysfs_bdw (struct drm_i915_private *dev_priv); + +extern void i915_perf_unregister_sysfs_bdw (struct drm_i915_private *dev_priv); + +#endif
drivers/gpu/drm/i915/i915_oa_bxt.c new file +322 -0
322 lines not on this page · raw message
drivers/gpu/drm/i915/i915_oa_bxt.h new file +38 -0
@@ -0,0 +1,38 @@ +/* +* Autogenerated file, DO NOT EDIT manually! +* +* Copyright (c) 2015 Intel Corporation +* +* Permission is hereby granted, free of charge, to any person obtaining a +* copy of this software and associated documentation files (the "Software"), +* to deal in the Software without restriction, including without limitation +* the rights to use, copy, modify, merge, publish, distribute, sublicense, +* and/or sell copies of the Software, and to permit persons to whom the +* Software is furnished to do so, subject to the following conditions: +* +* The above copyright notice and this permission notice (including the next +* paragraph) shall be included in all copies or substantial portions of the +* Software. +* +* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +* IN THE SOFTWARE. +* +*/ + +#ifndef __I915_OA_BXT_H__ +#define __I915_OA_BXT_H__ + +extern int i915_oa_n_builtin_metric_sets_bxt; + +extern int i915_oa_select_metric_set_bxt (struct drm_i915_private *dev_priv); + +extern int i915_perf_register_sysfs_bxt (struct drm_i915_private *dev_priv); + +extern void i915_perf_unregister_sysfs_bxt (struct drm_i915_private *dev_priv); + +#endif
drivers/gpu/drm/i915/i915_oa_chv.c new file +214 -0
214 lines not on this page · raw message
drivers/gpu/drm/i915/i915_oa_chv.h new file +38 -0
@@ -0,0 +1,38 @@ +/* +* Autogenerated file, DO NOT EDIT manually! +* +* Copyright (c) 2015 Intel Corporation +* +* Permission is hereby granted, free of charge, to any person obtaining a +* copy of this software and associated documentation files (the "Software"), +* to deal in the Software without restriction, including without limitation +* the rights to use, copy, modify, merge, publish, distribute, sublicense, +* and/or sell copies of the Software, and to permit persons to whom the +* Software is furnished to do so, subject to the following conditions: +* +* The above copyright notice and this permission notice (including the next +* paragraph) shall be included in all copies or substantial portions of the +* Software. +* +* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +* IN THE SOFTWARE. +* +*/ + +#ifndef __I915_OA_CHV_H__ +#define __I915_OA_CHV_H__ + +extern int i915_oa_n_builtin_metric_sets_chv; + +extern int i915_oa_select_metric_set_chv (struct drm_i915_private *dev_priv); + +extern int i915_perf_register_sysfs_chv (struct drm_i915_private *dev_priv); + +extern void i915_perf_unregister_sysfs_chv (struct drm_i915_private *dev_priv); + +#endif
drivers/gpu/drm/i915/i915_oa_sklgt2.c new file +228 -0
228 lines not on this page · raw message
drivers/gpu/drm/i915/i915_oa_sklgt2.h new file +38 -0
@@ -0,0 +1,38 @@ +/* +* Autogenerated file, DO NOT EDIT manually! +* +* Copyright (c) 2015 Intel Corporation +* +* Permission is hereby granted, free of charge, to any person obtaining a +* copy of this software and associated documentation files (the "Software"), +* to deal in the Software without restriction, including without limitation +* the rights to use, copy, modify, merge, publish, distribute, sublicense, +* and/or sell copies of the Software, and to permit persons to whom the +* Software is furnished to do so, subject to the following conditions: +* +* The above copyright notice and this permission notice (including the next +* paragraph) shall be included in all copies or substantial portions of the +* Software. +* +* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +* IN THE SOFTWARE. +* +*/ + +#ifndef __I915_OA_SKLGT2_H__ +#define __I915_OA_SKLGT2_H__ + +extern int i915_oa_n_builtin_metric_sets_sklgt2; + +extern int i915_oa_select_metric_set_sklgt2 (struct drm_i915_private *dev_priv); + +extern int i915_perf_register_sysfs_sklgt2 (struct drm_i915_private *dev_priv); + +extern void i915_perf_unregister_sysfs_sklgt2 (struct drm_i915_private *dev_priv); + +#endif
drivers/gpu/drm/i915/i915_oa_sklgt3.c new file +236 -0
236 lines not on this page · raw message
drivers/gpu/drm/i915/i915_oa_sklgt3.h new file +38 -0
@@ -0,0 +1,38 @@ +/* +* Autogenerated file, DO NOT EDIT manually! +* +* Copyright (c) 2015 Intel Corporation +* +* Permission is hereby granted, free of charge, to any person obtaining a +* copy of this software and associated documentation files (the "Software"), +* to deal in the Software without restriction, including without limitation +* the rights to use, copy, modify, merge, publish, distribute, sublicense, +* and/or sell copies of the Software, and to permit persons to whom the +* Software is furnished to do so, subject to the following conditions: +* +* The above copyright notice and this permission notice (including the next +* paragraph) shall be included in all copies or substantial portions of the +* Software. +* +* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +* IN THE SOFTWARE. +* +*/ + +#ifndef __I915_OA_SKLGT3_H__ +#define __I915_OA_SKLGT3_H__ + +extern int i915_oa_n_builtin_metric_sets_sklgt3; + +extern int i915_oa_select_metric_set_sklgt3 (struct drm_i915_private *dev_priv); + +extern int i915_perf_register_sysfs_sklgt3 (struct drm_i915_private *dev_priv); + +extern void i915_perf_unregister_sysfs_sklgt3 (struct drm_i915_private *dev_priv); + +#endif
drivers/gpu/drm/i915/i915_oa_sklgt4.c new file +247 -0
247 lines not on this page · raw message
drivers/gpu/drm/i915/i915_oa_sklgt4.h new file +38 -0
@@ -0,0 +1,38 @@ +/* +* Autogenerated file, DO NOT EDIT manually! +* +* Copyright (c) 2015 Intel Corporation +* +* Permission is hereby granted, free of charge, to any person obtaining a +* copy of this software and associated documentation files (the "Software"), +* to deal in the Software without restriction, including without limitation +* the rights to use, copy, modify, merge, publish, distribute, sublicense, +* and/or sell copies of the Software, and to permit persons to whom the +* Software is furnished to do so, subject to the following conditions: +* +* The above copyright notice and this permission notice (including the next +* paragraph) shall be included in all copies or substantial portions of the +* Software. +* +* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +* IN THE SOFTWARE. +* +*/ + +#ifndef __I915_OA_SKLGT4_H__ +#define __I915_OA_SKLGT4_H__ + +extern int i915_oa_n_builtin_metric_sets_sklgt4; + +extern int i915_oa_select_metric_set_sklgt4 (struct drm_i915_private *dev_priv); + +extern int i915_perf_register_sysfs_sklgt4 (struct drm_i915_private *dev_priv); + +extern void i915_perf_unregister_sysfs_sklgt4 (struct drm_i915_private *dev_priv); + +#endif
Signature · 6 lines
2.11.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 5/6 drm/i915: Add OA unit support for Gen 8+
In reply to Robert BraggEnables access to OA unit metrics for BDW, CHV, SKL and BXT which all share (more-or-less) the same OA unit design.
Of particular note in comparison to Haswell: some OA unit HW config state has become per-context state and as a consequence it is somewhat more complicated to manage synchronous state changes from the cpu while there's no guarantee of what context (if any) is currently actively running on the gpu.
The periodic sampling frequency which can be particularly useful for system-wide analysis (as opposed to command stream synchronised MI_REPORT_PERF_COUNT commands) is perhaps the most surprising state to have become per-context save and restored (while the OABUFFER destination is still a shared, system-wide resource).
This support for gen8+ takes care to consider a number of timing challenges involved in synchronously updating per-context state primarily by programming all config state from the cpu and updating all current and saved contexts synchronously while the OA unit is still disabled.
The driver intentionally avoids depending on command streamer programming to update OA state considering the lack of synchronization between the automatic loading of OACTXCONTROL state (that includes the periodic sampling state and enable state) on context restore and the parsing of any general purpose BB the driver can control. I.e. this implementation is careful to avoid the possibility of a context restore temporarily enabling any out-of-date periodic sampling state. In addition to the risk of transiently-out-of-date state being loaded automatically; there are also internal HW latencies involved in the loading of MUX configurations which would be difficult to account for from the command streamer (and we only want to enable the unit when once the MUX configuration is complete).
Since the Gen8+ OA unit design no longer supports clock gating the unit off for a single given context (which effectively stopped any progress of counters while any other context was running) and instead supports tagging OA reports with a context ID for filtering on the CPU, it means we can no longer hide the system-wide progress of counters from a non-privileged application only interested in metrics for its own context. Although we could theoretically try and subtract the progress of other contexts before forwarding reports via read() we aren't in a position to filter reports captured via MI_REPORT_PERF_COUNT commands. As a result, for Gen8+, we always require the dev.i915.perf_stream_paranoid to be unset for any access to OA metrics if not root.
--- drivers/gpu/drm/i915/i915_drv.h | 14 + drivers/gpu/drm/i915/i915_gem_context.h | 1 + drivers/gpu/drm/i915/i915_perf.c | 1067 +++++++++++++++++++++++++++++-- drivers/gpu/drm/i915/i915_reg.h | 9 + drivers/gpu/drm/i915/intel_lrc.c | 4 + include/uapi/drm/i915_drm.h | 19 +- 6 files changed, 1044 insertions(+), 70 deletions(-)
drivers/gpu/drm/i915/i915_drv.h +14 -0
@@ -2443,6 +2443,7 @@ struct drm_i915_private {struct {struct i915_vma *vma;u8 *vaddr; +u32 last_ctx_id;int format;int format_size;
@@ -2512,6 +2513,14 @@ struct drm_i915_private { } oa_buffer;u32 gen7_latched_oastatus1; +u32 ctx_oactxctrl_off; +u32 ctx_flexeu0_off; + +/* The RPT_ID/reason field for Gen8+ includes a bit +* to determine if the CTX ID in the report is valid +* but the specific bit differs between Gen 8 and 9 +*/ +u32 gen8_valid_ctx_bit;struct i915_oa_ops ops;const struct i915_oa_format *oa_formats;
@@ -2823,6 +2832,8 @@ intel_info(const struct drm_i915_private *dev_priv)#define IS_KBL_ULX (dev_priv) (INTEL_DEVID(dev_priv) == 0x590E || \ INTEL_DEVID(dev_priv) == 0x5915 || \ INTEL_DEVID(dev_priv) == 0x591E) +#define IS_SKL_GT2 (dev_priv) (IS_SKYLAKE(dev_priv) && \ + (INTEL_DEVID(dev_priv) & 0x00F0) == 0x0010)#define IS_SKL_GT3 (dev_priv) (IS_SKYLAKE(dev_priv) && \ (INTEL_DEVID(dev_priv) & 0x00F0) == 0x0020)#define IS_SKL_GT4 (dev_priv) (IS_SKYLAKE(dev_priv) && \
@@ -3566,6 +3577,9 @@ i915_gem_context_lookup_timeline(struct i915_gem_context *ctx,int i915_perf_open_ioctl (struct drm_device *dev,void *data,struct drm_file *file); +void i915_oa_update_reg_state (struct intel_engine_cs *engine, +struct i915_gem_context *ctx, +uint32_t *reg_state);/* i915_gem_evict.c */ int __must_check i915_gem_evict_something(struct i915_address_space *vm,
drivers/gpu/drm/i915/i915_gem_context.h +1 -0
@@ -153,6 +153,7 @@ struct i915_gem_context {u64 lrc_desc;int pin_count;bool initialised; +atomic_t oa_state_dirty; } engine[I915_NUM_ENGINES ];/** ring_size: size for allocating the per-engine ring buffer */
drivers/gpu/drm/i915/i915_perf.c +1004 -63
1,209 lines not on this page · raw message
drivers/gpu/drm/i915/i915_reg.h +9 -0
@@ -639,6 +639,12 @@ static inline bool i915_mmio_reg_valid(i915_reg_t reg)#define GEN8_OACTXID _MMIO(0x2364) +#define GEN8_OA_DEBUG _MMIO(0x2B04) +#define GEN9_OA_DEBUG_DISABLE_CLK_RATIO_REPORTS (1<<5) +#define GEN9_OA_DEBUG_INCLUDE_CLK_RATIO (1<<6) +#define GEN9_OA_DEBUG_DISABLE_GO_1_0_REPORTS (1<<2) +#define GEN9_OA_DEBUG_DISABLE_CTX_SWITCH_REPORTS (1<<1) +#define GEN8_OACONTROL _MMIO(0x2B00)#define GEN8_OA_REPORT_FORMAT_A12 (0<<2)#define GEN8_OA_REPORT_FORMAT_A12_B8_C8 (2<<2)
@@ -660,6 +666,7 @@ static inline bool i915_mmio_reg_valid(i915_reg_t reg)#define GEN7_OABUFFER_STOP_RESUME_ENABLE (1<<1)#define GEN7_OABUFFER_RESUME (1<<0) +#define GEN8_OABUFFER_UDW _MMIO(0x23b4)#define GEN8_OABUFFER _MMIO(0x2b14)#define GEN7_OASTATUS1 _MMIO(0x2364)
@@ -678,7 +685,9 @@ static inline bool i915_mmio_reg_valid(i915_reg_t reg)#define GEN8_OASTATUS_REPORT_LOST (1<<0)#define GEN8_OAHEADPTR _MMIO(0x2B0C) +#define GEN8_OAHEADPTR_MASK 0xffffffc0#define GEN8_OATAILPTR _MMIO(0x2B10) +#define GEN8_OATAILPTR_MASK 0xffffffc0#define OABUFFER_SIZE_128K (0<<3)#define OABUFFER_SIZE_256K (1<<3)
drivers/gpu/drm/i915/intel_lrc.c +4 -0
@@ -336,6 +336,8 @@ static u64 execlists_update_context(struct drm_i915_gem_request *rq)if (ppgtt && !i915_vm_is_48bit (&ppgtt->base))execlists_update_context_pdps (ppgtt, reg_state); +i915_oa_update_reg_state (rq->engine, rq->ctx, reg_state); +return ce->lrc_desc; }
@@ -1898,6 +1900,8 @@ static void execlists_init_reg_state(u32 *regs,CTX_REG (regs,CTX_R_PWR_CLK_STATE ,GEN8_R_PWR_CLK_STATE ,make_rpcs (dev_priv)); } + +i915_oa_update_reg_state (engine, ctx, regs); } static int
include/uapi/drm/i915_drm.h +12 -7
@@ -1295,13 +1295,18 @@ struct drm_i915_gem_context_param { };enum drm_i915_oa_format { -I915_OA_FORMAT_A13 =1 , -I915_OA_FORMAT_A29 , -I915_OA_FORMAT_A13_B8_C8 , -I915_OA_FORMAT_B4_C8 , -I915_OA_FORMAT_A45_B8_C8 , -I915_OA_FORMAT_B4_C8_A16 , -I915_OA_FORMAT_C4_B8 , +I915_OA_FORMAT_A13 =1 ,/* HSW only */ +I915_OA_FORMAT_A29 ,/* HSW only */ +I915_OA_FORMAT_A13_B8_C8 ,/* HSW only */ +I915_OA_FORMAT_B4_C8 ,/* HSW only */ +I915_OA_FORMAT_A45_B8_C8 ,/* HSW only */ +I915_OA_FORMAT_B4_C8_A16 ,/* HSW only */ +I915_OA_FORMAT_C4_B8 ,/* HSW+ */ + +/* Gen8+ */ +I915_OA_FORMAT_A12 , +I915_OA_FORMAT_A12_B8_C8 , + I915_OA_FORMAT_A32u40_A4u32_B8_C8,I915_OA_FORMAT_MAX /* non-ABI */ };
Signature · 6 lines
2.11.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 6/6 drm/i915: Add more OA configs for BDW, CHV, SKL + BXT
In reply to Robert BraggThese are auto generated from an XML description of metric sets, currently maintained in gputop, ref:
Quoted 2 lines
gputop-data/oa-*.xmlscripts/i915-perf-kernelgen.py
$ make -C gputop-data -f Makefile.xml
--- drivers/gpu/drm/i915/i915_oa_bdw.c | 4731 ++++++++++++++++++++++++++++++++- drivers/gpu/drm/i915/i915_oa_bxt.c | 2483 ++++++++++++++++- drivers/gpu/drm/i915/i915_oa_chv.c | 2600 +++++++++++++++++- drivers/gpu/drm/i915/i915_oa_sklgt2.c | 3093 ++++++++++++++++++++- drivers/gpu/drm/i915/i915_oa_sklgt3.c | 2638 +++++++++++++++++- drivers/gpu/drm/i915/i915_oa_sklgt4.c | 2681 ++++++++++++++++++- 6 files changed, 17951 insertions(+), 275 deletions(-)
drivers/gpu/drm/i915/i915_oa_bdw.c +4657 -74
@@ -31,15 +31,37 @@enum metric_set_id {METRIC_SET_ID_RENDER_BASIC =1 , +METRIC_SET_ID_COMPUTE_BASIC , +METRIC_SET_ID_RENDER_PIPE_PROFILE , +METRIC_SET_ID_MEMORY_READS , +METRIC_SET_ID_MEMORY_WRITES , +METRIC_SET_ID_COMPUTE_EXTENDED , +METRIC_SET_ID_COMPUTE_L3_CACHE , +METRIC_SET_ID_DATA_PORT_READS_COALESCING , +METRIC_SET_ID_DATA_PORT_WRITES_COALESCING , +METRIC_SET_ID_HDC_AND_SF , +METRIC_SET_ID_L3_1 , +METRIC_SET_ID_L3_2 , +METRIC_SET_ID_L3_3 , +METRIC_SET_ID_L3_4 , +METRIC_SET_ID_RASTERIZER_AND_PIXEL_BACKEND , +METRIC_SET_ID_SAMPLER_1 , +METRIC_SET_ID_SAMPLER_2 , +METRIC_SET_ID_TDL_1 , +METRIC_SET_ID_TDL_2 , +METRIC_SET_ID_COMPUTE_EXTRA , +METRIC_SET_ID_VME_PIPE , +METRIC_SET_ID_TEST_OA , }; -int i915_oa_n_builtin_metric_sets_bdw =1 ; +int i915_oa_n_builtin_metric_sets_bdw =22 ;static const struct i915_oa_reg b_counter_config_render_basic[] = { {_MMIO (0x2710 ),0x00000000 }, {_MMIO (0x2714 ),0x00800000 }, {_MMIO (0x2720 ),0x00000000 }, {_MMIO (0x2724 ),0x00800000 }, + {_MMIO (0x2740 ),0x00000000 }, };static const struct i915_oa_reg flex_eu_config_render_basic[] = {
@@ -57,6 +79,7 @@ static const struct i915_oa_reg mux_config_render_basic_1_0_slices_0x01[] = { { _MMIO(0x9888), 0x14110014 }, { _MMIO(0x9888), 0x14310014 }, { _MMIO(0x9888), 0x14bf000f }, + { _MMIO(0x9888), 0x118a0317 }, { _MMIO(0x9888), 0x13837be0 }, { _MMIO(0x9888), 0x3b800060 }, { _MMIO(0x9888), 0x3d800005 },
@@ -105,11 +128,15 @@ static const struct i915_oa_reg mux_config_render_basic_1_0_slices_0x01[] = { { _MMIO(0x9888), 0x109f0002 }, { _MMIO(0x9888), 0x0ab94000 }, { _MMIO(0x9888), 0x0d888000 }, + { _MMIO(0x9888), 0x038a0380 }, + { _MMIO(0x9888), 0x058a000e }, { _MMIO(0x9888), 0x018a8000 }, { _MMIO(0x9888), 0x0f8a8000 }, { _MMIO(0x9888), 0x198a8000 }, { _MMIO(0x9888), 0x1b8a00a0 }, - { _MMIO(0x9888), 0x238b0020 }, + { _MMIO(0x9888), 0x078a0000 }, + { _MMIO(0x9888), 0x098a0000 }, + { _MMIO(0x9888), 0x238b2820 }, { _MMIO(0x9888), 0x258b2550 }, { _MMIO(0x9888), 0x198c1000 }, { _MMIO(0x9888), 0x0b8d8000 },
@@ -119,13 +146,13 @@ static const struct i915_oa_reg mux_config_render_basic_1_0_slices_0x01[] = { { _MMIO(0x9888), 0x0d831021 }, { _MMIO(0x9888), 0x0f83572f }, { _MMIO(0x9888), 0x01835680 }, - { _MMIO(0x9888), 0x038315ac }, - { _MMIO(0x9888), 0x0583002a }, + { _MMIO(0x9888), 0x0383002c }, { _MMIO(0x9888), 0x11830000 }, { _MMIO(0x9888), 0x19835400 }, { _MMIO(0x9888), 0x1b830001 }, - { _MMIO(0x9888), 0x07830000 }, - { _MMIO(0x9888), 0x09830000 }, + { _MMIO(0x9888), 0x05830000 }, + { _MMIO(0x9888), 0x07834000 }, + { _MMIO(0x9888), 0x09834000 }, { _MMIO(0x9888), 0x0184c000 }, { _MMIO(0x9888), 0x07848000 }, { _MMIO(0x9888), 0x0984c000 },
@@ -143,7 +170,6 @@ static const struct i915_oa_reg mux_config_render_basic_1_0_slices_0x01[] = { { _MMIO(0x9888), 0x1f80c000 }, { _MMIO(0x9888), 0x1380c000 }, { _MMIO(0x9888), 0x15804000 }, - { _MMIO(0xd24), 0x00000000 }, { _MMIO(0x9888), 0x4d801110 }, { _MMIO(0x9888), 0x4f800331 }, { _MMIO(0x9888), 0x43800802 },
@@ -152,8 +178,8 @@ static const struct i915_oa_reg mux_config_render_basic_1_0_slices_0x01[] = { { _MMIO(0x9888), 0x53801111 }, { _MMIO(0x9888), 0x478014a5 }, { _MMIO(0x9888), 0x31800000 }, - { _MMIO(0x9888), 0x3f8014a5 }, - { _MMIO(0x9888), 0x41800005 }, + { _MMIO(0x9888), 0x3f800ca5 }, + { _MMIO(0x9888), 0x41800003 }, }; static const struct i915_oa_reg mux_config_render_basic_1_1_slices_0x02[] = {
@@ -161,6 +187,7 @@ static const struct i915_oa_reg mux_config_render_basic_1_1_slices_0x02[] = { { _MMIO(0x9888), 0x14bf000f }, { _MMIO(0x9888), 0x14910014 }, { _MMIO(0x9888), 0x14b10014 }, + { _MMIO(0x9888), 0x118a0317 }, { _MMIO(0x9888), 0x13837be0 }, { _MMIO(0x9888), 0x3b800060 }, { _MMIO(0x9888), 0x3d800005 },
@@ -211,8 +238,12 @@ static const struct i915_oa_reg mux_config_render_basic_1_1_slices_0x02[] = { { _MMIO(0x9888), 0x16b30080 }, { _MMIO(0x9888), 0x01888000 }, { _MMIO(0x9888), 0x0d88b800 }, + { _MMIO(0x9888), 0x038a0380 }, + { _MMIO(0x9888), 0x058a000e }, { _MMIO(0x9888), 0x1b8a0080 }, - { _MMIO(0x9888), 0x238b0040 }, + { _MMIO(0x9888), 0x078a0000 }, + { _MMIO(0x9888), 0x098a0000 }, + { _MMIO(0x9888), 0x238b2840 }, { _MMIO(0x9888), 0x258b26a0 }, { _MMIO(0x9888), 0x018c4000 }, { _MMIO(0x9888), 0x0f8c4000 },
@@ -228,13 +259,13 @@ static const struct i915_oa_reg mux_config_render_basic_1_1_slices_0x02[] = { { _MMIO(0x9888), 0x0d831021 }, { _MMIO(0x9888), 0x0f83572f }, { _MMIO(0x9888), 0x01835680 }, - { _MMIO(0x9888), 0x038315ac }, - { _MMIO(0x9888), 0x0583002a }, + { _MMIO(0x9888), 0x0383002c }, { _MMIO(0x9888), 0x11830000 }, { _MMIO(0x9888), 0x19835400 }, { _MMIO(0x9888), 0x1b830001 }, - { _MMIO(0x9888), 0x07830000 }, - { _MMIO(0x9888), 0x09830000 }, + { _MMIO(0x9888), 0x05830000 }, + { _MMIO(0x9888), 0x07834000 }, + { _MMIO(0x9888), 0x09834000 }, { _MMIO(0x9888), 0x0184c000 }, { _MMIO(0x9888), 0x07848000 }, { _MMIO(0x9888), 0x0984c000 },
@@ -252,17 +283,16 @@ static const struct i915_oa_reg mux_config_render_basic_1_1_slices_0x02[] = { { _MMIO(0x9888), 0x1f80c000 }, { _MMIO(0x9888), 0x1380c000 }, { _MMIO(0x9888), 0x15804000 }, - { _MMIO(0xd24), 0x00000000 }, - { _MMIO(0x9888), 0x4d805550 }, - { _MMIO(0x9888), 0x4f800335 }, + { _MMIO(0x9888), 0x4d801550 }, + { _MMIO(0x9888), 0x4f800331 }, { _MMIO(0x9888), 0x43800802 }, { _MMIO(0x9888), 0x51800400 }, { _MMIO(0x9888), 0x458004a1 }, { _MMIO(0x9888), 0x53805555 }, { _MMIO(0x9888), 0x47800421 }, { _MMIO(0x9888), 0x31800000 }, - { _MMIO(0x9888), 0x3f800421 }, - { _MMIO(0x9888), 0x41800841 }, + { _MMIO(0x9888), 0x3f801421 }, + { _MMIO(0x9888), 0x41800845 }, }; static const struct i915_oa_reg *
@@ -281,82 +311,4593 @@ get_render_basic_mux_config(struct drm_i915_private *dev_priv,return NULL ; } -int i915_oa_select_metric_set_bdw (struct drm_i915_private *dev_priv) +static const struct i915_oa_reg b_counter_config_compute_basic[] = { + {_MMIO (0x2710 ),0x00000000 }, + {_MMIO (0x2714 ),0x00800000 }, + {_MMIO (0x2720 ),0x00000000 }, + {_MMIO (0x2724 ),0x00800000 }, + {_MMIO (0x2740 ),0x00000000 }, +}; + +static const struct i915_oa_reg flex_eu_config_compute_basic[] = { + {_MMIO (0xe458 ),0x00005004 }, + {_MMIO (0xe558 ),0x00000003 }, + {_MMIO (0xe658 ),0x00002001 }, + {_MMIO (0xe758 ),0x00778008 }, + {_MMIO (0xe45c ),0x00088078 }, + {_MMIO (0xe55c ),0x00808708 }, + {_MMIO (0xe65c ),0x00a08908 }, +}; + +static const struct i915_oa_reg mux_config_compute_basic_1_0_slices_0x01[] = { + {_MMIO (0x9888 ),0x105c00e0 }, + {_MMIO (0x9888 ),0x105800e0 }, + {_MMIO (0x9888 ),0x103800e0 }, + {_MMIO (0x9888 ),0x3580001a }, + {_MMIO (0x9888 ),0x3b800060 }, + {_MMIO (0x9888 ),0x3d800005 }, + {_MMIO (0x9888 ),0x065c2100 }, + {_MMIO (0x9888 ),0x0a5c0041 }, + {_MMIO (0x9888 ),0x0c5c6600 }, + {_MMIO (0x9888 ),0x005c6580 }, + {_MMIO (0x9888 ),0x085c8000 }, + {_MMIO (0x9888 ),0x0e5c8000 }, + {_MMIO (0x9888 ),0x00580042 }, + {_MMIO (0x9888 ),0x08582080 }, + {_MMIO (0x9888 ),0x0c58004c }, + {_MMIO (0x9888 ),0x0e582580 }, + {_MMIO (0x9888 ),0x005b4000 }, + {_MMIO (0x9888 ),0x185b1000 }, + {_MMIO (0x9888 ),0x1a5b0104 }, + {_MMIO (0x9888 ),0x0c1fa800 }, + {_MMIO (0x9888 ),0x0e1faa00 }, + {_MMIO (0x9888 ),0x101f02aa }, + {_MMIO (0x9888 ),0x08380042 }, + {_MMIO (0x9888 ),0x0a382080 }, + {_MMIO (0x9888 ),0x0e38404c }, + {_MMIO (0x9888 ),0x0238404b }, + {_MMIO (0x9888 ),0x00384000 }, + {_MMIO (0x9888 ),0x16380000 }, + {_MMIO (0x9888 ),0x18381145 }, + {_MMIO (0x9888 ),0x04380000 }, + {_MMIO (0x9888 ),0x0039a000 }, + {_MMIO (0x9888 ),0x06398000 }, + {_MMIO (0x9888 ),0x0839a000 }, + {_MMIO (0x9888 ),0x0a39a000 }, + {_MMIO (0x9888 ),0x0c39a000 }, + {_MMIO (0x9888 ),0x0e39a000 }, + {_MMIO (0x9888 ),0x02392000 }, + {_MMIO (0x9888 ),0x018a8000 }, + {_MMIO (0x9888 ),0x0f8a8000 }, + {_MMIO (0x9888 ),0x198a8000 }, + {_MMIO (0x9888 ),0x1b8aaaa0 }, + {_MMIO (0x9888 ),0x1d8a0002 }, + {_MMIO (0x9888 ),0x038a8000 }, + {_MMIO (0x9888 ),0x058a8000 }, + {_MMIO (0x9888 ),0x238b02a0 }, + {_MMIO (0x9888 ),0x258b5550 }, + {_MMIO (0x9888 ),0x278b0015 }, + {_MMIO (0x9888 ),0x1f850a80 }, + {_MMIO (0x9888 ),0x2185aaa0 }, + {_MMIO (0x9888 ),0x2385002a }, + {_MMIO (0x9888 ),0x01834000 }, + {_MMIO (0x9888 ),0x0f834000 }, + {_MMIO (0x9888 ),0x19835400 }, + {_MMIO (0x9888 ),0x1b830155 }, + {_MMIO (0x9888 ),0x03834000 }, + {_MMIO (0x9888 ),0x05834000 }, + {_MMIO (0x9888 ),0x0184c000 }, + {_MMIO (0x9888 ),0x07848000 }, + {_MMIO (0x9888 ),0x0984c000 }, + {_MMIO (0x9888 ),0x0b84c000 }, + {_MMIO (0x9888 ),0x0d84c000 }, + {_MMIO (0x9888 ),0x0f84c000 }, + {_MMIO (0x9888 ),0x03844000 }, + {_MMIO (0x9888 ),0x17808137 }, + {_MMIO (0x9888 ),0x1980c147 }, + {_MMIO (0x9888 ),0x1b80c0e5 }, + {_MMIO (0x9888 ),0x1d80c0e3 }, + {_MMIO (0x9888 ),0x21800000 }, + {_MMIO (0x9888 ),0x1180c000 }, + {_MMIO (0x9888 ),0x1f80c000 }, + {_MMIO (0x9888 ),0x13804000 }, + {_MMIO (0x9888 ),0x15800000 }, + {_MMIO (0xd24 ),0x00000000 }, + {_MMIO (0x9888 ),0x4d801000 }, + {_MMIO (0x9888 ),0x4f800111 }, + {_MMIO (0x9888 ),0x43800062 }, + {_MMIO (0x9888 ),0x51800000 }, + {_MMIO (0x9888 ),0x45800062 }, + {_MMIO (0x9888 ),0x53800000 }, + {_MMIO (0x9888 ),0x47800062 }, + {_MMIO (0x9888 ),0x31800000 }, + {_MMIO (0x9888 ),0x3f801062 }, + {_MMIO (0x9888 ),0x41801084 }, +}; + +static const struct i915_oa_reg mux_config_compute_basic_1_2_slices_0x02[] = { + {_MMIO (0x9888 ),0x10dc00e0 }, + {_MMIO (0x9888 ),0x10d800e0 }, + {_MMIO (0x9888 ),0x10b800e0 }, + {_MMIO (0x9888 ),0x3580001a }, + {_MMIO (0x9888 ),0x3b800060 }, + {_MMIO (0x9888 ),0x3d800005 }, + {_MMIO (0x9888 ),0x06dc2100 }, + {_MMIO (0x9888 ),0x0adc0041 }, + {_MMIO (0x9888 ),0x0cdc6600 }, + {_MMIO (0x9888 ),0x00dc6580 }, + {_MMIO (0x9888 ),0x08dc8000 }, + {_MMIO (0x9888 ),0x0edc8000 }, + {_MMIO (0x9888 ),0x00d80042 }, + {_MMIO (0x9888 ),0x08d82080 }, + {_MMIO (0x9888 ),0x0cd8004c }, + {_MMIO (0x9888 ),0x0ed82580 }, + {_MMIO (0x9888 ),0x00db4000 }, + {_MMIO (0x9888 ),0x18db1000 }, + {_MMIO (0x9888 ),0x1adb0104 }, + {_MMIO (0x9888 ),0x0c9fa800 }, + {_MMIO (0x9888 ),0x0e9faa00 }, + {_MMIO (0x9888 ),0x109f02aa }, + {_MMIO (0x9888 ),0x08b80042 }, + {_MMIO (0x9888 ),0x0ab82080 }, + {_MMIO (0x9888 ),0x0eb8404c }, + {_MMIO (0x9888 ),0x02b8404b }, + {_MMIO (0x9888 ),0x00b84000 }, + {_MMIO (0x9888 ),0x16b80000 }, + {_MMIO (0x9888 ),0x18b81145 }, + {_MMIO (0x9888 ),0x04b80000 }, + {_MMIO (0x9888 ),0x00b9a000 }, + {_MMIO (0x9888 ),0x06b98000 }, + {_MMIO (0x9888 ),0x08b9a000 }, + {_MMIO (0x9888 ),0x0ab9a000 }, + {_MMIO (0x9888 ),0x0cb9a000 }, + {_MMIO (0x9888 ),0x0eb9a000 }, + {_MMIO (0x9888 ),0x02b92000 }, + {_MMIO (0x9888 ),0x01888000 }, + {_MMIO (0x9888 ),0x0d88f800 }, + {_MMIO (0x9888 ),0x0f88000f }, + {_MMIO (0x9888 ),0x03888000 }, + {_MMIO (0x9888 ),0x05888000 }, + {_MMIO (0x9888 ),0x238b0540 }, + {_MMIO (0x9888 ),0x258baaa0 }, + {_MMIO (0x9888 ),0x278b002a }, + {_MMIO (0x9888 ),0x018c4000 }, + {_MMIO (0x9888 ),0x0f8c4000 }, + {_MMIO (0x9888 ),0x178c2000 }, + {_MMIO (0x9888 ),0x198c5500 }, + {_MMIO (0x9888 ),0x1b8c0015 }, + {_MMIO (0x9888 ),0x038c4000 }, + {_MMIO (0x9888 ),0x058c4000 }, + {_MMIO (0x9888 ),0x018da000 }, + {_MMIO (0x9888 ),0x078d8000 }, + {_MMIO (0x9888 ),0x098da000 }, + {_MMIO (0x9888 ),0x0b8da000 }, + {_MMIO (0x9888 ),0x0d8da000 }, + {_MMIO (0x9888 ),0x0f8da000 }, + {_MMIO (0x9888 ),0x038d2000 }, + {_MMIO (0x9888 ),0x1f850a80 }, + {_MMIO (0x9888 ),0x2185aaa0 }, + {_MMIO (0x9888 ),0x2385002a }, + {_MMIO (0x9888 ),0x01834000 }, + {_MMIO (0x9888 ),0x0f834000 }, + {_MMIO (0x9888 ),0x19835400 }, + {_MMIO (0x9888 ),0x1b830155 }, + {_MMIO (0x9888 ),0x03834000 }, + {_MMIO (0x9888 ),0x05834000 }, + {_MMIO (0x9888 ),0x0184c000 }, + {_MMIO (0x9888 ),0x07848000 }, + {_MMIO (0x9888 ),0x0984c000 }, + {_MMIO (0x9888 ),0x0b84c000 }, + {_MMIO (0x9888 ),0x0d84c000 }, + {_MMIO (0x9888 ),0x0f84c000 }, + {_MMIO (0x9888 ),0x03844000 }, + {_MMIO (0x9888 ),0x17808137 }, + {_MMIO (0x9888 ),0x1980c147 }, + {_MMIO (0x9888 ),0x1b80c0e5 }, + {_MMIO (0x9888 ),0x1d80c0e3 }, + {_MMIO (0x9888 ),0x21800000 }, + {_MMIO (0x9888 ),0x1180c000 }, + {_MMIO (0x9888 ),0x1f80c000 }, + {_MMIO (0x9888 ),0x13804000 }, + {_MMIO (0x9888 ),0x15800000 }, + {_MMIO (0xd24 ),0x00000000 }, + {_MMIO (0x9888 ),0x4d805000 }, + {_MMIO (0x9888 ),0x4f800555 }, + {_MMIO (0x9888 ),0x43800062 }, + {_MMIO (0x9888 ),0x51800000 }, + {_MMIO (0x9888 ),0x45800062 }, + {_MMIO (0x9888 ),0x53800000 }, + {_MMIO (0x9888 ),0x47800062 }, + {_MMIO (0x9888 ),0x31800000 }, + {_MMIO (0x9888 ),0x3f800062 }, + {_MMIO (0x9888 ),0x41800000 }, +}; + +static const struct i915_oa_reg * +get_compute_basic_mux_config (struct drm_i915_private *dev_priv, +int *len) { - dev_priv->perf.oa.mux_regs =NULL ; - dev_priv->perf.oa.mux_regs_len =0 ; - dev_priv->perf.oa.b_counter_regs =NULL ; - dev_priv->perf.oa.b_counter_regs_len =0 ; - dev_priv->perf.oa.flex_regs =NULL ; - dev_priv->perf.oa.flex_regs_len =0 ; +if (INTEL_INFO (dev_priv)->sseu.slice_mask &0x01 ) { + *len =ARRAY_SIZE (mux_config_compute_basic_1_0_slices_0x01); +return mux_config_compute_basic_1_0_slices_0x01; + }else if (INTEL_INFO (dev_priv)->sseu.slice_mask &0x02 ) { + *len =ARRAY_SIZE (mux_config_compute_basic_1_2_slices_0x02); +return mux_config_compute_basic_1_2_slices_0x02; + } -switch (dev_priv->perf.oa.metrics_set) { -case METRIC_SET_ID_RENDER_BASIC : - dev_priv->perf.oa.mux_regs = -get_render_basic_mux_config (dev_priv, - &dev_priv->perf.oa.mux_regs_len); -if (!dev_priv->perf.oa.mux_regs) { -DRM_DEBUG_DRIVER ("No suitable MUX config for \"RENDER_BASIC\" metric set" ); + *len =0 ; +return NULL ; +} -/* EINVAL because *_register_sysfs already checked this -* and so it wouldn't have been advertised so userspace and -* so shouldn't have been requested -*/ -return -EINVAL ; - } +static const struct i915_oa_reg b_counter_config_render_pipe_profile[] = { + {_MMIO (0x2724 ),0xf0800000 }, + {_MMIO (0x2720 ),0x00000000 }, + {_MMIO (0x2714 ),0xf0800000 }, + {_MMIO (0x2710 ),0x00000000 }, + {_MMIO (0x2740 ),0x00000000 }, + {_MMIO (0x2770 ),0x0007ffea }, + {_MMIO (0x2774 ),0x00007ffc }, + {_MMIO (0x2778 ),0x0007affa }, + {_MMIO (0x277c ),0x0000f5fd }, + {_MMIO (0x2780 ),0x00079ffa }, + {_MMIO (0x2784 ),0x0000f3fb }, + {_MMIO (0x2788 ),0x0007bf7a }, + {_MMIO (0x278c ),0x0000f7e7 }, + {_MMIO (0x2790 ),0x0007fefa }, + {_MMIO (0x2794 ),0x0000f7cf }, + {_MMIO (0x2798 ),0x00077ffa }, + {_MMIO (0x279c ),0x0000efdf }, + {_MMIO (0x27a0 ),0x0006fffa }, + {_MMIO (0x27a4 ),0x0000cfbf }, + {_MMIO (0x27a8 ),0x0003fffa }, + {_MMIO (0x27ac ),0x00005f7f }, +}; - dev_priv->perf.oa.b_counter_regs = - b_counter_config_render_basic; - dev_priv->perf.oa.b_counter_regs_len = -ARRAY_SIZE (b_counter_config_render_basic); +static const struct i915_oa_reg flex_eu_config_render_pipe_profile[] = { + {_MMIO (0xe458 ),0x00005004 }, + {_MMIO (0xe558 ),0x00015014 }, + {_MMIO (0xe658 ),0x00025024 }, + {_MMIO (0xe758 ),0x00035034 }, + {_MMIO (0xe45c ),0x00045044 }, + {_MMIO (0xe55c ),0x00055054 }, + {_MMIO (0xe65c ),0x00065064 }, +}; - dev_priv->perf.oa.flex_regs = - flex_eu_config_render_basic; - dev_priv->perf.oa.flex_regs_len = -ARRAY_SIZE (flex_eu_config_render_basic); +static const struct i915_oa_reg mux_config_render_pipe_profile[] = { + {_MMIO (0x9888 ),0x0a1e0000 }, + {_MMIO (0x9888 ),0x0c1f000f }, + {_MMIO (0x9888 ),0x10176800 }, + {_MMIO (0x9888 ),0x1191001f }, + {_MMIO (0x9888 ),0x0b880320 }, + {_MMIO (0x9888 ),0x01890c40 }, + {_MMIO (0x9888 ),0x118a1c00 }, + {_MMIO (0x9888 ),0x118d7c00 }, + {_MMIO (0x9888 ),0x118e0020 }, + {_MMIO (0x9888 ),0x118f4c00 }, + {_MMIO (0x9888 ),0x11900000 }, + {_MMIO (0x9888 ),0x13900001 }, + {_MMIO (0x9888 ),0x065c4000 }, + {_MMIO (0x9888 ),0x0c3d8000 }, + {_MMIO (0x9888 ),0x06584000 }, + {_MMIO (0x9888 ),0x0c5b4000 }, + {_MMIO (0x9888 ),0x081e0040 }, + {_MMIO (0x9888 ),0x0e1e0000 }, + {_MMIO (0x9888 ),0x021f5400 }, + {_MMIO (0x9888 ),0x001f0000 }, + {_MMIO (0x9888 ),0x101f0010 }, + {_MMIO (0x9888 ),0x0e1f0080 }, + {_MMIO (0x9888 ),0x0c384000 }, + {_MMIO (0x9888 ),0x06392000 }, + {_MMIO (0x9888 ),0x0c13c000 }, + {_MMIO (0x9888 ),0x06164000 }, + {_MMIO (0x9888 ),0x06170012 }, + {_MMIO (0x9888 ),0x00170000 }, + {_MMIO (0x9888 ),0x01910005 }, + {_MMIO (0x9888 ),0x07880002 }, + {_MMIO (0x9888 ),0x01880c00 }, + {_MMIO (0x9888 ),0x0f880000 }, + {_MMIO (0x9888 ),0x0d880000 }, + {_MMIO (0x9888 ),0x05880000 }, + {_MMIO (0x9888 ),0x09890032 }, + {_MMIO (0x9888 ),0x078a0800 }, + {_MMIO (0x9888 ),0x0f8a0a00 }, + {_MMIO (0x9888 ),0x198a4000 }, + {_MMIO (0x9888 ),0x1b8a2000 }, + {_MMIO (0x9888 ),0x1d8a0000 }, + {_MMIO (0x9888 ),0x038a4000 }, + {_MMIO (0x9888 ),0x0b8a8000 }, + {_MMIO (0x9888 ),0x0d8a8000 }, + {_MMIO (0x9888 ),0x238b54c0 }, + {_MMIO (0x9888 ),0x258baa55 }, + {_MMIO (0x9888 ),0x278b0019 }, + {_MMIO (0x9888 ),0x198c0100 }, + {_MMIO (0x9888 ),0x058c4000 }, + {_MMIO (0x9888 ),0x0f8d0015 }, + {_MMIO (0x9888 ),0x018d1000 }, + {_MMIO (0x9888 ),0x098d8000 }, + {_MMIO (0x9888 ),0x0b8df000 }, + {_MMIO (0x9888 ),0x0d8d3000 }, + {_MMIO (0x9888 ),0x038de000 }, + {_MMIO (0x9888 ),0x058d3000 }, + {_MMIO (0x9888 ),0x0d8e0004 }, + {_MMIO (0x9888 ),0x058e000c }, + {_MMIO (0x9888 ),0x098e0000 }, + {_MMIO (0x9888 ),0x078e0000 }, + {_MMIO (0x9888 ),0x038e0000 }, + {_MMIO (0x9888 ),0x0b8f0020 }, + {_MMIO (0x9888 ),0x198f0c00 }, + {_MMIO (0x9888 ),0x078f8000 }, + {_MMIO (0x9888 ),0x098f4000 }, + {_MMIO (0x9888 ),0x0b900980 }, + {_MMIO (0x9888 ),0x03900d80 }, + {_MMIO (0x9888 ),0x01900000 }, + {_MMIO (0x9888 ),0x1f85aa80 }, + {_MMIO (0x9888 ),0x2185aaaa }, + {_MMIO (0x9888 ),0x2385002a }, + {_MMIO (0x9888 ),0x01834000 }, + {_MMIO (0x9888 ),0x0f834000 }, + {_MMIO (0x9888 ),0x19835400 }, + {_MMIO (0x9888 ),0x1b830155 }, + {_MMIO (0x9888 ),0x03834000 }, + {_MMIO (0x9888 ),0x05834000 }, + {_MMIO (0x9888 ),0x07834000 }, + {_MMIO (0x9888 ),0x09834000 }, + {_MMIO (0x9888 ),0x0b834000 }, + {_MMIO (0x9888 ),0x0d834000 }, + {_MMIO (0x9888 ),0x0184c000 }, + {_MMIO (0x9888 ),0x0784c000 }, + {_MMIO (0x9888 ),0x0984c000 }, + {_MMIO (0x9888 ),0x0b84c000 }, + {_MMIO (0x9888 ),0x0d84c000 }, + {_MMIO (0x9888 ),0x0f84c000 }, + {_MMIO (0x9888 ),0x0384c000 }, + {_MMIO (0x9888 ),0x0584c000 }, + {_MMIO (0x9888 ),0x1180c000 }, + {_MMIO (0x9888 ),0x1780c000 }, + {_MMIO (0x9888 ),0x1980c000 }, + {_MMIO (0x9888 ),0x1b80c000 }, + {_MMIO (0x9888 ),0x1d80c000 }, + {_MMIO (0x9888 ),0x1f80c000 }, + {_MMIO (0x9888 ),0x1380c000 }, + {_MMIO (0x9888 ),0x1580c000 }, + {_MMIO (0xd24 ),0x00000000 }, + {_MMIO (0x9888 ),0x4d801111 }, + {_MMIO (0x9888 ),0x3d800800 }, + {_MMIO (0x9888 ),0x4f801011 }, + {_MMIO (0x9888 ),0x43800443 }, + {_MMIO (0x9888 ),0x51801111 }, + {_MMIO (0x9888 ),0x45800422 }, + {_MMIO (0x9888 ),0x53801111 }, + {_MMIO (0x9888 ),0x47800c60 }, + {_MMIO (0x9888 ),0x21800000 }, + {_MMIO (0x9888 ),0x31800000 }, + {_MMIO (0x9888 ),0x3f800422 }, + {_MMIO (0x9888 ),0x41800021 }, +}; -return 0 ; -default : -return -ENODEV ; - } +static const struct i915_oa_reg * +get_render_pipe_profile_mux_config (struct drm_i915_private *dev_priv, +int *len) +{ + *len =ARRAY_SIZE (mux_config_render_pipe_profile); +return mux_config_render_pipe_profile; } -static ssize_t -show_render_basic_id (struct device *kdev,struct device_attribute *attr,char *buf) +static const struct i915_oa_reg b_counter_config_memory_reads[] = { + {_MMIO (0x2724 ),0xf0800000 }, + {_MMIO (0x2720 ),0x00000000 }, + {_MMIO (0x2714 ),0xf0800000 }, + {_MMIO (0x2710 ),0x00000000 }, + {_MMIO (0x274c ),0x86543210 }, + {_MMIO (0x2748 ),0x86543210 }, + {_MMIO (0x2744 ),0x00006667 }, + {_MMIO (0x2740 ),0x00000000 }, + {_MMIO (0x275c ),0x86543210 }, + {_MMIO (0x2758 ),0x86543210 }, + {_MMIO (0x2754 ),0x00006465 }, + {_MMIO (0x2750 ),0x00000000 }, + {_MMIO (0x2770 ),0x0007f81a }, + {_MMIO (0x2774 ),0x0000fe00 }, + {_MMIO (0x2778 ),0x0007f82a }, + {_MMIO (0x277c ),0x0000fe00 }, + {_MMIO (0x2780 ),0x0007f872 }, + {_MMIO (0x2784 ),0x0000fe00 }, + {_MMIO (0x2788 ),0x0007f8ba }, + {_MMIO (0x278c ),0x0000fe00 }, + {_MMIO (0x2790 ),0x0007f87a }, + {_MMIO (0x2794 ),0x0000fe00 }, + {_MMIO (0x2798 ),0x0007f8ea }, + {_MMIO (0x279c ),0x0000fe00 }, + {_MMIO (0x27a0 ),0x0007f8e2 }, + {_MMIO (0x27a4 ),0x0000fe00 }, + {_MMIO (0x27a8 ),0x0007f8f2 }, + {_MMIO (0x27ac ),0x0000fe00 }, +}; + +static const struct i915_oa_reg flex_eu_config_memory_reads[] = { + {_MMIO (0xe458 ),0x00005004 }, + {_MMIO (0xe558 ),0x00015014 }, + {_MMIO (0xe658 ),0x00025024 }, + {_MMIO (0xe758 ),0x00035034 }, + {_MMIO (0xe45c ),0x00045044 }, + {_MMIO (0xe55c ),0x00055054 }, + {_MMIO (0xe65c ),0x00065064 }, +}; + +static const struct i915_oa_reg mux_config_memory_reads[] = { + {_MMIO (0x9888 ),0x198b0343 }, + {_MMIO (0x9888 ),0x13845800 }, + {_MMIO (0x9888 ),0x15840018 }, + {_MMIO (0x9888 ),0x3580001a }, + {_MMIO (0x9888 ),0x038b6300 }, + {_MMIO (0x9888 ),0x058b6b62 }, + {_MMIO (0x9888 ),0x078b006a }, + {_MMIO (0x9888 ),0x118b0000 }, + {_MMIO (0x9888 ),0x238b0000 }, + {_MMIO (0x9888 ),0x258b0000 }, + {_MMIO (0x9888 ),0x1f85a080 }, + {_MMIO (0x9888 ),0x2185aaaa }, + {_MMIO (0x9888 ),0x2385000a }, + {_MMIO (0x9888 ),0x07834000 }, + {_MMIO (0x9888 ),0x09834000 }, + {_MMIO (0x9888 ),0x0b834000 }, + {_MMIO (0x9888 ),0x0d834000 }, + {_MMIO (0x9888 ),0x01840018 }, + {_MMIO (0x9888 ),0x07844c80 }, + {_MMIO (0x9888 ),0x09840d9a }, + {_MMIO (0x9888 ),0x0b840e9c }, + {_MMIO (0x9888 ),0x0d840f9e }, + {_MMIO (0x9888 ),0x0f840010 }, + {_MMIO (0x9888 ),0x11840000 }, + {_MMIO (0x9888 ),0x03848000 }, + {_MMIO (0x9888 ),0x0584c000 }, + {_MMIO (0x9888 ),0x2f8000e5 }, + {_MMIO (0x9888 ),0x138080e3 }, + {_MMIO (0x9888 ),0x1580c0e1 }, + {_MMIO (0x9888 ),0x21800000 }, + {_MMIO (0x9888 ),0x11804000 }, + {_MMIO (0x9888 ),0x1780c000 }, + {_MMIO (0x9888 ),0x1980c000 }, + {_MMIO (0x9888 ),0x1b80c000 }, + {_MMIO (0x9888 ),0x1d80c000 }, + {_MMIO (0x9888 ),0x1f804000 }, + {_MMIO (0xd24 ),0x00000000 }, + {_MMIO (0x9888 ),0x4d800000 }, + {_MMIO (0x9888 ),0x3d800800 }, + {_MMIO (0x9888 ),0x4f800000 }, + {_MMIO (0x9888 ),0x43800842 }, + {_MMIO (0x9888 ),0x51800000 }, + {_MMIO (0x9888 ),0x45800842 }, + {_MMIO (0x9888 ),0x53800000 }, + {_MMIO (0x9888 ),0x47801042 }, + {_MMIO (0x9888 ),0x31800000 }, + {_MMIO (0x9888 ),0x3f800084 }, + {_MMIO (0x9888 ),0x41800000 }, +}; + +static const struct i915_oa_reg * +get_memory_reads_mux_config (struct drm_i915_private *dev_priv, +int *len) { -return sprintf (buf,"%d\n" ,METRIC_SET_ID_RENDER_BASIC ); + *len =ARRAY_SIZE (mux_config_memory_reads); +return mux_config_memory_reads; } -static struct device_attribute dev_attr_render_basic_id = { - .attr = { .name ="id" , .mode =0444 }, - .show = show_render_basic_id, - .store =NULL , +static const struct i915_oa_reg b_counter_config_memory_writes[] = { + {_MMIO (0x2724 ),0xf0800000 }, + {_MMIO (0x2720 ),0x00000000 }, + {_MMIO (0x2714 ),0xf0800000 }, + {_MMIO (0x2710 ),0x00000000 }, + {_MMIO (0x274c ),0x86543210 }, + {_MMIO (0x2748 ),0x86543210 }, + {_MMIO (0x2744 ),0x00006667 }, + {_MMIO (0x2740 ),0x00000000 }, + {_MMIO (0x275c ),0x86543210 }, + {_MMIO (0x2758 ),0x86543210 }, + {_MMIO (0x2754 ),0x00006465 }, + {_MMIO (0x2750 ),0x00000000 }, + {_MMIO (0x2770 ),0x0007f81a }, + {_MMIO (0x2774 ),0x0000fe00 }, + {_MMIO (0x2778 ),0x0007f82a }, + {_MMIO (0x277c ),0x0000fe00 }, + {_MMIO (0x2780 ),0x0007f822 }, + {_MMIO (0x2784 ),0x0000fe00 }, + {_MMIO (0x2788 ),0x0007f8ba }, + {_MMIO (0x278c ),0x0000fe00 }, + {_MMIO (0x2790 ),0x0007f87a }, + {_MMIO (0x2794 ),0x0000fe00 }, + {_MMIO (0x2798 ),0x0007f8ea }, + {_MMIO (0x279c ),0x0000fe00 }, + {_MMIO (0x27a0 ),0x0007f8e2 }, + {_MMIO (0x27a4 ),0x0000fe00 }, + {_MMIO (0x27a8 ),0x0007f8f2 }, + {_MMIO (0x27ac ),0x0000fe00 }, }; -static struct attribute *attrs_render_basic[] = { - &dev_attr_render_basic_id.attr, -NULL , +static const struct i915_oa_reg flex_eu_config_memory_writes[] = { + {_MMIO (0xe458 ),0x00005004 }, + {_MMIO (0xe558 ),0x00015014 }, + {_MMIO (0xe658 ),0x00025024 }, + {_MMIO (0xe758 ),0x00035034 }, + {_MMIO (0xe45c ),0x00045044 }, + {_MMIO (0xe55c ),0x00055054 }, + {_MMIO (0xe65c ),0x00065064 }, }; -static struct attribute_group group_render_basic = { - .name ="b541bd57-0e0f-4154-b4c0-5858010a2bf7" , - .attrs = attrs_render_basic, +static const struct i915_oa_reg mux_config_memory_writes[] = { + {_MMIO (0x9888 ),0x198b0343 }, + {_MMIO (0x9888 ),0x13845400 }, + {_MMIO (0x9888 ),0x3580001a }, + {_MMIO (0x9888 ),0x3d800805 }, + {_MMIO (0x9888 ),0x038b6300 }, + {_MMIO (0x9888 ),0x058b6b62 }, + {_MMIO (0x9888 ),0x078b006a }, + {_MMIO (0x9888 ),0x118b0000 }, + {_MMIO (0x9888 ),0x238b0000 }, + {_MMIO (0x9888 ),0x258b0000 }, + {_MMIO (0x9888 ),0x1f85a080 }, + {_MMIO (0x9888 ),0x2185aaaa }, + {_MMIO (0x9888 ),0x23850002 }, + {_MMIO (0x9888 ),0x07834000 }, + {_MMIO (0x9888 ),0x09834000 }, + {_MMIO (0x9888 ),0x0b834000 }, + {_MMIO (0x9888 ),0x0d834000 }, + {_MMIO (0x9888 ),0x01840010 }, + {_MMIO (0x9888 ),0x07844880 }, + {_MMIO (0x9888 ),0x09840992 }, + {_MMIO (0x9888 ),0x0b840a94 }, + {_MMIO (0x9888 ),0x0d840b96 }, + {_MMIO (0x9888 ),0x11840000 }, + {_MMIO (0x9888 ),0x03848000 }, + {_MMIO (0x9888 ),0x0584c000 }, + {_MMIO (0x9888 ),0x2d800147 }, + {_MMIO (0x9888 ),0x2f8000e5 }, + {_MMIO (0x9888 ),0x138080e3 }, + {_MMIO (0x9888 ),0x1580c0e1 }, + {_MMIO (0x9888 ),0x21800000 }, + {_MMIO (0x9888 ),0x11804000 }, + {_MMIO (0x9888 ),0x1780c000 }, + {_MMIO (0x9888 ),0x1980c000 }, + {_MMIO (0x9888 ),0x1b80c000 }, + {_MMIO (0x9888 ),0x1d80c000 }, + {_MMIO (0x9888 ),0x1f800000 }, + {_MMIO (0xd24 ),0x00000000 }, + {_MMIO (0x9888 ),0x4d800000 }, + {_MMIO (0x9888 ),0x4f800000 }, + {_MMIO (0x9888 ),0x43800842 }, + {_MMIO (0x9888 ),0x51800000 }, + {_MMIO (0x9888 ),0x45800842 }, + {_MMIO (0x9888 ),0x53800000 }, + {_MMIO (0x9888 ),0x47801082 }, + {_MMIO (0x9888 ),0x31800000 }, + {_MMIO (0x9888 ),0x3f800084 }, + {_MMIO (0x9888 ),0x41800000 }, }; -int -i915_perf_register_sysfs_bdw (struct drm_i915_private *dev_priv) +static const struct i915_oa_reg * +get_memory_writes_mux_config (struct drm_i915_private *dev_priv, +int *len) { -int mux_len; -int ret =0 ; + *len =ARRAY_SIZE (mux_config_memory_writes); +return mux_config_memory_writes; +} -if (get_render_basic_mux_config (dev_priv, &mux_len)) { - ret =sysfs_create_group (dev_priv->perf.metrics_kobj, &group_render_basic); -if (ret) - goto error_render_basic; - } +static const struct i915_oa_reg b_counter_config_compute_extended[] = { + {_MMIO (0x2724 ),0xf0800000 }, + {_MMIO (0x2720 ),0x00000000 }, + {_MMIO (0x2714 ),0xf0800000 }, + {_MMIO (0x2710 ),0x00000000 }, + {_MMIO (0x2740 ),0x00000000 }, + {_MMIO (0x2770 ),0x0007fc2a }, + {_MMIO (0x2774 ),0x0000bf00 }, + {_MMIO (0x2778 ),0x0007fc6a }, + {_MMIO (0x277c ),0x0000bf00 }, + {_MMIO (0x2780 ),0x0007fc92 }, + {_MMIO (0x2784 ),0x0000bf00 }, + {_MMIO (0x2788 ),0x0007fca2 }, + {_MMIO (0x278c ),0x0000bf00 }, + {_MMIO (0x2790 ),0x0007fc32 }, + {_MMIO (0x2794 ),0x0000bf00 }, + {_MMIO (0x2798 ),0x0007fc9a }, + {_MMIO (0x279c ),0x0000bf00 }, + {_MMIO (0x27a0 ),0x0007fe6a }, + {_MMIO (0x27a4 ),0x0000bf00 }, + {_MMIO (0x27a8 ),0x0007fe7a }, + {_MMIO (0x27ac ),0x0000bf00 }, +}; -return 0 ; +static const struct i915_oa_reg flex_eu_config_compute_extended[] = { + {_MMIO (0xe458 ),0x00005004 }, + {_MMIO (0xe558 ),0x00000003 }, + {_MMIO (0xe658 ),0x00002001 }, + {_MMIO (0xe758 ),0x00778008 }, + {_MMIO (0xe45c ),0x00088078 }, + {_MMIO (0xe55c ),0x00808708 }, + {_MMIO (0xe65c ),0x00a08908 }, +}; + +static const struct i915_oa_reg mux_config_compute_extended_1_0_subslices_0x01[] = { + {_MMIO (0x9888 ),0x143d0160 }, + {_MMIO (0x9888 ),0x163d2800 }, + {_MMIO (0x9888 ),0x183d0120 }, + {_MMIO (0x9888 ),0x105800e0 }, + {_MMIO (0x9888 ),0x005cc000 }, + {_MMIO (0x9888 ),0x065c8000 }, + {_MMIO (0x9888 ),0x085cc000 }, + {_MMIO (0x9888 ),0x0a5cc000 }, + {_MMIO (0x9888 ),0x0c5cc000 }, + {_MMIO (0x9888 ),0x0e5cc000 }, + {_MMIO (0x9888 ),0x025cc000 }, + {_MMIO (0x9888 ),0x045cc000 }, + {_MMIO (0x9888 ),0x003d0011 }, + {_MMIO (0x9888 ),0x063d0900 }, + {_MMIO (0x9888 ),0x083d0a13 }, + {_MMIO (0x9888 ),0x0a3d0b15 }, + {_MMIO (0x9888 ),0x0c3d2317 }, + {_MMIO (0x9888 ),0x043d21b7 }, + {_MMIO (0x9888 ),0x103d0000 }, + {_MMIO (0x9888 ),0x0e3d0000 }, + {_MMIO (0x9888 ),0x1a3d0000 }, + {_MMIO (0x9888 ),0x0e5825c1 }, + {_MMIO (0x9888 ),0x00586100 }, + {_MMIO (0x9888 ),0x0258204c }, + {_MMIO (0x9888 ),0x06588000 }, + {_MMIO (0x9888 ),0x0858c000 }, + {_MMIO (0x9888 ),0x0a58c000 }, + {_MMIO (0x9888 ),0x0c58c000 }, + {_MMIO (0x9888 ),0x0458c000 }, + {_MMIO (0x9888 ),0x005b4000 }, + {_MMIO (0x9888 ),0x0e5b4000 }, + {_MMIO (0x9888 ),0x185b5400 }, + {_MMIO (0x9888 ),0x1a5b0155 }, + {_MMIO (0x9888 ),0x025b4000 }, + {_MMIO (0x9888 ),0x045b4000 }, + {_MMIO (0x9888 ),0x065b4000 }, + {_MMIO (0x9888 ),0x085b4000 }, + {_MMIO (0x9888 ),0x0a5b4000 }, + {_MMIO (0x9888 ),0x0c1fa800 }, + {_MMIO (0x9888 ),0x0e1faa2a }, + {_MMIO (0x9888 ),0x101f02aa }, + {_MMIO (0x9888 ),0x00384000 }, + {_MMIO (0x9888 ),0x0e384000 }, + {_MMIO (0x9888 ),0x16384000 }, + {_MMIO (0x9888 ),0x18381555 }, + {_MMIO (0x9888 ),0x02384000 }, + {_MMIO (0x9888 ),0x04384000 }, + {_MMIO (0x9888 ),0x06384000 }, + {_MMIO (0x9888 ),0x08384000 }, + {_MMIO (0x9888 ),0x0a384000 }, + {_MMIO (0x9888 ),0x0039a000 }, + {_MMIO (0x9888 ),0x06398000 }, + {_MMIO (0x9888 ),0x0839a000 }, + {_MMIO (0x9888 ),0x0a39a000 }, + {_MMIO (0x9888 ),0x0c39a000 }, + {_MMIO (0x9888 ),0x0e39a000 }, + {_MMIO (0x9888 ),0x0239a000 }, + {_MMIO (0x9888 ),0x0439a000 }, + {_MMIO (0x9888 ),0x018a8000 }, + {_MMIO (0x9888 ),0x0f8a8000 }, + {_MMIO (0x9888 ),0x198a8000 }, + {_MMIO (0x9888 ),0x1b8aaaa0 }, + {_MMIO (0x9888 ),0x1d8a0002 }, + {_MMIO (0x9888 ),0x038a8000 }, + {_MMIO (0x9888 ),0x058a8000 }, + {_MMIO (0x9888 ),0x078a8000 }, + {_MMIO (0x9888 ),0x098a8000 }, + {_MMIO (0x9888 ),0x0b8a8000 }, + {_MMIO (0x9888 ),0x238b2aa0 }, + {_MMIO (0x9888 ),0x258b5551 }, + {_MMIO (0x9888 ),0x278b0015 }, +}; + +static const struct i915_oa_reg mux_config_compute_extended_1_1_subslices_0x08[] = { + {_MMIO (0x9888 ),0x14bd0160 }, + {_MMIO (0x9888 ),0x16bd2800 }, + {_MMIO (0x9888 ),0x18bd0120 }, + {_MMIO (0x9888 ),0x10d800e0 }, + {_MMIO (0x9888 ),0x00dcc000 }, + {_MMIO (0x9888 ),0x06dc8000 }, + {_MMIO (0x9888 ),0x08dcc000 }, + {_MMIO (0x9888 ),0x0adcc000 }, + {_MMIO (0x9888 ),0x0cdcc000 }, + {_MMIO (0x9888 ),0x0edcc000 }, + {_MMIO (0x9888 ),0x02dcc000 }, + {_MMIO (0x9888 ),0x04dcc000 }, + {_MMIO (0x9888 ),0x00bd0011 }, + {_MMIO (0x9888 ),0x06bd0900 }, + {_MMIO (0x9888 ),0x08bd0a13 }, + {_MMIO (0x9888 ),0x0abd0b15 }, + {_MMIO (0x9888 ),0x0cbd2317 }, + {_MMIO (0x9888 ),0x04bd21b7 }, + {_MMIO (0x9888 ),0x10bd0000 }, + {_MMIO (0x9888 ),0x0ebd0000 }, + {_MMIO (0x9888 ),0x1abd0000 }, + {_MMIO (0x9888 ),0x0ed825c1 }, + {_MMIO (0x9888 ),0x00d86100 }, + {_MMIO (0x9888 ),0x02d8204c }, + {_MMIO (0x9888 ),0x06d88000 }, + {_MMIO (0x9888 ),0x08d8c000 }, + {_MMIO (0x9888 ),0x0ad8c000 }, + {_MMIO (0x9888 ),0x0cd8c000 }, + {_MMIO (0x9888 ),0x04d8c000 }, + {_MMIO (0x9888 ),0x00db4000 }, + {_MMIO (0x9888 ),0x0edb4000 }, + {_MMIO (0x9888 ),0x18db5400 }, + {_MMIO (0x9888 ),0x1adb0155 }, + {_MMIO (0x9888 ),0x02db4000 }, + {_MMIO (0x9888 ),0x04db4000 }, + {_MMIO (0x9888 ),0x06db4000 }, + {_MMIO (0x9888 ),0x08db4000 }, + {_MMIO (0x9888 ),0x0adb4000 }, + {_MMIO (0x9888 ),0x0c9fa800 }, + {_MMIO (0x9888 ),0x0e9faa2a }, + {_MMIO (0x9888 ),0x109f02aa }, + {_MMIO (0x9888 ),0x00b84000 }, + {_MMIO (0x9888 ),0x0eb84000 }, + {_MMIO (0x9888 ),0x16b84000 }, + {_MMIO (0x9888 ),0x18b81555 }, + {_MMIO (0x9888 ),0x02b84000 }, + {_MMIO (0x9888 ),0x04b84000 }, + {_MMIO (0x9888 ),0x06b84000 }, + {_MMIO (0x9888 ),0x08b84000 }, + {_MMIO (0x9888 ),0x0ab84000 }, + {_MMIO (0x9888 ),0x00b9a000 }, + {_MMIO (0x9888 ),0x06b98000 }, + {_MMIO (0x9888 ),0x08b9a000 }, + {_MMIO (0x9888 ),0x0ab9a000 }, + {_MMIO (0x9888 ),0x0cb9a000 }, + {_MMIO (0x9888 ),0x0eb9a000 }, + {_MMIO (0x9888 ),0x02b9a000 }, + {_MMIO (0x9888 ),0x04b9a000 }, + {_MMIO (0x9888 ),0x01888000 }, + {_MMIO (0x9888 ),0x0d88f800 }, + {_MMIO (0x9888 ),0x0f88000f }, + {_MMIO (0x9888 ),0x03888000 }, + {_MMIO (0x9888 ),0x05888000 }, + {_MMIO (0x9888 ),0x07888000 }, + {_MMIO (0x9888 ),0x09888000 }, + {_MMIO (0x9888 ),0x0b888000 }, + {_MMIO (0x9888 ),0x238b5540 }, + {_MMIO (0x9888 ),0x258baaa2 }, + {_MMIO (0x9888 ),0x278b002a }, + {_MMIO (0x9888 ),0x018c4000 }, + {_MMIO (0x9888 ),0x0f8c4000 }, + {_MMIO (0x9888 ),0x178c2000 }, + {_MMIO (0x9888 ),0x198c5500 }, + {_MMIO (0x9888 ),0x1b8c0015 }, + {_MMIO (0x9888 ),0x038c4000 }, + {_MMIO (0x9888 ),0x058c4000 }, + {_MMIO (0x9888 ),0x078c4000 }, + {_MMIO (0x9888 ),0x098c4000 }, + {_MMIO (0x9888 ),0x0b8c4000 }, + {_MMIO (0x9888 ),0x018da000 }, + {_MMIO (0x9888 ),0x078d8000 }, + {_MMIO (0x9888 ),0x098da000 }, + {_MMIO (0x9888 ),0x0b8da000 }, + {_MMIO (0x9888 ),0x0d8da000 }, + {_MMIO (0x9888 ),0x0f8da000 }, + {_MMIO (0x9888 ),0x038da000 }, + {_MMIO (0x9888 ),0x058da000 }, +}; + +static const struct i915_oa_reg mux_config_compute_extended_1_2_subslices_0x02[] = { + {_MMIO (0x9888 ),0x105c00e0 }, + {_MMIO (0x9888 ),0x145b0160 }, + {_MMIO (0x9888 ),0x165b2800 }, + {_MMIO (0x9888 ),0x185b0120 }, + {_MMIO (0x9888 ),0x0e5c25c1 }, + {_MMIO (0x9888 ),0x005c6100 }, + {_MMIO (0x9888 ),0x025c204c }, + {_MMIO (0x9888 ),0x065c8000 }, + {_MMIO (0x9888 ),0x085cc000 }, + {_MMIO (0x9888 ),0x0a5cc000 }, + {_MMIO (0x9888 ),0x0c5cc000 }, + {_MMIO (0x9888 ),0x045cc000 }, + {_MMIO (0x9888 ),0x005b0011 }, + {_MMIO (0x9888 ),0x065b0900 }, + {_MMIO (0x9888 ),0x085b0a13 }, + {_MMIO (0x9888 ),0x0a5b0b15 }, + {_MMIO (0x9888 ),0x0c5b2317 }, + {_MMIO (0x9888 ),0x045b21b7 }, + {_MMIO (0x9888 ),0x105b0000 }, + {_MMIO (0x9888 ),0x0e5b0000 }, + {_MMIO (0x9888 ),0x1a5b0000 }, + {_MMIO (0x9888 ),0x0c1fa800 }, + {_MMIO (0x9888 ),0x0e1faa2a }, + {_MMIO (0x9888 ),0x101f02aa }, + {_MMIO (0x9888 ),0x00384000 }, + {_MMIO (0x9888 ),0x0e384000 }, + {_MMIO (0x9888 ),0x16384000 }, + {_MMIO (0x9888 ),0x18381555 }, + {_MMIO (0x9888 ),0x02384000 }, + {_MMIO (0x9888 ),0x04384000 }, + {_MMIO (0x9888 ),0x06384000 }, + {_MMIO (0x9888 ),0x08384000 }, + {_MMIO (0x9888 ),0x0a384000 }, + {_MMIO (0x9888 ),0x0039a000 }, + {_MMIO (0x9888 ),0x06398000 }, + {_MMIO (0x9888 ),0x0839a000 }, + {_MMIO (0x9888 ),0x0a39a000 }, + {_MMIO (0x9888 ),0x0c39a000 }, + {_MMIO (0x9888 ),0x0e39a000 }, + {_MMIO (0x9888 ),0x0239a000 }, + {_MMIO (0x9888 ),0x0439a000 }, + {_MMIO (0x9888 ),0x018a8000 }, + {_MMIO (0x9888 ),0x0f8a8000 }, + {_MMIO (0x9888 ),0x198a8000 }, + {_MMIO (0x9888 ),0x1b8aaaa0 }, + {_MMIO (0x9888 ),0x1d8a0002 }, + {_MMIO (0x9888 ),0x038a8000 }, + {_MMIO (0x9888 ),0x058a8000 }, + {_MMIO (0x9888 ),0x078a8000 }, + {_MMIO (0x9888 ),0x098a8000 }, + {_MMIO (0x9888 ),0x0b8a8000 }, + {_MMIO (0x9888 ),0x238b2aa0 }, + {_MMIO (0x9888 ),0x258b5551 }, + {_MMIO (0x9888 ),0x278b0015 }, +}; + +static const struct i915_oa_reg mux_config_compute_extended_1_3_subslices_0x10[] = { + {_MMIO (0x9888 ),0x10dc00e0 }, + {_MMIO (0x9888 ),0x14db0160 }, + {_MMIO (0x9888 ),0x16db2800 }, + {_MMIO (0x9888 ),0x18db0120 }, + {_MMIO (0x9888 ),0x0edc25c1 }, + {_MMIO (0x9888 ),0x00dc6100 }, + {_MMIO (0x9888 ),0x02dc204c }, + {_MMIO (0x9888 ),0x06dc8000 }, + {_MMIO (0x9888 ),0x08dcc000 }, + {_MMIO (0x9888 ),0x0adcc000 }, + {_MMIO (0x9888 ),0x0cdcc000 }, + {_MMIO (0x9888 ),0x04dcc000 }, + {_MMIO (0x9888 ),0x00db0011 }, + {_MMIO (0x9888 ),0x06db0900 }, + {_MMIO (0x9888 ),0x08db0a13 }, + {_MMIO (0x9888 ),0x0adb0b15 }, + {_MMIO (0x9888 ),0x0cdb2317 }, + {_MMIO (0x9888 ),0x04db21b7 }, + {_MMIO (0x9888 ),0x10db0000 }, + {_MMIO (0x9888 ),0x0edb0000 }, + {_MMIO (0x9888 ),0x1adb0000 }, + {_MMIO (0x9888 ),0x0c9fa800 }, + {_MMIO (0x9888 ),0x0e9faa2a }, + {_MMIO (0x9888 ),0x109f02aa }, + {_MMIO (0x9888 ),0x00b84000 }, + {_MMIO (0x9888 ),0x0eb84000 }, + {_MMIO (0x9888 ),0x16b84000 }, + {_MMIO (0x9888 ),0x18b81555 }, + {_MMIO (0x9888 ),0x02b84000 }, + {_MMIO (0x9888 ),0x04b84000 }, + {_MMIO (0x9888 ),0x06b84000 }, + {_MMIO (0x9888 ),0x08b84000 }, + {_MMIO (0x9888 ),0x0ab84000 }, + {_MMIO (0x9888 ),0x00b9a000 }, + {_MMIO (0x9888 ),0x06b98000 }, + {_MMIO (0x9888 ),0x08b9a000 }, + {_MMIO (0x9888 ),0x0ab9a000 }, + {_MMIO (0x9888 ),0x0cb9a000 }, + {_MMIO (0x9888 ),0x0eb9a000 }, + {_MMIO (0x9888 ),0x02b9a000 }, + {_MMIO (0x9888 ),0x04b9a000 }, + {_MMIO (0x9888 ),0x01888000 }, + {_MMIO (0x9888 ),0x0d88f800 }, + {_MMIO (0x9888 ),0x0f88000f }, + {_MMIO (0x9888 ),0x03888000 }, + {_MMIO (0x9888 ),0x05888000 }, + {_MMIO (0x9888 ),0x07888000 }, + {_MMIO (0x9888 ),0x09888000 }, + {_MMIO (0x9888 ),0x0b888000 }, + {_MMIO (0x9888 ),0x238b5540 }, + {_MMIO (0x9888 ),0x258baaa2 }, + {_MMIO (0x9888 ),0x278b002a }, + {_MMIO (0x9888 ),0x018c4000 }, + {_MMIO (0x9888 ),0x0f8c4000 }, + {_MMIO (0x9888 ),0x178c2000 }, + {_MMIO (0x9888 ),0x198c5500 }, + {_MMIO (0x9888 ),0x1b8c0015 }, + {_MMIO (0x9888 ),0x038c4000 }, + {_MMIO (0x9888 ),0x058c4000 }, + {_MMIO (0x9888 ),0x078c4000 }, + {_MMIO (0x9888 ),0x098c4000 }, + {_MMIO (0x9888 ),0x0b8c4000 }, + {_MMIO (0x9888 ),0x018da000 }, + {_MMIO (0x9888 ),0x078d8000 }, + {_MMIO (0x9888 ),0x098da000 }, + {_MMIO (0x9888 ),0x0b8da000 }, + {_MMIO (0x9888 ),0x0d8da000 }, + {_MMIO (0x9888 ),0x0f8da000 }, + {_MMIO (0x9888 ),0x038da000 }, + {_MMIO (0x9888 ),0x058da000 }, +}; + +static const struct i915_oa_reg mux_config_compute_extended_1_4_subslices_0x04[] = { + {_MMIO (0x9888 ),0x103800e0 }, + {_MMIO (0x9888 ),0x143a0160 }, + {_MMIO (0x9888 ),0x163a2800 }, + {_MMIO (0x9888 ),0x183a0120 }, + {_MMIO (0x9888 ),0x0c1fa800 }, + {_MMIO (0x9888 ),0x0e1faa2a }, + {_MMIO (0x9888 ),0x101f02aa }, + {_MMIO (0x9888 ),0x0e38a5c1 }, + {_MMIO (0x9888 ),0x0038a100 }, + {_MMIO (0x9888 ),0x0238204c }, + {_MMIO (0x9888 ),0x16388000 }, + {_MMIO (0x9888 ),0x183802aa }, + {_MMIO (0x9888 ),0x04380000 }, + {_MMIO (0x9888 ),0x06380000 }, + {_MMIO (0x9888 ),0x08388000 }, + {_MMIO (0x9888 ),0x0a388000 }, + {_MMIO (0x9888 ),0x0039a000 }, + {_MMIO (0x9888 ),0x06398000 }, + {_MMIO (0x9888 ),0x0839a000 }, + {_MMIO (0x9888 ),0x0a39a000 }, + {_MMIO (0x9888 ),0x0c39a000 }, + {_MMIO (0x9888 ),0x0e39a000 }, + {_MMIO (0x9888 ),0x0239a000 }, + {_MMIO (0x9888 ),0x0439a000 }, + {_MMIO (0x9888 ),0x003a0011 }, + {_MMIO (0x9888 ),0x063a0900 }, + {_MMIO (0x9888 ),0x083a0a13 }, + {_MMIO (0x9888 ),0x0a3a0b15 }, + {_MMIO (0x9888 ),0x0c3a2317 }, + {_MMIO (0x9888 ),0x043a21b7 }, + {_MMIO (0x9888 ),0x103a0000 }, + {_MMIO (0x9888 ),0x0e3a0000 }, + {_MMIO (0x9888 ),0x1a3a0000 }, + {_MMIO (0x9888 ),0x018a8000 }, + {_MMIO (0x9888 ),0x0f8a8000 }, + {_MMIO (0x9888 ),0x198a8000 }, + {_MMIO (0x9888 ),0x1b8aaaa0 }, + {_MMIO (0x9888 ),0x1d8a0002 }, + {_MMIO (0x9888 ),0x038a8000 }, + {_MMIO (0x9888 ),0x058a8000 }, + {_MMIO (0x9888 ),0x078a8000 }, + {_MMIO (0x9888 ),0x098a8000 }, + {_MMIO (0x9888 ),0x0b8a8000 }, + {_MMIO (0x9888 ),0x238b2aa0 }, + {_MMIO (0x9888 ),0x258b5551 }, + {_MMIO (0x9888 ),0x278b0015 }, +}; +static const struct i915_oa_reg mux_config_compute_extended_1_5_subslices_0x20[] = { + {_MMIO (0x9888 ),0x10b800e0 }, + {_MMIO (0x9888 ),0x14ba0160 }, + {_MMIO (0x9888 ),0x16ba2800 }, + {_MMIO (0x9888 ),0x18ba0120 }, + {_MMIO (0x9888 ),0x0c9fa800 }, + {_MMIO (0x9888 ),0x0e9faa2a }, + {_MMIO (0x9888 ),0x109f02aa }, + {_MMIO (0x9888 ),0x0eb8a5c1 }, + {_MMIO (0x9888 ),0x00b8a100 }, + {_MMIO (0x9888 ),0x02b8204c }, + {_MMIO (0x9888 ),0x16b88000 }, + {_MMIO (0x9888 ),0x18b802aa }, + {_MMIO (0x9888 ),0x04b80000 }, + {_MMIO (0x9888 ),0x06b80000 }, + {_MMIO (0x9888 ),0x08b88000 }, + {_MMIO (0x9888 ),0x0ab88000 }, + {_MMIO (0x9888 ),0x00b9a000 }, + {_MMIO (0x9888 ),0x06b98000 }, + {_MMIO (0x9888 ),0x08b9a000 }, + {_MMIO (0x9888 ),0x0ab9a000 }, + {_MMIO (0x9888 ),0x0cb9a000 }, + {_MMIO (0x9888 ),0x0eb9a000 }, + {_MMIO (0x9888 ),0x02b9a000 }, + {_MMIO (0x9888 ),0x04b9a000 }, + {_MMIO (0x9888 ),0x00ba0011 }, + {_MMIO (0x9888 ),0x06ba0900 }, + {_MMIO (0x9888 ),0x08ba0a13 }, + {_MMIO (0x9888 ),0x0aba0b15 }, + {_MMIO (0x9888 ),0x0cba2317 }, + {_MMIO (0x9888 ),0x04ba21b7 }, + {_MMIO (0x9888 ),0x10ba0000 }, + {_MMIO (0x9888 ),0x0eba0000 }, + {_MMIO (0x9888 ),0x1aba0000 }, + {_MMIO (0x9888 ),0x01888000 }, + {_MMIO (0x9888 ),0x0d88f800 }, + {_MMIO (0x9888 ),0x0f88000f }, + {_MMIO (0x9888 ),0x03888000 }, + {_MMIO (0x9888 ),0x05888000 }, + {_MMIO (0x9888 ),0x07888000 }, + {_MMIO (0x9888 ),0x09888000 }, + {_MMIO (0x9888 ),0x0b888000 }, + {_MMIO (0x9888 ),0x238b5540 }, + {_MMIO (0x9888 ),0x258baaa2 }, + {_MMIO (0x9888 ),0x278b002a }, + {_MMIO (0x9888 ),0x018c4000 }, + {_MMIO (0x9888 ),0x0f8c4000 }, + {_MMIO (0x9888 ),0x178c2000 }, + {_MMIO (0x9888 ),0x198c5500 }, + {_MMIO (0x9888 ),0x1b8c0015 }, + {_MMIO (0x9888 ),0x038c4000 }, + {_MMIO (0x9888 ),0x058c4000 }, + {_MMIO (0x9888 ),0x078c4000 }, + {_MMIO (0x9888 ),0x098c4000 }, + {_MMIO (0x9888 ),0x0b8c4000 }, + {_MMIO (0x9888 ),0x018da000 }, + {_MMIO (0x9888 ),0x078d8000 }, + {_MMIO (0x9888 ),0x098da000 }, + {_MMIO (0x9888 ),0x0b8da000 }, + {_MMIO (0x9888 ),0x0d8da000 }, + {_MMIO (0x9888 ),0x0f8da000 }, + {_MMIO (0x9888 ),0x038da000 }, + {_MMIO (0x9888 ),0x058da000 }, +}; + +static const struct i915_oa_reg mux_config_compute_extended[] = { + {_MMIO (0x9888 ),0x1f85aa80 }, + {_MMIO (0x9888 ),0x2185aaa2 }, + {_MMIO (0x9888 ),0x2385002a }, + {_MMIO (0x9888 ),0x01834000 }, + {_MMIO (0x9888 ),0x0f834000 }, + {_MMIO (0x9888 ),0x19835400 }, + {_MMIO (0x9888 ),0x1b830155 }, + {_MMIO (0x9888 ),0x03834000 }, + {_MMIO (0x9888 ),0x05834000 }, + {_MMIO (0x9888 ),0x07834000 }, + {_MMIO (0x9888 ),0x09834000 }, + {_MMIO (0x9888 ),0x0b834000 }, + {_MMIO (0x9888 ),0x0184c000 }, + {_MMIO (0x9888 ),0x07848000 }, + {_MMIO (0x9888 ),0x0984c000 }, + {_MMIO (0x9888 ),0x0b84c000 }, + {_MMIO (0x9888 ),0x0d84c000 }, + {_MMIO (0x9888 ),0x0f84c000 }, + {_MMIO (0x9888 ),0x0384c000 }, + {_MMIO (0x9888 ),0x0584c000 }, + {_MMIO (0x9888 ),0x1180c000 }, + {_MMIO (0x9888 ),0x17808000 }, + {_MMIO (0x9888 ),0x1980c000 }, + {_MMIO (0x9888 ),0x1b80c000 }, + {_MMIO (0x9888 ),0x1d80c000 }, + {_MMIO (0x9888 ),0x1f80c000 }, + {_MMIO (0x9888 ),0x1380c000 }, + {_MMIO (0x9888 ),0x1580c000 }, + {_MMIO (0xd24 ),0x00000000 }, + {_MMIO (0x9888 ),0x4d800000 }, + {_MMIO (0x9888 ),0x3d800000 }, + {_MMIO (0x9888 ),0x4f800000 }, + {_MMIO (0x9888 ),0x43800000 }, + {_MMIO (0x9888 ),0x51800000 }, + {_MMIO (0x9888 ),0x45800000 }, + {_MMIO (0x9888 ),0x53800000 }, + {_MMIO (0x9888 ),0x47800420 }, + {_MMIO (0x9888 ),0x21800000 }, + {_MMIO (0x9888 ),0x31800000 }, + {_MMIO (0x9888 ),0x3f800421 }, + {_MMIO (0x9888 ),0x41800000 }, +}; + +static const struct i915_oa_reg * +get_compute_extended_mux_config (struct drm_i915_private *dev_priv, +int *len) +{ +if (INTEL_INFO (dev_priv)->sseu.subslice_mask &0x01 ) { + *len =ARRAY_SIZE (mux_config_compute_extended_1_0_subslices_0x01); +return mux_config_compute_extended_1_0_subslices_0x01; + }else if (INTEL_INFO (dev_priv)->sseu.subslice_mask &0x08 ) { + *len =ARRAY_SIZE (mux_config_compute_extended_1_1_subslices_0x08); +return mux_config_compute_extended_1_1_subslices_0x08; + }else if (INTEL_INFO (dev_priv)->sseu.subslice_mask &0x02 ) { + *len =ARRAY_SIZE (mux_config_compute_extended_1_2_subslices_0x02); +return mux_config_compute_extended_1_2_subslices_0x02; + }else if (INTEL_INFO (dev_priv)->sseu.subslice_mask &0x10 ) { + *len =ARRAY_SIZE (mux_config_compute_extended_1_3_subslices_0x10); +return mux_config_compute_extended_1_3_subslices_0x10; + }else if (INTEL_INFO (dev_priv)->sseu.subslice_mask &0x04 ) { + *len =ARRAY_SIZE (mux_config_compute_extended_1_4_subslices_0x04); +return mux_config_compute_extended_1_4_subslices_0x04; + }else if (INTEL_INFO (dev_priv)->sseu.subslice_mask &0x20 ) { + *len =ARRAY_SIZE (mux_config_compute_extended_1_5_subslices_0x20); +return mux_config_compute_extended_1_5_subslices_0x20; + *len =ARRAY_SIZE (mux_config_compute_extended); +return mux_config_compute_extended; + } + + *len =0 ; +return NULL ; +} + +static const struct i915_oa_reg b_counter_config_compute_l3_cache[] = { + {_MMIO (0x2710 ),0x00000000 }, + {_MMIO (0x2714 ),0x30800000 }, + {_MMIO (0x2720 ),0x00000000 }, + {_MMIO (0x2724 ),0x30800000 }, + {_MMIO (0x2740 ),0x00000000 }, + {_MMIO (0x2770 ),0x0007fffa }, + {_MMIO (0x2774 ),0x0000fefe }, + {_MMIO (0x2778 ),0x0007fffa }, + {_MMIO (0x277c ),0x0000fefd }, + {_MMIO (0x2790 ),0x0007fffa }, + {_MMIO (0x2794 ),0x0000fbef }, + {_MMIO (0x2798 ),0x0007fffa }, + {_MMIO (0x279c ),0x0000fbdf }, +}; + +static const struct i915_oa_reg flex_eu_config_compute_l3_cache[] = { + {_MMIO (0xe458 ),0x00005004 }, + {_MMIO (0xe558 ),0x00000003 }, + {_MMIO (0xe658 ),0x00002001 }, + {_MMIO (0xe758 ),0x00101100 }, + {_MMIO (0xe45c ),0x00201200 }, + {_MMIO (0xe55c ),0x00301300 }, + {_MMIO (0xe65c ),0x00401400 }, +}; + +static const struct i915_oa_reg mux_config_compute_l3_cache[] = { + {_MMIO (0x9888 ),0x143f00b3 }, + {_MMIO (0x9888 ),0x14bf00b3 }, + {_MMIO (0x9888 ),0x138303c0 }, + {_MMIO (0x9888 ),0x3b800060 }, + {_MMIO (0x9888 ),0x3d800805 }, + {_MMIO (0x9888 ),0x003f0029 }, + {_MMIO (0x9888 ),0x063f1400 }, + {_MMIO (0x9888 ),0x083f1225 }, + {_MMIO (0x9888 ),0x0e3f1327 }, + {_MMIO (0x9888 ),0x103f0000 }, + {_MMIO (0x9888 ),0x005a4000 }, + {_MMIO (0x9888 ),0x065a8000 }, + {_MMIO (0x9888 ),0x085ac000 }, + {_MMIO (0x9888 ),0x0e5ac000 }, + {_MMIO (0x9888 ),0x001d4000 }, + {_MMIO (0x9888 ),0x061d8000 }, + {_MMIO (0x9888 ),0x081dc000 }, + {_MMIO (0x9888 ),0x0e1dc000 }, + {_MMIO (0x9888 ),0x0c1f0800 }, + {_MMIO (0x9888 ),0x0e1f2a00 }, + {_MMIO (0x9888 ),0x101f0280 }, + {_MMIO (0x9888 ),0x00391000 }, + {_MMIO (0x9888 ),0x06394000 }, + {_MMIO (0x9888 ),0x08395000 }, + {_MMIO (0x9888 ),0x0e395000 }, + {_MMIO (0x9888 ),0x0abf1429 }, + {_MMIO (0x9888 ),0x0cbf1225 }, + {_MMIO (0x9888 ),0x00bf1380 }, + {_MMIO (0x9888 ),0x02bf0026 }, + {_MMIO (0x9888 ),0x10bf0000 }, + {_MMIO (0x9888 ),0x0adac000 }, + {_MMIO (0x9888 ),0x0cdac000 }, + {_MMIO (0x9888 ),0x00da8000 }, + {_MMIO (0x9888 ),0x02da4000 }, + {_MMIO (0x9888 ),0x0a9dc000 }, + {_MMIO (0x9888 ),0x0c9dc000 }, + {_MMIO (0x9888 ),0x009d8000 }, + {_MMIO (0x9888 ),0x029d4000 }, + {_MMIO (0x9888 ),0x0e9f8000 }, + {_MMIO (0x9888 ),0x109f002a }, + {_MMIO (0x9888 ),0x0c9fa000 }, + {_MMIO (0x9888 ),0x0ab95000 }, + {_MMIO (0x9888 ),0x0cb95000 }, + {_MMIO (0x9888 ),0x00b94000 }, + {_MMIO (0x9888 ),0x02b91000 }, + {_MMIO (0x9888 ),0x0d88c000 }, + {_MMIO (0x9888 ),0x0f880003 }, + {_MMIO (0x9888 ),0x03888000 }, + {_MMIO (0x9888 ),0x05888000 }, + {_MMIO (0x9888 ),0x018a8000 }, + {_MMIO (0x9888 ),0x0f8a8000 }, + {_MMIO (0x9888 ),0x198a8000 }, + {_MMIO (0x9888 ),0x1b8a8020 }, + {_MMIO (0x9888 ),0x1d8a0002 }, + {_MMIO (0x9888 ),0x238b0520 }, + {_MMIO (0x9888 ),0x258ba950 }, + {_MMIO (0x9888 ),0x278b0016 }, + {_MMIO (0x9888 ),0x198c5400 }, + {_MMIO (0x9888 ),0x1b8c0001 }, + {_MMIO (0x9888 ),0x038c4000 }, + {_MMIO (0x9888 ),0x058c4000 }, + {_MMIO (0x9888 ),0x0b8da000 }, + {_MMIO (0x9888 ),0x0d8da000 }, + {_MMIO (0x9888 ),0x018d8000 }, + {_MMIO (0x9888 ),0x038d2000 }, + {_MMIO (0x9888 ),0x1f85aa80 }, + {_MMIO (0x9888 ),0x2185aaa0 }, + {_MMIO (0x9888 ),0x2385002a }, + {_MMIO (0x9888 ),0x03835180 }, + {_MMIO (0x9888 ),0x05834022 }, + {_MMIO (0x9888 ),0x11830000 }, + {_MMIO (0x9888 ),0x01834000 }, + {_MMIO (0x9888 ),0x0f834000 }, + {_MMIO (0x9888 ),0x19835400 }, + {_MMIO (0x9888 ),0x1b830155 }, + {_MMIO (0x9888 ),0x07830000 }, + {_MMIO (0x9888 ),0x09830000 }, + {_MMIO (0x9888 ),0x0184c000 }, + {_MMIO (0x9888 ),0x07848000 }, + {_MMIO (0x9888 ),0x0984c000 }, + {_MMIO (0x9888 ),0x0b84c000 }, + {_MMIO (0x9888 ),0x0d84c000 }, + {_MMIO (0x9888 ),0x0f84c000 }, + {_MMIO (0x9888 ),0x0384c000 }, + {_MMIO (0x9888 ),0x05844000 }, + {_MMIO (0x9888 ),0x1b80c137 }, + {_MMIO (0x9888 ),0x1d80c147 }, + {_MMIO (0x9888 ),0x21800000 }, + {_MMIO (0x9888 ),0x1180c000 }, + {_MMIO (0x9888 ),0x17808000 }, + {_MMIO (0x9888 ),0x1980c000 }, + {_MMIO (0x9888 ),0x1f80c000 }, + {_MMIO (0x9888 ),0x1380c000 }, + {_MMIO (0x9888 ),0x15804000 }, + {_MMIO (0xd24 ),0x00000000 }, + {_MMIO (0x9888 ),0x4d801000 }, + {_MMIO (0x9888 ),0x4f800111 }, + {_MMIO (0x9888 ),0x43800842 }, + {_MMIO (0x9888 ),0x51800000 }, + {_MMIO (0x9888 ),0x45800000 }, + {_MMIO (0x9888 ),0x53800000 }, + {_MMIO (0x9888 ),0x47800840 }, + {_MMIO (0x9888 ),0x31800000 }, + {_MMIO (0x9888 ),0x3f800800 }, + {_MMIO (0x9888 ),0x418014a2 }, +}; + +static const struct i915_oa_reg * +get_compute_l3_cache_mux_config (struct drm_i915_private *dev_priv, +int *len) +{ + *len =ARRAY_SIZE (mux_config_compute_l3_cache); +return mux_config_compute_l3_cache; +} + +static const struct i915_oa_reg b_counter_config_data_port_reads_coalescing[] = { + {_MMIO (0x2724 ),0xf0800000 }, + {_MMIO (0x2720 ),0x00000000 }, + {_MMIO (0x2714 ),0xf0800000 }, + {_MMIO (0x2710 ),0x00000000 }, + {_MMIO (0x274c ),0xba98ba98 }, + {_MMIO (0x2748 ),0xba98ba98 }, + {_MMIO (0x2744 ),0x00003377 }, + {_MMIO (0x2740 ),0x00000000 }, + {_MMIO (0x2770 ),0x0007fff2 }, + {_MMIO (0x2774 ),0x00007ff0 }, + {_MMIO (0x2778 ),0x0007ffe2 }, + {_MMIO (0x277c ),0x00007ff0 }, + {_MMIO (0x2780 ),0x0007ffc2 }, + {_MMIO (0x2784 ),0x00007ff0 }, + {_MMIO (0x2788 ),0x0007ff82 }, + {_MMIO (0x278c ),0x00007ff0 }, + {_MMIO (0x2790 ),0x0007fffa }, + {_MMIO (0x2794 ),0x0000bfef }, + {_MMIO (0x2798 ),0x0007fffa }, + {_MMIO (0x279c ),0x0000bfdf }, + {_MMIO (0x27a0 ),0x0007fffa }, + {_MMIO (0x27a4 ),0x0000bfbf }, + {_MMIO (0x27a8 ),0x0007fffa }, + {_MMIO (0x27ac ),0x0000bf7f }, +}; + +static const struct i915_oa_reg flex_eu_config_data_port_reads_coalescing[] = { + {_MMIO (0xe458 ),0x00005004 }, + {_MMIO (0xe558 ),0x00000003 }, + {_MMIO (0xe658 ),0x00002001 }, + {_MMIO (0xe758 ),0x00778008 }, + {_MMIO (0xe45c ),0x00088078 }, + {_MMIO (0xe55c ),0x00808708 }, + {_MMIO (0xe65c ),0x00a08908 }, +}; + +static const struct i915_oa_reg mux_config_data_port_reads_coalescing_1_0_subslices_0x01[] = { + {_MMIO (0x9888 ),0x103d0005 }, + {_MMIO (0x9888 ),0x163d240b }, + {_MMIO (0x9888 ),0x1058022f }, + {_MMIO (0x9888 ),0x185b5520 }, + {_MMIO (0x9888 ),0x198b0003 }, + {_MMIO (0x9888 ),0x005cc000 }, + {_MMIO (0x9888 ),0x065cc000 }, + {_MMIO (0x9888 ),0x085cc000 }, + {_MMIO (0x9888 ),0x0a5cc000 }, + {_MMIO (0x9888 ),0x0c5cc000 }, + {_MMIO (0x9888 ),0x0e5cc000 }, + {_MMIO (0x9888 ),0x025c4000 }, + {_MMIO (0x9888 ),0x045c8000 }, + {_MMIO (0x9888 ),0x003d0000 }, + {_MMIO (0x9888 ),0x063d00b0 }, + {_MMIO (0x9888 ),0x083d0182 }, + {_MMIO (0x9888 ),0x0a3d10a0 }, + {_MMIO (0x9888 ),0x0c3d11a2 }, + {_MMIO (0x9888 ),0x0e3d0000 }, + {_MMIO (0x9888 ),0x183d0000 }, + {_MMIO (0x9888 ),0x1a3d0000 }, + {_MMIO (0x9888 ),0x0e582242 }, + {_MMIO (0x9888 ),0x00586700 }, + {_MMIO (0x9888 ),0x0258004f }, + {_MMIO (0x9888 ),0x0658c000 }, + {_MMIO (0x9888 ),0x0858c000 }, + {_MMIO (0x9888 ),0x0a58c000 }, + {_MMIO (0x9888 ),0x0c58c000 }, + {_MMIO (0x9888 ),0x045b6300 }, + {_MMIO (0x9888 ),0x105b0000 }, + {_MMIO (0x9888 ),0x005b4000 }, + {_MMIO (0x9888 ),0x0e5b4000 }, + {_MMIO (0x9888 ),0x1a5b0155 }, + {_MMIO (0x9888 ),0x025b4000 }, + {_MMIO (0x9888 ),0x0a5b0000 }, + {_MMIO (0x9888 ),0x0c5b4000 }, + {_MMIO (0x9888 ),0x0c1fa800 }, + {_MMIO (0x9888 ),0x0e1faaa0 }, + {_MMIO (0x9888 ),0x101f02aa }, + {_MMIO (0x9888 ),0x00384000 }, + {_MMIO (0x9888 ),0x0e384000 }, + {_MMIO (0x9888 ),0x16384000 }, + {_MMIO (0x9888 ),0x18381555 }, + {_MMIO (0x9888 ),0x02384000 }, + {_MMIO (0x9888 ),0x04384000 }, + {_MMIO (0x9888 ),0x0a384000 }, + {_MMIO (0x9888 ),0x0c384000 }, + {_MMIO (0x9888 ),0x0039a000 }, + {_MMIO (0x9888 ),0x0639a000 }, + {_MMIO (0x9888 ),0x0839a000 }, + {_MMIO (0x9888 ),0x0a39a000 }, + {_MMIO (0x9888 ),0x0c39a000 }, + {_MMIO (0x9888 ),0x0e39a000 }, + {_MMIO (0x9888 ),0x02392000 }, + {_MMIO (0x9888 ),0x04398000 }, + {_MMIO (0x9888 ),0x018a8000 }, + {_MMIO (0x9888 ),0x0f8a8000 }, + {_MMIO (0x9888 ),0x198a8000 }, + {_MMIO (0x9888 ),0x1b8aaaa0 }, + {_MMIO (0x9888 ),0x1d8a0002 }, + {_MMIO (0x9888 ),0x038a8000 }, + {_MMIO (0x9888 ),0x058a8000 }, + {_MMIO (0x9888 ),0x0b8a8000 }, + {_MMIO (0x9888 ),0x0d8a8000 }, + {_MMIO (0x9888 ),0x038b6300 }, + {_MMIO (0x9888 ),0x058b0062 }, + {_MMIO (0x9888 ),0x118b0000 }, + {_MMIO (0x9888 ),0x238b02a0 }, + {_MMIO (0x9888 ),0x258b5555 }, + {_MMIO (0x9888 ),0x278b0015 }, + {_MMIO (0x9888 ),0x1f85aa80 }, + {_MMIO (0x9888 ),0x2185aaaa }, + {_MMIO (0x9888 ),0x2385002a }, + {_MMIO (0x9888 ),0x01834000 }, + {_MMIO (0x9888 ),0x0f834000 }, + {_MMIO (0x9888 ),0x19835400 }, + {_MMIO (0x9888 ),0x1b830155 }, + {_MMIO (0x9888 ),0x03834000 }, + {_MMIO (0x9888 ),0x05834000 }, + {_MMIO (0x9888 ),0x07834000 }, + {_MMIO (0x9888 ),0x09834000 }, + {_MMIO (0x9888 ),0x0b834000 }, + {_MMIO (0x9888 ),0x0d834000 }, + {_MMIO (0x9888 ),0x0184c000 }, + {_MMIO (0x9888 ),0x0784c000 }, + {_MMIO (0x9888 ),0x0984c000 }, + {_MMIO (0x9888 ),0x0b84c000 }, + {_MMIO (0x9888 ),0x0d84c000 }, + {_MMIO (0x9888 ),0x0f84c000 }, + {_MMIO (0x9888 ),0x0384c000 }, + {_MMIO (0x9888 ),0x0584c000 }, + {_MMIO (0x9888 ),0x1180c000 }, + {_MMIO (0x9888 ),0x1780c000 }, + {_MMIO (0x9888 ),0x1980c000 }, + {_MMIO (0x9888 ),0x1b80c000 }, + {_MMIO (0x9888 ),0x1d80c000 }, + {_MMIO (0x9888 ),0x1f80c000 }, + {_MMIO (0x9888 ),0x1380c000 }, + {_MMIO (0x9888 ),0x1580c000 }, + {_MMIO (0xd24 ),0x00000000 }, + {_MMIO (0x9888 ),0x4d801000 }, + {_MMIO (0x9888 ),0x3d800000 }, + {_MMIO (0x9888 ),0x4f800001 }, + {_MMIO (0x9888 ),0x43800000 }, + {_MMIO (0x9888 ),0x51800000 }, + {_MMIO (0x9888 ),0x45800000 }, + {_MMIO (0x9888 ),0x53800000 }, + {_MMIO (0x9888 ),0x47800420 }, + {_MMIO (0x9888 ),0x21800000 }, + {_MMIO (0x9888 ),0x31800000 }, + {_MMIO (0x9888 ),0x3f800421 }, + {_MMIO (0x9888 ),0x41800041 }, +}; + +static const struct i915_oa_reg * +get_data_port_reads_coalescing_mux_config (struct drm_i915_private *dev_priv, +int *len) +{ +if (INTEL_INFO (dev_priv)->sseu.subslice_mask &0x01 ) { + *len =ARRAY_SIZE (mux_config_data_port_reads_coalescing_1_0_subslices_0x01); +return mux_config_data_port_reads_coalescing_1_0_subslices_0x01; + } + + *len =0 ; +return NULL ; +} + +static const struct i915_oa_reg b_counter_config_data_port_writes_coalescing[] = { + {_MMIO (0x2724 ),0xf0800000 }, + {_MMIO (0x2720 ),0x00000000 }, + {_MMIO (0x2714 ),0xf0800000 }, + {_MMIO (0x2710 ),0x00000000 }, + {_MMIO (0x274c ),0xba98ba98 }, + {_MMIO (0x2748 ),0xba98ba98 }, + {_MMIO (0x2744 ),0x00003377 }, + {_MMIO (0x2740 ),0x00000000 }, + {_MMIO (0x2770 ),0x0007ff72 }, + {_MMIO (0x2774 ),0x0000bfd0 }, + {_MMIO (0x2778 ),0x0007ff62 }, + {_MMIO (0x277c ),0x0000bfd0 }, + {_MMIO (0x2780 ),0x0007ff42 }, + {_MMIO (0x2784 ),0x0000bfd0 }, + {_MMIO (0x2788 ),0x0007ff02 }, + {_MMIO (0x278c ),0x0000bfd0 }, + {_MMIO (0x2790 ),0x0005fff2 }, + {_MMIO (0x2794 ),0x0000bfd0 }, + {_MMIO (0x2798 ),0x0005ffe2 }, + {_MMIO (0x279c ),0x0000bfd0 }, + {_MMIO (0x27a0 ),0x0005ffc2 }, + {_MMIO (0x27a4 ),0x0000bfd0 }, + {_MMIO (0x27a8 ),0x0005ff82 }, + {_MMIO (0x27ac ),0x0000bfd0 }, +}; + +static const struct i915_oa_reg flex_eu_config_data_port_writes_coalescing[] = { + {_MMIO (0xe458 ),0x00005004 }, + {_MMIO (0xe558 ),0x00000003 }, + {_MMIO (0xe658 ),0x00002001 }, + {_MMIO (0xe758 ),0x00778008 }, + {_MMIO (0xe45c ),0x00088078 }, + {_MMIO (0xe55c ),0x00808708 }, + {_MMIO (0xe65c ),0x00a08908 }, +}; + +static const struct i915_oa_reg mux_config_data_port_writes_coalescing_1_0_subslices_0x01[] = { + {_MMIO (0x9888 ),0x103d0005 }, + {_MMIO (0x9888 ),0x143d0120 }, + {_MMIO (0x9888 ),0x163d2400 }, + {_MMIO (0x9888 ),0x1058022f }, + {_MMIO (0x9888 ),0x105b0000 }, + {_MMIO (0x9888 ),0x198b0003 }, + {_MMIO (0x9888 ),0x005cc000 }, + {_MMIO (0x9888 ),0x065cc000 }, + {_MMIO (0x9888 ),0x085cc000 }, + {_MMIO (0x9888 ),0x0a5cc000 }, + {_MMIO (0x9888 ),0x0e5cc000 }, + {_MMIO (0x9888 ),0x025c4000 }, + {_MMIO (0x9888 ),0x045c8000 }, + {_MMIO (0x9888 ),0x003d0000 }, + {_MMIO (0x9888 ),0x063d0094 }, + {_MMIO (0x9888 ),0x083d0182 }, + {_MMIO (0x9888 ),0x0a3d1814 }, + {_MMIO (0x9888 ),0x0e3d0000 }, + {_MMIO (0x9888 ),0x183d0000 }, + {_MMIO (0x9888 ),0x1a3d0000 }, + {_MMIO (0x9888 ),0x0c3d0000 }, + {_MMIO (0x9888 ),0x0e582242 }, + {_MMIO (0x9888 ),0x00586700 }, + {_MMIO (0x9888 ),0x0258004f }, + {_MMIO (0x9888 ),0x0658c000 }, + {_MMIO (0x9888 ),0x0858c000 }, + {_MMIO (0x9888 ),0x0a58c000 }, + {_MMIO (0x9888 ),0x045b6a80 }, + {_MMIO (0x9888 ),0x005b4000 }, + {_MMIO (0x9888 ),0x0e5b4000 }, + {_MMIO (0x9888 ),0x185b5400 }, + {_MMIO (0x9888 ),0x1a5b0141 }, + {_MMIO (0x9888 ),0x025b4000 }, + {_MMIO (0x9888 ),0x0a5b0000 }, + {_MMIO (0x9888 ),0x0c5b4000 }, + {_MMIO (0x9888 ),0x0c1fa800 }, + {_MMIO (0x9888 ),0x0e1faaa0 }, + {_MMIO (0x9888 ),0x101f0282 }, + {_MMIO (0x9888 ),0x00384000 }, + {_MMIO (0x9888 ),0x0e384000 }, + {_MMIO (0x9888 ),0x16384000 }, + {_MMIO (0x9888 ),0x18381415 }, + {_MMIO (0x9888 ),0x02384000 }, + {_MMIO (0x9888 ),0x04384000 }, + {_MMIO (0x9888 ),0x0a384000 }, + {_MMIO (0x9888 ),0x0c384000 }, + {_MMIO (0x9888 ),0x0039a000 }, + {_MMIO (0x9888 ),0x0639a000 }, + {_MMIO (0x9888 ),0x0839a000 }, + {_MMIO (0x9888 ),0x0a39a000 }, + {_MMIO (0x9888 ),0x0e39a000 }, + {_MMIO (0x9888 ),0x02392000 }, + {_MMIO (0x9888 ),0x04398000 }, + {_MMIO (0x9888 ),0x018a8000 }, + {_MMIO (0x9888 ),0x0f8a8000 }, + {_MMIO (0x9888 ),0x198a8000 }, + {_MMIO (0x9888 ),0x1b8a82a0 }, + {_MMIO (0x9888 ),0x1d8a0002 }, + {_MMIO (0x9888 ),0x038a8000 }, + {_MMIO (0x9888 ),0x058a8000 }, + {_MMIO (0x9888 ),0x0b8a8000 }, + {_MMIO (0x9888 ),0x0d8a8000 }, + {_MMIO (0x9888 ),0x038b6300 }, + {_MMIO (0x9888 ),0x058b0062 }, + {_MMIO (0x9888 ),0x118b0000 }, + {_MMIO (0x9888 ),0x238b02a0 }, + {_MMIO (0x9888 ),0x258b1555 }, + {_MMIO (0x9888 ),0x278b0014 }, + {_MMIO (0x9888 ),0x1f85aa80 }, + {_MMIO (0x9888 ),0x21852aaa }, + {_MMIO (0x9888 ),0x23850028 }, + {_MMIO (0x9888 ),0x01834000 }, + {_MMIO (0x9888 ),0x0f834000 }, + {_MMIO (0x9888 ),0x19835400 }, + {_MMIO (0x9888 ),0x1b830141 }, + {_MMIO (0x9888 ),0x03834000 }, + {_MMIO (0x9888 ),0x05834000 }, + {_MMIO (0x9888 ),0x07834000 }, + {_MMIO (0x9888 ),0x09834000 }, + {_MMIO (0x9888 ),0x0b834000 }, + {_MMIO (0x9888 ),0x0d834000 }, + {_MMIO (0x9888 ),0x0184c000 }, + {_MMIO (0x9888 ),0x0784c000 }, + {_MMIO (0x9888 ),0x0984c000 }, + {_MMIO (0x9888 ),0x0b84c000 }, + {_MMIO (0x9888 ),0x0f84c000 }, + {_MMIO (0x9888 ),0x0384c000 }, + {_MMIO (0x9888 ),0x0584c000 }, + {_MMIO (0x9888 ),0x1180c000 }, + {_MMIO (0x9888 ),0x1780c000 }, + {_MMIO (0x9888 ),0x1980c000 }, + {_MMIO (0x9888 ),0x1b80c000 }, + {_MMIO (0x9888 ),0x1f80c000 }, + {_MMIO (0x9888 ),0x1380c000 }, + {_MMIO (0x9888 ),0x1580c000 }, + {_MMIO (0xd24 ),0x00000000 }, + {_MMIO (0x9888 ),0x4d801000 }, + {_MMIO (0x9888 ),0x3d800000 }, + {_MMIO (0x9888 ),0x4f800001 }, + {_MMIO (0x9888 ),0x43800000 }, + {_MMIO (0x9888 ),0x51800000 }, + {_MMIO (0x9888 ),0x45800000 }, + {_MMIO (0x9888 ),0x21800000 }, + {_MMIO (0x9888 ),0x31800000 }, + {_MMIO (0x9888 ),0x53800000 }, + {_MMIO (0x9888 ),0x47800420 }, + {_MMIO (0x9888 ),0x3f800421 }, + {_MMIO (0x9888 ),0x41800041 }, +}; + +static const struct i915_oa_reg * +get_data_port_writes_coalescing_mux_config (struct drm_i915_private *dev_priv, +int *len) +{ +if (INTEL_INFO (dev_priv)->sseu.subslice_mask &0x01 ) { + *len =ARRAY_SIZE (mux_config_data_port_writes_coalescing_1_0_subslices_0x01); +return mux_config_data_port_writes_coalescing_1_0_subslices_0x01; + } + + *len =0 ; +return NULL ; +} + +static const struct i915_oa_reg b_counter_config_hdc_and_sf[] = { + {_MMIO (0x2740 ),0x00000000 }, + {_MMIO (0x2744 ),0x00800000 }, + {_MMIO (0x2710 ),0x00000000 }, + {_MMIO (0x2714 ),0x10800000 }, + {_MMIO (0x2720 ),0x00000000 }, + {_MMIO (0x2724 ),0x00800000 }, + {_MMIO (0x2770 ),0x00000002 }, + {_MMIO (0x2774 ),0x0000fff7 }, +}; + +static const struct i915_oa_reg flex_eu_config_hdc_and_sf[] = { + {_MMIO (0xe458 ),0x00005004 }, + {_MMIO (0xe558 ),0x00010003 }, + {_MMIO (0xe658 ),0x00012011 }, + {_MMIO (0xe758 ),0x00015014 }, + {_MMIO (0xe45c ),0x00051050 }, + {_MMIO (0xe55c ),0x00053052 }, + {_MMIO (0xe65c ),0x00055054 }, +}; + +static const struct i915_oa_reg mux_config_hdc_and_sf[] = { + {_MMIO (0x9888 ),0x105c0232 }, + {_MMIO (0x9888 ),0x10580232 }, + {_MMIO (0x9888 ),0x10380232 }, + {_MMIO (0x9888 ),0x10dc0232 }, + {_MMIO (0x9888 ),0x10d80232 }, + {_MMIO (0x9888 ),0x10b80232 }, + {_MMIO (0x9888 ),0x118e4400 }, + {_MMIO (0x9888 ),0x025c6080 }, + {_MMIO (0x9888 ),0x045c004b }, + {_MMIO (0x9888 ),0x005c8000 }, + {_MMIO (0x9888 ),0x00582080 }, + {_MMIO (0x9888 ),0x0258004b }, + {_MMIO (0x9888 ),0x025b4000 }, + {_MMIO (0x9888 ),0x045b4000 }, + {_MMIO (0x9888 ),0x0c1fa000 }, + {_MMIO (0x9888 ),0x0e1f00aa }, + {_MMIO (0x9888 ),0x04386080 }, + {_MMIO (0x9888 ),0x0638404b }, + {_MMIO (0x9888 ),0x02384000 }, + {_MMIO (0x9888 ),0x08384000 }, + {_MMIO (0x9888 ),0x0a380000 }, + {_MMIO (0x9888 ),0x0c380000 }, + {_MMIO (0x9888 ),0x00398000 }, + {_MMIO (0x9888 ),0x0239a000 }, + {_MMIO (0x9888 ),0x0439a000 }, + {_MMIO (0x9888 ),0x06392000 }, + {_MMIO (0x9888 ),0x0cdc25c1 }, + {_MMIO (0x9888 ),0x0adcc000 }, + {_MMIO (0x9888 ),0x0ad825c1 }, + {_MMIO (0x9888 ),0x18db4000 }, + {_MMIO (0x9888 ),0x1adb0001 }, + {_MMIO (0x9888 ),0x0e9f8000 }, + {_MMIO (0x9888 ),0x109f02aa }, + {_MMIO (0x9888 ),0x0eb825c1 }, + {_MMIO (0x9888 ),0x18b80154 }, + {_MMIO (0x9888 ),0x0ab9a000 }, + {_MMIO (0x9888 ),0x0cb9a000 }, + {_MMIO (0x9888 ),0x0eb9a000 }, + {_MMIO (0x9888 ),0x0d88c000 }, + {_MMIO (0x9888 ),0x0f88000f }, + {_MMIO (0x9888 ),0x038a8000 }, + {_MMIO (0x9888 ),0x058a8000 }, + {_MMIO (0x9888 ),0x078a8000 }, + {_MMIO (0x9888 ),0x098a8000 }, + {_MMIO (0x9888 ),0x0b8a8000 }, + {_MMIO (0x9888 ),0x0d8a8000 }, + {_MMIO (0x9888 ),0x258baa05 }, + {_MMIO (0x9888 ),0x278b002a }, + {_MMIO (0x9888 ),0x238b2a80 }, + {_MMIO (0x9888 ),0x198c5400 }, + {_MMIO (0x9888 ),0x1b8c0015 }, + {_MMIO (0x9888 ),0x098dc000 }, + {_MMIO (0x9888 ),0x0b8da000 }, + {_MMIO (0x9888 ),0x0d8da000 }, + {_MMIO (0x9888 ),0x0f8da000 }, + {_MMIO (0x9888 ),0x098e05c0 }, + {_MMIO (0x9888 ),0x058e0000 }, + {_MMIO (0x9888 ),0x198f0020 }, + {_MMIO (0x9888 ),0x2185aa0a }, + {_MMIO (0x9888 ),0x2385002a }, + {_MMIO (0x9888 ),0x1f85aa00 }, + {_MMIO (0x9888 ),0x19835000 }, + {_MMIO (0x9888 ),0x1b830155 }, + {_MMIO (0x9888 ),0x03834000 }, + {_MMIO (0x9888 ),0x05834000 }, + {_MMIO (0x9888 ),0x07834000 }, + {_MMIO (0x9888 ),0x09834000 }, + {_MMIO (0x9888 ),0x0b834000 }, + {_MMIO (0x9888 ),0x0d834000 }, + {_MMIO (0x9888 ),0x09848000 }, + {_MMIO (0x9888 ),0x0b84c000 }, + {_MMIO (0x9888 ),0x0d84c000 }, + {_MMIO (0x9888 ),0x0f84c000 }, + {_MMIO (0x9888 ),0x01848000 }, + {_MMIO (0x9888 ),0x0384c000 }, + {_MMIO (0x9888 ),0x0584c000 }, + {_MMIO (0x9888 ),0x07844000 }, + {_MMIO (0x9888 ),0x19808000 }, + {_MMIO (0x9888 ),0x1b80c000 }, + {_MMIO (0x9888 ),0x1d80c000 }, + {_MMIO (0x9888 ),0x1f80c000 }, + {_MMIO (0x9888 ),0x11808000 }, + {_MMIO (0x9888 ),0x1380c000 }, + {_MMIO (0x9888 ),0x1580c000 }, + {_MMIO (0x9888 ),0x17804000 }, + {_MMIO (0x9888 ),0x51800040 }, + {_MMIO (0x9888 ),0x43800400 }, + {_MMIO (0x9888 ),0x45800800 }, + {_MMIO (0x9888 ),0x53800000 }, + {_MMIO (0x9888 ),0x47800c62 }, + {_MMIO (0x9888 ),0x21800000 }, + {_MMIO (0x9888 ),0x31800000 }, + {_MMIO (0x9888 ),0x4d800000 }, + {_MMIO (0x9888 ),0x3f801042 }, + {_MMIO (0x9888 ),0x4f800000 }, + {_MMIO (0x9888 ),0x418014a4 }, +}; + +static const struct i915_oa_reg * +get_hdc_and_sf_mux_config (struct drm_i915_private *dev_priv, +int *len) +{ + *len =ARRAY_SIZE (mux_config_hdc_and_sf); +return mux_config_hdc_and_sf; +} + +static const struct i915_oa_reg b_counter_config_l3_1[] = { + {_MMIO (0x2740 ),0x00000000 }, + {_MMIO (0x2744 ),0x00800000 }, + {_MMIO (0x2710 ),0x00000000 }, + {_MMIO (0x2714 ),0xf0800000 }, + {_MMIO (0x2720 ),0x00000000 }, + {_MMIO (0x2724 ),0xf0800000 }, + {_MMIO (0x2770 ),0x00100070 }, + {_MMIO (0x2774 ),0x0000fff1 }, + {_MMIO (0x2778 ),0x00014002 }, + {_MMIO (0x277c ),0x0000c3ff }, + {_MMIO (0x2780 ),0x00010002 }, + {_MMIO (0x2784 ),0x0000c7ff }, + {_MMIO (0x2788 ),0x00004002 }, + {_MMIO (0x278c ),0x0000d3ff }, + {_MMIO (0x2790 ),0x00100700 }, + {_MMIO (0x2794 ),0x0000ff1f }, + {_MMIO (0x2798 ),0x00001402 }, + {_MMIO (0x279c ),0x0000fc3f }, + {_MMIO (0x27a0 ),0x00001002 }, + {_MMIO (0x27a4 ),0x0000fc7f }, + {_MMIO (0x27a8 ),0x00000402 }, + {_MMIO (0x27ac ),0x0000fd3f }, +}; + +static const struct i915_oa_reg flex_eu_config_l3_1[] = { + {_MMIO (0xe458 ),0x00005004 }, + {_MMIO (0xe558 ),0x00010003 }, + {_MMIO (0xe658 ),0x00012011 }, + {_MMIO (0xe758 ),0x00015014 }, + {_MMIO (0xe45c ),0x00051050 }, + {_MMIO (0xe55c ),0x00053052 }, + {_MMIO (0xe65c ),0x00055054 }, +}; + +static const struct i915_oa_reg mux_config_l3_1[] = { + {_MMIO (0x9888 ),0x10bf03da }, + {_MMIO (0x9888 ),0x14bf0001 }, + {_MMIO (0x9888 ),0x12980340 }, + {_MMIO (0x9888 ),0x12990340 }, + {_MMIO (0x9888 ),0x0cbf1187 }, + {_MMIO (0x9888 ),0x0ebf1205 }, + {_MMIO (0x9888 ),0x00bf0500 }, + {_MMIO (0x9888 ),0x02bf042b }, + {_MMIO (0x9888 ),0x04bf002c }, + {_MMIO (0x9888 ),0x0cdac000 }, + {_MMIO (0x9888 ),0x0edac000 }, + {_MMIO (0x9888 ),0x00da8000 }, + {_MMIO (0x9888 ),0x02dac000 }, + {_MMIO (0x9888 ),0x04da4000 }, + {_MMIO (0x9888 ),0x04983400 }, + {_MMIO (0x9888 ),0x10980000 }, + {_MMIO (0x9888 ),0x06990034 }, + {_MMIO (0x9888 ),0x10990000 }, + {_MMIO (0x9888 ),0x0c9dc000 }, + {_MMIO (0x9888 ),0x0e9dc000 }, + {_MMIO (0x9888 ),0x009d8000 }, + {_MMIO (0x9888 ),0x029dc000 }, + {_MMIO (0x9888 ),0x049d4000 }, + {_MMIO (0x9888 ),0x109f02a8 }, + {_MMIO (0x9888 ),0x0c9fa000 }, + {_MMIO (0x9888 ),0x0e9f00ba }, + {_MMIO (0x9888 ),0x0cb88000 }, + {_MMIO (0x9888 ),0x0cb95000 }, + {_MMIO (0x9888 ),0x0eb95000 }, + {_MMIO (0x9888 ),0x00b94000 }, + {_MMIO (0x9888 ),0x02b95000 }, + {_MMIO (0x9888 ),0x04b91000 }, + {_MMIO (0x9888 ),0x06b92000 }, + {_MMIO (0x9888 ),0x0cba4000 }, + {_MMIO (0x9888 ),0x0f88000f }, + {_MMIO (0x9888 ),0x03888000 }, + {_MMIO (0x9888 ),0x05888000 }, + {_MMIO (0x9888 ),0x07888000 }, + {_MMIO (0x9888 ),0x09888000 }, + {_MMIO (0x9888 ),0x0b888000 }, + {_MMIO (0x9888 ),0x0d880400 }, + {_MMIO (0x9888 ),0x258b800a }, + {_MMIO (0x9888 ),0x278b002a }, + {_MMIO (0x9888 ),0x238b5500 }, + {_MMIO (0x9888 ),0x198c4000 }, + {_MMIO (0x9888 ),0x1b8c0015 }, + {_MMIO (0x9888 ),0x038c4000 }, + {_MMIO (0x9888 ),0x058c4000 }, + {_MMIO (0x9888 ),0x078c4000 }, + {_MMIO (0x9888 ),0x098c4000 }, + {_MMIO (0x9888 ),0x0b8c4000 }, + {_MMIO (0x9888 ),0x0d8c4000 }, + {_MMIO (0x9888 ),0x0d8da000 }, + {_MMIO (0x9888 ),0x0f8da000 }, + {_MMIO (0x9888 ),0x018d8000 }, + {_MMIO (0x9888 ),0x038da000 }, + {_MMIO (0x9888 ),0x058da000 }, + {_MMIO (0x9888 ),0x078d2000 }, + {_MMIO (0x9888 ),0x2185800a }, + {_MMIO (0x9888 ),0x2385002a }, + {_MMIO (0x9888 ),0x1f85aa00 }, + {_MMIO (0x9888 ),0x1b830154 }, + {_MMIO (0x9888 ),0x03834000 }, + {_MMIO (0x9888 ),0x05834000 }, + {_MMIO (0x9888 ),0x07834000 }, + {_MMIO (0x9888 ),0x09834000 }, + {_MMIO (0x9888 ),0x0b834000 }, + {_MMIO (0x9888 ),0x0d834000 }, + {_MMIO (0x9888 ),0x0d84c000 }, + {_MMIO (0x9888 ),0x0f84c000 }, + {_MMIO (0x9888 ),0x01848000 }, + {_MMIO (0x9888 ),0x0384c000 }, + {_MMIO (0x9888 ),0x0584c000 }, + {_MMIO (0x9888 ),0x07844000 }, + {_MMIO (0x9888 ),0x1d80c000 }, + {_MMIO (0x9888 ),0x1f80c000 }, + {_MMIO (0x9888 ),0x11808000 }, + {_MMIO (0x9888 ),0x1380c000 }, + {_MMIO (0x9888 ),0x1580c000 }, + {_MMIO (0x9888 ),0x17804000 }, + {_MMIO (0x9888 ),0x53800000 }, + {_MMIO (0x9888 ),0x45800000 }, + {_MMIO (0x9888 ),0x47800000 }, + {_MMIO (0x9888 ),0x21800000 }, + {_MMIO (0x9888 ),0x31800000 }, + {_MMIO (0x9888 ),0x4d800000 }, + {_MMIO (0x9888 ),0x3f800000 }, + {_MMIO (0x9888 ),0x4f800000 }, + {_MMIO (0x9888 ),0x41800060 }, +}; + +static const struct i915_oa_reg * +get_l3_1_mux_config (struct drm_i915_private *dev_priv, +int *len) +{ + *len =ARRAY_SIZE (mux_config_l3_1); +return mux_config_l3_1; +} + +static const struct i915_oa_reg b_counter_config_l3_2[] = { + {_MMIO (0x2740 ),0x00000000 }, + {_MMIO (0x2744 ),0x00800000 }, + {_MMIO (0x2710 ),0x00000000 }, + {_MMIO (0x2714 ),0xf0800000 }, + {_MMIO (0x2720 ),0x00000000 }, + {_MMIO (0x2724 ),0xf0800000 }, + {_MMIO (0x2770 ),0x00100070 }, + {_MMIO (0x2774 ),0x0000fff1 }, + {_MMIO (0x2778 ),0x00014002 }, + {_MMIO (0x277c ),0x0000c3ff }, + {_MMIO (0x2780 ),0x00010002 }, + {_MMIO (0x2784 ),0x0000c7ff }, + {_MMIO (0x2788 ),0x00004002 }, + {_MMIO (0x278c ),0x0000d3ff }, + {_MMIO (0x2790 ),0x00100700 }, + {_MMIO (0x2794 ),0x0000ff1f }, + {_MMIO (0x2798 ),0x00001402 }, + {_MMIO (0x279c ),0x0000fc3f }, + {_MMIO (0x27a0 ),0x00001002 }, + {_MMIO (0x27a4 ),0x0000fc7f }, + {_MMIO (0x27a8 ),0x00000402 }, + {_MMIO (0x27ac ),0x0000fd3f }, +}; + +static const struct i915_oa_reg flex_eu_config_l3_2[] = { + {_MMIO (0xe458 ),0x00005004 }, + {_MMIO (0xe558 ),0x00010003 }, + {_MMIO (0xe658 ),0x00012011 }, + {_MMIO (0xe758 ),0x00015014 }, + {_MMIO (0xe45c ),0x00051050 }, + {_MMIO (0xe55c ),0x00053052 }, + {_MMIO (0xe65c ),0x00055054 }, +}; + +static const struct i915_oa_reg mux_config_l3_2[] = { + {_MMIO (0x9888 ),0x103f03da }, + {_MMIO (0x9888 ),0x143f0001 }, + {_MMIO (0x9888 ),0x12180340 }, + {_MMIO (0x9888 ),0x12190340 }, + {_MMIO (0x9888 ),0x0c3f1187 }, + {_MMIO (0x9888 ),0x0e3f1205 }, + {_MMIO (0x9888 ),0x003f0500 }, + {_MMIO (0x9888 ),0x023f042b }, + {_MMIO (0x9888 ),0x043f002c }, + {_MMIO (0x9888 ),0x0c5ac000 }, + {_MMIO (0x9888 ),0x0e5ac000 }, + {_MMIO (0x9888 ),0x005a8000 }, + {_MMIO (0x9888 ),0x025ac000 }, + {_MMIO (0x9888 ),0x045a4000 }, + {_MMIO (0x9888 ),0x04183400 }, + {_MMIO (0x9888 ),0x10180000 }, + {_MMIO (0x9888 ),0x06190034 }, + {_MMIO (0x9888 ),0x10190000 }, + {_MMIO (0x9888 ),0x0c1dc000 }, + {_MMIO (0x9888 ),0x0e1dc000 }, + {_MMIO (0x9888 ),0x001d8000 }, + {_MMIO (0x9888 ),0x021dc000 }, + {_MMIO (0x9888 ),0x041d4000 }, + {_MMIO (0x9888 ),0x101f02a8 }, + {_MMIO (0x9888 ),0x0c1fa000 }, + {_MMIO (0x9888 ),0x0e1f00ba }, + {_MMIO (0x9888 ),0x0c388000 }, + {_MMIO (0x9888 ),0x0c395000 }, + {_MMIO (0x9888 ),0x0e395000 }, + {_MMIO (0x9888 ),0x00394000 }, + {_MMIO (0x9888 ),0x02395000 }, + {_MMIO (0x9888 ),0x04391000 }, + {_MMIO (0x9888 ),0x06392000 }, + {_MMIO (0x9888 ),0x0c3a4000 }, + {_MMIO (0x9888 ),0x1b8aa800 }, + {_MMIO (0x9888 ),0x1d8a0002 }, + {_MMIO (0x9888 ),0x038a8000 }, + {_MMIO (0x9888 ),0x058a8000 }, + {_MMIO (0x9888 ),0x078a8000 }, + {_MMIO (0x9888 ),0x098a8000 }, + {_MMIO (0x9888 ),0x0b8a8000 }, + {_MMIO (0x9888 ),0x0d8a8000 }, + {_MMIO (0x9888 ),0x258b4005 }, + {_MMIO (0x9888 ),0x278b0015 }, + {_MMIO (0x9888 ),0x238b2a80 }, + {_MMIO (0x9888 ),0x2185800a }, + {_MMIO (0x9888 ),0x2385002a }, + {_MMIO (0x9888 ),0x1f85aa00 }, + {_MMIO (0x9888 ),0x1b830154 }, + {_MMIO (0x9888 ),0x03834000 }, + {_MMIO (0x9888 ),0x05834000 }, + {_MMIO (0x9888 ),0x07834000 }, + {_MMIO (0x9888 ),0x09834000 }, + {_MMIO (0x9888 ),0x0b834000 }, + {_MMIO (0x9888 ),0x0d834000 }, + {_MMIO (0x9888 ),0x0d84c000 }, + {_MMIO (0x9888 ),0x0f84c000 }, + {_MMIO (0x9888 ),0x01848000 }, + {_MMIO (0x9888 ),0x0384c000 }, + {_MMIO (0x9888 ),0x0584c000 }, + {_MMIO (0x9888 ),0x07844000 }, + {_MMIO (0x9888 ),0x1d80c000 }, + {_MMIO (0x9888 ),0x1f80c000 }, + {_MMIO (0x9888 ),0x11808000 }, + {_MMIO (0x9888 ),0x1380c000 }, + {_MMIO (0x9888 ),0x1580c000 }, + {_MMIO (0x9888 ),0x17804000 }, + {_MMIO (0x9888 ),0x53800000 }, + {_MMIO (0x9888 ),0x45800000 }, + {_MMIO (0x9888 ),0x47800000 }, + {_MMIO (0x9888 ),0x21800000 }, + {_MMIO (0x9888 ),0x31800000 }, + {_MMIO (0x9888 ),0x4d800000 }, + {_MMIO (0x9888 ),0x3f800000 }, + {_MMIO (0x9888 ),0x4f800000 }, + {_MMIO (0x9888 ),0x41800060 }, +}; + +static const struct i915_oa_reg * +get_l3_2_mux_config (struct drm_i915_private *dev_priv, +int *len) +{ + *len =ARRAY_SIZE (mux_config_l3_2); +return mux_config_l3_2; +} + +static const struct i915_oa_reg b_counter_config_l3_3[] = { + {_MMIO (0x2740 ),0x00000000 }, + {_MMIO (0x2744 ),0x00800000 }, + {_MMIO (0x2710 ),0x00000000 }, + {_MMIO (0x2714 ),0xf0800000 }, + {_MMIO (0x2720 ),0x00000000 }, + {_MMIO (0x2724 ),0xf0800000 }, + {_MMIO (0x2770 ),0x00100070 }, + {_MMIO (0x2774 ),0x0000fff1 }, + {_MMIO (0x2778 ),0x00014002 }, + {_MMIO (0x277c ),0x0000c3ff }, + {_MMIO (0x2780 ),0x00010002 }, + {_MMIO (0x2784 ),0x0000c7ff }, + {_MMIO (0x2788 ),0x00004002 }, + {_MMIO (0x278c ),0x0000d3ff }, + {_MMIO (0x2790 ),0x00100700 }, + {_MMIO (0x2794 ),0x0000ff1f }, + {_MMIO (0x2798 ),0x00001402 }, + {_MMIO (0x279c ),0x0000fc3f }, + {_MMIO (0x27a0 ),0x00001002 }, + {_MMIO (0x27a4 ),0x0000fc7f }, + {_MMIO (0x27a8 ),0x00000402 }, + {_MMIO (0x27ac ),0x0000fd3f }, +}; + +static const struct i915_oa_reg flex_eu_config_l3_3[] = { + {_MMIO (0xe458 ),0x00005004 }, + {_MMIO (0xe558 ),0x00010003 }, + {_MMIO (0xe658 ),0x00012011 }, + {_MMIO (0xe758 ),0x00015014 }, + {_MMIO (0xe45c ),0x00051050 }, + {_MMIO (0xe55c ),0x00053052 }, + {_MMIO (0xe65c ),0x00055054 }, +}; + +static const struct i915_oa_reg mux_config_l3_3[] = { + {_MMIO (0x9888 ),0x121b0340 }, + {_MMIO (0x9888 ),0x103f0274 }, + {_MMIO (0x9888 ),0x123f0000 }, + {_MMIO (0x9888 ),0x129b0340 }, + {_MMIO (0x9888 ),0x10bf0274 }, + {_MMIO (0x9888 ),0x12bf0000 }, + {_MMIO (0x9888 ),0x041b3400 }, + {_MMIO (0x9888 ),0x101b0000 }, + {_MMIO (0x9888 ),0x045c8000 }, + {_MMIO (0x9888 ),0x0a3d4000 }, + {_MMIO (0x9888 ),0x003f0080 }, + {_MMIO (0x9888 ),0x023f0793 }, + {_MMIO (0x9888 ),0x043f0014 }, + {_MMIO (0x9888 ),0x04588000 }, + {_MMIO (0x9888 ),0x005a8000 }, + {_MMIO (0x9888 ),0x025ac000 }, + {_MMIO (0x9888 ),0x045a4000 }, + {_MMIO (0x9888 ),0x0a5b4000 }, + {_MMIO (0x9888 ),0x001d8000 }, + {_MMIO (0x9888 ),0x021dc000 }, + {_MMIO (0x9888 ),0x041d4000 }, + {_MMIO (0x9888 ),0x0c1fa000 }, + {_MMIO (0x9888 ),0x0e1f002a }, + {_MMIO (0x9888 ),0x0a384000 }, + {_MMIO (0x9888 ),0x00394000 }, + {_MMIO (0x9888 ),0x02395000 }, + {_MMIO (0x9888 ),0x04399000 }, + {_MMIO (0x9888 ),0x069b0034 }, + {_MMIO (0x9888 ),0x109b0000 }, + {_MMIO (0x9888 ),0x06dc4000 }, + {_MMIO (0x9888 ),0x0cbd4000 }, + {_MMIO (0x9888 ),0x0cbf0981 }, + {_MMIO (0x9888 ),0x0ebf0a0f }, + {_MMIO (0x9888 ),0x06d84000 }, + {_MMIO (0x9888 ),0x0cdac000 }, + {_MMIO (0x9888 ),0x0edac000 }, + {_MMIO (0x9888 ),0x0cdb4000 }, + {_MMIO (0x9888 ),0x0c9dc000 }, + {_MMIO (0x9888 ),0x0e9dc000 }, + {_MMIO (0x9888 ),0x109f02a8 }, + {_MMIO (0x9888 ),0x0e9f0080 }, + {_MMIO (0x9888 ),0x0cb84000 }, + {_MMIO (0x9888 ),0x0cb95000 }, + {_MMIO (0x9888 ),0x0eb95000 }, + {_MMIO (0x9888 ),0x06b92000 }, + {_MMIO (0x9888 ),0x0f88000f }, + {_MMIO (0x9888 ),0x0d880400 }, + {_MMIO (0x9888 ),0x038a8000 }, + {_MMIO (0x9888 ),0x058a8000 }, + {_MMIO (0x9888 ),0x078a8000 }, + {_MMIO (0x9888 ),0x098a8000 }, + {_MMIO (0x9888 ),0x0b8a8000 }, + {_MMIO (0x9888 ),0x258b8009 }, + {_MMIO (0x9888 ),0x278b002a }, + {_MMIO (0x9888 ),0x238b2a80 }, + {_MMIO (0x9888 ),0x198c4000 }, + {_MMIO (0x9888 ),0x1b8c0015 }, + {_MMIO (0x9888 ),0x0d8c4000 }, + {_MMIO (0x9888 ),0x0d8da000 }, + {_MMIO (0x9888 ),0x0f8da000 }, + {_MMIO (0x9888 ),0x078d2000 }, + {_MMIO (0x9888 ),0x2185800a }, + {_MMIO (0x9888 ),0x2385002a }, + {_MMIO (0x9888 ),0x1f85aa00 }, + {_MMIO (0x9888 ),0x1b830154 }, + {_MMIO (0x9888 ),0x03834000 }, + {_MMIO (0x9888 ),0x05834000 }, + {_MMIO (0x9888 ),0x07834000 }, + {_MMIO (0x9888 ),0x09834000 }, + {_MMIO (0x9888 ),0x0b834000 }, + {_MMIO (0x9888 ),0x0d834000 }, + {_MMIO (0x9888 ),0x0d84c000 }, + {_MMIO (0x9888 ),0x0f84c000 }, + {_MMIO (0x9888 ),0x01848000 }, + {_MMIO (0x9888 ),0x0384c000 }, + {_MMIO (0x9888 ),0x0584c000 }, + {_MMIO (0x9888 ),0x07844000 }, + {_MMIO (0x9888 ),0x1d80c000 }, + {_MMIO (0x9888 ),0x1f80c000 }, + {_MMIO (0x9888 ),0x11808000 }, + {_MMIO (0x9888 ),0x1380c000 }, + {_MMIO (0x9888 ),0x1580c000 }, + {_MMIO (0x9888 ),0x17804000 }, + {_MMIO (0x9888 ),0x53800000 }, + {_MMIO (0x9888 ),0x45800c00 }, + {_MMIO (0x9888 ),0x47800c63 }, + {_MMIO (0x9888 ),0x21800000 }, + {_MMIO (0x9888 ),0x31800000 }, + {_MMIO (0x9888 ),0x4d800000 }, + {_MMIO (0x9888 ),0x3f8014a5 }, + {_MMIO (0x9888 ),0x4f800000 }, + {_MMIO (0x9888 ),0x41800045 }, +}; + +static const struct i915_oa_reg * +get_l3_3_mux_config (struct drm_i915_private *dev_priv, +int *len) +{ + *len =ARRAY_SIZE (mux_config_l3_3); +return mux_config_l3_3; +} + +static const struct i915_oa_reg b_counter_config_l3_4[] = { + {_MMIO (0x2740 ),0x00000000 }, + {_MMIO (0x2744 ),0x00800000 }, + {_MMIO (0x2710 ),0x00000000 }, + {_MMIO (0x2714 ),0xf0800000 }, + {_MMIO (0x2720 ),0x00000000 }, + {_MMIO (0x2724 ),0xf0800000 }, + {_MMIO (0x2770 ),0x00100070 }, + {_MMIO (0x2774 ),0x0000fff1 }, + {_MMIO (0x2778 ),0x00014002 }, + {_MMIO (0x277c ),0x0000c3ff }, + {_MMIO (0x2780 ),0x00010002 }, + {_MMIO (0x2784 ),0x0000c7ff }, + {_MMIO (0x2788 ),0x00004002 }, + {_MMIO (0x278c ),0x0000d3ff }, + {_MMIO (0x2790 ),0x00100700 }, + {_MMIO (0x2794 ),0x0000ff1f }, + {_MMIO (0x2798 ),0x00001402 }, + {_MMIO (0x279c ),0x0000fc3f }, + {_MMIO (0x27a0 ),0x00001002 }, + {_MMIO (0x27a4 ),0x0000fc7f }, + {_MMIO (0x27a8 ),0x00000402 }, + {_MMIO (0x27ac ),0x0000fd3f }, +}; + +static const struct i915_oa_reg flex_eu_config_l3_4[] = { + {_MMIO (0xe458 ),0x00005004 }, + {_MMIO (0xe558 ),0x00010003 }, + {_MMIO (0xe658 ),0x00012011 }, + {_MMIO (0xe758 ),0x00015014 }, + {_MMIO (0xe45c ),0x00051050 }, + {_MMIO (0xe55c ),0x00053052 }, + {_MMIO (0xe65c ),0x00055054 }, +}; + +static const struct i915_oa_reg mux_config_l3_4[] = { + {_MMIO (0x9888 ),0x121a0340 }, + {_MMIO (0x9888 ),0x103f0017 }, + {_MMIO (0x9888 ),0x123f0020 }, + {_MMIO (0x9888 ),0x129a0340 }, + {_MMIO (0x9888 ),0x10bf0017 }, + {_MMIO (0x9888 ),0x12bf0020 }, + {_MMIO (0x9888 ),0x041a3400 }, + {_MMIO (0x9888 ),0x101a0000 }, + {_MMIO (0x9888 ),0x043b8000 }, + {_MMIO (0x9888 ),0x0a3e0010 }, + {_MMIO (0x9888 ),0x003f0200 }, + {_MMIO (0x9888 ),0x023f0113 }, + {_MMIO (0x9888 ),0x043f0014 }, + {_MMIO (0x9888 ),0x02592000 }, + {_MMIO (0x9888 ),0x005a8000 }, + {_MMIO (0x9888 ),0x025ac000 }, + {_MMIO (0x9888 ),0x045a4000 }, + {_MMIO (0x9888 ),0x0a1c8000 }, + {_MMIO (0x9888 ),0x001d8000 }, + {_MMIO (0x9888 ),0x021dc000 }, + {_MMIO (0x9888 ),0x041d4000 }, + {_MMIO (0x9888 ),0x0a1e8000 }, + {_MMIO (0x9888 ),0x0c1fa000 }, + {_MMIO (0x9888 ),0x0e1f001a }, + {_MMIO (0x9888 ),0x00394000 }, + {_MMIO (0x9888 ),0x02395000 }, + {_MMIO (0x9888 ),0x04391000 }, + {_MMIO (0x9888 ),0x069a0034 }, + {_MMIO (0x9888 ),0x109a0000 }, + {_MMIO (0x9888 ),0x06bb4000 }, + {_MMIO (0x9888 ),0x0abe0040 }, + {_MMIO (0x9888 ),0x0cbf0984 }, + {_MMIO (0x9888 ),0x0ebf0a02 }, + {_MMIO (0x9888 ),0x02d94000 }, + {_MMIO (0x9888 ),0x0cdac000 }, + {_MMIO (0x9888 ),0x0edac000 }, + {_MMIO (0x9888 ),0x0c9c0400 }, + {_MMIO (0x9888 ),0x0c9dc000 }, + {_MMIO (0x9888 ),0x0e9dc000 }, + {_MMIO (0x9888 ),0x0c9e0400 }, + {_MMIO (0x9888 ),0x109f02a8 }, + {_MMIO (0x9888 ),0x0e9f0040 }, + {_MMIO (0x9888 ),0x0cb95000 }, + {_MMIO (0x9888 ),0x0eb95000 }, + {_MMIO (0x9888 ),0x0f88000f }, + {_MMIO (0x9888 ),0x0d880400 }, + {_MMIO (0x9888 ),0x038a8000 }, + {_MMIO (0x9888 ),0x058a8000 }, + {_MMIO (0x9888 ),0x078a8000 }, + {_MMIO (0x9888 ),0x098a8000 }, + {_MMIO (0x9888 ),0x0b8a8000 }, + {_MMIO (0x9888 ),0x258b8009 }, + {_MMIO (0x9888 ),0x278b002a }, + {_MMIO (0x9888 ),0x238b2a80 }, + {_MMIO (0x9888 ),0x198c4000 }, + {_MMIO (0x9888 ),0x1b8c0015 }, + {_MMIO (0x9888 ),0x0d8c4000 }, + {_MMIO (0x9888 ),0x0d8da000 }, + {_MMIO (0x9888 ),0x0f8da000 }, + {_MMIO (0x9888 ),0x078d2000 }, + {_MMIO (0x9888 ),0x2185800a }, + {_MMIO (0x9888 ),0x2385002a }, + {_MMIO (0x9888 ),0x1f85aa00 }, + {_MMIO (0x9888 ),0x1b830154 }, + {_MMIO (0x9888 ),0x03834000 }, + {_MMIO (0x9888 ),0x05834000 }, + {_MMIO (0x9888 ),0x07834000 }, + {_MMIO (0x9888 ),0x09834000 }, + {_MMIO (0x9888 ),0x0b834000 }, + {_MMIO (0x9888 ),0x0d834000 }, + {_MMIO (0x9888 ),0x0d84c000 }, + {_MMIO (0x9888 ),0x0f84c000 }, + {_MMIO (0x9888 ),0x01848000 }, + {_MMIO (0x9888 ),0x0384c000 }, + {_MMIO (0x9888 ),0x0584c000 }, + {_MMIO (0x9888 ),0x07844000 }, + {_MMIO (0x9888 ),0x1d80c000 }, + {_MMIO (0x9888 ),0x1f80c000 }, + {_MMIO (0x9888 ),0x11808000 }, + {_MMIO (0x9888 ),0x1380c000 }, + {_MMIO (0x9888 ),0x1580c000 }, + {_MMIO (0x9888 ),0x17804000 }, + {_MMIO (0x9888 ),0x53800000 }, + {_MMIO (0x9888 ),0x45800800 }, + {_MMIO (0x9888 ),0x47800842 }, + {_MMIO (0x9888 ),0x21800000 }, + {_MMIO (0x9888 ),0x31800000 }, + {_MMIO (0x9888 ),0x4d800000 }, + {_MMIO (0x9888 ),0x3f801084 }, + {_MMIO (0x9888 ),0x4f800000 }, + {_MMIO (0x9888 ),0x41800044 }, +}; + +static const struct i915_oa_reg * +get_l3_4_mux_config (struct drm_i915_private *dev_priv, +int *len) +{ + *len =ARRAY_SIZE (mux_config_l3_4); +return mux_config_l3_4; +} + +static const struct i915_oa_reg b_counter_config_rasterizer_and_pixel_backend[] = { + {_MMIO (0x2740 ),0x00000000 }, + {_MMIO (0x2744 ),0x00800000 }, + {_MMIO (0x2710 ),0x00000000 }, + {_MMIO (0x2714 ),0xf0800000 }, + {_MMIO (0x2720 ),0x00000000 }, + {_MMIO (0x2724 ),0x30800000 }, + {_MMIO (0x2770 ),0x00006000 }, + {_MMIO (0x2774 ),0x0000f3ff }, + {_MMIO (0x2778 ),0x00001800 }, + {_MMIO (0x277c ),0x0000fcff }, + {_MMIO (0x2780 ),0x00000600 }, + {_MMIO (0x2784 ),0x0000ff3f }, + {_MMIO (0x2788 ),0x00000180 }, + {_MMIO (0x278c ),0x0000ffcf }, + {_MMIO (0x2790 ),0x00000060 }, + {_MMIO (0x2794 ),0x0000fff3 }, + {_MMIO (0x2798 ),0x00000018 }, + {_MMIO (0x279c ),0x0000fffc }, +}; + +static const struct i915_oa_reg flex_eu_config_rasterizer_and_pixel_backend[] = { + {_MMIO (0xe458 ),0x00005004 }, + {_MMIO (0xe558 ),0x00010003 }, + {_MMIO (0xe658 ),0x00012011 }, + {_MMIO (0xe758 ),0x00015014 }, + {_MMIO (0xe45c ),0x00051050 }, + {_MMIO (0xe55c ),0x00053052 }, + {_MMIO (0xe65c ),0x00055054 }, +}; + +static const struct i915_oa_reg mux_config_rasterizer_and_pixel_backend[] = { + {_MMIO (0x9888 ),0x143b000e }, + {_MMIO (0x9888 ),0x043c55c0 }, + {_MMIO (0x9888 ),0x0a1e0280 }, + {_MMIO (0x9888 ),0x0c1e0408 }, + {_MMIO (0x9888 ),0x10390000 }, + {_MMIO (0x9888 ),0x12397a1f }, + {_MMIO (0x9888 ),0x14bb000e }, + {_MMIO (0x9888 ),0x04bc5000 }, + {_MMIO (0x9888 ),0x0a9e0296 }, + {_MMIO (0x9888 ),0x0c9e0008 }, + {_MMIO (0x9888 ),0x10b90000 }, + {_MMIO (0x9888 ),0x12b97a1f }, + {_MMIO (0x9888 ),0x063b0042 }, + {_MMIO (0x9888 ),0x103b0000 }, + {_MMIO (0x9888 ),0x083c0000 }, + {_MMIO (0x9888 ),0x0a3e0040 }, + {_MMIO (0x9888 ),0x043f8000 }, + {_MMIO (0x9888 ),0x02594000 }, + {_MMIO (0x9888 ),0x045a8000 }, + {_MMIO (0x9888 ),0x0c1c0400 }, + {_MMIO (0x9888 ),0x041d8000 }, + {_MMIO (0x9888 ),0x081e02c0 }, + {_MMIO (0x9888 ),0x0e1e0000 }, + {_MMIO (0x9888 ),0x0c1fa800 }, + {_MMIO (0x9888 ),0x0e1f0260 }, + {_MMIO (0x9888 ),0x101f0014 }, + {_MMIO (0x9888 ),0x003905e0 }, + {_MMIO (0x9888 ),0x06390bc0 }, + {_MMIO (0x9888 ),0x02390018 }, + {_MMIO (0x9888 ),0x04394000 }, + {_MMIO (0x9888 ),0x04bb0042 }, + {_MMIO (0x9888 ),0x10bb0000 }, + {_MMIO (0x9888 ),0x02bc05c0 }, + {_MMIO (0x9888 ),0x08bc0000 }, + {_MMIO (0x9888 ),0x0abe0004 }, + {_MMIO (0x9888 ),0x02bf8000 }, + {_MMIO (0x9888 ),0x02d91000 }, + {_MMIO (0x9888 ),0x02da8000 }, + {_MMIO (0x9888 ),0x089c8000 }, + {_MMIO (0x9888 ),0x029d8000 }, + {_MMIO (0x9888 ),0x089e8000 }, + {_MMIO (0x9888 ),0x0e9e0000 }, + {_MMIO (0x9888 ),0x0e9fa806 }, + {_MMIO (0x9888 ),0x109f0142 }, + {_MMIO (0x9888 ),0x08b90617 }, + {_MMIO (0x9888 ),0x0ab90be0 }, + {_MMIO (0x9888 ),0x02b94000 }, + {_MMIO (0x9888 ),0x0d88f000 }, + {_MMIO (0x9888 ),0x0f88000c }, + {_MMIO (0x9888 ),0x07888000 }, + {_MMIO (0x9888 ),0x09888000 }, + {_MMIO (0x9888 ),0x018a8000 }, + {_MMIO (0x9888 ),0x0f8a8000 }, + {_MMIO (0x9888 ),0x1b8a2800 }, + {_MMIO (0x9888 ),0x038a8000 }, + {_MMIO (0x9888 ),0x058a8000 }, + {_MMIO (0x9888 ),0x0b8a8000 }, + {_MMIO (0x9888 ),0x0d8a8000 }, + {_MMIO (0x9888 ),0x238b52a0 }, + {_MMIO (0x9888 ),0x258b6a95 }, + {_MMIO (0x9888 ),0x278b0029 }, + {_MMIO (0x9888 ),0x178c2000 }, + {_MMIO (0x9888 ),0x198c1500 }, + {_MMIO (0x9888 ),0x1b8c0014 }, + {_MMIO (0x9888 ),0x078c4000 }, + {_MMIO (0x9888 ),0x098c4000 }, + {_MMIO (0x9888 ),0x098da000 }, + {_MMIO (0x9888 ),0x0b8da000 }, + {_MMIO (0x9888 ),0x0f8da000 }, + {_MMIO (0x9888 ),0x038d8000 }, + {_MMIO (0x9888 ),0x058d2000 }, + {_MMIO (0x9888 ),0x1f85aa80 }, + {_MMIO (0x9888 ),0x2185aaaa }, + {_MMIO (0x9888 ),0x2385002a }, + {_MMIO (0x9888 ),0x01834000 }, + {_MMIO (0x9888 ),0x0f834000 }, + {_MMIO (0x9888 ),0x19835400 }, + {_MMIO (0x9888 ),0x1b830155 }, + {_MMIO (0x9888 ),0x03834000 }, + {_MMIO (0x9888 ),0x05834000 }, + {_MMIO (0x9888 ),0x07834000 }, + {_MMIO (0x9888 ),0x09834000 }, + {_MMIO (0x9888 ),0x0b834000 }, + {_MMIO (0x9888 ),0x0d834000 }, + {_MMIO (0x9888 ),0x0184c000 }, + {_MMIO (0x9888 ),0x0784c000 }, + {_MMIO (0x9888 ),0x0984c000 }, + {_MMIO (0x9888 ),0x0b84c000 }, + {_MMIO (0x9888 ),0x0d84c000 }, + {_MMIO (0x9888 ),0x0f84c000 }, + {_MMIO (0x9888 ),0x0384c000 }, + {_MMIO (0x9888 ),0x0584c000 }, + {_MMIO (0x9888 ),0x1180c000 }, + {_MMIO (0x9888 ),0x1780c000 }, + {_MMIO (0x9888 ),0x1980c000 }, + {_MMIO (0x9888 ),0x1b80c000 }, + {_MMIO (0x9888 ),0x1d80c000 }, + {_MMIO (0x9888 ),0x1f80c000 }, + {_MMIO (0x9888 ),0x1380c000 }, + {_MMIO (0x9888 ),0x1580c000 }, + {_MMIO (0x9888 ),0x4d800444 }, + {_MMIO (0x9888 ),0x3d800000 }, + {_MMIO (0x9888 ),0x4f804000 }, + {_MMIO (0x9888 ),0x43801080 }, + {_MMIO (0x9888 ),0x51800000 }, + {_MMIO (0x9888 ),0x45800084 }, + {_MMIO (0x9888 ),0x53800044 }, + {_MMIO (0x9888 ),0x47801080 }, + {_MMIO (0x9888 ),0x21800000 }, + {_MMIO (0x9888 ),0x31800000 }, + {_MMIO (0x9888 ),0x3f800000 }, + {_MMIO (0x9888 ),0x41800840 }, +}; + +static const struct i915_oa_reg * +get_rasterizer_and_pixel_backend_mux_config (struct drm_i915_private *dev_priv, +int *len) +{ + *len =ARRAY_SIZE (mux_config_rasterizer_and_pixel_backend); +return mux_config_rasterizer_and_pixel_backend; +} + +static const struct i915_oa_reg b_counter_config_sampler_1[] = { + {_MMIO (0x2740 ),0x00000000 }, + {_MMIO (0x2744 ),0x00800000 }, + {_MMIO (0x2710 ),0x00000000 }, + {_MMIO (0x2714 ),0x70800000 }, + {_MMIO (0x2720 ),0x00000000 }, + {_MMIO (0x2724 ),0x00800000 }, + {_MMIO (0x2770 ),0x0000c000 }, + {_MMIO (0x2774 ),0x0000e7ff }, + {_MMIO (0x2778 ),0x00003000 }, + {_MMIO (0x277c ),0x0000f9ff }, + {_MMIO (0x2780 ),0x00000c00 }, + {_MMIO (0x2784 ),0x0000fe7f }, +}; + +static const struct i915_oa_reg flex_eu_config_sampler_1[] = { + {_MMIO (0xe458 ),0x00005004 }, + {_MMIO (0xe558 ),0x00010003 }, + {_MMIO (0xe658 ),0x00012011 }, + {_MMIO (0xe758 ),0x00015014 }, + {_MMIO (0xe45c ),0x00051050 }, + {_MMIO (0xe55c ),0x00053052 }, + {_MMIO (0xe65c ),0x00055054 }, +}; + +static const struct i915_oa_reg mux_config_sampler_1[] = { + {_MMIO (0x9888 ),0x18921400 }, + {_MMIO (0x9888 ),0x149500ab }, + {_MMIO (0x9888 ),0x18b21400 }, + {_MMIO (0x9888 ),0x14b500ab }, + {_MMIO (0x9888 ),0x18d21400 }, + {_MMIO (0x9888 ),0x14d500ab }, + {_MMIO (0x9888 ),0x0cdc8000 }, + {_MMIO (0x9888 ),0x0edc4000 }, + {_MMIO (0x9888 ),0x02dcc000 }, + {_MMIO (0x9888 ),0x04dcc000 }, + {_MMIO (0x9888 ),0x1abd00a0 }, + {_MMIO (0x9888 ),0x0abd8000 }, + {_MMIO (0x9888 ),0x0cd88000 }, + {_MMIO (0x9888 ),0x0ed84000 }, + {_MMIO (0x9888 ),0x04d88000 }, + {_MMIO (0x9888 ),0x1adb0050 }, + {_MMIO (0x9888 ),0x04db8000 }, + {_MMIO (0x9888 ),0x06db8000 }, + {_MMIO (0x9888 ),0x08db8000 }, + {_MMIO (0x9888 ),0x0adb4000 }, + {_MMIO (0x9888 ),0x109f02a0 }, + {_MMIO (0x9888 ),0x0c9fa000 }, + {_MMIO (0x9888 ),0x0e9f00aa }, + {_MMIO (0x9888 ),0x18b82500 }, + {_MMIO (0x9888 ),0x02b88000 }, + {_MMIO (0x9888 ),0x04b84000 }, + {_MMIO (0x9888 ),0x06b84000 }, + {_MMIO (0x9888 ),0x08b84000 }, + {_MMIO (0x9888 ),0x0ab84000 }, + {_MMIO (0x9888 ),0x0cb88000 }, + {_MMIO (0x9888 ),0x0cb98000 }, + {_MMIO (0x9888 ),0x0eb9a000 }, + {_MMIO (0x9888 ),0x00b98000 }, + {_MMIO (0x9888 ),0x02b9a000 }, + {_MMIO (0x9888 ),0x04b9a000 }, + {_MMIO (0x9888 ),0x06b92000 }, + {_MMIO (0x9888 ),0x1aba0200 }, + {_MMIO (0x9888 ),0x02ba8000 }, + {_MMIO (0x9888 ),0x0cba8000 }, + {_MMIO (0x9888 ),0x04908000 }, + {_MMIO (0x9888 ),0x04918000 }, + {_MMIO (0x9888 ),0x04927300 }, + {_MMIO (0x9888 ),0x10920000 }, + {_MMIO (0x9888 ),0x1893000a }, + {_MMIO (0x9888 ),0x0a934000 }, + {_MMIO (0x9888 ),0x0a946000 }, + {_MMIO (0x9888 ),0x0c959000 }, + {_MMIO (0x9888 ),0x0e950098 }, + {_MMIO (0x9888 ),0x10950000 }, + {_MMIO (0x9888 ),0x04b04000 }, + {_MMIO (0x9888 ),0x04b14000 }, + {_MMIO (0x9888 ),0x04b20073 }, + {_MMIO (0x9888 ),0x10b20000 }, + {_MMIO (0x9888 ),0x04b38000 }, + {_MMIO (0x9888 ),0x06b38000 }, + {_MMIO (0x9888 ),0x08b34000 }, + {_MMIO (0x9888 ),0x04b4c000 }, + {_MMIO (0x9888 ),0x02b59890 }, + {_MMIO (0x9888 ),0x10b50000 }, + {_MMIO (0x9888 ),0x06d04000 }, + {_MMIO (0x9888 ),0x06d14000 }, + {_MMIO (0x9888 ),0x06d20073 }, + {_MMIO (0x9888 ),0x10d20000 }, + {_MMIO (0x9888 ),0x18d30020 }, + {_MMIO (0x9888 ),0x02d38000 }, + {_MMIO (0x9888 ),0x0cd34000 }, + {_MMIO (0x9888 ),0x0ad48000 }, + {_MMIO (0x9888 ),0x04d42000 }, + {_MMIO (0x9888 ),0x0ed59000 }, + {_MMIO (0x9888 ),0x00d59800 }, + {_MMIO (0x9888 ),0x10d50000 }, + {_MMIO (0x9888 ),0x0f88000e }, + {_MMIO (0x9888 ),0x03888000 }, + {_MMIO (0x9888 ),0x05888000 }, + {_MMIO (0x9888 ),0x07888000 }, + {_MMIO (0x9888 ),0x09888000 }, + {_MMIO (0x9888 ),0x0b888000 }, + {_MMIO (0x9888 ),0x0d880400 }, + {_MMIO (0x9888 ),0x278b002a }, + {_MMIO (0x9888 ),0x238b5500 }, + {_MMIO (0x9888 ),0x258b000a }, + {_MMIO (0x9888 ),0x1b8c0015 }, + {_MMIO (0x9888 ),0x038c4000 }, + {_MMIO (0x9888 ),0x058c4000 }, + {_MMIO (0x9888 ),0x078c4000 }, + {_MMIO (0x9888 ),0x098c4000 }, + {_MMIO (0x9888 ),0x0b8c4000 }, + {_MMIO (0x9888 ),0x0d8c4000 }, + {_MMIO (0x9888 ),0x0d8d8000 }, + {_MMIO (0x9888 ),0x0f8da000 }, + {_MMIO (0x9888 ),0x018d8000 }, + {_MMIO (0x9888 ),0x038da000 }, + {_MMIO (0x9888 ),0x058da000 }, + {_MMIO (0x9888 ),0x078d2000 }, + {_MMIO (0x9888 ),0x2385002a }, + {_MMIO (0x9888 ),0x1f85aa00 }, + {_MMIO (0x9888 ),0x2185000a }, + {_MMIO (0x9888 ),0x1b830150 }, + {_MMIO (0x9888 ),0x03834000 }, + {_MMIO (0x9888 ),0x05834000 }, + {_MMIO (0x9888 ),0x07834000 }, + {_MMIO (0x9888 ),0x09834000 }, + {_MMIO (0x9888 ),0x0b834000 }, + {_MMIO (0x9888 ),0x0d834000 }, + {_MMIO (0x9888 ),0x0d848000 }, + {_MMIO (0x9888 ),0x0f84c000 }, + {_MMIO (0x9888 ),0x01848000 }, + {_MMIO (0x9888 ),0x0384c000 }, + {_MMIO (0x9888 ),0x0584c000 }, + {_MMIO (0x9888 ),0x07844000 }, + {_MMIO (0x9888 ),0x1d808000 }, + {_MMIO (0x9888 ),0x1f80c000 }, + {_MMIO (0x9888 ),0x11808000 }, + {_MMIO (0x9888 ),0x1380c000 }, + {_MMIO (0x9888 ),0x1580c000 }, + {_MMIO (0x9888 ),0x17804000 }, + {_MMIO (0x9888 ),0x53800000 }, + {_MMIO (0x9888 ),0x47801021 }, + {_MMIO (0x9888 ),0x21800000 }, + {_MMIO (0x9888 ),0x31800000 }, + {_MMIO (0x9888 ),0x4d800000 }, + {_MMIO (0x9888 ),0x3f800c64 }, + {_MMIO (0x9888 ),0x4f800000 }, + {_MMIO (0x9888 ),0x41800c02 }, +}; + +static const struct i915_oa_reg * +get_sampler_1_mux_config (struct drm_i915_private *dev_priv, +int *len) +{ + *len =ARRAY_SIZE (mux_config_sampler_1); +return mux_config_sampler_1; +} + +static const struct i915_oa_reg b_counter_config_sampler_2[] = { + {_MMIO (0x2740 ),0x00000000 }, + {_MMIO (0x2744 ),0x00800000 }, + {_MMIO (0x2710 ),0x00000000 }, + {_MMIO (0x2714 ),0x70800000 }, + {_MMIO (0x2720 ),0x00000000 }, + {_MMIO (0x2724 ),0x00800000 }, + {_MMIO (0x2770 ),0x0000c000 }, + {_MMIO (0x2774 ),0x0000e7ff }, + {_MMIO (0x2778 ),0x00003000 }, + {_MMIO (0x277c ),0x0000f9ff }, + {_MMIO (0x2780 ),0x00000c00 }, + {_MMIO (0x2784 ),0x0000fe7f }, +}; + +static const struct i915_oa_reg flex_eu_config_sampler_2[] = { + {_MMIO (0xe458 ),0x00005004 }, + {_MMIO (0xe558 ),0x00010003 }, + {_MMIO (0xe658 ),0x00012011 }, + {_MMIO (0xe758 ),0x00015014 }, + {_MMIO (0xe45c ),0x00051050 }, + {_MMIO (0xe55c ),0x00053052 }, + {_MMIO (0xe65c ),0x00055054 }, +}; + +static const struct i915_oa_reg mux_config_sampler_2[] = { + {_MMIO (0x9888 ),0x18121400 }, + {_MMIO (0x9888 ),0x141500ab }, + {_MMIO (0x9888 ),0x18321400 }, + {_MMIO (0x9888 ),0x143500ab }, + {_MMIO (0x9888 ),0x18521400 }, + {_MMIO (0x9888 ),0x145500ab }, + {_MMIO (0x9888 ),0x0c5c8000 }, + {_MMIO (0x9888 ),0x0e5c4000 }, + {_MMIO (0x9888 ),0x025cc000 }, + {_MMIO (0x9888 ),0x045cc000 }, + {_MMIO (0x9888 ),0x1a3d00a0 }, + {_MMIO (0x9888 ),0x0a3d8000 }, + {_MMIO (0x9888 ),0x0c588000 }, + {_MMIO (0x9888 ),0x0e584000 }, + {_MMIO (0x9888 ),0x04588000 }, + {_MMIO (0x9888 ),0x1a5b0050 }, + {_MMIO (0x9888 ),0x045b8000 }, + {_MMIO (0x9888 ),0x065b8000 }, + {_MMIO (0x9888 ),0x085b8000 }, + {_MMIO (0x9888 ),0x0a5b4000 }, + {_MMIO (0x9888 ),0x101f02a0 }, + {_MMIO (0x9888 ),0x0c1fa000 }, + {_MMIO (0x9888 ),0x0e1f00aa }, + {_MMIO (0x9888 ),0x18382500 }, + {_MMIO (0x9888 ),0x02388000 }, + {_MMIO (0x9888 ),0x04384000 }, + {_MMIO (0x9888 ),0x06384000 }, + {_MMIO (0x9888 ),0x08384000 }, + {_MMIO (0x9888 ),0x0a384000 }, + {_MMIO (0x9888 ),0x0c388000 }, + {_MMIO (0x9888 ),0x0c398000 }, + {_MMIO (0x9888 ),0x0e39a000 }, + {_MMIO (0x9888 ),0x00398000 }, + {_MMIO (0x9888 ),0x0239a000 }, + {_MMIO (0x9888 ),0x0439a000 }, + {_MMIO (0x9888 ),0x06392000 }, + {_MMIO (0x9888 ),0x1a3a0200 }, + {_MMIO (0x9888 ),0x023a8000 }, + {_MMIO (0x9888 ),0x0c3a8000 }, + {_MMIO (0x9888 ),0x04108000 }, + {_MMIO (0x9888 ),0x04118000 }, + {_MMIO (0x9888 ),0x04127300 }, + {_MMIO (0x9888 ),0x10120000 }, + {_MMIO (0x9888 ),0x1813000a }, + {_MMIO (0x9888 ),0x0a134000 }, + {_MMIO (0x9888 ),0x0a146000 }, + {_MMIO (0x9888 ),0x0c159000 }, + {_MMIO (0x9888 ),0x0e150098 }, + {_MMIO (0x9888 ),0x10150000 }, + {_MMIO (0x9888 ),0x04304000 }, + {_MMIO (0x9888 ),0x04314000 }, + {_MMIO (0x9888 ),0x04320073 }, + {_MMIO (0x9888 ),0x10320000 }, + {_MMIO (0x9888 ),0x04338000 }, + {_MMIO (0x9888 ),0x06338000 }, + {_MMIO (0x9888 ),0x08334000 }, + {_MMIO (0x9888 ),0x0434c000 }, + {_MMIO (0x9888 ),0x02359890 }, + {_MMIO (0x9888 ),0x10350000 }, + {_MMIO (0x9888 ),0x06504000 }, + {_MMIO (0x9888 ),0x06514000 }, + {_MMIO (0x9888 ),0x06520073 }, + {_MMIO (0x9888 ),0x10520000 }, + {_MMIO (0x9888 ),0x18530020 }, + {_MMIO (0x9888 ),0x02538000 }, + {_MMIO (0x9888 ),0x0c534000 }, + {_MMIO (0x9888 ),0x0a548000 }, + {_MMIO (0x9888 ),0x04542000 }, + {_MMIO (0x9888 ),0x0e559000 }, + {_MMIO (0x9888 ),0x00559800 }, + {_MMIO (0x9888 ),0x10550000 }, + {_MMIO (0x9888 ),0x1b8aa000 }, + {_MMIO (0x9888 ),0x1d8a0002 }, + {_MMIO (0x9888 ),0x038a8000 }, + {_MMIO (0x9888 ),0x058a8000 }, + {_MMIO (0x9888 ),0x078a8000 }, + {_MMIO (0x9888 ),0x098a8000 }, + {_MMIO (0x9888 ),0x0b8a8000 }, + {_MMIO (0x9888 ),0x0d8a8000 }, + {_MMIO (0x9888 ),0x278b0015 }, + {_MMIO (0x9888 ),0x238b2a80 }, + {_MMIO (0x9888 ),0x258b0005 }, + {_MMIO (0x9888 ),0x2385002a }, + {_MMIO (0x9888 ),0x1f85aa00 }, + {_MMIO (0x9888 ),0x2185000a }, + {_MMIO (0x9888 ),0x1b830150 }, + {_MMIO (0x9888 ),0x03834000 }, + {_MMIO (0x9888 ),0x05834000 }, + {_MMIO (0x9888 ),0x07834000 }, + {_MMIO (0x9888 ),0x09834000 }, + {_MMIO (0x9888 ),0x0b834000 }, + {_MMIO (0x9888 ),0x0d834000 }, + {_MMIO (0x9888 ),0x0d848000 }, + {_MMIO (0x9888 ),0x0f84c000 }, + {_MMIO (0x9888 ),0x01848000 }, + {_MMIO (0x9888 ),0x0384c000 }, + {_MMIO (0x9888 ),0x0584c000 }, + {_MMIO (0x9888 ),0x07844000 }, + {_MMIO (0x9888 ),0x1d808000 }, + {_MMIO (0x9888 ),0x1f80c000 }, + {_MMIO (0x9888 ),0x11808000 }, + {_MMIO (0x9888 ),0x1380c000 }, + {_MMIO (0x9888 ),0x1580c000 }, + {_MMIO (0x9888 ),0x17804000 }, + {_MMIO (0x9888 ),0x53800000 }, + {_MMIO (0x9888 ),0x47801021 }, + {_MMIO (0x9888 ),0x21800000 }, + {_MMIO (0x9888 ),0x31800000 }, + {_MMIO (0x9888 ),0x4d800000 }, + {_MMIO (0x9888 ),0x3f800c64 }, + {_MMIO (0x9888 ),0x4f800000 }, + {_MMIO (0x9888 ),0x41800c02 }, +}; + +static const struct i915_oa_reg * +get_sampler_2_mux_config (struct drm_i915_private *dev_priv, +int *len) +{ + *len =ARRAY_SIZE (mux_config_sampler_2); +return mux_config_sampler_2; +} + +static const struct i915_oa_reg b_counter_config_tdl_1[] = { + {_MMIO (0x2740 ),0x00000000 }, + {_MMIO (0x2744 ),0x00800000 }, + {_MMIO (0x2710 ),0x00000000 }, + {_MMIO (0x2714 ),0xf0800000 }, + {_MMIO (0x2720 ),0x00000000 }, + {_MMIO (0x2724 ),0x30800000 }, + {_MMIO (0x2770 ),0x00000002 }, + {_MMIO (0x2774 ),0x0000fdff }, + {_MMIO (0x2778 ),0x00000000 }, + {_MMIO (0x277c ),0x0000fe7f }, + {_MMIO (0x2780 ),0x00000002 }, + {_MMIO (0x2784 ),0x0000ffbf }, + {_MMIO (0x2788 ),0x00000000 }, + {_MMIO (0x278c ),0x0000ffcf }, + {_MMIO (0x2790 ),0x00000002 }, + {_MMIO (0x2794 ),0x0000fff7 }, + {_MMIO (0x2798 ),0x00000000 }, + {_MMIO (0x279c ),0x0000fff9 }, +}; + +static const struct i915_oa_reg flex_eu_config_tdl_1[] = { + {_MMIO (0xe458 ),0x00005004 }, + {_MMIO (0xe558 ),0x00010003 }, + {_MMIO (0xe658 ),0x00012011 }, + {_MMIO (0xe758 ),0x00015014 }, + {_MMIO (0xe45c ),0x00051050 }, + {_MMIO (0xe55c ),0x00053052 }, + {_MMIO (0xe65c ),0x00055054 }, +}; + +static const struct i915_oa_reg mux_config_tdl_1[] = { + {_MMIO (0x9888 ),0x16154d60 }, + {_MMIO (0x9888 ),0x16352e60 }, + {_MMIO (0x9888 ),0x16554d60 }, + {_MMIO (0x9888 ),0x16950000 }, + {_MMIO (0x9888 ),0x16b50000 }, + {_MMIO (0x9888 ),0x16d50000 }, + {_MMIO (0x9888 ),0x005c8000 }, + {_MMIO (0x9888 ),0x045cc000 }, + {_MMIO (0x9888 ),0x065c4000 }, + {_MMIO (0x9888 ),0x083d8000 }, + {_MMIO (0x9888 ),0x0a3d8000 }, + {_MMIO (0x9888 ),0x0458c000 }, + {_MMIO (0x9888 ),0x025b8000 }, + {_MMIO (0x9888 ),0x085b4000 }, + {_MMIO (0x9888 ),0x0a5b4000 }, + {_MMIO (0x9888 ),0x0c5b8000 }, + {_MMIO (0x9888 ),0x0c1fa000 }, + {_MMIO (0x9888 ),0x0e1f00aa }, + {_MMIO (0x9888 ),0x02384000 }, + {_MMIO (0x9888 ),0x04388000 }, + {_MMIO (0x9888 ),0x06388000 }, + {_MMIO (0x9888 ),0x08384000 }, + {_MMIO (0x9888 ),0x0a384000 }, + {_MMIO (0x9888 ),0x0c384000 }, + {_MMIO (0x9888 ),0x00398000 }, + {_MMIO (0x9888 ),0x0239a000 }, + {_MMIO (0x9888 ),0x0439a000 }, + {_MMIO (0x9888 ),0x06392000 }, + {_MMIO (0x9888 ),0x043a8000 }, + {_MMIO (0x9888 ),0x063a8000 }, + {_MMIO (0x9888 ),0x08138000 }, + {_MMIO (0x9888 ),0x0a138000 }, + {_MMIO (0x9888 ),0x06143000 }, + {_MMIO (0x9888 ),0x0415cfc7 }, + {_MMIO (0x9888 ),0x10150000 }, + {_MMIO (0x9888 ),0x02338000 }, + {_MMIO (0x9888 ),0x0c338000 }, + {_MMIO (0x9888 ),0x04342000 }, + {_MMIO (0x9888 ),0x06344000 }, + {_MMIO (0x9888 ),0x0035c700 }, + {_MMIO (0x9888 ),0x063500cf }, + {_MMIO (0x9888 ),0x10350000 }, + {_MMIO (0x9888 ),0x04538000 }, + {_MMIO (0x9888 ),0x06538000 }, + {_MMIO (0x9888 ),0x0454c000 }, + {_MMIO (0x9888 ),0x0255cfc7 }, + {_MMIO (0x9888 ),0x10550000 }, + {_MMIO (0x9888 ),0x06dc8000 }, + {_MMIO (0x9888 ),0x08dc4000 }, + {_MMIO (0x9888 ),0x0cdcc000 }, + {_MMIO (0x9888 ),0x0edcc000 }, + {_MMIO (0x9888 ),0x1abd00a8 }, + {_MMIO (0x9888 ),0x0cd8c000 }, + {_MMIO (0x9888 ),0x0ed84000 }, + {_MMIO (0x9888 ),0x0edb8000 }, + {_MMIO (0x9888 ),0x18db0800 }, + {_MMIO (0x9888 ),0x1adb0254 }, + {_MMIO (0x9888 ),0x0e9faa00 }, + {_MMIO (0x9888 ),0x109f02aa }, + {_MMIO (0x9888 ),0x0eb84000 }, + {_MMIO (0x9888 ),0x16b84000 }, + {_MMIO (0x9888 ),0x18b8156a }, + {_MMIO (0x9888 ),0x06b98000 }, + {_MMIO (0x9888 ),0x08b9a000 }, + {_MMIO (0x9888 ),0x0ab9a000 }, + {_MMIO (0x9888 ),0x0cb9a000 }, + {_MMIO (0x9888 ),0x0eb9a000 }, + {_MMIO (0x9888 ),0x18baa000 }, + {_MMIO (0x9888 ),0x1aba0002 }, + {_MMIO (0x9888 ),0x16934000 }, + {_MMIO (0x9888 ),0x1893000a }, + {_MMIO (0x9888 ),0x0a947000 }, + {_MMIO (0x9888 ),0x0c95c5c1 }, + {_MMIO (0x9888 ),0x0e9500c3 }, + {_MMIO (0x9888 ),0x10950000 }, + {_MMIO (0x9888 ),0x0eb38000 }, + {_MMIO (0x9888 ),0x16b30040 }, + {_MMIO (0x9888 ),0x18b30020 }, + {_MMIO (0x9888 ),0x06b48000 }, + {_MMIO (0x9888 ),0x08b41000 },
Lines of this file are not shown. View the raw message.
drivers/gpu/drm/i915/i915_oa_bxt.c +2351 -132
2,483 lines not on this page · raw message
drivers/gpu/drm/i915/i915_oa_chv.c +2558 -42
2,600 lines not on this page · raw message
drivers/gpu/drm/i915/i915_oa_sklgt2.c +3084 -9
3,093 lines not on this page · raw message
drivers/gpu/drm/i915/i915_oa_sklgt3.c +2629 -9
2,638 lines not on this page · raw message
drivers/gpu/drm/i915/i915_oa_sklgt4.c +2672 -9
2,681 lines not on this page · raw message
The rest of this diff is not shown. View the raw message.
Signature · 6 lines
2.11.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Part of the diff is not shown here. View the raw message.
Re: [PATCH 6/6] drm/i915: Add more OA configs for BDW, CHV, SKL + BXT
Quoted 11 lines · Robert Bragg
These are auto generated from an XML description of metric sets, currently maintained in gputop, ref:
Quoted 2 lines
gputop-data/oa-*.xmlscripts/i915-perf-kernelgen.py$ make -C gputop-data -f Makefile.xmlSigned-off-by Robert Bragg <[email protected]>---
<SNIP>
Quoted 15 lines
drivers/gpu/drm/i915/i915_oa_bdw.c +15
-0+ +static const struct i915_oa_reg * +get_compute_extended_mux_config (struct drm_i915_private *dev_priv, +int *len) +{ +if (INTEL_INFO (dev_priv)->sseu.subslice_mask &0x01 ) { + *len =ARRAY_SIZE (mux_config_compute_extended_1_0_subslices_0x01); +return mux_config_compute_extended_1_0_subslices_0x01; + }else if (INTEL_INFO (dev_priv)->sseu.subslice_mask &0x08 ) { + *len =ARRAY_SIZE (mux_config_compute_extended_1_1_subslices_0x08); +return mux_config_compute_extended_1_1_subslices_0x08; + }else if (INTEL_INFO (dev_priv)->sseu.subslice_mask &0x02 ) { + *len =ARRAY_SIZE (mux_config_compute_extended_1_2_subslices_0x02); +return mux_config_compute_extended_1_2_subslices_0x02; + }else if (INTEL_INFO (dev_priv)->sseu.subslice_mask &0x10 ) {
drivers/gpu/drm/i915/i915_oa_bdw.c get_render_basic_mux_config(struct drm_i915_private *dev_priv, · line 1394
Quoted 10 lines
drivers/gpu/drm/i915/i915_oa_bdw.c +10
-0+ *len =ARRAY_SIZE (mux_config_compute_extended_1_3_subslices_0x10); +return mux_config_compute_extended_1_3_subslices_0x10; + }else if (INTEL_INFO (dev_priv)->sseu.subslice_mask &0x04 ) { + *len =ARRAY_SIZE (mux_config_compute_extended_1_4_subslices_0x04); +return mux_config_compute_extended_1_4_subslices_0x04; + }else if (INTEL_INFO (dev_priv)->sseu.subslice_mask &0x20 ) { + *len =ARRAY_SIZE (mux_config_compute_extended_1_5_subslices_0x20); +return mux_config_compute_extended_1_5_subslices_0x20; + *len =ARRAY_SIZE (mux_config_compute_extended); +return mux_config_compute_extended;
It looks like your script doesn't properly handle the unconditional mux config here.
<SNIP>
Quoted 15 lines
drivers/gpu/drm/i915/i915_oa_bdw.c +15
-0+ +static const struct i915_oa_reg * +get_test_oa_mux_config (struct drm_i915_private *dev_priv, +int *len) +{ + *len =ARRAY_SIZE (mux_config_test_oa); +return mux_config_test_oa; +} + +int i915_oa_select_metric_set_bdw (struct drm_i915_private *dev_priv) +{ + dev_priv->perf.oa.mux_regs =NULL ; + dev_priv->perf.oa.mux_regs_len =0 ; + dev_priv->perf.oa.b_counter_regs =NULL ; + dev_priv->perf.oa.b_counter_regs_len =0 ;
drivers/gpu/drm/i915/i915_oa_bdw.c get_render_basic_mux_config(struct drm_i915_private *dev_priv, · line 3685
Quoted 10 lines
drivers/gpu/drm/i915/i915_oa_bdw.c +10
-0+ dev_priv->perf.oa.flex_regs =NULL ; + dev_priv->perf.oa.flex_regs_len =0 ; + +switch (dev_priv->perf.oa.metrics_set) { +case METRIC_SET_ID_RENDER_BASIC : + dev_priv->perf.oa.mux_regs = +get_render_basic_mux_config (dev_priv, + &dev_priv->perf.oa.mux_regs_len); +if (!dev_priv->perf.oa.mux_regs) { +DRM_DEBUG_DRIVER ("No suitable MUX config for \"RENDER_BASIC\" metric set" );
Your script also needs to output a newline for DRM_DEBUG_DRIVER.
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH 6/6] drm/i915: Add more OA configs for BDW, CHV, SKL + BXT
Quoted 34 lines · Matthew Auld
Quoted 11 lines · Robert Bragg
These are auto generated from an XML description of metric sets, currently maintained in gputop, ref:
Quoted 2 lines
gputop-data/oa-*.xmlscripts/i915-perf-kernelgen.py$ make -C gputop-data -f Makefile.xmlSigned-off-by Robert Bragg <[email protected]>---
<SNIP>
Quoted 19 lines
drivers/gpu/drm/i915/i915_oa_bdw.c +19
-0+ +static const struct i915_oa_reg * +get_compute_extended_mux_config (struct drm_i915_private *dev_priv, +int *len) +{ +if (INTEL_INFO (dev_priv)->sseu.subslice_mask &0x01 ) { + *len =ARRAY_SIZE (mux_config_compute_extended_1_0_subslices_0x01); +return mux_config_compute_extended_1_0_subslices_0x01; + }else if (INTEL_INFO (dev_priv)->sseu.subslice_mask &0x08 ) { + *len =ARRAY_SIZE (mux_config_compute_extended_1_1_subslices_0x08); +return mux_config_compute_extended_1_1_subslices_0x08; + }else if (INTEL_INFO (dev_priv)->sseu.subslice_mask &0x02 ) { + *len =ARRAY_SIZE (mux_config_compute_extended_1_2_subslices_0x02); +return mux_config_compute_extended_1_2_subslices_0x02; + }else if (INTEL_INFO (dev_priv)->sseu.subslice_mask &0x10 ) { + *len =ARRAY_SIZE (mux_config_compute_extended_1_3_subslices_0x10); +return mux_config_compute_extended_1_3_subslices_0x10; + }else if (INTEL_INFO (dev_priv)->sseu.subslice_mask &0x04 ) { + *len =ARRAY_SIZE (mux_config_compute_extended_1_4_subslices_0x04);
Quoted 8 lines
drivers/gpu/drm/i915/i915_oa_bdw.c get_render_basic_mux_config(struct drm_i915_private *dev_priv, · line 1394
Quoted 6 lines
drivers/gpu/drm/i915/i915_oa_bdw.c +6
-0+return mux_config_compute_extended_1_4_subslices_0x04; + }else if (INTEL_INFO (dev_priv)->sseu.subslice_mask &0x20 ) { + *len =ARRAY_SIZE (mux_config_compute_extended_1_5_subslices_0x20); +return mux_config_compute_extended_1_5_subslices_0x20; + *len =ARRAY_SIZE (mux_config_compute_extended); +return mux_config_compute_extended;It looks like your script doesn't properly handle the unconditional mux config here.
Very well spotted!
This is a pretty ambiguous case and I'm not entirely sure what the right thing to do here is and have asked the folks that came up with the original OA config for their feedback. I *think* in this case it's supposed to combine both as if the unconditional config were logically concatenated at the end of all the conditional configs.
Locally I've at least updated the i915-perf-kernelgen.py script to print a loud warning out for this so I could double check in case there were other similar cases I'd missed - this BDW config seems to be the only one with this ambiguity though. This makes me think that I should update the mdapi-xml-convert.py script to just hide this special case from our oa-*.xml file by explicitly concatenating with the conditional configs if that's appropriate - then we don't need to support multiple NOA configs in the i915 perf implementation. The scripts can then have strict assertions that this doesn't change in the future.
Quoted 21 lines
<SNIP>
Quoted 18 lines
drivers/gpu/drm/i915/i915_oa_bdw.c +18
-0+ +static const struct i915_oa_reg * +get_test_oa_mux_config (struct drm_i915_private *dev_priv, +int *len) +{ + *len =ARRAY_SIZE (mux_config_test_oa); +return mux_config_test_oa; +} + +int i915_oa_select_metric_set_bdw (struct drm_i915_private *dev_priv) +{ + dev_priv->perf.oa.mux_regs =NULL ; + dev_priv->perf.oa.mux_regs_len =0 ; + dev_priv->perf.oa.b_counter_regs =NULL ; + dev_priv->perf.oa.b_counter_regs_len =0 ; + dev_priv->perf.oa.flex_regs =NULL ; + dev_priv->perf.oa.flex_regs_len =0 ; +
Quoted 8 lines
drivers/gpu/drm/i915/i915_oa_bdw.c get_render_basic_mux_config(struct drm_i915_private *dev_priv, · line 3685
Quoted 7 lines
drivers/gpu/drm/i915/i915_oa_bdw.c +7
-0+switch (dev_priv->perf.oa.metrics_set) { +case METRIC_SET_ID_RENDER_BASIC : + dev_priv->perf.oa.mux_regs = +get_render_basic_mux_config (dev_priv, + &dev_priv->perf.oa.mux_regs_len); +if (!dev_priv->perf.oa.mux_regs) { +DRM_DEBUG_DRIVER ("No suitable MUX config for \"RENDER_BASIC\" metric set" );Your script also needs to output a newline for
DRM_DEBUG_DRIVER.
Ah yep, fixed locally thanks,
Quoted 1 line
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✓ Fi.CI.BAT: success for Enable OA unit for Gen 8 and 9 in i915 perf
In reply to Robert Bragg== Series Details ==
== Series Details ==
Series: Enable OA unit for Gen 8 and 9 in i915 perf
URL : https://patchwork.freedesktop.org/series/20084/
State : success
== Summary ==
Series 20084v1 Enable OA unit for Gen 8 and 9 in i915 perf
https://patchwork.freedesktop.org/api/1.0/series/20084/revisions/1/mbox/
fi-bdw-5557u total:253 pass:242 dwarn:0 dfail:0 fail:0 skip:11 fi-bsw-n3050 total:253 pass:214 dwarn:0 dfail:0 fail:0 skip:39 fi-bxt-j4205 total:253 pass:234 dwarn:0 dfail:0 fail:0 skip:19 fi-bxt-t5700 total:83 pass:70 dwarn:0 dfail:0 fail:0 skip:12 fi-byt-j1900 total:253 pass:226 dwarn:0 dfail:0 fail:0 skip:27 fi-byt-n2820 total:253 pass:222 dwarn:0 dfail:0 fail:0 skip:31 fi-hsw-4770 total:253 pass:237 dwarn:0 dfail:0 fail:0 skip:16 fi-hsw-4770r total:253 pass:237 dwarn:0 dfail:0 fail:0 skip:16 fi-ilk-650 total:253 pass:203 dwarn:0 dfail:0 fail:0 skip:50 fi-ivb-3520m total:253 pass:235 dwarn:0 dfail:0 fail:0 skip:18 fi-ivb-3770 total:253 pass:235 dwarn:0 dfail:0 fail:0 skip:18 fi-kbl-7500u total:253 pass:235 dwarn:0 dfail:0 fail:0 skip:18 fi-skl-6260u total:253 pass:243 dwarn:0 dfail:0 fail:0 skip:10 fi-skl-6700hq total:253 pass:236 dwarn:0 dfail:0 fail:0 skip:17 fi-skl-6700k total:253 pass:231 dwarn:4 dfail:0 fail:0 skip:18 fi-skl-6770hq total:253 pass:243 dwarn:0 dfail:0 fail:0 skip:10 fi-snb-2520m total:253 pass:225 dwarn:0 dfail:0 fail:0 skip:28 fi-snb-2600 total:253 pass:224 dwarn:0 dfail:0 fail:0 skip:29
bf89ec45d0822835b03910371ac0baf46c4efa2d drm-tip: 2017y-02m-22d-14h-30m-04s UTC integration manifest 733c1e5 drm/i915: Add 'render basic' Gen8+ OA unit configs
73646a7 drm/i915: Add uncore mmio api for per-context registers
26c9eb3 drm/i915: expose _SUBSLICE_MASK GETPARM
b035818 drm/i915: expose _SLICE_MASK GETPARM
== Logs ==
For more details see: https://intel-gfx-ci.01.org/CI/Patchwork_3935/
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx