Lines Matching refs:len
229 int len, r; in amdgpu_cs_vce_create() local
239 len = 0; in amdgpu_cs_vce_create()
241 len += sizeof(vce_session) / 4; in amdgpu_cs_vce_create()
242 memcpy((ib_cpu + len), vce_taskinfo, sizeof(vce_taskinfo)); in amdgpu_cs_vce_create()
243 len += sizeof(vce_taskinfo) / 4; in amdgpu_cs_vce_create()
244 memcpy((ib_cpu + len), vce_create, sizeof(vce_create)); in amdgpu_cs_vce_create()
245 len += sizeof(vce_create) / 4; in amdgpu_cs_vce_create()
246 memcpy((ib_cpu + len), vce_feedback, sizeof(vce_feedback)); in amdgpu_cs_vce_create()
247 ib_cpu[len + 2] = enc.fb[0].addr >> 32; in amdgpu_cs_vce_create()
248 ib_cpu[len + 3] = enc.fb[0].addr; in amdgpu_cs_vce_create()
249 len += sizeof(vce_feedback) / 4; in amdgpu_cs_vce_create()
251 r = submit(len, AMDGPU_HW_IP_VCE); in amdgpu_cs_vce_create()
259 int len = 0, r; in amdgpu_cs_vce_config() local
261 memcpy((ib_cpu + len), vce_session, sizeof(vce_session)); in amdgpu_cs_vce_config()
262 len += sizeof(vce_session) / 4; in amdgpu_cs_vce_config()
263 memcpy((ib_cpu + len), vce_taskinfo, sizeof(vce_taskinfo)); in amdgpu_cs_vce_config()
264 ib_cpu[len + 3] = 2; in amdgpu_cs_vce_config()
265 ib_cpu[len + 6] = 0xffffffff; in amdgpu_cs_vce_config()
266 len += sizeof(vce_taskinfo) / 4; in amdgpu_cs_vce_config()
267 memcpy((ib_cpu + len), vce_rate_ctrl, sizeof(vce_rate_ctrl)); in amdgpu_cs_vce_config()
268 len += sizeof(vce_rate_ctrl) / 4; in amdgpu_cs_vce_config()
269 memcpy((ib_cpu + len), vce_config_ext, sizeof(vce_config_ext)); in amdgpu_cs_vce_config()
270 len += sizeof(vce_config_ext) / 4; in amdgpu_cs_vce_config()
271 memcpy((ib_cpu + len), vce_motion_est, sizeof(vce_motion_est)); in amdgpu_cs_vce_config()
272 len += sizeof(vce_motion_est) / 4; in amdgpu_cs_vce_config()
273 memcpy((ib_cpu + len), vce_rdo, sizeof(vce_rdo)); in amdgpu_cs_vce_config()
274 len += sizeof(vce_rdo) / 4; in amdgpu_cs_vce_config()
275 memcpy((ib_cpu + len), vce_pic_ctrl, sizeof(vce_pic_ctrl)); in amdgpu_cs_vce_config()
276 len += sizeof(vce_pic_ctrl) / 4; in amdgpu_cs_vce_config()
278 r = submit(len, AMDGPU_HW_IP_VCE); in amdgpu_cs_vce_config()
286 int len = 0, r; in amdgpu_cs_vce_encode_idr() local
291 memcpy((ib_cpu + len), vce_session, sizeof(vce_session)); in amdgpu_cs_vce_encode_idr()
292 len += sizeof(vce_session) / 4; in amdgpu_cs_vce_encode_idr()
293 memcpy((ib_cpu + len), vce_taskinfo, sizeof(vce_taskinfo)); in amdgpu_cs_vce_encode_idr()
294 len += sizeof(vce_taskinfo) / 4; in amdgpu_cs_vce_encode_idr()
295 memcpy((ib_cpu + len), vce_bs_buffer, sizeof(vce_bs_buffer)); in amdgpu_cs_vce_encode_idr()
296 ib_cpu[len + 2] = enc->bs[0].addr >> 32; in amdgpu_cs_vce_encode_idr()
297 ib_cpu[len + 3] = enc->bs[0].addr; in amdgpu_cs_vce_encode_idr()
298 len += sizeof(vce_bs_buffer) / 4; in amdgpu_cs_vce_encode_idr()
299 memcpy((ib_cpu + len), vce_context_buffer, sizeof(vce_context_buffer)); in amdgpu_cs_vce_encode_idr()
300 ib_cpu[len + 2] = enc->cpb.addr >> 32; in amdgpu_cs_vce_encode_idr()
301 ib_cpu[len + 3] = enc->cpb.addr; in amdgpu_cs_vce_encode_idr()
302 len += sizeof(vce_context_buffer) / 4; in amdgpu_cs_vce_encode_idr()
303 memcpy((ib_cpu + len), vce_aux_buffer, sizeof(vce_aux_buffer)); in amdgpu_cs_vce_encode_idr()
304 len += sizeof(vce_aux_buffer) / 4; in amdgpu_cs_vce_encode_idr()
305 memcpy((ib_cpu + len), vce_feedback, sizeof(vce_feedback)); in amdgpu_cs_vce_encode_idr()
306 ib_cpu[len + 2] = enc->fb[0].addr >> 32; in amdgpu_cs_vce_encode_idr()
307 ib_cpu[len + 3] = enc->fb[0].addr; in amdgpu_cs_vce_encode_idr()
308 len += sizeof(vce_feedback) / 4; in amdgpu_cs_vce_encode_idr()
309 memcpy((ib_cpu + len), vce_encode, sizeof(vce_encode)); in amdgpu_cs_vce_encode_idr()
310 ib_cpu[len + 9] = luma_offset >> 32; in amdgpu_cs_vce_encode_idr()
311 ib_cpu[len + 10] = luma_offset; in amdgpu_cs_vce_encode_idr()
312 ib_cpu[len + 11] = chroma_offset >> 32; in amdgpu_cs_vce_encode_idr()
313 ib_cpu[len + 12] = chroma_offset; in amdgpu_cs_vce_encode_idr()
314 ib_cpu[len + 73] = 0x7800; in amdgpu_cs_vce_encode_idr()
315 ib_cpu[len + 74] = 0x7800 + 0x5000; in amdgpu_cs_vce_encode_idr()
316 len += sizeof(vce_encode) / 4; in amdgpu_cs_vce_encode_idr()
317 enc->ib_len = len; in amdgpu_cs_vce_encode_idr()
319 r = submit(len, AMDGPU_HW_IP_VCE); in amdgpu_cs_vce_encode_idr()
327 int len, r; in amdgpu_cs_vce_encode_p() local
329 len = (enc->two_instance) ? enc->ib_len : 0; in amdgpu_cs_vce_encode_p()
334 memcpy((ib_cpu + len), vce_session, sizeof(vce_session)); in amdgpu_cs_vce_encode_p()
335 len += sizeof(vce_session) / 4; in amdgpu_cs_vce_encode_p()
337 memcpy((ib_cpu + len), vce_taskinfo, sizeof(vce_taskinfo)); in amdgpu_cs_vce_encode_p()
338 len += sizeof(vce_taskinfo) / 4; in amdgpu_cs_vce_encode_p()
339 memcpy((ib_cpu + len), vce_bs_buffer, sizeof(vce_bs_buffer)); in amdgpu_cs_vce_encode_p()
340 ib_cpu[len + 2] = enc->bs[1].addr >> 32; in amdgpu_cs_vce_encode_p()
341 ib_cpu[len + 3] = enc->bs[1].addr; in amdgpu_cs_vce_encode_p()
342 len += sizeof(vce_bs_buffer) / 4; in amdgpu_cs_vce_encode_p()
343 memcpy((ib_cpu + len), vce_context_buffer, sizeof(vce_context_buffer)); in amdgpu_cs_vce_encode_p()
344 ib_cpu[len + 2] = enc->cpb.addr >> 32; in amdgpu_cs_vce_encode_p()
345 ib_cpu[len + 3] = enc->cpb.addr; in amdgpu_cs_vce_encode_p()
346 len += sizeof(vce_context_buffer) / 4; in amdgpu_cs_vce_encode_p()
347 memcpy((ib_cpu + len), vce_aux_buffer, sizeof(vce_aux_buffer)); in amdgpu_cs_vce_encode_p()
348 len += sizeof(vce_aux_buffer) / 4; in amdgpu_cs_vce_encode_p()
349 memcpy((ib_cpu + len), vce_feedback, sizeof(vce_feedback)); in amdgpu_cs_vce_encode_p()
350 ib_cpu[len + 2] = enc->fb[1].addr >> 32; in amdgpu_cs_vce_encode_p()
351 ib_cpu[len + 3] = enc->fb[1].addr; in amdgpu_cs_vce_encode_p()
352 len += sizeof(vce_feedback) / 4; in amdgpu_cs_vce_encode_p()
353 memcpy((ib_cpu + len), vce_encode, sizeof(vce_encode)); in amdgpu_cs_vce_encode_p()
354 ib_cpu[len + 2] = 0; in amdgpu_cs_vce_encode_p()
355 ib_cpu[len + 9] = luma_offset >> 32; in amdgpu_cs_vce_encode_p()
356 ib_cpu[len + 10] = luma_offset; in amdgpu_cs_vce_encode_p()
357 ib_cpu[len + 11] = chroma_offset >> 32; in amdgpu_cs_vce_encode_p()
358 ib_cpu[len + 12] = chroma_offset; in amdgpu_cs_vce_encode_p()
359 ib_cpu[len + 18] = 0; in amdgpu_cs_vce_encode_p()
360 ib_cpu[len + 19] = 0; in amdgpu_cs_vce_encode_p()
361 ib_cpu[len + 56] = 3; in amdgpu_cs_vce_encode_p()
362 ib_cpu[len + 57] = 0; in amdgpu_cs_vce_encode_p()
363 ib_cpu[len + 58] = 0; in amdgpu_cs_vce_encode_p()
364 ib_cpu[len + 59] = 0x7800; in amdgpu_cs_vce_encode_p()
365 ib_cpu[len + 60] = 0x7800 + 0x5000; in amdgpu_cs_vce_encode_p()
366 ib_cpu[len + 73] = 0; in amdgpu_cs_vce_encode_p()
367 ib_cpu[len + 74] = 0x5000; in amdgpu_cs_vce_encode_p()
368 ib_cpu[len + 81] = 1; in amdgpu_cs_vce_encode_p()
369 ib_cpu[len + 82] = 1; in amdgpu_cs_vce_encode_p()
370 len += sizeof(vce_encode) / 4; in amdgpu_cs_vce_encode_p()
372 r = submit(len, AMDGPU_HW_IP_VCE); in amdgpu_cs_vce_encode_p()
469 int len, r; in amdgpu_cs_vce_destroy() local
476 len = 0; in amdgpu_cs_vce_destroy()
478 len += sizeof(vce_session) / 4; in amdgpu_cs_vce_destroy()
479 memcpy((ib_cpu + len), vce_taskinfo, sizeof(vce_taskinfo)); in amdgpu_cs_vce_destroy()
480 ib_cpu[len + 3] = 1; in amdgpu_cs_vce_destroy()
481 len += sizeof(vce_taskinfo) / 4; in amdgpu_cs_vce_destroy()
482 memcpy((ib_cpu + len), vce_feedback, sizeof(vce_feedback)); in amdgpu_cs_vce_destroy()
483 ib_cpu[len + 2] = enc.fb[0].addr >> 32; in amdgpu_cs_vce_destroy()
484 ib_cpu[len + 3] = enc.fb[0].addr; in amdgpu_cs_vce_destroy()
485 len += sizeof(vce_feedback) / 4; in amdgpu_cs_vce_destroy()
486 memcpy((ib_cpu + len), vce_destroy, sizeof(vce_destroy)); in amdgpu_cs_vce_destroy()
487 len += sizeof(vce_destroy) / 4; in amdgpu_cs_vce_destroy()
489 r = submit(len, AMDGPU_HW_IP_VCE); in amdgpu_cs_vce_destroy()