hardware/intel/intel-driver
Revisión | 01941a2ae08a69512b708d91efd9191edeb7e723 (tree) |
---|---|
Tiempo | 2014-12-14 01:26:32 |
Autor | Zhao Yakui <yakui.zhao@inte...> |
Commiter | Xiang, Haihao |
Media/SKL: Follow the spec to add the FORCE_MEDIA_AWAKE for media pipeline
Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
(cherry picked from commit 1927da361bd529405340ca042df3ff9d4e5bb3e7)
@@ -648,6 +648,8 @@ static void gen9_vme_pipeline_programing(VADriverContextP ctx, | ||
648 | 648 | OUT_BATCH(batch, 0); |
649 | 649 | ADVANCE_BATCH(batch); |
650 | 650 | |
651 | + gen9_gpe_pipeline_end(ctx, &vme_context->gpe_context, batch); | |
652 | + | |
651 | 653 | intel_batchbuffer_end_atomic(batch); |
652 | 654 | } |
653 | 655 |
@@ -1076,6 +1078,8 @@ gen9_vme_mpeg2_pipeline_programing(VADriverContextP ctx, | ||
1076 | 1078 | OUT_BATCH(batch, 0); |
1077 | 1079 | ADVANCE_BATCH(batch); |
1078 | 1080 | |
1081 | + gen9_gpe_pipeline_end(ctx, &vme_context->gpe_context, batch); | |
1082 | + | |
1079 | 1083 | intel_batchbuffer_end_atomic(batch); |
1080 | 1084 | } |
1081 | 1085 |
@@ -851,5 +851,8 @@ | ||
851 | 851 | |
852 | 852 | |
853 | 853 | #define GEN9_PIPELINE_SELECTION_MASK (0x3 << 8) |
854 | +#define GEN9_FORCE_MEDIA_AWAKE_MASK (1 << 13) | |
855 | +#define GEN9_FORCE_MEDIA_AWAKE_ON (1 << 5) | |
856 | +#define GEN9_FORCE_MEDIA_AWAKE_OFF (0 << 5) | |
854 | 857 | |
855 | 858 | #endif /* _I965_DEFINES_H_ */ |
@@ -1275,7 +1275,9 @@ gen9_gpe_select(VADriverContextP ctx, | ||
1275 | 1275 | { |
1276 | 1276 | BEGIN_BATCH(batch, 1); |
1277 | 1277 | OUT_BATCH(batch, CMD_PIPELINE_SELECT | PIPELINE_SELECT_MEDIA | |
1278 | - GEN9_PIPELINE_SELECTION_MASK); | |
1278 | + GEN9_PIPELINE_SELECTION_MASK | | |
1279 | + GEN9_FORCE_MEDIA_AWAKE_ON | | |
1280 | + GEN9_FORCE_MEDIA_AWAKE_MASK); | |
1279 | 1281 | ADVANCE_BATCH(batch); |
1280 | 1282 | } |
1281 | 1283 |
@@ -1292,3 +1294,16 @@ gen9_gpe_pipeline_setup(VADriverContextP ctx, | ||
1292 | 1294 | gen8_gpe_curbe_load(ctx, gpe_context, batch); |
1293 | 1295 | gen8_gpe_idrt(ctx, gpe_context, batch); |
1294 | 1296 | } |
1297 | + | |
1298 | +void | |
1299 | +gen9_gpe_pipeline_end(VADriverContextP ctx, | |
1300 | + struct i965_gpe_context *gpe_context, | |
1301 | + struct intel_batchbuffer *batch) | |
1302 | +{ | |
1303 | + BEGIN_BATCH(batch, 1); | |
1304 | + OUT_BATCH(batch, CMD_PIPELINE_SELECT | PIPELINE_SELECT_MEDIA | | |
1305 | + GEN9_PIPELINE_SELECTION_MASK | | |
1306 | + GEN9_FORCE_MEDIA_AWAKE_OFF | | |
1307 | + GEN9_FORCE_MEDIA_AWAKE_MASK); | |
1308 | + ADVANCE_BATCH(batch); | |
1309 | +} |
@@ -223,4 +223,9 @@ void gen8_gpe_load_kernels(VADriverContextP ctx, | ||
223 | 223 | void gen9_gpe_pipeline_setup(VADriverContextP ctx, |
224 | 224 | struct i965_gpe_context *gpe_context, |
225 | 225 | struct intel_batchbuffer *batch); |
226 | + | |
227 | +void gen9_gpe_pipeline_end(VADriverContextP ctx, | |
228 | + struct i965_gpe_context *gpe_context, | |
229 | + struct intel_batchbuffer *batch); | |
230 | + | |
226 | 231 | #endif /* _I965_GPE_UTILS_H_ */ |