2 * Copyright © 2014 Intel Corporation
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the
6 * "Software"), to deal in the Software without restriction, including
7 * without limitation the rights to use, copy, modify, merge, publish,
8 * distribute, sub license, and/or sell copies of the Software, and to
9 * permit persons to whom the Software is furnished to do so, subject to
10 * the following conditions:
12 * The above copyright notice and this permission notice (including the
13 * next paragraph) shall be included in all copies or substantial portions
16 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
17 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
19 * IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR
20 * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
21 * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
22 * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
28 #include "i965_drv_video.h"
35 /* Extra set of chroma formats supported for H.264 decoding (beyond YUV 4:2:0) */
36 #define EXTRA_H264_DEC_CHROMA_FORMATS \
39 /* Extra set of chroma formats supported for JPEG decoding (beyond YUV 4:2:0) */
40 #define EXTRA_JPEG_DEC_CHROMA_FORMATS \
41 (VA_RT_FORMAT_YUV400 | VA_RT_FORMAT_YUV411 | VA_RT_FORMAT_YUV422 | \
44 /* Extra set of chroma formats supported for JPEG encoding (beyond YUV 4:2:0) */
45 #define EXTRA_JPEG_ENC_CHROMA_FORMATS \
46 (VA_RT_FORMAT_YUV400| VA_RT_FORMAT_YUV422 | VA_RT_FORMAT_YUV444 | VA_RT_FORMAT_RGB32)
48 /* Defines VA profile as a 32-bit unsigned integer mask */
49 #define VA_PROFILE_MASK(PROFILE) \
50 (1U << VAProfile##PROFILE)
52 extern struct hw_context *i965_proc_context_init(VADriverContextP, struct object_config *);
53 extern struct hw_context *g4x_dec_hw_context_init(VADriverContextP, struct object_config *);
54 extern bool genx_render_init(VADriverContextP);
56 static struct hw_codec_info g4x_hw_codec_info = {
57 .dec_hw_context_init = g4x_dec_hw_context_init,
58 .enc_hw_context_init = NULL,
59 .proc_hw_context_init = NULL,
60 .render_init = genx_render_init,
61 .post_processing_context_init = NULL,
65 .min_linear_wpitch = 16,
66 .min_linear_hpitch = 16,
68 .has_mpeg2_decoding = 1,
73 extern struct hw_context *ironlake_dec_hw_context_init(VADriverContextP, struct object_config *);
74 extern void i965_post_processing_context_init(VADriverContextP, void *, struct intel_batchbuffer *);
76 static struct hw_codec_info ilk_hw_codec_info = {
77 .dec_hw_context_init = ironlake_dec_hw_context_init,
78 .enc_hw_context_init = NULL,
79 .proc_hw_context_init = i965_proc_context_init,
80 .render_init = genx_render_init,
81 .post_processing_context_init = i965_post_processing_context_init,
85 .min_linear_wpitch = 16,
86 .min_linear_hpitch = 16,
88 .has_mpeg2_decoding = 1,
89 .has_h264_decoding = 1,
91 .has_accelerated_putimage = 1,
96 static void gen6_hw_codec_preinit(VADriverContextP ctx, struct hw_codec_info *codec_info);
98 extern struct hw_context *gen6_dec_hw_context_init(VADriverContextP, struct object_config *);
99 extern struct hw_context *gen6_enc_hw_context_init(VADriverContextP, struct object_config *);
100 static struct hw_codec_info snb_hw_codec_info = {
101 .dec_hw_context_init = gen6_dec_hw_context_init,
102 .enc_hw_context_init = gen6_enc_hw_context_init,
103 .proc_hw_context_init = i965_proc_context_init,
104 .render_init = genx_render_init,
105 .post_processing_context_init = i965_post_processing_context_init,
106 .preinit_hw_codec = gen6_hw_codec_preinit,
110 .min_linear_wpitch = 16,
111 .min_linear_hpitch = 16,
113 .h264_mvc_dec_profiles = VA_PROFILE_MASK(H264StereoHigh),
114 .h264_dec_chroma_formats = EXTRA_H264_DEC_CHROMA_FORMATS,
116 .has_mpeg2_decoding = 1,
117 .has_h264_decoding = 1,
118 .has_h264_encoding = 1,
119 .has_vc1_decoding = 1,
121 .has_accelerated_getimage = 1,
122 .has_accelerated_putimage = 1,
123 .has_tiled_surface = 1,
124 .has_di_motion_adptive = 1,
128 { VAProcFilterNoiseReduction, I965_RING_NULL },
129 { VAProcFilterDeinterlacing, I965_RING_NULL },
133 static void gen7_hw_codec_preinit(VADriverContextP ctx, struct hw_codec_info *codec_info);
135 extern struct hw_context *gen7_dec_hw_context_init(VADriverContextP, struct object_config *);
136 extern struct hw_context *gen7_enc_hw_context_init(VADriverContextP, struct object_config *);
137 static struct hw_codec_info ivb_hw_codec_info = {
138 .dec_hw_context_init = gen7_dec_hw_context_init,
139 .enc_hw_context_init = gen7_enc_hw_context_init,
140 .proc_hw_context_init = i965_proc_context_init,
141 .render_init = genx_render_init,
142 .post_processing_context_init = i965_post_processing_context_init,
143 .preinit_hw_codec = gen7_hw_codec_preinit,
147 .min_linear_wpitch = 64,
148 .min_linear_hpitch = 16,
150 .h264_mvc_dec_profiles = VA_PROFILE_MASK(H264StereoHigh),
151 .h264_dec_chroma_formats = EXTRA_H264_DEC_CHROMA_FORMATS,
152 .jpeg_dec_chroma_formats = EXTRA_JPEG_DEC_CHROMA_FORMATS,
154 .has_mpeg2_decoding = 1,
155 .has_mpeg2_encoding = 1,
156 .has_h264_decoding = 1,
157 .has_h264_encoding = 1,
158 .has_vc1_decoding = 1,
159 .has_jpeg_decoding = 1,
161 .has_accelerated_getimage = 1,
162 .has_accelerated_putimage = 1,
163 .has_tiled_surface = 1,
164 .has_di_motion_adptive = 1,
165 .has_di_motion_compensated = 1,
169 { VAProcFilterNoiseReduction, I965_RING_NULL },
170 { VAProcFilterDeinterlacing, I965_RING_NULL },
174 static void hsw_hw_codec_preinit(VADriverContextP ctx, struct hw_codec_info *codec_info);
176 extern struct hw_context *gen75_dec_hw_context_init(VADriverContextP, struct object_config *);
177 extern struct hw_context *gen75_enc_hw_context_init(VADriverContextP, struct object_config *);
178 extern struct hw_context *gen75_proc_context_init(VADriverContextP, struct object_config *);
179 static struct hw_codec_info hsw_hw_codec_info = {
180 .dec_hw_context_init = gen75_dec_hw_context_init,
181 .enc_hw_context_init = gen75_enc_hw_context_init,
182 .proc_hw_context_init = gen75_proc_context_init,
183 .render_init = genx_render_init,
184 .post_processing_context_init = i965_post_processing_context_init,
185 .preinit_hw_codec = hsw_hw_codec_preinit,
189 .min_linear_wpitch = 64,
190 .min_linear_hpitch = 16,
192 .h264_mvc_dec_profiles = (VA_PROFILE_MASK(H264StereoHigh) |
193 VA_PROFILE_MASK(H264MultiviewHigh)),
194 .h264_dec_chroma_formats = EXTRA_H264_DEC_CHROMA_FORMATS,
195 .jpeg_dec_chroma_formats = EXTRA_JPEG_DEC_CHROMA_FORMATS,
197 .has_mpeg2_decoding = 1,
198 .has_mpeg2_encoding = 1,
199 .has_h264_decoding = 1,
200 .has_h264_encoding = 1,
201 .has_vc1_decoding = 1,
202 .has_jpeg_decoding = 1,
204 .has_accelerated_getimage = 1,
205 .has_accelerated_putimage = 1,
206 .has_tiled_surface = 1,
207 .has_di_motion_adptive = 1,
208 .has_di_motion_compensated = 1,
209 .has_h264_mvc_encoding = 1,
213 { VAProcFilterNoiseReduction, I965_RING_VEBOX },
214 { VAProcFilterDeinterlacing, I965_RING_VEBOX },
215 { VAProcFilterSharpening, I965_RING_NULL },
216 { VAProcFilterColorBalance, I965_RING_VEBOX},
217 { VAProcFilterSkinToneEnhancement, I965_RING_VEBOX},
221 extern struct hw_context *gen8_dec_hw_context_init(VADriverContextP, struct object_config *);
222 extern struct hw_context *gen8_enc_hw_context_init(VADriverContextP, struct object_config *);
223 extern void gen8_post_processing_context_init(VADriverContextP, void *, struct intel_batchbuffer *);
224 static struct hw_codec_info bdw_hw_codec_info = {
225 .dec_hw_context_init = gen8_dec_hw_context_init,
226 .enc_hw_context_init = gen8_enc_hw_context_init,
227 .proc_hw_context_init = gen75_proc_context_init,
228 .render_init = gen8_render_init,
229 .post_processing_context_init = gen8_post_processing_context_init,
233 .min_linear_wpitch = 128,
234 .min_linear_hpitch = 16,
236 .h264_mvc_dec_profiles = (VA_PROFILE_MASK(H264StereoHigh) |
237 VA_PROFILE_MASK(H264MultiviewHigh)),
238 .h264_dec_chroma_formats = EXTRA_H264_DEC_CHROMA_FORMATS,
239 .jpeg_dec_chroma_formats = EXTRA_JPEG_DEC_CHROMA_FORMATS,
241 .has_mpeg2_decoding = 1,
242 .has_mpeg2_encoding = 1,
243 .has_h264_decoding = 1,
244 .has_h264_encoding = 1,
245 .has_vc1_decoding = 1,
246 .has_jpeg_decoding = 1,
248 .has_accelerated_getimage = 1,
249 .has_accelerated_putimage = 1,
250 .has_tiled_surface = 1,
251 .has_di_motion_adptive = 1,
252 .has_di_motion_compensated = 1,
253 .has_vp8_decoding = 1,
254 .has_h264_mvc_encoding = 1,
258 { VAProcFilterNoiseReduction, I965_RING_VEBOX },
259 { VAProcFilterDeinterlacing, I965_RING_VEBOX },
260 { VAProcFilterSharpening, I965_RING_NULL }, /* need to rebuild the shader for BDW */
261 { VAProcFilterColorBalance, I965_RING_VEBOX},
262 { VAProcFilterSkinToneEnhancement, I965_RING_VEBOX},
266 extern struct hw_context *gen9_dec_hw_context_init(VADriverContextP, struct object_config *);
267 static struct hw_codec_info chv_hw_codec_info = {
268 .dec_hw_context_init = gen9_dec_hw_context_init,
269 .enc_hw_context_init = gen8_enc_hw_context_init,
270 .proc_hw_context_init = gen75_proc_context_init,
271 .render_init = gen8_render_init,
272 .post_processing_context_init = gen8_post_processing_context_init,
276 .min_linear_wpitch = 128,
277 .min_linear_hpitch = 16,
279 .h264_mvc_dec_profiles = (VA_PROFILE_MASK(H264StereoHigh) |
280 VA_PROFILE_MASK(H264MultiviewHigh)),
281 .h264_dec_chroma_formats = EXTRA_H264_DEC_CHROMA_FORMATS,
282 .jpeg_dec_chroma_formats = EXTRA_JPEG_DEC_CHROMA_FORMATS,
283 .jpeg_enc_chroma_formats = EXTRA_JPEG_ENC_CHROMA_FORMATS,
285 .has_mpeg2_decoding = 1,
286 .has_mpeg2_encoding = 1,
287 .has_h264_decoding = 1,
288 .has_h264_encoding = 1,
289 .has_vc1_decoding = 1,
290 .has_jpeg_decoding = 1,
291 .has_jpeg_encoding = 1,
293 .has_accelerated_getimage = 1,
294 .has_accelerated_putimage = 1,
295 .has_tiled_surface = 1,
296 .has_di_motion_adptive = 1,
297 .has_di_motion_compensated = 1,
298 .has_vp8_decoding = 1,
299 .has_vp8_encoding = 1,
300 .has_h264_mvc_encoding = 1,
301 .has_hevc_decoding = 1,
305 { VAProcFilterNoiseReduction, I965_RING_VEBOX },
306 { VAProcFilterDeinterlacing, I965_RING_VEBOX },
307 { VAProcFilterSharpening, I965_RING_NULL }, /* need to rebuild the shader for BDW */
308 { VAProcFilterColorBalance, I965_RING_VEBOX},
309 { VAProcFilterSkinToneEnhancement, I965_RING_VEBOX},
313 extern struct hw_context *gen9_enc_hw_context_init(VADriverContextP, struct object_config *);
314 extern void gen9_post_processing_context_init(VADriverContextP, void *, struct intel_batchbuffer *);
315 static struct hw_codec_info skl_hw_codec_info = {
316 .dec_hw_context_init = gen9_dec_hw_context_init,
317 .enc_hw_context_init = gen9_enc_hw_context_init,
318 .proc_hw_context_init = gen75_proc_context_init,
319 .render_init = gen9_render_init,
320 .post_processing_context_init = gen9_post_processing_context_init,
324 .min_linear_wpitch = 128,
325 .min_linear_hpitch = 16,
327 .h264_mvc_dec_profiles = (VA_PROFILE_MASK(H264StereoHigh) |
328 VA_PROFILE_MASK(H264MultiviewHigh)),
329 .h264_dec_chroma_formats = EXTRA_H264_DEC_CHROMA_FORMATS,
330 .jpeg_dec_chroma_formats = EXTRA_JPEG_DEC_CHROMA_FORMATS,
331 .jpeg_enc_chroma_formats = EXTRA_JPEG_ENC_CHROMA_FORMATS,
333 .has_mpeg2_decoding = 1,
334 .has_mpeg2_encoding = 1,
335 .has_h264_decoding = 1,
336 .has_h264_encoding = 1,
337 .has_vc1_decoding = 1,
338 .has_jpeg_decoding = 1,
339 .has_jpeg_encoding = 1,
341 .has_accelerated_getimage = 1,
342 .has_accelerated_putimage = 1,
343 .has_tiled_surface = 1,
344 .has_di_motion_adptive = 1,
345 .has_di_motion_compensated = 1,
346 .has_vp8_decoding = 1,
347 .has_vp8_encoding = 1,
348 .has_h264_mvc_encoding = 1,
349 .has_hevc_decoding = 1,
350 .has_hevc_encoding = 1,
354 { VAProcFilterNoiseReduction, I965_RING_VEBOX },
355 { VAProcFilterDeinterlacing, I965_RING_VEBOX },
356 { VAProcFilterSharpening, I965_RING_NULL }, /* need to rebuild the shader for BDW */
357 { VAProcFilterColorBalance, I965_RING_VEBOX},
358 { VAProcFilterSkinToneEnhancement, I965_RING_VEBOX},
363 static struct hw_codec_info bxt_hw_codec_info = {
364 .dec_hw_context_init = gen9_dec_hw_context_init,
365 .enc_hw_context_init = gen9_enc_hw_context_init,
366 .proc_hw_context_init = gen75_proc_context_init,
367 .render_init = gen9_render_init,
368 .post_processing_context_init = gen9_post_processing_context_init,
372 .min_linear_wpitch = 64,
373 .min_linear_hpitch = 16,
375 .h264_mvc_dec_profiles = (VA_PROFILE_MASK(H264StereoHigh) |
376 VA_PROFILE_MASK(H264MultiviewHigh)),
377 .h264_dec_chroma_formats = EXTRA_H264_DEC_CHROMA_FORMATS,
378 .jpeg_dec_chroma_formats = EXTRA_JPEG_DEC_CHROMA_FORMATS,
379 .jpeg_enc_chroma_formats = EXTRA_JPEG_ENC_CHROMA_FORMATS,
381 .has_mpeg2_decoding = 1,
382 .has_h264_decoding = 1,
383 .has_h264_encoding = 1,
384 .has_vc1_decoding = 1,
385 .has_jpeg_decoding = 1,
386 .has_jpeg_encoding = 1,
388 .has_accelerated_getimage = 1,
389 .has_accelerated_putimage = 1,
390 .has_tiled_surface = 1,
391 .has_di_motion_adptive = 1,
392 .has_di_motion_compensated = 1,
393 .has_vp8_decoding = 1,
394 .has_vp8_encoding = 1,
395 .has_h264_mvc_encoding = 1,
396 .has_hevc_decoding = 1,
397 .has_hevc_encoding = 1,
401 { VAProcFilterNoiseReduction, I965_RING_VEBOX },
402 { VAProcFilterDeinterlacing, I965_RING_VEBOX },
403 { VAProcFilterSharpening, I965_RING_NULL },
404 { VAProcFilterColorBalance, I965_RING_VEBOX},
405 { VAProcFilterSkinToneEnhancement, I965_RING_VEBOX},
410 struct hw_codec_info *
411 i965_get_codec_info(int devid)
415 #define CHIPSET(id, family, dev, str) case id: return &family##_hw_codec_info;
416 #include "i965_pciids.h"
422 static const struct intel_device_info g4x_device_info = {
426 .max_wm_threads = 50, /* 10 * 5 */
431 static const struct intel_device_info ilk_device_info = {
435 .max_wm_threads = 72, /* 12 * 6 */
438 static const struct intel_device_info snb_gt1_device_info = {
443 .max_wm_threads = 40,
446 static const struct intel_device_info snb_gt2_device_info = {
451 .max_wm_threads = 80,
454 static const struct intel_device_info ivb_gt1_device_info = {
459 .max_wm_threads = 48,
464 static const struct intel_device_info ivb_gt2_device_info = {
469 .max_wm_threads = 172,
474 static const struct intel_device_info byt_device_info = {
479 .max_wm_threads = 48,
485 static const struct intel_device_info hsw_gt1_device_info = {
490 .max_wm_threads = 102,
495 static const struct intel_device_info hsw_gt2_device_info = {
500 .max_wm_threads = 204,
505 static const struct intel_device_info hsw_gt3_device_info = {
510 .max_wm_threads = 408,
515 static const struct intel_device_info bdw_device_info = {
519 .max_wm_threads = 64, /* per PSD */
522 static const struct intel_device_info chv_device_info = {
526 .max_wm_threads = 64, /* per PSD */
531 static const struct intel_device_info skl_device_info = {
535 .max_wm_threads = 64, /* per PSD */
538 static const struct intel_device_info bxt_device_info = {
542 .max_wm_threads = 64, /* per PSD */
546 const struct intel_device_info *
547 i965_get_device_info(int devid)
551 #define CHIPSET(id, family, dev, str) case id: return &dev##_device_info;
552 #include "i965_pciids.h"
558 static void cpuid(unsigned int op,
559 uint32_t *eax, uint32_t *ebx,
560 uint32_t *ecx, uint32_t *edx)
562 __cpuid_count(op, 0, *eax, *ebx, *ecx, *edx);
566 * This function doesn't check the length. And the caller should
567 * assure that the length of input string should be greater than 48.
569 static int intel_driver_detect_cpustring(char *model_id)
573 if (model_id == NULL)
576 rdata = (uint32_t *)model_id;
578 /* obtain the max supported extended CPUID info */
579 cpuid(0x80000000, &rdata[0], &rdata[1], &rdata[2], &rdata[3]);
581 /* If the max extended CPUID info is less than 0x80000004, fail */
582 if (rdata[0] < 0x80000004)
585 /* obtain the CPUID string */
586 cpuid(0x80000002, &rdata[0], &rdata[1], &rdata[2], &rdata[3]);
587 cpuid(0x80000003, &rdata[4], &rdata[5], &rdata[6], &rdata[7]);
588 cpuid(0x80000004, &rdata[8], &rdata[9], &rdata[10], &rdata[11]);
590 *(model_id + 48) = '\0';
595 * the hook_list for HSW.
596 * It is captured by /proc/cpuinfo and the space character is stripped.
598 const static char *hsw_cpu_hook_list[] = {
599 "Intel(R)Pentium(R)3556U",
600 "Intel(R)Pentium(R)3560Y",
601 "Intel(R)Pentium(R)3550M",
602 "Intel(R)Celeron(R)2980U",
603 "Intel(R)Celeron(R)2955U",
604 "Intel(R)Celeron(R)2950M",
607 static void hsw_hw_codec_preinit(VADriverContextP ctx, struct hw_codec_info *codec_info)
609 char model_string[64];
610 char *model_ptr, *tmp_ptr;
611 int i, model_len, list_len;
614 memset(model_string, 0, sizeof(model_string));
616 /* If it can't detect cpu model_string, leave it alone */
617 if (intel_driver_detect_cpustring(model_string))
620 /* strip the cpufreq info */
621 model_ptr = model_string;
622 tmp_ptr = strstr(model_ptr, "@");
627 /* strip the space character and convert to the lower case */
628 model_ptr = model_string;
629 model_len = strlen(model_string);
630 for (i = 0; i < model_len; i++) {
631 if (model_string[i] != ' ') {
632 *model_ptr = model_string[i];
639 list_len = sizeof(hsw_cpu_hook_list) / sizeof(char *);
640 model_len = strlen(model_string);
641 for (i = 0; i < list_len; i++) {
642 model_ptr = (char *)hsw_cpu_hook_list[i];
644 if (strlen(model_ptr) != model_len)
647 if (strncasecmp(model_string, model_ptr, model_len) == 0) {
654 codec_info->has_h264_encoding = 0;
655 codec_info->has_h264_mvc_encoding = 0;
656 codec_info->has_mpeg2_encoding = 0;
662 * the hook_list for Sandybride.
663 * It is captured by /proc/cpuinfo and the space character is stripped.
665 const static char *gen6_cpu_hook_list[] = {
666 "Intel(R)Celeron(R)CPU847",
667 "Intel(R)Celeron(R)CPU867",
670 static void gen6_hw_codec_preinit(VADriverContextP ctx, struct hw_codec_info *codec_info)
672 char model_string[64];
673 char *model_ptr, *tmp_ptr;
674 int i, model_len, list_len;
677 memset(model_string, 0, sizeof(model_string));
679 /* If it can't detect cpu model_string, leave it alone */
680 if (intel_driver_detect_cpustring(model_string))
683 /* strip the cpufreq info */
684 model_ptr = model_string;
685 tmp_ptr = strstr(model_ptr, "@");
690 /* strip the space character and convert to the lower case */
691 model_ptr = model_string;
692 model_len = strlen(model_string);
693 for (i = 0; i < model_len; i++) {
694 if (model_string[i] != ' ') {
695 *model_ptr = model_string[i];
702 list_len = sizeof(gen6_cpu_hook_list) / sizeof(char *);
703 model_len = strlen(model_string);
704 for (i = 0; i < list_len; i++) {
705 model_ptr = (char *)gen6_cpu_hook_list[i];
707 if (strlen(model_ptr) != model_len)
710 if (strncasecmp(model_string, model_ptr, model_len) == 0) {
717 codec_info->has_h264_encoding = 0;
723 * the hook_list for Ivybridge.
724 * It is captured by /proc/cpuinfo and the space character is stripped.
726 const static char *gen7_cpu_hook_list[] = {
727 "Intel(R)Celeron(R)CPU1007U",
730 static void gen7_hw_codec_preinit(VADriverContextP ctx, struct hw_codec_info *codec_info)
732 char model_string[64];
733 char *model_ptr, *tmp_ptr;
734 int i, model_len, list_len;
737 memset(model_string, 0, sizeof(model_string));
739 /* If it can't detect cpu model_string, leave it alone */
740 if (intel_driver_detect_cpustring(model_string))
743 /* strip the cpufreq info */
744 model_ptr = model_string;
745 tmp_ptr = strstr(model_ptr, "@");
750 /* strip the space character and convert to the lower case */
751 model_ptr = model_string;
752 model_len = strlen(model_string);
753 for (i = 0; i < model_len; i++) {
754 if (model_string[i] != ' ') {
755 *model_ptr = model_string[i];
762 list_len = sizeof(gen7_cpu_hook_list) / sizeof(char *);
763 model_len = strlen(model_string);
764 for (i = 0; i < list_len; i++) {
765 model_ptr = (char *)gen7_cpu_hook_list[i];
767 if (strlen(model_ptr) != model_len)
770 if (strncasecmp(model_string, model_ptr, model_len) == 0) {
777 codec_info->has_h264_encoding = 0;
778 codec_info->has_mpeg2_encoding = 0;