Skip to content

Commit 3485d99

Browse files
Tim Goretursulin
authored andcommitted
drm/i915:gen9: implement WaMediaPoolStateCmdInWABB
This patch applies WaMediaPoolStateCmdInWABB which fixes a problem with the restoration of thread counts on resuming from RC6. References: HSD#2137167 Signed-off-by: Tim Gore <tim.gore@intel.com> Reviewed-by: Arun Siluvery <arun.siluvery@linux.intel.com> Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Link: http://patchwork.freedesktop.org/patch/msgid/1467709290-5941-1-git-send-email-tim.gore@intel.com
1 parent e25148d commit 3485d99

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

drivers/gpu/drm/i915/intel_lrc.c

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1296,6 +1296,31 @@ static int gen9_init_indirectctx_bb(struct intel_engine_cs *engine,
12961296
wa_ctx_emit(batch, index, 0);
12971297
wa_ctx_emit(batch, index, 0);
12981298
}
1299+
1300+
/* WaMediaPoolStateCmdInWABB:bxt */
1301+
if (HAS_POOLED_EU(engine->i915)) {
1302+
/*
1303+
* EU pool configuration is setup along with golden context
1304+
* during context initialization. This value depends on
1305+
* device type (2x6 or 3x6) and needs to be updated based
1306+
* on which subslice is disabled especially for 2x6
1307+
* devices, however it is safe to load default
1308+
* configuration of 3x6 device instead of masking off
1309+
* corresponding bits because HW ignores bits of a disabled
1310+
* subslice and drops down to appropriate config. Please
1311+
* see render_state_setup() in i915_gem_render_state.c for
1312+
* possible configurations, to avoid duplication they are
1313+
* not shown here again.
1314+
*/
1315+
u32 eu_pool_config = 0x00777000;
1316+
wa_ctx_emit(batch, index, GEN9_MEDIA_POOL_STATE);
1317+
wa_ctx_emit(batch, index, GEN9_MEDIA_POOL_ENABLE);
1318+
wa_ctx_emit(batch, index, eu_pool_config);
1319+
wa_ctx_emit(batch, index, 0);
1320+
wa_ctx_emit(batch, index, 0);
1321+
wa_ctx_emit(batch, index, 0);
1322+
}
1323+
12991324
/* Pad to end of cacheline */
13001325
while (index % CACHELINE_DWORDS)
13011326
wa_ctx_emit(batch, index, MI_NOOP);

0 commit comments

Comments
 (0)