hardware/intel/intel-driver
Révision | 030f48af1ea3160894db798093559e0fdc4ba079 (tree) |
---|---|
l'heure | 2014-12-14 01:26:32 |
Auteur | Zhao Yakui <yakui.zhao@inte...> |
Commiter | Xiang, Haihao |
Media/SKL: Follow the spec to update the STATE_BASE_ADDRESS command for media pipeline
Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
(cherry picked from commit b660c288f963dd2a2bb1951feeb8161483c2faf2)
@@ -1207,6 +1207,67 @@ gen8_gpe_load_kernels(VADriverContextP ctx, | ||
1207 | 1207 | return; |
1208 | 1208 | } |
1209 | 1209 | |
1210 | +static void | |
1211 | +gen9_gpe_state_base_address(VADriverContextP ctx, | |
1212 | + struct i965_gpe_context *gpe_context, | |
1213 | + struct intel_batchbuffer *batch) | |
1214 | +{ | |
1215 | + BEGIN_BATCH(batch, 19); | |
1216 | + | |
1217 | + OUT_BATCH(batch, CMD_STATE_BASE_ADDRESS | (19 - 2)); | |
1218 | + | |
1219 | + OUT_BATCH(batch, 0 | BASE_ADDRESS_MODIFY); //General State Base Address | |
1220 | + OUT_BATCH(batch, 0); | |
1221 | + OUT_BATCH(batch, 0); | |
1222 | + | |
1223 | + /*DW4 Surface state base address */ | |
1224 | + OUT_RELOC(batch, gpe_context->surface_state_binding_table.bo, I915_GEM_DOMAIN_INSTRUCTION, 0, BASE_ADDRESS_MODIFY); /* Surface state base address */ | |
1225 | + OUT_BATCH(batch, 0); | |
1226 | + | |
1227 | + /*DW6. Dynamic state base address */ | |
1228 | + if (gpe_context->dynamic_state.bo) | |
1229 | + OUT_RELOC(batch, gpe_context->dynamic_state.bo, | |
1230 | + I915_GEM_DOMAIN_RENDER | I915_GEM_DOMAIN_SAMPLER, | |
1231 | + 0, BASE_ADDRESS_MODIFY); | |
1232 | + else | |
1233 | + OUT_BATCH(batch, 0 | BASE_ADDRESS_MODIFY); | |
1234 | + | |
1235 | + OUT_BATCH(batch, 0); | |
1236 | + | |
1237 | + /*DW8. Indirect Object base address */ | |
1238 | + if (gpe_context->indirect_state.bo) | |
1239 | + OUT_RELOC(batch, gpe_context->indirect_state.bo, | |
1240 | + I915_GEM_DOMAIN_SAMPLER, | |
1241 | + 0, BASE_ADDRESS_MODIFY); | |
1242 | + else | |
1243 | + OUT_BATCH(batch, 0 | BASE_ADDRESS_MODIFY); | |
1244 | + | |
1245 | + OUT_BATCH(batch, 0); | |
1246 | + | |
1247 | + /*DW10. Instruct base address */ | |
1248 | + if (gpe_context->instruction_state.bo) | |
1249 | + OUT_RELOC(batch, gpe_context->instruction_state.bo, | |
1250 | + I915_GEM_DOMAIN_INSTRUCTION, | |
1251 | + 0, BASE_ADDRESS_MODIFY); | |
1252 | + else | |
1253 | + OUT_BATCH(batch, 0 | BASE_ADDRESS_MODIFY); | |
1254 | + | |
1255 | + OUT_BATCH(batch, 0); | |
1256 | + | |
1257 | + /* DW12. Size limitation */ | |
1258 | + OUT_BATCH(batch, 0xFFFFF000 | BASE_ADDRESS_MODIFY); //General State Access Upper Bound | |
1259 | + OUT_BATCH(batch, 0xFFFFF000 | BASE_ADDRESS_MODIFY); //Dynamic State Access Upper Bound | |
1260 | + OUT_BATCH(batch, 0xFFFFF000 | BASE_ADDRESS_MODIFY); //Indirect Object Access Upper Bound | |
1261 | + OUT_BATCH(batch, 0xFFFFF000 | BASE_ADDRESS_MODIFY); //Instruction Access Upper Bound | |
1262 | + | |
1263 | + /* the bindless surface state address */ | |
1264 | + OUT_BATCH(batch, 0 | BASE_ADDRESS_MODIFY); | |
1265 | + OUT_BATCH(batch, 0); | |
1266 | + OUT_BATCH(batch, 0xFFFFF000); | |
1267 | + | |
1268 | + ADVANCE_BATCH(batch); | |
1269 | +} | |
1270 | + | |
1210 | 1271 | void |
1211 | 1272 | gen9_gpe_pipeline_setup(VADriverContextP ctx, |
1212 | 1273 | struct i965_gpe_context *gpe_context, |
@@ -1215,7 +1276,7 @@ gen9_gpe_pipeline_setup(VADriverContextP ctx, | ||
1215 | 1276 | intel_batchbuffer_emit_mi_flush(batch); |
1216 | 1277 | |
1217 | 1278 | i965_gpe_select(ctx, gpe_context, batch); |
1218 | - gen8_gpe_state_base_address(ctx, gpe_context, batch); | |
1279 | + gen9_gpe_state_base_address(ctx, gpe_context, batch); | |
1219 | 1280 | gen8_gpe_vfe_state(ctx, gpe_context, batch); |
1220 | 1281 | gen8_gpe_curbe_load(ctx, gpe_context, batch); |
1221 | 1282 | gen8_gpe_idrt(ctx, gpe_context, batch); |