File: 0002-Disable-post-processing-shaders.patch

package info (click to toggle)
intel-vaapi-driver 2.3.0%2Bdfsg1-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 23,480 kB
  • sloc: ansic: 181,828; asm: 20,806; cpp: 15,306; pascal: 5,836; makefile: 1,857; python: 153; xml: 146; sh: 51
file content (289 lines) | stat: -rw-r--r-- 10,625 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
From: Sebastian Ramacher <sebastian@ramacher.at>
Date: Thu, 30 Aug 2018 20:14:25 +0200
Subject: Disable post-processing shaders

---
 src/gen75_vpp_gpe.c        |  4 ++++
 src/gen8_post_processing.c |  4 ++++
 src/gen9_post_processing.c |  6 ++++++
 src/i965_device_info.c     | 27 ++++++---------------------
 4 files changed, 20 insertions(+), 21 deletions(-)

diff --git a/src/gen75_vpp_gpe.c b/src/gen75_vpp_gpe.c
index 02dc576..b08ead0 100644
--- a/src/gen75_vpp_gpe.c
+++ b/src/gen75_vpp_gpe.c
@@ -51,6 +51,7 @@
 #define CURBE_TOTAL_DATA_LENGTH (4 * 32)
 #define CURBE_URB_ENTRY_LENGTH  4
 
+#if 0
 /* Shaders information for sharpening */
 static const unsigned int gen75_gpe_sharpening_h_blur[][4] = {
 #include "shaders/post_processing/gen75/sharpening_h_blur.g75b"
@@ -119,6 +120,7 @@ static struct i965_kernel gen8_vpp_sharpening_kernels[] = {
         NULL
     },
 };
+#endif
 
 static VAStatus
 gen75_gpe_process_surfaces_setup(VADriverContextP ctx,
@@ -625,6 +627,7 @@ vpp_gpe_process_sharpening(VADriverContextP ctx,
     if (vpp_gpe_ctx->is_first_frame) {
         vpp_gpe_ctx->sub_shader_sum = 3;
         struct i965_kernel * vpp_kernels;
+#if 0
         if (IS_HASWELL(i965->intel.device_info))
             vpp_kernels = gen75_vpp_sharpening_kernels;
         else if (IS_GEN8(i965->intel.device_info) ||
@@ -632,6 +635,7 @@ vpp_gpe_process_sharpening(VADriverContextP ctx,
                  IS_GEN10(i965->intel.device_info))
             vpp_kernels = gen8_vpp_sharpening_kernels;
         else
+#endif
             return VA_STATUS_ERROR_UNIMPLEMENTED;
 
         vpp_gpe_ctx->gpe_load_kernels(ctx,
diff --git a/src/gen8_post_processing.c b/src/gen8_post_processing.c
index c3a911b..888ee0d 100644
--- a/src/gen8_post_processing.c
+++ b/src/gen8_post_processing.c
@@ -324,6 +324,7 @@ static struct pp_module pp_modules_gen8[] = {
 
 #define DEFAULT_MOCS    0
 
+#if 0
 static const uint32_t pp_yuv420p8_scaling_gen8[][4] = {
 #include "shaders/post_processing/gen8/conv_nv12.g8b"
 };
@@ -349,6 +350,7 @@ struct i965_kernel pp_common_scaling_gen8[] = {
         NULL,
     },
 };
+#endif
 
 static const uint32_t pp_clear_yuy2_gen8[][4] = {
 #include "shaders/post_processing/gen8/clear_yuy2.g8b"
@@ -1759,6 +1761,7 @@ gen8_post_processing_context_init(VADriverContextP ctx,
     gen8_post_processing_context_common_init(ctx, data, pp_modules_gen8, ARRAY_ELEMS(pp_modules_gen8), batch);
     avs_init_state(&pp_context->pp_avs_context.state, &gen8_avs_config);
 
+#if 0
     /* initialize the YUV420 8-Bit scaling context. The below is supported.
      * NV12 ->NV12
      * NV12 ->I420
@@ -1798,6 +1801,7 @@ gen8_post_processing_context_init(VADriverContextP ctx,
 
     gen8_gpe_context_init(ctx, gpe_context);
     pp_context->scaling_gpe_context_initialized |= (VPPGPE_8BIT_8BIT | VPPGPE_8BIT_420_RGB32);
+#endif
 
     gpe_context = &pp_context->clear_gpe_context;
     gen8_gpe_load_kernels(ctx, gpe_context, pp_clear_gen8, ARRAY_ELEMS(pp_clear_gen8));
diff --git a/src/gen9_post_processing.c b/src/gen9_post_processing.c
index 7e1ccd3..9a054c6 100644
--- a/src/gen9_post_processing.c
+++ b/src/gen9_post_processing.c
@@ -108,6 +108,7 @@ static const uint32_t pp_nv12_load_save_rgbx_gen9[][4] = {
 
 #define DEFAULT_MOCS    0x02
 
+#if 0
 static const uint32_t pp_10bit_scaling_gen9[][4] = {
 #include "shaders/post_processing/gen9/conv_p010.g9b"
 };
@@ -123,6 +124,7 @@ static const uint32_t pp_10bit_8bit_scaling_gen9[][4] = {
 static const uint32_t pp_8bit_420_rgb32_scaling_gen9[][4] = {
 #include "shaders/post_processing/gen9/conv_8bit_420_rgb32.g9b"
 };
+#endif
 
 static const uint32_t pp_clear_yuy2_gen9[][4] = {
 #include "shaders/post_processing/gen9/clear_yuy2.g9b"
@@ -148,6 +150,7 @@ static const uint32_t pp_clear_bgrx_gen9[][4] = {
 #include "shaders/post_processing/gen9/clear_bgrx.g9b"
 };
 
+#if 0
 struct i965_kernel pp_common_scaling_gen9[] = {
     {
         "10bit to 10bit",
@@ -181,6 +184,7 @@ struct i965_kernel pp_common_scaling_gen9[] = {
         NULL,
     },
 };
+#endif
 
 struct i965_kernel pp_clear_gen9[] = {
     {
@@ -619,6 +623,7 @@ gen9_post_processing_context_init(VADriverContextP ctx,
 
     pp_context->intel_post_processing = gen9_post_processing;
 
+#if 0
     gpe_context = &pp_context->scaling_gpe_context;
     gen8_gpe_load_kernels(ctx, gpe_context, pp_common_scaling_gen9, ARRAY_ELEMS(pp_common_scaling_gen9));
     gpe_context->idrt.entry_size = ALIGN(sizeof(struct gen8_interface_descriptor_data), 64);
@@ -648,6 +653,7 @@ gen9_post_processing_context_init(VADriverContextP ctx,
 
     gen8_gpe_context_init(ctx, gpe_context);
     pp_context->scaling_gpe_context_initialized |= (VPPGPE_8BIT_8BIT | VPPGPE_10BIT_10BIT | VPPGPE_10BIT_8BIT | VPPGPE_8BIT_420_RGB32);
+#endif
 
     gpe_context = &pp_context->clear_gpe_context;
     gen8_gpe_load_kernels(ctx, gpe_context, pp_clear_gen9, ARRAY_ELEMS(pp_clear_gen9));
diff --git a/src/i965_device_info.c b/src/i965_device_info.c
index a6adcf5..f4dfd4c 100644
--- a/src/i965_device_info.c
+++ b/src/i965_device_info.c
@@ -223,11 +223,10 @@ static struct hw_codec_info hsw_hw_codec_info = {
 
     .h264_brc_mode = VA_RC_CQP | VA_RC_CBR | VA_RC_VBR,
 
-    .num_filters = 5,
+    .num_filters = 4,
     .filters = {
         { VAProcFilterNoiseReduction, I965_RING_VEBOX },
         { VAProcFilterDeinterlacing, I965_RING_VEBOX },
-        { VAProcFilterSharpening, I965_RING_NULL },
         { VAProcFilterColorBalance, I965_RING_VEBOX},
         { VAProcFilterSkinToneEnhancement, I965_RING_VEBOX},
     },
@@ -259,7 +258,6 @@ static struct hw_codec_info bdw_hw_codec_info = {
     .has_h264_encoding = 1,
     .has_vc1_decoding = 1,
     .has_jpeg_decoding = 1,
-    .has_vpp = 1,
     .has_accelerated_getimage = 1,
     .has_accelerated_putimage = 1,
     .has_tiled_surface = 1,
@@ -270,11 +268,10 @@ static struct hw_codec_info bdw_hw_codec_info = {
 
     .h264_brc_mode = VA_RC_CQP | VA_RC_CBR | VA_RC_VBR,
 
-    .num_filters = 5,
+    .num_filters = 4,
     .filters = {
         { VAProcFilterNoiseReduction, I965_RING_VEBOX },
         { VAProcFilterDeinterlacing, I965_RING_VEBOX },
-        { VAProcFilterSharpening, I965_RING_NULL }, /* need to rebuild the shader for BDW */
         { VAProcFilterColorBalance, I965_RING_VEBOX},
         { VAProcFilterSkinToneEnhancement, I965_RING_VEBOX},
     },
@@ -306,7 +303,6 @@ static struct hw_codec_info chv_hw_codec_info = {
     .has_vc1_decoding = 1,
     .has_jpeg_decoding = 1,
     .has_jpeg_encoding = 1,
-    .has_vpp = 1,
     .has_accelerated_getimage = 1,
     .has_accelerated_putimage = 1,
     .has_tiled_surface = 1,
@@ -319,11 +315,10 @@ static struct hw_codec_info chv_hw_codec_info = {
 
     .h264_brc_mode = VA_RC_CQP | VA_RC_CBR | VA_RC_VBR,
 
-    .num_filters = 5,
+    .num_filters = 4,
     .filters = {
         { VAProcFilterNoiseReduction, I965_RING_VEBOX },
         { VAProcFilterDeinterlacing, I965_RING_VEBOX },
-        { VAProcFilterSharpening, I965_RING_NULL }, /* need to rebuild the shader for BDW */
         { VAProcFilterColorBalance, I965_RING_VEBOX},
         { VAProcFilterSkinToneEnhancement, I965_RING_VEBOX},
     },
@@ -361,7 +356,6 @@ static struct hw_codec_info skl_hw_codec_info = {
     .has_vc1_decoding = 1,
     .has_jpeg_decoding = 1,
     .has_jpeg_encoding = 1,
-    .has_vpp = 1,
     .has_accelerated_getimage = 1,
     .has_accelerated_putimage = 1,
     .has_tiled_surface = 1,
@@ -379,11 +373,10 @@ static struct hw_codec_info skl_hw_codec_info = {
     .lp_h264_brc_mode = VA_RC_CQP,
     .h264_brc_mode = VA_RC_CQP | VA_RC_CBR | VA_RC_VBR | VA_RC_MB,
 
-    .num_filters = 5,
+    .num_filters = 4,
     .filters = {
         { VAProcFilterNoiseReduction, I965_RING_VEBOX },
         { VAProcFilterDeinterlacing, I965_RING_VEBOX },
-        { VAProcFilterSharpening, I965_RING_NULL }, /* need to rebuild the shader for BDW */
         { VAProcFilterColorBalance, I965_RING_VEBOX},
         { VAProcFilterSkinToneEnhancement, I965_RING_VEBOX},
     },
@@ -432,7 +425,6 @@ static struct hw_codec_info bxt_hw_codec_info = {
     .has_hevc_encoding = 1,
     .has_hevc10_decoding = 1,
     .has_vp9_decoding = 1,
-    .has_vpp_p010 = 1,
     .has_lp_h264_encoding = 1,
 
     .lp_h264_brc_mode = VA_RC_CQP,
@@ -442,7 +434,6 @@ static struct hw_codec_info bxt_hw_codec_info = {
     .filters = {
         { VAProcFilterNoiseReduction, I965_RING_VEBOX },
         { VAProcFilterDeinterlacing, I965_RING_VEBOX },
-        { VAProcFilterSharpening, I965_RING_NULL },
         { VAProcFilterColorBalance, I965_RING_VEBOX},
         { VAProcFilterSkinToneEnhancement, I965_RING_VEBOX},
     },
@@ -495,7 +486,6 @@ static struct hw_codec_info kbl_hw_codec_info = {
     .has_hevc10_encoding = 1,
     .has_hevc10_decoding = 1,
     .has_vp9_decoding = 1,
-    .has_vpp_p010 = 1,
     .has_vp9_encoding = 1,
     .has_lp_h264_encoding = 1,
 
@@ -562,7 +552,6 @@ static struct hw_codec_info glk_hw_codec_info = {
     .has_hevc10_decoding = 1,
     .has_hevc10_encoding = 1,
     .has_vp9_decoding = 1,
-    .has_vpp_p010 = 1,
     .has_vp9_encoding = 1,
     .has_lp_h264_encoding = 1,
 
@@ -628,7 +617,6 @@ static struct hw_codec_info cfl_hw_codec_info = {
     .has_hevc10_encoding = 1,
     .has_hevc10_decoding = 1,
     .has_vp9_decoding = 1,
-    .has_vpp_p010 = 1,
     .has_vp9_encoding = 1,
     .has_lp_h264_encoding = 1,
 
@@ -637,11 +625,10 @@ static struct hw_codec_info cfl_hw_codec_info = {
 
     .vp9_brc_mode = VA_RC_CQP | VA_RC_CBR | VA_RC_VBR,
 
-    .num_filters = 5,
+    .num_filters = 4,
     .filters = {
         { VAProcFilterNoiseReduction, I965_RING_VEBOX },
         { VAProcFilterDeinterlacing, I965_RING_VEBOX },
-        { VAProcFilterSharpening, I965_RING_NULL },
         { VAProcFilterColorBalance, I965_RING_VEBOX},
         { VAProcFilterSkinToneEnhancement, I965_RING_VEBOX},
     },
@@ -692,7 +679,6 @@ static struct hw_codec_info cnl_hw_codec_info = {
     .has_hevc10_decoding = 1,
     .has_hevc10_encoding = 1,
     .has_vp9_decoding = 1,
-    .has_vpp_p010 = 1,
     .has_vp9_encoding = 1,
     .has_lp_h264_encoding = 1,
     .has_lp_vp9_encoding = 1,
@@ -702,11 +688,10 @@ static struct hw_codec_info cnl_hw_codec_info = {
 
     .vp9_brc_mode = VA_RC_CQP | VA_RC_CBR | VA_RC_VBR,
 
-    .num_filters = 5,
+    .num_filters = 4,
     .filters = {
         { VAProcFilterNoiseReduction, I965_RING_VEBOX },
         { VAProcFilterDeinterlacing, I965_RING_VEBOX },
-        { VAProcFilterSharpening, I965_RING_NULL },
         { VAProcFilterColorBalance, I965_RING_VEBOX},
         { VAProcFilterSkinToneEnhancement, I965_RING_VEBOX},
     },