hardware/intel/intel-driver
Revisión | a56efcdf27d11ad9b21664b4a2cda72d7f90f5a8 (tree) |
---|---|
Tiempo | 2014-12-14 01:42:17 |
Autor | Zhao Yakui <yakui.zhao@inte...> |
Commiter | Xiang, Haihao |
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)
@@ -859,6 +859,7 @@ gen9_hcpd_hevc_decode_picture(VADriverContextP ctx, | ||
859 | 859 | struct gen9_hcpd_context *gen9_hcpd_context) |
860 | 860 | { |
861 | 861 | VAStatus vaStatus; |
862 | + struct i965_driver_data *i965 = i965_driver_data(ctx); | |
862 | 863 | struct intel_batchbuffer *batch = gen9_hcpd_context->base.batch; |
863 | 864 | VAPictureParameterBufferHEVC *pic_param; |
864 | 865 | VASliceParameterBufferHEVC *slice_param, *next_slice_param, *next_slice_group_param; |
@@ -873,7 +874,10 @@ gen9_hcpd_hevc_decode_picture(VADriverContextP ctx, | ||
873 | 874 | assert(decode_state->pic_param && decode_state->pic_param->buffer); |
874 | 875 | pic_param = (VAPictureParameterBufferHEVC *)decode_state->pic_param->buffer; |
875 | 876 | |
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); | |
877 | 881 | intel_batchbuffer_emit_mi_flush(batch); |
878 | 882 | |
879 | 883 | gen9_hcpd_pipe_mode_select(ctx, decode_state, HCP_CODEC_HEVC, gen9_hcpd_context); |
@@ -36,6 +36,14 @@ | ||
36 | 36 | #include "intel_driver.h" |
37 | 37 | uint32_t g_intel_debug_option_flags = 0; |
38 | 38 | |
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 | + | |
39 | 47 | static Bool |
40 | 48 | intel_driver_get_param(struct intel_driver_data *intel, int param, int *value) |
41 | 49 | { |
@@ -77,6 +85,7 @@ intel_driver_init(VADriverContextP ctx) | ||
77 | 85 | struct drm_state * const drm_state = (struct drm_state *)ctx->drm_state; |
78 | 86 | int has_exec2 = 0, has_bsd = 0, has_blt = 0, has_vebox = 0; |
79 | 87 | char *env_str = NULL; |
88 | + int ret_value = 0; | |
80 | 89 | |
81 | 90 | g_intel_debug_option_flags = 0; |
82 | 91 | if ((env_str = getenv("VA_INTEL_DEBUG"))) |
@@ -115,7 +124,11 @@ intel_driver_init(VADriverContextP ctx) | ||
115 | 124 | intel->has_blt = has_blt; |
116 | 125 | if (intel_driver_get_param(intel, I915_PARAM_HAS_VEBOX, &has_vebox)) |
117 | 126 | 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 | + | |
119 | 132 | intel_driver_get_revid(intel, &intel->revision); |
120 | 133 | intel_memman_init(intel); |
121 | 134 | return true; |
@@ -155,6 +155,7 @@ struct intel_driver_data | ||
155 | 155 | unsigned int has_bsd : 1; /* Flag: has bitstream decoder for H.264? */ |
156 | 156 | unsigned int has_blt : 1; /* Flag: has BLT unit? */ |
157 | 157 | unsigned int has_vebox : 1; /* Flag: has VEBOX unit */ |
158 | + unsigned int has_bsd2 : 1; /* Flag: has the second BSD video ring unit */ | |
158 | 159 | |
159 | 160 | const struct intel_device_info *device_info; |
160 | 161 | }; |