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"
30 extern struct hw_context *i965_proc_context_init(VADriverContextP, struct object_config *);
31 extern struct hw_context *g4x_dec_hw_context_init(VADriverContextP, struct object_config *);
32 extern bool genx_render_init(VADriverContextP);
34 static const struct hw_codec_info g4x_hw_codec_info = {
35 .dec_hw_context_init = g4x_dec_hw_context_init,
36 .enc_hw_context_init = NULL,
37 .proc_hw_context_init = NULL,
38 .render_init = genx_render_init,
43 .has_mpeg2_decoding = 1,
48 extern struct hw_context *ironlake_dec_hw_context_init(VADriverContextP, struct object_config *);
49 static const struct hw_codec_info ilk_hw_codec_info = {
50 .dec_hw_context_init = ironlake_dec_hw_context_init,
51 .enc_hw_context_init = NULL,
52 .proc_hw_context_init = i965_proc_context_init,
53 .render_init = genx_render_init,
58 .has_mpeg2_decoding = 1,
59 .has_h264_decoding = 1,
61 .has_accelerated_putimage = 1,
66 extern struct hw_context *gen6_dec_hw_context_init(VADriverContextP, struct object_config *);
67 extern struct hw_context *gen6_enc_hw_context_init(VADriverContextP, struct object_config *);
68 static const struct hw_codec_info snb_hw_codec_info = {
69 .dec_hw_context_init = gen6_dec_hw_context_init,
70 .enc_hw_context_init = gen6_enc_hw_context_init,
71 .proc_hw_context_init = i965_proc_context_init,
72 .render_init = genx_render_init,
77 .has_mpeg2_decoding = 1,
78 .has_h264_decoding = 1,
79 .has_h264_encoding = 1,
80 .has_vc1_decoding = 1,
82 .has_accelerated_getimage = 1,
83 .has_accelerated_putimage = 1,
84 .has_tiled_surface = 1,
88 { VAProcFilterNoiseReduction, I965_RING_NULL },
89 { VAProcFilterDeinterlacing, I965_RING_NULL },
93 extern struct hw_context *gen7_dec_hw_context_init(VADriverContextP, struct object_config *);
94 extern struct hw_context *gen7_enc_hw_context_init(VADriverContextP, struct object_config *);
95 static const struct hw_codec_info ivb_hw_codec_info = {
96 .dec_hw_context_init = gen7_dec_hw_context_init,
97 .enc_hw_context_init = gen7_enc_hw_context_init,
98 .proc_hw_context_init = i965_proc_context_init,
99 .render_init = genx_render_init,
104 .has_mpeg2_decoding = 1,
105 .has_mpeg2_encoding = 1,
106 .has_h264_decoding = 1,
107 .has_h264_encoding = 1,
108 .has_vc1_decoding = 1,
109 .has_jpeg_decoding = 1,
111 .has_accelerated_getimage = 1,
112 .has_accelerated_putimage = 1,
113 .has_tiled_surface = 1,
114 .has_di_motion_adptive = 1,
118 { VAProcFilterNoiseReduction, I965_RING_NULL },
119 { VAProcFilterDeinterlacing, I965_RING_NULL },
123 extern struct hw_context *gen75_dec_hw_context_init(VADriverContextP, struct object_config *);
124 extern struct hw_context *gen75_enc_hw_context_init(VADriverContextP, struct object_config *);
125 extern struct hw_context *gen75_proc_context_init(VADriverContextP, struct object_config *);
126 static const struct hw_codec_info hsw_hw_codec_info = {
127 .dec_hw_context_init = gen75_dec_hw_context_init,
128 .enc_hw_context_init = gen75_enc_hw_context_init,
129 .proc_hw_context_init = gen75_proc_context_init,
130 .render_init = genx_render_init,
135 .has_mpeg2_decoding = 1,
136 .has_mpeg2_encoding = 1,
137 .has_h264_decoding = 1,
138 .has_h264_encoding = 1,
139 .has_vc1_decoding = 1,
140 .has_jpeg_decoding = 1,
142 .has_accelerated_getimage = 1,
143 .has_accelerated_putimage = 1,
144 .has_tiled_surface = 1,
145 .has_di_motion_adptive = 1,
146 .has_di_motion_compensated = 1,
150 { VAProcFilterNoiseReduction, I965_RING_VEBOX },
151 { VAProcFilterDeinterlacing, I965_RING_VEBOX },
152 { VAProcFilterSharpening, I965_RING_NULL },
153 { VAProcFilterColorBalance, I965_RING_VEBOX},
154 { VAProcFilterSkinToneEnhancement, I965_RING_VEBOX},
158 extern struct hw_context *gen8_dec_hw_context_init(VADriverContextP, struct object_config *);
159 extern struct hw_context *gen8_enc_hw_context_init(VADriverContextP, struct object_config *);
160 static const struct hw_codec_info bdw_hw_codec_info = {
161 .dec_hw_context_init = gen8_dec_hw_context_init,
162 .enc_hw_context_init = gen8_enc_hw_context_init,
163 .proc_hw_context_init = gen75_proc_context_init,
164 .render_init = gen8_render_init,
169 .has_mpeg2_decoding = 1,
170 .has_mpeg2_encoding = 1,
171 .has_h264_decoding = 1,
172 .has_h264_encoding = 1,
173 .has_vc1_decoding = 1,
174 .has_jpeg_decoding = 1,
176 .has_accelerated_getimage = 1,
177 .has_accelerated_putimage = 1,
178 .has_tiled_surface = 1,
179 .has_di_motion_adptive = 1,
180 .has_di_motion_compensated = 1,
181 .has_vp8_decoding = 1,
185 { VAProcFilterNoiseReduction, I965_RING_VEBOX },
186 { VAProcFilterDeinterlacing, I965_RING_VEBOX },
187 { VAProcFilterSharpening, I965_RING_NULL }, /* need to rebuild the shader for BDW */
188 { VAProcFilterColorBalance, I965_RING_VEBOX},
189 { VAProcFilterSkinToneEnhancement, I965_RING_VEBOX},
193 const struct hw_codec_info *
194 i965_get_codec_info(int devid)
198 #define CHIPSET(id, family, dev, str) case id: return &family##_hw_codec_info;
199 #include "i965_pciids.h"
205 static const struct intel_device_info g4x_device_info = {
209 .max_wm_threads = 50, /* 10 * 5 */
214 static const struct intel_device_info ilk_device_info = {
218 .max_wm_threads = 72, /* 12 * 6 */
221 static const struct intel_device_info snb_gt1_device_info = {
226 .max_wm_threads = 40,
229 static const struct intel_device_info snb_gt2_device_info = {
234 .max_wm_threads = 80,
237 static const struct intel_device_info ivb_gt1_device_info = {
242 .max_wm_threads = 48,
247 static const struct intel_device_info ivb_gt2_device_info = {
252 .max_wm_threads = 172,
257 static const struct intel_device_info byt_device_info = {
262 .max_wm_threads = 48,
268 static const struct intel_device_info hsw_gt1_device_info = {
273 .max_wm_threads = 102,
278 static const struct intel_device_info hsw_gt2_device_info = {
283 .max_wm_threads = 204,
288 static const struct intel_device_info hsw_gt3_device_info = {
293 .max_wm_threads = 408,
298 static const struct intel_device_info bdw_device_info = {
302 .max_wm_threads = 64, /* per PSD */
305 const struct intel_device_info *
306 i965_get_device_info(int devid)
310 #define CHIPSET(id, family, dev, str) case id: return &dev##_device_info;
311 #include "i965_pciids.h"