Lines Matching full:cs
11 #define batch_advance(Y, CS) GEM_BUG_ON((Y)->end != (CS)) argument
101 static u32 batch_offset(const struct batch_chunk *bc, u32 *cs) in batch_offset() argument
103 return (cs - bc->start) * sizeof(*bc->start) + bc->offset; in batch_offset()
147 u32 *cs = batch_alloc_items(state, 32, 8); in gen7_fill_surface_state() local
148 u32 offset = batch_offset(state, cs); in gen7_fill_surface_state()
154 *cs++ = SURFACE_2D << 29 | in gen7_fill_surface_state()
158 *cs++ = batch_addr(state) + dst_offset; in gen7_fill_surface_state()
160 *cs++ = ((surface_h / 4 - 1) << 16) | (surface_w / 4 - 1); in gen7_fill_surface_state()
161 *cs++ = surface_w; in gen7_fill_surface_state()
162 *cs++ = 0; in gen7_fill_surface_state()
163 *cs++ = 0; in gen7_fill_surface_state()
164 *cs++ = 0; in gen7_fill_surface_state()
167 *cs++ = SHADER_CHANNELS(4, 5, 6, 7); in gen7_fill_surface_state()
168 batch_advance(state, cs); in gen7_fill_surface_state()
179 u32 *cs = batch_alloc_items(state, 32, 8); in gen7_fill_binding_table() local
180 u32 offset = batch_offset(state, cs); in gen7_fill_binding_table()
182 *cs++ = surface_start - state->offset; in gen7_fill_binding_table()
183 *cs++ = 0; in gen7_fill_binding_table()
184 *cs++ = 0; in gen7_fill_binding_table()
185 *cs++ = 0; in gen7_fill_binding_table()
186 *cs++ = 0; in gen7_fill_binding_table()
187 *cs++ = 0; in gen7_fill_binding_table()
188 *cs++ = 0; in gen7_fill_binding_table()
189 *cs++ = 0; in gen7_fill_binding_table()
190 batch_advance(state, cs); in gen7_fill_binding_table()
214 u32 *cs = batch_alloc_items(state, 32, 8 * count); in gen7_fill_interface_descriptor() local
215 u32 offset = batch_offset(state, cs); in gen7_fill_interface_descriptor()
217 *cs++ = kernel_offset; in gen7_fill_interface_descriptor()
218 *cs++ = (1 << 7) | (1 << 13); in gen7_fill_interface_descriptor()
219 *cs++ = 0; in gen7_fill_interface_descriptor()
220 *cs++ = (binding_table - state->offset) | 1; in gen7_fill_interface_descriptor()
221 *cs++ = 0; in gen7_fill_interface_descriptor()
222 *cs++ = 0; in gen7_fill_interface_descriptor()
223 *cs++ = 0; in gen7_fill_interface_descriptor()
224 *cs++ = 0; in gen7_fill_interface_descriptor()
227 memset32(cs, 0x00, (count - 1) * 8); in gen7_fill_interface_descriptor()
228 batch_advance(state, cs + (count - 1) * 8); in gen7_fill_interface_descriptor()
237 u32 *cs = batch_alloc_items(batch, 0, 10); in gen7_emit_state_base_address() local
239 *cs++ = STATE_BASE_ADDRESS | (10 - 2); in gen7_emit_state_base_address()
241 *cs++ = batch_addr(batch) | BASE_ADDRESS_MODIFY; in gen7_emit_state_base_address()
243 *cs++ = (batch_addr(batch) + surface_state_base) | BASE_ADDRESS_MODIFY; in gen7_emit_state_base_address()
245 *cs++ = batch_addr(batch) | BASE_ADDRESS_MODIFY; in gen7_emit_state_base_address()
247 *cs++ = batch_addr(batch) | BASE_ADDRESS_MODIFY; in gen7_emit_state_base_address()
249 *cs++ = batch_addr(batch) | BASE_ADDRESS_MODIFY; in gen7_emit_state_base_address()
252 *cs++ = 0; in gen7_emit_state_base_address()
253 *cs++ = BASE_ADDRESS_MODIFY; in gen7_emit_state_base_address()
254 *cs++ = 0; in gen7_emit_state_base_address()
255 *cs++ = BASE_ADDRESS_MODIFY; in gen7_emit_state_base_address()
256 batch_advance(batch, cs); in gen7_emit_state_base_address()
266 u32 *cs = batch_alloc_items(batch, 32, 8); in gen7_emit_vfe_state() local
268 *cs++ = MEDIA_VFE_STATE | (8 - 2); in gen7_emit_vfe_state()
271 *cs++ = 0; in gen7_emit_vfe_state()
274 *cs++ = threads << 16 | 1 << 8 | mode << 2; in gen7_emit_vfe_state()
276 *cs++ = 0; in gen7_emit_vfe_state()
279 *cs++ = urb_size << 16 | curbe_size; in gen7_emit_vfe_state()
282 *cs++ = 0; in gen7_emit_vfe_state()
283 *cs++ = 0; in gen7_emit_vfe_state()
284 *cs++ = 0; in gen7_emit_vfe_state()
285 batch_advance(batch, cs); in gen7_emit_vfe_state()
293 u32 *cs = batch_alloc_items(batch, 8, 4); in gen7_emit_interface_descriptor_load() local
295 *cs++ = MEDIA_INTERFACE_DESCRIPTOR_LOAD | (4 - 2); in gen7_emit_interface_descriptor_load()
296 *cs++ = 0; in gen7_emit_interface_descriptor_load()
297 *cs++ = count * 8 * sizeof(*cs); in gen7_emit_interface_descriptor_load()
303 *cs++ = interface_descriptor; in gen7_emit_interface_descriptor_load()
304 batch_advance(batch, cs); in gen7_emit_interface_descriptor_load()
314 u32 *cs; in gen7_emit_media_object() local
316 cs = batch_alloc_items(batch, 8, pkt); in gen7_emit_media_object()
318 *cs++ = MEDIA_OBJECT | (pkt - 2); in gen7_emit_media_object()
321 *cs++ = 0; in gen7_emit_media_object()
324 *cs++ = 0; in gen7_emit_media_object()
325 *cs++ = 0; in gen7_emit_media_object()
328 *cs++ = 0; in gen7_emit_media_object()
329 *cs++ = 0; in gen7_emit_media_object()
332 *cs++ = y_offset << 16 | x_offset; in gen7_emit_media_object()
333 *cs++ = 0; in gen7_emit_media_object()
334 *cs++ = GT3_INLINE_DATA_DELAYS; in gen7_emit_media_object()
336 batch_advance(batch, cs); in gen7_emit_media_object()
341 u32 *cs = batch_alloc_items(batch, 0, 4); in gen7_emit_pipeline_flush() local
343 *cs++ = GFX_OP_PIPE_CONTROL(4); in gen7_emit_pipeline_flush()
344 *cs++ = PIPE_CONTROL_RENDER_TARGET_CACHE_FLUSH | in gen7_emit_pipeline_flush()
348 *cs++ = 0; in gen7_emit_pipeline_flush()
349 *cs++ = 0; in gen7_emit_pipeline_flush()
351 batch_advance(batch, cs); in gen7_emit_pipeline_flush()
356 u32 *cs = batch_alloc_items(batch, 0, 10); in gen7_emit_pipeline_invalidate() local
359 *cs++ = GFX_OP_PIPE_CONTROL(5); in gen7_emit_pipeline_invalidate()
360 *cs++ = PIPE_CONTROL_STALL_AT_SCOREBOARD | in gen7_emit_pipeline_invalidate()
362 *cs++ = 0; in gen7_emit_pipeline_invalidate()
363 *cs++ = 0; in gen7_emit_pipeline_invalidate()
364 *cs++ = 0; in gen7_emit_pipeline_invalidate()
366 *cs++ = GFX_OP_PIPE_CONTROL(5); in gen7_emit_pipeline_invalidate()
367 *cs++ = PIPE_CONTROL_STATE_CACHE_INVALIDATE; in gen7_emit_pipeline_invalidate()
368 *cs++ = 0; in gen7_emit_pipeline_invalidate()
369 *cs++ = 0; in gen7_emit_pipeline_invalidate()
370 *cs++ = 0; in gen7_emit_pipeline_invalidate()
372 batch_advance(batch, cs); in gen7_emit_pipeline_invalidate()