• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

hardware/intel/intel-driver


Commit MetaInfo

Revisióna56efcdf27d11ad9b21664b4a2cda72d7f90f5a8 (tree)
Tiempo2014-12-14 01:42:17
AutorZhao Yakui <yakui.zhao@inte...>
CommiterXiang, Haihao

Log Message

Add the override flag to assure that HEVC video command always uses BSD ring0 for SKL GT3 machine

The SKL GT3 machine has two BSD video rings,which can dispatch the video
command.But the HEVC command is an exception, which can't be handled by
the second BSD video ring. So we need to assure that the HEVC command always
uses the first BSD video ring.

Reviewed-by: Xiang Haihao <haihao.xiang@intel.com>
Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
(cherry picked from commit b2a558b335e27d53436df3cc8562163c1baa8f76)

Cambiar Resumen

Diferencia incremental

--- a/src/gen9_mfd.c
+++ b/src/gen9_mfd.c
@@ -859,6 +859,7 @@ gen9_hcpd_hevc_decode_picture(VADriverContextP ctx,
859859 struct gen9_hcpd_context *gen9_hcpd_context)
860860 {
861861 VAStatus vaStatus;
862+ struct i965_driver_data *i965 = i965_driver_data(ctx);
862863 struct intel_batchbuffer *batch = gen9_hcpd_context->base.batch;
863864 VAPictureParameterBufferHEVC *pic_param;
864865 VASliceParameterBufferHEVC *slice_param, *next_slice_param, *next_slice_group_param;
@@ -873,7 +874,10 @@ gen9_hcpd_hevc_decode_picture(VADriverContextP ctx,
873874 assert(decode_state->pic_param && decode_state->pic_param->buffer);
874875 pic_param = (VAPictureParameterBufferHEVC *)decode_state->pic_param->buffer;
875876
876- intel_batchbuffer_start_atomic_bcs(batch, 0x1000);
877+ if (i965->intel.has_bsd2)
878+ intel_batchbuffer_start_atomic_bcs_override(batch, 0x1000, BSD_RING0);
879+ else
880+ intel_batchbuffer_start_atomic_bcs(batch, 0x1000);
877881 intel_batchbuffer_emit_mi_flush(batch);
878882
879883 gen9_hcpd_pipe_mode_select(ctx, decode_state, HCP_CODEC_HEVC, gen9_hcpd_context);
--- a/src/intel_driver.c
+++ b/src/intel_driver.c
@@ -36,6 +36,14 @@
3636 #include "intel_driver.h"
3737 uint32_t g_intel_debug_option_flags = 0;
3838
39+#ifdef I915_PARAM_HAS_BSD2
40+#define LOCAL_I915_PARAM_HAS_BSD2 I915_PARAM_HAS_BSD2
41+#endif
42+
43+#ifndef LOCAL_I915_PARAM_HAS_BSD2
44+#define LOCAL_I915_PARAM_HAS_BSD2 30
45+#endif
46+
3947 static Bool
4048 intel_driver_get_param(struct intel_driver_data *intel, int param, int *value)
4149 {
@@ -77,6 +85,7 @@ intel_driver_init(VADriverContextP ctx)
7785 struct drm_state * const drm_state = (struct drm_state *)ctx->drm_state;
7886 int has_exec2 = 0, has_bsd = 0, has_blt = 0, has_vebox = 0;
7987 char *env_str = NULL;
88+ int ret_value = 0;
8089
8190 g_intel_debug_option_flags = 0;
8291 if ((env_str = getenv("VA_INTEL_DEBUG")))
@@ -115,7 +124,11 @@ intel_driver_init(VADriverContextP ctx)
115124 intel->has_blt = has_blt;
116125 if (intel_driver_get_param(intel, I915_PARAM_HAS_VEBOX, &has_vebox))
117126 intel->has_vebox = !!has_vebox;
118-
127+
128+ intel->has_bsd2 = 0;
129+ if (intel_driver_get_param(intel, LOCAL_I915_PARAM_HAS_BSD2, &ret_value))
130+ intel->has_bsd2 = !!ret_value;
131+
119132 intel_driver_get_revid(intel, &intel->revision);
120133 intel_memman_init(intel);
121134 return true;
--- a/src/intel_driver.h
+++ b/src/intel_driver.h
@@ -155,6 +155,7 @@ struct intel_driver_data
155155 unsigned int has_bsd : 1; /* Flag: has bitstream decoder for H.264? */
156156 unsigned int has_blt : 1; /* Flag: has BLT unit? */
157157 unsigned int has_vebox : 1; /* Flag: has VEBOX unit */
158+ unsigned int has_bsd2 : 1; /* Flag: has the second BSD video ring unit */
158159
159160 const struct intel_device_info *device_info;
160161 };