drm/i915: Engine relative MMIO
Subsystems (2)
cover drm/i915: Engine relative MMIO
From: John Harrison <[email protected]>
Newer hardware has support for making LRI accesses to MMIO registers relative to the engine that is executing the LRI instruction. This is required for things like hardware based load balancing across engines.
John Harrison (2):
drm/i915: Engine relative MMIO
drm/i915: Engine relative MMIO for Gen12
drivers/gpu/drm/i915/gem/i915_gem_context.c | 7 ++-- drivers/gpu/drm/i915/gt/intel_engine_cs.c | 43 ++++++++++++++++++++ drivers/gpu/drm/i915/gt/intel_engine_types.h | 4 ++ drivers/gpu/drm/i915/gt/intel_gpu_commands.h | 8 +++- drivers/gpu/drm/i915/gt/intel_lrc.c | 40 +++++++++--------- drivers/gpu/drm/i915/gt/intel_mocs.c | 12 +++--- drivers/gpu/drm/i915/gt/intel_ringbuffer.c | 12 +++--- drivers/gpu/drm/i915/gt/intel_workarounds.c | 2 +- drivers/gpu/drm/i915/i915_perf.c | 9 +++- drivers/gpu/drm/i915/intel_device_info.c | 14 +++++++ drivers/gpu/drm/i915/intel_device_info.h | 1 + 11 files changed, 114 insertions(+), 38 deletions(-)
Signature · 6 lines
2.21.0.5.gaeb582a983 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 1/2 drm/i915: Engine relative MMIO
From: John Harrison <[email protected]>
With virtual engines, it is no longer possible to know which specific physical engine a given request will be executed on at the time that request is generated. This means that the request itself must be engine agnostic - any direct register writes must be relative to the engine and not absolute addresses.
The LRI command has support for engine relative addressing. However, the mechanism is not transparent to the driver. The scheme for Gen11 (MI_LRI_ADD_CS_MMIO_START) requires the LRI address to have no absolute engine base component. The hardware then adds on the correct engine offset at execution time.
Due to the non-trivial and differing schemes on different hardware, it is not possible to simply set a remap flag and let the hardware get on with it. Instead, this patch adds 'lri_cmd_mode' and 'lri_mmio_base' fields to the engine structure. The former should be ORd in when creating an LRI command. The latter should be used as the register base address (as opposed to just engine->mmio_base). They are set per engine according to the currently available hardware scheme.
v2: Fix build break in GVT. Remove flags parameter [review feedback from Chris W].
v3: Fix build break in selftest. Rebase to newer base tree and fix merge conflict.
v4: More rebasing. Rmoved relative addressing support from Gen7-9 only code paths [review feedback from Chris W].
v5: More rebasing (new 'gt' directory). Fix white space issue. Use COPY class rather than BCS0 id for checking against BCS engine.
v6: Change to MI_LRI for generic code and __MI_LRI for legacy code. MI_LRI is now a macro wrapper around an engine function pointer to reduce runtime checks on LRI relative support. [review feedback from Tvrtko]
v7: Replace engine function pointer with a per engine flags field that is added by a common function. [Daniele]
v8: Re-write on top of patch series by Mika - greatly simplified to not bother with any of the abstraction of the previous version.
Bspec: 45606
--- drivers/gpu/drm/i915/gem/i915_gem_context.c | 7 ++-- drivers/gpu/drm/i915/gt/intel_engine_cs.c | 24 ++++++++++++ drivers/gpu/drm/i915/gt/intel_engine_types.h | 3 ++ drivers/gpu/drm/i915/gt/intel_gpu_commands.h | 7 +++- drivers/gpu/drm/i915/gt/intel_lrc.c | 40 ++++++++++---------- drivers/gpu/drm/i915/gt/intel_mocs.c | 6 +-- drivers/gpu/drm/i915/gt/intel_ringbuffer.c | 12 +++--- drivers/gpu/drm/i915/gt/intel_workarounds.c | 2 +- drivers/gpu/drm/i915/i915_perf.c | 8 +++- 9 files changed, 74 insertions(+), 35 deletions(-)
drivers/gpu/drm/i915/gem/i915_gem_context.c +4 -3
@@ -980,7 +980,7 @@ static int emit_ppgtt_update(struct i915_request *rq, void *data) {struct i915_address_space *vm = rq->hw_context->vm;struct intel_engine_cs *engine = rq->engine; -u32 base = engine->mmio_base; +u32 base = engine->lri_mmio_base;u32 *cs;int i;
@@ -992,7 +992,7 @@ static int emit_ppgtt_update(struct i915_request *rq, void *data)if (IS_ERR (cs))return PTR_ERR (cs); - *cs++ =MI_LOAD_REGISTER_IMM (2 ); + *cs++ =MI_LOAD_REGISTER_IMM (2 ) | engine->lri_cmd_mode; *cs++ =i915_mmio_reg_offset (GEN8_RING_PDP_UDW (base,0 )); *cs++ =upper_32_bits (pd_daddr);
@@ -1014,7 +1014,8 @@ static int emit_ppgtt_update(struct i915_request *rq, void *data)if (IS_ERR (cs))return PTR_ERR (cs); - *cs++ =MI_LOAD_REGISTER_IMM (2 *GEN8_3LVL_PDPES ) |MI_LRI_FORCE_POSTED ; + *cs++ =MI_LOAD_REGISTER_IMM (2 *GEN8_3LVL_PDPES ) | +MI_LRI_FORCE_POSTED | engine->lri_cmd_mode;for (i =GEN8_3LVL_PDPES ; i--; ) {const dma_addr_t pd_daddr =i915_page_dir_dma_addr (ppgtt, i);
drivers/gpu/drm/i915/gt/intel_engine_cs.c +24 -0
@@ -236,6 +236,28 @@ static u32 __engine_mmio_base(struct drm_i915_private *i915,return bases[i].base; } +static bool i915_engine_has_relative_lri (const struct intel_engine_cs *engine) +{ +if (INTEL_GEN (engine->i915) <11 ) +return false; + +if (engine->class ==COPY_ENGINE_CLASS ) +return false; + +return true; +} + +static void lri_init (struct intel_engine_cs *engine) +{ +if (i915_engine_has_relative_lri (engine)) { + engine->lri_cmd_mode =MI_LRI_ADD_CS_MMIO_START_GEN11 ; + engine->lri_mmio_base =0 ; + }else { + engine->lri_cmd_mode =0 ; + engine->lri_mmio_base = engine->mmio_base; + } +} +static void __sprint_engine_name (struct intel_engine_cs *engine) {/*
@@ -320,6 +342,8 @@ static int intel_engine_setup(struct intel_gt *gt, enum intel_engine_id id)/* Nothing to do here, execute in order of dependencies */ engine->schedule =NULL ; +lri_init (engine); +seqlock_init (&engine->stats.lock);ATOMIC_INIT_NOTIFIER_HEAD (&engine->context_status_notifier);
drivers/gpu/drm/i915/gt/intel_engine_types.h +3 -0
@@ -306,6 +306,9 @@ struct intel_engine_cs {u32 context_size;u32 mmio_base; +u32 lri_mmio_base; +u32 lri_cmd_mode; +u32 uabi_capabilities;struct rb_node uabi_node;
drivers/gpu/drm/i915/gt/intel_gpu_commands.h +6 -1
@@ -133,11 +133,16 @@* simply ignores the register load under certain conditions. * - One can actually load arbitrary many arbitrary registers: Simply issue x * address/value pairs. Don't overdue it, though, x <= 2^4 must hold! +* - Newer hardware supports engine relative addressing but older hardware does +* not. This is required for hw engine load balancing. Hence the MI_LRI +* instruction itself is prefixed with '__' and should only be used on +* legacy hardware code paths. Generic code must always use the MI_LRI +* and i915_get_lri_reg() helper functions instead. */ #define MI_LOAD_REGISTER_IMM (x) MI_INSTR(0x22, 2*(x)-1)/* Gen11+. addr = base + (ctx_restore ? offset & GENMASK(12,2) : offset) */ -#define MI_LRI_CS_MMIO (1<<19)#define MI_LRI_FORCE_POSTED (1<<12) +#define MI_LRI_ADD_CS_MMIO_START_GEN11 BIT(19)#define MI_STORE_REGISTER_MEM MI_INSTR(0x24, 1)#define MI_STORE_REGISTER_MEM_GEN8 MI_INSTR(0x24, 2)#define MI_SRM_LRM_GLOBAL_GTT (1<<22)
drivers/gpu/drm/i915/gt/intel_lrc.c +20 -20
@@ -1986,11 +1986,12 @@ struct lri {u32 value; }; -static u32 *emit_lri (u32 *batch,const struct lri *lri,unsigned int count) +static u32 *emit_lri (struct intel_engine_cs *engine,u32 *batch, +const struct lri *lri,unsigned int count) {GEM_BUG_ON (!count || count >63 ); - *batch++ =MI_LOAD_REGISTER_IMM (count); + *batch++ =MI_LOAD_REGISTER_IMM (count) | engine->lri_cmd_mode; do { *batch++ = i915_mmio_reg_offset(lri->reg); *batch++ = lri->value;
@@ -2030,7 +2031,7 @@ static u32 *gen9_init_indirectctx_bb(struct intel_engine_cs *engine, u32 *batch)/* WaFlushCoherentL3CacheLinesAtContextSwitch:skl,bxt,glk */ batch =gen8_emit_flush_coherentl3_wa (engine, batch); - batch =emit_lri (batch, lri,ARRAY_SIZE (lri)); + batch =emit_lri (engine, batch, lri,ARRAY_SIZE (lri));/* WaMediaPoolStateCmdInWABB:bxt,glk */ if (HAS_POOLED_EU (engine->i915)) {
@@ -3186,7 +3187,7 @@ static void init_common_reg_state(u32 * const regs,struct intel_engine_cs *engine, struct intel_ring *ring) { - const u32 base = engine->mmio_base; + const u32 base = engine->lri_mmio_base; CTX_REG(regs, CTX_CONTEXT_CONTROL, RING_CONTEXT_CONTROL(base), _MASKED_BIT_DISABLE(CTX_CTRL_ENGINE_CTX_RESTORE_INHIBIT) |
@@ -3211,7 +3212,7 @@ static void init_wa_bb_reg_state(u32 * const regs, u32 pos_bb_per_ctx) {struct i915_ctx_workarounds *const wa_ctx = &engine->wa_ctx; -const u32 base = engine->mmio_base; +const u32 base = engine->lri_mmio_base;const u32 pos_indirect_ctx = pos_bb_per_ctx +2 ;const u32 pos_indirect_ctx_offset = pos_indirect_ctx +2 ;
@@ -3239,6 +3240,7 @@ static void init_wa_bb_reg_state(u32 * const regs, }static void init_ppgtt_reg_state (u32 *regs,u32 base, +struct intel_engine_cs *engine,struct i915_ppgtt *ppgtt) {/* PDP values well be assigned later if needed */
@@ -3280,14 +3282,12 @@ static void gen8_init_reg_state(u32 * const regs, {struct i915_ppgtt *const ppgtt =vm_alias (ce->vm);const bool rcs = engine->class ==RENDER_CLASS ; -const u32 base = engine->mmio_base; -const u32 lri_base = -intel_engine_has_relative_mmio (engine) ?MI_LRI_CS_MMIO :0 ; +const u32 base = engine->lri_mmio_base; regs[CTX_LRI_HEADER_0 ] =MI_LOAD_REGISTER_IMM (rcs ?14 :11 ) |MI_LRI_FORCE_POSTED | - lri_base; + engine->lri_cmd_mode;init_common_reg_state (regs, ppgtt, engine, ring);CTX_REG (regs,CTX_SECOND_BB_HEAD_U ,RING_SBBADDR_UDW (base),0 );
@@ -3299,15 +3299,17 @@ static void gen8_init_reg_state(u32 * const regs, regs[CTX_LRI_HEADER_1 ] =MI_LOAD_REGISTER_IMM (9 ) |MI_LRI_FORCE_POSTED | - lri_base; + engine->lri_cmd_mode;CTX_REG (regs,CTX_CTX_TIMESTAMP ,RING_CTX_TIMESTAMP (base),0 ); -init_ppgtt_reg_state (regs, base, ppgtt); +init_ppgtt_reg_state (regs, base, engine, ppgtt);if (rcs) { - regs[CTX_LRI_HEADER_2 ] =MI_LOAD_REGISTER_IMM (1 ) | lri_base; -CTX_REG (regs,CTX_R_PWR_CLK_STATE ,GEN8_R_PWR_CLK_STATE ,0 ); + regs[CTX_LRI_HEADER_2 ] =MI_LOAD_REGISTER_IMM (1 ) | + engine->lri_cmd_mode; +CTX_REG (regs,CTX_R_PWR_CLK_STATE , +GEN8_R_PWR_CLK_STATE ,0 ); } regs[CTX_END ] =MI_BATCH_BUFFER_END ;
@@ -3322,14 +3324,12 @@ static void gen12_init_reg_state(u32 * const regs, {struct i915_ppgtt *const ppgtt =i915_vm_to_ppgtt (ce->vm);const bool rcs = engine->class ==RENDER_CLASS ; -const u32 base = engine->mmio_base; -const u32 lri_base = -intel_engine_has_relative_mmio (engine) ?MI_LRI_CS_MMIO :0 ; +const u32 base = engine->lri_mmio_base; regs[CTX_LRI_HEADER_0 ] =MI_LOAD_REGISTER_IMM (rcs ?11 :9 ) |MI_LRI_FORCE_POSTED | - lri_base; + engine->lri_cmd_mode;init_common_reg_state (regs, ppgtt, engine, ring);
@@ -3339,15 +3339,15 @@ static void gen12_init_reg_state(u32 * const regs, regs[CTX_LRI_HEADER_1 ] =MI_LOAD_REGISTER_IMM (9 ) |MI_LRI_FORCE_POSTED | - lri_base; + engine->lri_cmd_mode;CTX_REG (regs,CTX_CTX_TIMESTAMP ,RING_CTX_TIMESTAMP (base),0 ); -init_ppgtt_reg_state (regs, base, ppgtt); +init_ppgtt_reg_state (regs, base, engine, ppgtt);if (rcs) { regs[GEN12_CTX_LRI_HEADER_3 ] = -MI_LOAD_REGISTER_IMM (1 ) | lri_base; +MI_LOAD_REGISTER_IMM (1 ) | engine->lri_cmd_mode;CTX_REG (regs,CTX_R_PWR_CLK_STATE ,GEN8_R_PWR_CLK_STATE ,0 );/* TODO: oa_init_reg_state ? */
drivers/gpu/drm/i915/gt/intel_mocs.c +2 -4
@@ -368,9 +368,6 @@ static u32 get_entry_control(const struct drm_i915_mocs_table *table,/** * intel_mocs_init_engine() - emit the mocs control table * @engine: The engine for whom to emit the registers. -* -* This function simply emits a MI_LOAD_REGISTER_IMM command for the -* given table starting at the given address. */ void intel_mocs_init_engine (struct intel_engine_cs *engine) {
@@ -456,7 +453,8 @@ static int emit_mocs_control_table(struct i915_request *rq,if (IS_ERR (cs))return PTR_ERR (cs); - *cs++ =MI_LOAD_REGISTER_IMM (table->n_entries); + *cs++ =MI_LOAD_REGISTER_IMM (table->n_entries) | + rq->engine->lri_cmd_mode;for (index =0 ; index < table->size; index++) {u32 value =get_entry_control (table, index);
drivers/gpu/drm/i915/gt/intel_ringbuffer.c +7 -5
@@ -1535,12 +1535,13 @@ static int load_pd_dir(struct i915_request *rq, const struct i915_ppgtt *ppgtt)if (IS_ERR (cs))return PTR_ERR (cs); - *cs++ =MI_LOAD_REGISTER_IMM (1 ); - *cs++ =i915_mmio_reg_offset (RING_PP_DIR_DCLV (engine->mmio_base)); +/* Can these not be merged into a single LRI??? */ + *cs++ =MI_LOAD_REGISTER_IMM (1 ) | engine->lri_cmd_mode; + *cs++ =i915_mmio_reg_offset (RING_PP_DIR_DCLV (engine->lri_mmio_base)); *cs++ =PP_DIR_DCLV_2G ; - *cs++ =MI_LOAD_REGISTER_IMM (1 ); - *cs++ =i915_mmio_reg_offset (RING_PP_DIR_BASE (engine->mmio_base)); + *cs++ =MI_LOAD_REGISTER_IMM (1 ) | engine->lri_cmd_mode; + *cs++ =i915_mmio_reg_offset (RING_PP_DIR_BASE (engine->lri_mmio_base)); *cs++ =px_base (ppgtt->pd)->ggtt_offset <<10 ;intel_ring_advance (rq, cs);
@@ -1708,7 +1709,8 @@ static int remap_l3_slice(struct i915_request *rq, int slice)* here because no other code should access these registers other than * at initialization time. */ - *cs++ =MI_LOAD_REGISTER_IMM (GEN7_L3LOG_SIZE /4 ); + *cs++ =MI_LOAD_REGISTER_IMM (GEN7_L3LOG_SIZE /4 ) | + rq->engine->lri_cmd_mode;for (i =0 ; i <GEN7_L3LOG_SIZE /4 ; i++) { *cs++ =i915_mmio_reg_offset (GEN7_L3LOG (slice, i)); *cs++ = remap_info[i];
drivers/gpu/drm/i915/gt/intel_workarounds.c +1 -1
@@ -633,7 +633,7 @@ int intel_engine_emit_ctx_wa(struct i915_request *rq)if (IS_ERR (cs))return PTR_ERR (cs); - *cs++ =MI_LOAD_REGISTER_IMM (wal->count); + *cs++ =MI_LOAD_REGISTER_IMM (wal->count) | rq->engine->lri_cmd_mode;for (i =0 , wa = wal->list; i < wal->count; i++, wa++) { *cs++ =i915_mmio_reg_offset (wa->reg); *cs++ = wa->val;
drivers/gpu/drm/i915/i915_perf.c +7 -1
@@ -1693,6 +1693,11 @@ gen8_update_reg_state_unlocked(struct i915_perf_stream *stream, };int i; +/* +* NB: The LRI instruction is generated by the hardware. +* Should we read it in and assert that the offset flag is set? +*/ + CTX_REG(reg_state, ctx_oactxctrl, GEN8_OACTXCONTROL, (stream->period_exponent << GEN8_OA_TIMER_PERIOD_SHIFT) | (stream->periodic ? GEN8_OA_TIMER_ENABLE : 0) |
@@ -1752,8 +1757,9 @@ gen8_load_flex(struct i915_request *rq,if (IS_ERR (cs))return PTR_ERR (cs); - *cs++ =MI_LOAD_REGISTER_IMM (count); + *cs++ =MI_LOAD_REGISTER_IMM (count) | rq->engine->lri_cmd_mode;do { +/* FIXME: Is this table LRI remap/offset friendly? */ *cs++ =i915_mmio_reg_offset (flex->reg); *cs++ = flex->value; }while (flex++, --count);
Signature · 6 lines
2.21.0.5.gaeb582a983 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 2/2 drm/i915: Engine relative MMIO for Gen12
In reply to [email protected]From: John Harrison <[email protected]>
Gen12 introduces a completely new and different scheme for implementing engine relative MMIO accesses - MI_LRI_MMIO_REMAP. This requires using the base address of instance zero of the relevant engine class. And then, it is only valid if the register in question falls within a certain range as specified by a table.
v2: Add support for fused parts where instance zero of a given engine class may be missing. Make aux_tables presence a device flag rather than just hard coded. Pre-calculate the correct LRI base address rather than using a per-instance base and then adding on a delta to the correct base later. Make all the table range checking a debug only feature - the theory is that all driver access should be within the remap ranges. [Daniele]
v3: Re-base on Mika's changes. This removes all the abstraction layer. Which also means there is no common code path that all LRI accesses go via. Thus it is not possible to implement the range check. However, as noted in v2, the range check should not be necessary anyway.
--- drivers/gpu/drm/i915/gt/intel_engine_cs.c | 27 +++++++++++++++++--- drivers/gpu/drm/i915/gt/intel_engine_types.h | 1 + drivers/gpu/drm/i915/gt/intel_gpu_commands.h | 9 ++++--- drivers/gpu/drm/i915/gt/intel_mocs.c | 6 ++--- drivers/gpu/drm/i915/i915_perf.c | 3 ++- drivers/gpu/drm/i915/intel_device_info.c | 14 ++++++++++ drivers/gpu/drm/i915/intel_device_info.h | 1 + 7 files changed, 49 insertions(+), 12 deletions(-)
drivers/gpu/drm/i915/gt/intel_engine_cs.c +23 -4
@@ -247,14 +247,32 @@ static bool i915_engine_has_relative_lri(const struct intel_engine_cs *engine)return true; } -static void lri_init (struct intel_engine_cs *engine) +static void lri_init (struct intel_engine_cs *engine,u32 first_instance) {if (i915_engine_has_relative_lri (engine)) { - engine->lri_cmd_mode =MI_LRI_ADD_CS_MMIO_START_GEN11 ; - engine->lri_mmio_base =0 ; +if (INTEL_GEN (engine->i915) <12 ) { + engine->lri_cmd_mode =MI_LRI_ADD_CS_MMIO_START_GEN11 ; + engine->lri_mmio_base =0 ;//engine->mmio_base; + engine->lri_engine = engine; + }else { + engine->lri_cmd_mode =MI_LRI_MMIO_REMAP_GEN12 ; + + engine->lri_engine = engine->gt->engine_class + [engine->class][first_instance]; +GEM_BUG_ON (!engine->lri_engine); + engine->lri_mmio_base = engine->lri_engine->mmio_base; + +/* According to the bspec, accesses should be compared +* against the remap table and remapping only enabled +* if found. In practice, all driver accesses should be +* to remap registers. So, no need for the complication +* of checking against any device specific tables. +*/ + } }else { engine->lri_cmd_mode =0 ; engine->lri_mmio_base = engine->mmio_base; + engine->lri_engine = engine; } }
@@ -342,7 +360,8 @@ static int intel_engine_setup(struct intel_gt *gt, enum intel_engine_id id)/* Nothing to do here, execute in order of dependencies */ engine->schedule =NULL ; -lri_init (engine); +lri_init (engine, +INTEL_INFO (engine->i915)->first_instance[engine->class]);seqlock_init (&engine->stats.lock);
drivers/gpu/drm/i915/gt/intel_engine_types.h +1 -0
@@ -308,6 +308,7 @@ struct intel_engine_cs {u32 lri_mmio_base;u32 lri_cmd_mode; +struct intel_engine_cs *lri_engine;u32 uabi_capabilities;
drivers/gpu/drm/i915/gt/intel_gpu_commands.h +5 -4
@@ -133,15 +133,16 @@* simply ignores the register load under certain conditions. * - One can actually load arbitrary many arbitrary registers: Simply issue x * address/value pairs. Don't overdue it, though, x <= 2^4 must hold! -* - Newer hardware supports engine relative addressing but older hardware does -* not. This is required for hw engine load balancing. Hence the MI_LRI -* instruction itself is prefixed with '__' and should only be used on -* legacy hardware code paths. Generic code must always use the MI_LRI +* - Newer hardware supports engine relative addressing but using multiple +* incompatible schemes. This is required for hw engine load balancing. Hence +* the MI_LRI instruction itself is prefixed with '__' and should only be +* used on legacy hardware code paths. Generic code must always use the MI_LRI * and i915_get_lri_reg() helper functions instead. */ #define MI_LOAD_REGISTER_IMM (x) MI_INSTR(0x22, 2*(x)-1)/* Gen11+. addr = base + (ctx_restore ? offset & GENMASK(12,2) : offset) */ #define MI_LRI_FORCE_POSTED (1<<12) +#define MI_LRI_MMIO_REMAP_GEN12 BIT(17)#define MI_LRI_ADD_CS_MMIO_START_GEN11 BIT(19)#define MI_STORE_REGISTER_MEM MI_INSTR(0x24, 1)#define MI_STORE_REGISTER_MEM_GEN8 MI_INSTR(0x24, 2)
drivers/gpu/drm/i915/gt/intel_mocs.c +3 -3
@@ -438,7 +438,7 @@ static void intel_mocs_init_global(struct intel_gt *gt)static int emit_mocs_control_table (struct i915_request *rq,const struct drm_i915_mocs_table *table) { -enum intel_engine_id engine = rq->engine->id; +enum intel_engine_id engine_id = rq->engine->lri_engine->id;unsigned int index;u32 unused_value;u32 *cs;
@@ -459,13 +459,13 @@ static int emit_mocs_control_table(struct i915_request *rq,for (index =0 ; index < table->size; index++) {u32 value =get_entry_control (table, index); - *cs++ =i915_mmio_reg_offset (mocs_register (engine, index)); + *cs++ =i915_mmio_reg_offset (mocs_register (engine_id, index)); *cs++ = value; }/* All remaining entries are also unused */ for (; index < table->n_entries; index++) { - *cs++ =i915_mmio_reg_offset (mocs_register (engine, index)); + *cs++ =i915_mmio_reg_offset (mocs_register (engine_id, index)); *cs++ = unused_value; }
drivers/gpu/drm/i915/i915_perf.c +2 -1
@@ -1695,7 +1695,8 @@ gen8_update_reg_state_unlocked(struct i915_perf_stream *stream,/* * NB: The LRI instruction is generated by the hardware. -* Should we read it in and assert that the offset flag is set? +* Should we read it in and assert that the appropriate +* offset flag is set? */ CTX_REG(reg_state, ctx_oactxctrl, GEN8_OACTXCONTROL,
drivers/gpu/drm/i915/intel_device_info.c +14 -0
@@ -989,6 +989,7 @@ void intel_device_info_init_mmio(struct drm_i915_private *dev_priv)u32 media_fuse;u16 vdbox_mask;u16 vebox_mask; +bool found;if (INTEL_GEN (dev_priv) <11 )return ;
@@ -999,6 +1000,7 @@ void intel_device_info_init_mmio(struct drm_i915_private *dev_priv) vebox_mask = (media_fuse &GEN11_GT_VEBOX_DISABLE_MASK ) >>GEN11_GT_VEBOX_DISABLE_SHIFT ; + found = false;for (i =0 ; i <I915_MAX_VCS ; i++) {if (!HAS_ENGINE (dev_priv,_VCS (i))) { vdbox_mask &= ~BIT (i);
@@ -1018,11 +1020,17 @@ void intel_device_info_init_mmio(struct drm_i915_private *dev_priv)*/ if (IS_TIGERLAKE (dev_priv) || logical_vdbox++ %2 ==0 )RUNTIME_INFO (dev_priv)->vdbox_sfc_access |=BIT (i); + +if (!found) { + found = true; + info->first_instance[VIDEO_DECODE_CLASS ] = i; + } }DRM_DEBUG_DRIVER ("vdbox enable: %04x, instances: %04lx\n" , vdbox_mask,VDBOX_MASK (dev_priv));GEM_BUG_ON (vdbox_mask !=VDBOX_MASK (dev_priv)); + found = false;for (i =0 ; i <I915_MAX_VECS ; i++) {if (!HAS_ENGINE (dev_priv,_VECS (i))) { vebox_mask &= ~BIT (i);
@@ -1032,6 +1040,12 @@ void intel_device_info_init_mmio(struct drm_i915_private *dev_priv)if (!(BIT (i) & vebox_mask)) { info->engine_mask &= ~BIT (_VECS (i));DRM_DEBUG_DRIVER ("vecs%u fused off\n" , i); +continue ; + } + +if (!found) { + found = true; + info->first_instance[VIDEO_ENHANCEMENT_CLASS ] = i; } } DRM_DEBUG_DRIVER("vebox enable: %04x, instances: %04lx\n",
drivers/gpu/drm/i915/intel_device_info.h +1 -0
@@ -151,6 +151,7 @@ struct intel_device_info {u8 gen;u8 gt;/* GT number, 0 if undefined */ intel_engine_mask_t engine_mask;/* Engines supported by the HW */ +u32 first_instance[MAX_ENGINE_CLASS ];/* instance 0 might be fused */ enum intel_platform platform;
Signature · 6 lines
2.21.0.5.gaeb582a983 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✗ Fi.CI.BAT: failure for drm/i915: Engine relative MMIO (rev8)
In reply to [email protected]== Series Details ==
== Series Details ==
Series: drm/i915: Engine relative MMIO (rev8)
URL : https://patchwork.freedesktop.org/series/57117/
State : failure
== Summary ==
CI Bug Log - changes from CI_DRM_6917 -> Patchwork_14452
====================================================
Summary
-------
**FAILURE**
Serious unknown changes coming with Patchwork_14452 absolutely need to be verified manually.
If you think the reported changes have nothing to do with the changes introduced in Patchwork_14452, please notify your bug team to allow them to document this new failure mode, which will reduce false positives in CI.
External URL: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14452/
Possible new issues
-------------------
Here are the unknown changes that may have been introduced in Patchwork_14452:
### IGT changes ###
#### Possible regressions ####
* igt@gem_workarounds@basic-read:
- fi-icl-u3: [PASS][1] -> [FAIL][2]
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6917/fi-icl-u3/igt@[email protected]
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14452/fi-icl-u3/igt@[email protected]
- fi-icl-u2: [PASS][3] -> [FAIL][4]
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6917/fi-icl-u2/igt@[email protected]
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14452/fi-icl-u2/igt@[email protected]
* igt@i915_selftest@live_workarounds:
- fi-icl-u3: [PASS][5] -> [DMESG-FAIL][6]
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6917/fi-icl-u3/igt@i915_selftest@live_workarounds.html
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14452/fi-icl-u3/igt@i915_selftest@live_workarounds.html
- fi-icl-u2: [PASS][7] -> [DMESG-FAIL][8]
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6917/fi-icl-u2/igt@i915_selftest@live_workarounds.html
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14452/fi-icl-u2/igt@i915_selftest@live_workarounds.html
#### Suppressed ####
The following results come from untrusted machines, tests, or statuses. They do not affect the overall result.
* igt@gem_workarounds@basic-read:
- {fi-icl-u4}: [PASS][9] -> [FAIL][10]
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6917/fi-icl-u4/igt@[email protected]
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14452/fi-icl-u4/igt@[email protected]
- {fi-icl-dsi}: [PASS][11] -> [FAIL][12]
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6917/fi-icl-dsi/igt@[email protected]
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14452/fi-icl-dsi/igt@[email protected]
- {fi-icl-guc}: [PASS][13] -> [FAIL][14]
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6917/fi-icl-guc/igt@[email protected]
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14452/fi-icl-guc/igt@[email protected]
* igt@i915_selftest@live_workarounds:
- {fi-icl-dsi}: [PASS][15] -> [DMESG-FAIL][16]
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6917/fi-icl-dsi/igt@i915_selftest@live_workarounds.html
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14452/fi-icl-dsi/igt@i915_selftest@live_workarounds.html
- {fi-icl-guc}: [PASS][17] -> [DMESG-FAIL][18]
[17]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6917/fi-icl-guc/igt@i915_selftest@live_workarounds.html
[18]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14452/fi-icl-guc/igt@i915_selftest@live_workarounds.html
Known issues
------------
Here are the changes found in Patchwork_14452 that come from known issues:
### IGT changes ###
#### Issues hit ####
* igt@gem_mmap_gtt@basic-read-write:
- fi-icl-u3: [PASS][19] -> [DMESG-WARN][20] ([fdo#107724])
[19]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6917/fi-icl-u3/igt@[email protected]
[20]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14452/fi-icl-u3/igt@[email protected]
#### Possible fixes ####
* igt@gem_exec_suspend@basic-s3:
- fi-blb-e6850: [INCOMPLETE][21] ([fdo#107718]) -> [PASS][22]
[21]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6917/fi-blb-e6850/igt@[email protected]
[22]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14452/fi-blb-e6850/igt@[email protected]
* igt@gem_mmap_gtt@basic-write-no-prefault:
- fi-icl-u3: [DMESG-WARN][23] ([fdo#107724]) -> [PASS][24] +1 similar issue
[23]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6917/fi-icl-u3/igt@[email protected]
[24]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14452/fi-icl-u3/igt@[email protected]
{name}: This element is suppressed. This means it is ignored when computing
the status of the difference (SUCCESS, WARNING, or FAILURE).
[fdo#105602]: https://bugs.freedesktop.org/show_bug.cgi?id=105602
[fdo#106107]: https://bugs.freedesktop.org/show_bug.cgi?id=106107
[fdo#106350]: https://bugs.freedesktop.org/show_bug.cgi?id=106350
[fdo#107718]: https://bugs.freedesktop.org/show_bug.cgi?id=107718
[fdo#107724]: https://bugs.freedesktop.org/show_bug.cgi?id=107724
[fdo#109285]: https://bugs.freedesktop.org/show_bug.cgi?id=109285
[fdo#109309]: https://bugs.freedesktop.org/show_bug.cgi?id=109309
[fdo#111045]: https://bugs.freedesktop.org/show_bug.cgi?id=111045
[fdo#111155]: https://bugs.freedesktop.org/show_bug.cgi?id=111155
Participating hosts (53 -> 45)
------------------------------
Additional (1): fi-bxt-dsi
Missing (9): fi-ilk-m540 fi-tgl-u fi-hsw-4200u fi-tgl-u2 fi-byt-squawks fi-bsw-cyan fi-icl-y fi-byt-clapper fi-bdw-samus
Build changes
-------------
* CI: CI-20190529 -> None
* Linux: CI_DRM_6917 -> Patchwork_14452
CI-20190529: 20190529
CI_DRM_6917: 7ca2b123ae999133223b882e3190955897df8b03 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_5191: 63e30122cadaf2798ae2bd44a56cee81a27fbc40 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_14452: 38f414180b75c1604d7c3e91d03a26c5086b8013 @ git://anongit.freedesktop.org/gfx-ci/linux
== Linux commits ==
38f414180b75 drm/i915: Engine relative MMIO for Gen12 43b3c0ae51de drm/i915: Engine relative MMIO
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14452/index.html
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx