Lines Matching refs:msg
44 allegro_enc_init(u32 *dst, struct mcu_msg_init_request *msg) in allegro_enc_init() argument
47 enum mcu_msg_version version = msg->header.version; in allegro_enc_init()
49 dst[i++] = msg->reserved0; in allegro_enc_init()
50 dst[i++] = msg->suballoc_dma; in allegro_enc_init()
51 dst[i++] = msg->suballoc_size; in allegro_enc_init()
52 dst[i++] = msg->encoder_buffer_size; in allegro_enc_init()
53 dst[i++] = msg->encoder_buffer_color_depth; in allegro_enc_init()
54 dst[i++] = msg->num_cores; in allegro_enc_init()
56 dst[i++] = msg->clk_rate; in allegro_enc_init()
233 allegro_enc_create_channel(u32 *dst, struct mcu_msg_create_channel *msg) in allegro_enc_create_channel() argument
235 enum mcu_msg_version version = msg->header.version; in allegro_enc_create_channel()
238 dst[i++] = msg->user_id; in allegro_enc_create_channel()
241 dst[i++] = msg->blob_mcu_addr; in allegro_enc_create_channel()
243 memcpy(&dst[i], msg->blob, msg->blob_size); in allegro_enc_create_channel()
244 i += msg->blob_size / sizeof(*dst); in allegro_enc_create_channel()
248 dst[i++] = msg->ep1_addr; in allegro_enc_create_channel()
254 struct mcu_msg_create_channel_response *msg, in allegro_decode_config_blob() argument
257 enum mcu_msg_version version = msg->header.version; in allegro_decode_config_blob()
263 param->num_ref_idx_l0 = msg->num_ref_idx_l0; in allegro_decode_config_blob()
264 param->num_ref_idx_l1 = msg->num_ref_idx_l1; in allegro_decode_config_blob()
271 allegro_enc_destroy_channel(u32 *dst, struct mcu_msg_destroy_channel *msg) in allegro_enc_destroy_channel() argument
275 dst[i++] = msg->channel_id; in allegro_enc_destroy_channel()
281 allegro_enc_push_buffers(u32 *dst, struct mcu_msg_push_buffers_internal *msg) in allegro_enc_push_buffers() argument
285 unsigned int num_buffers = msg->num_buffers; in allegro_enc_push_buffers()
288 dst[i++] = msg->channel_id; in allegro_enc_push_buffers()
291 buffer = &msg->buffer[j]; in allegro_enc_push_buffers()
302 struct mcu_msg_put_stream_buffer *msg) in allegro_enc_put_stream_buffer() argument
306 dst[i++] = msg->channel_id; in allegro_enc_put_stream_buffer()
307 dst[i++] = msg->dma_addr; in allegro_enc_put_stream_buffer()
308 dst[i++] = msg->mcu_addr; in allegro_enc_put_stream_buffer()
309 dst[i++] = msg->size; in allegro_enc_put_stream_buffer()
310 dst[i++] = msg->offset; in allegro_enc_put_stream_buffer()
311 dst[i++] = lower_32_bits(msg->dst_handle); in allegro_enc_put_stream_buffer()
312 dst[i++] = upper_32_bits(msg->dst_handle); in allegro_enc_put_stream_buffer()
318 allegro_enc_encode_frame(u32 *dst, struct mcu_msg_encode_frame *msg) in allegro_enc_encode_frame() argument
320 enum mcu_msg_version version = msg->header.version; in allegro_enc_encode_frame()
323 dst[i++] = msg->channel_id; in allegro_enc_encode_frame()
325 dst[i++] = msg->reserved; in allegro_enc_encode_frame()
326 dst[i++] = msg->encoding_options; in allegro_enc_encode_frame()
327 dst[i++] = FIELD_PREP(GENMASK(31, 16), msg->padding) | in allegro_enc_encode_frame()
328 FIELD_PREP(GENMASK(15, 0), msg->pps_qp); in allegro_enc_encode_frame()
337 dst[i++] = lower_32_bits(msg->user_param); in allegro_enc_encode_frame()
338 dst[i++] = upper_32_bits(msg->user_param); in allegro_enc_encode_frame()
339 dst[i++] = lower_32_bits(msg->src_handle); in allegro_enc_encode_frame()
340 dst[i++] = upper_32_bits(msg->src_handle); in allegro_enc_encode_frame()
341 dst[i++] = msg->request_options; in allegro_enc_encode_frame()
342 dst[i++] = msg->src_y; in allegro_enc_encode_frame()
343 dst[i++] = msg->src_uv; in allegro_enc_encode_frame()
345 dst[i++] = msg->is_10_bit; in allegro_enc_encode_frame()
346 dst[i++] = msg->stride; in allegro_enc_encode_frame()
348 dst[i++] = msg->format; in allegro_enc_encode_frame()
349 dst[i++] = msg->ep2; in allegro_enc_encode_frame()
350 dst[i++] = lower_32_bits(msg->ep2_v); in allegro_enc_encode_frame()
351 dst[i++] = upper_32_bits(msg->ep2_v); in allegro_enc_encode_frame()
357 allegro_dec_init(struct mcu_msg_init_response *msg, u32 *src) in allegro_dec_init() argument
361 msg->reserved0 = src[i++]; in allegro_dec_init()
367 allegro_dec_create_channel(struct mcu_msg_create_channel_response *msg, in allegro_dec_create_channel() argument
370 enum mcu_msg_version version = msg->header.version; in allegro_dec_create_channel()
373 msg->channel_id = src[i++]; in allegro_dec_create_channel()
374 msg->user_id = src[i++]; in allegro_dec_create_channel()
380 msg->options = src[i++]; in allegro_dec_create_channel()
381 msg->num_core = src[i++]; in allegro_dec_create_channel()
382 msg->num_ref_idx_l0 = FIELD_GET(GENMASK(7, 4), src[i]); in allegro_dec_create_channel()
383 msg->num_ref_idx_l1 = FIELD_GET(GENMASK(11, 8), src[i++]); in allegro_dec_create_channel()
385 msg->int_buffers_count = src[i++]; in allegro_dec_create_channel()
386 msg->int_buffers_size = src[i++]; in allegro_dec_create_channel()
387 msg->rec_buffers_count = src[i++]; in allegro_dec_create_channel()
388 msg->rec_buffers_size = src[i++]; in allegro_dec_create_channel()
389 msg->reserved = src[i++]; in allegro_dec_create_channel()
390 msg->error_code = src[i++]; in allegro_dec_create_channel()
396 allegro_dec_destroy_channel(struct mcu_msg_destroy_channel_response *msg, in allegro_dec_destroy_channel() argument
401 msg->channel_id = src[i++]; in allegro_dec_destroy_channel()
407 allegro_dec_encode_frame(struct mcu_msg_encode_frame_response *msg, u32 *src) in allegro_dec_encode_frame() argument
409 enum mcu_msg_version version = msg->header.version; in allegro_dec_encode_frame()
413 msg->channel_id = src[i++]; in allegro_dec_encode_frame()
415 msg->dst_handle = src[i++]; in allegro_dec_encode_frame()
416 msg->dst_handle |= (((u64)src[i++]) << 32); in allegro_dec_encode_frame()
417 msg->user_param = src[i++]; in allegro_dec_encode_frame()
418 msg->user_param |= (((u64)src[i++]) << 32); in allegro_dec_encode_frame()
419 msg->src_handle = src[i++]; in allegro_dec_encode_frame()
420 msg->src_handle |= (((u64)src[i++]) << 32); in allegro_dec_encode_frame()
421 msg->skip = FIELD_GET(GENMASK(31, 16), src[i]); in allegro_dec_encode_frame()
422 msg->is_ref = FIELD_GET(GENMASK(15, 0), src[i++]); in allegro_dec_encode_frame()
423 msg->initial_removal_delay = src[i++]; in allegro_dec_encode_frame()
424 msg->dpb_output_delay = src[i++]; in allegro_dec_encode_frame()
425 msg->size = src[i++]; in allegro_dec_encode_frame()
426 msg->frame_tag_size = src[i++]; in allegro_dec_encode_frame()
427 msg->stuffing = src[i++]; in allegro_dec_encode_frame()
428 msg->filler = src[i++]; in allegro_dec_encode_frame()
429 msg->num_row = FIELD_GET(GENMASK(31, 16), src[i]); in allegro_dec_encode_frame()
430 msg->num_column = FIELD_GET(GENMASK(15, 0), src[i++]); in allegro_dec_encode_frame()
431 msg->num_ref_idx_l1 = FIELD_GET(GENMASK(31, 24), src[i]); in allegro_dec_encode_frame()
432 msg->num_ref_idx_l0 = FIELD_GET(GENMASK(23, 16), src[i]); in allegro_dec_encode_frame()
433 msg->qp = FIELD_GET(GENMASK(15, 0), src[i++]); in allegro_dec_encode_frame()
434 msg->partition_table_offset = src[i++]; in allegro_dec_encode_frame()
435 msg->partition_table_size = src[i++]; in allegro_dec_encode_frame()
436 msg->sum_complex = src[i++]; in allegro_dec_encode_frame()
438 msg->tile_width[j] = src[i++]; in allegro_dec_encode_frame()
440 msg->tile_height[j] = src[i++]; in allegro_dec_encode_frame()
441 msg->error_code = src[i++]; in allegro_dec_encode_frame()
442 msg->slice_type = src[i++]; in allegro_dec_encode_frame()
443 msg->pic_struct = src[i++]; in allegro_dec_encode_frame()
444 msg->reserved = FIELD_GET(GENMASK(31, 24), src[i]); in allegro_dec_encode_frame()
445 msg->is_last_slice = FIELD_GET(GENMASK(23, 16), src[i]); in allegro_dec_encode_frame()
446 msg->is_first_slice = FIELD_GET(GENMASK(15, 8), src[i]); in allegro_dec_encode_frame()
447 msg->is_idr = FIELD_GET(GENMASK(7, 0), src[i++]); in allegro_dec_encode_frame()
449 msg->reserved1 = FIELD_GET(GENMASK(31, 16), src[i]); in allegro_dec_encode_frame()
450 msg->pps_qp = FIELD_GET(GENMASK(15, 0), src[i++]); in allegro_dec_encode_frame()
452 msg->reserved2 = src[i++]; in allegro_dec_encode_frame()
454 msg->reserved3 = src[i++]; in allegro_dec_encode_frame()
455 msg->reserved4 = src[i++]; in allegro_dec_encode_frame()
456 msg->reserved5 = src[i++]; in allegro_dec_encode_frame()
457 msg->reserved6 = src[i++]; in allegro_dec_encode_frame()
468 ssize_t allegro_encode_mail(u32 *dst, void *msg) in allegro_encode_mail() argument
470 const struct mcu_msg_header *header = msg; in allegro_encode_mail()
473 if (!msg || !dst) in allegro_encode_mail()
478 size = allegro_enc_init(&dst[1], msg); in allegro_encode_mail()
481 size = allegro_enc_create_channel(&dst[1], msg); in allegro_encode_mail()
484 size = allegro_enc_destroy_channel(&dst[1], msg); in allegro_encode_mail()
487 size = allegro_enc_encode_frame(&dst[1], msg); in allegro_encode_mail()
490 size = allegro_enc_put_stream_buffer(&dst[1], msg); in allegro_encode_mail()
494 size = allegro_enc_push_buffers(&dst[1], msg); in allegro_encode_mail()
520 int allegro_decode_mail(void *msg, u32 *src) in allegro_decode_mail() argument
524 if (!src || !msg) in allegro_decode_mail()
527 header = msg; in allegro_decode_mail()
533 allegro_dec_init(msg, src); in allegro_decode_mail()
536 allegro_dec_create_channel(msg, src); in allegro_decode_mail()
539 allegro_dec_destroy_channel(msg, src); in allegro_decode_mail()
542 allegro_dec_encode_frame(msg, src); in allegro_decode_mail()