Lines Matching refs:operation

341                                         OUT lm_dmae_operation_t* operation)  in lm_dmae_operation_create()  argument
354 mm_mem_zero(operation, sizeof(lm_dmae_operation_t)); in lm_dmae_operation_create()
356 operation->mode = LM_DMAE_MODE_SINGLE_BLOCK; in lm_dmae_operation_create()
357 operation->b_replicate_source = replicate_source; in lm_dmae_operation_create()
358 operation->le32_swap = le32_swap; in lm_dmae_operation_create()
359 operation->context = context; in lm_dmae_operation_create()
360 operation->b_sync = TRUE; in lm_dmae_operation_create()
362 operation->blocks[0].source = source; in lm_dmae_operation_create()
363 operation->blocks[0].dest = dest; in lm_dmae_operation_create()
364 operation->blocks[0].length = length; in lm_dmae_operation_create()
367 operation->context, in lm_dmae_operation_create()
368 &operation->main_cmd, in lm_dmae_operation_create()
369 &operation->blocks[0], in lm_dmae_operation_create()
392 lm_dmae_operation_t* operation, in lm_dmae_initialize_sgl_loader_command() argument
395 …lm_dmae_address_t source = lm_dmae_address( operation->executer_paddr.as_u64 ,LM_DMAE_ADDRESS_HOST… in lm_dmae_initialize_sgl_loader_command()
396 …lm_dmae_address_t dest = lm_dmae_address( DMAE_REG_CMD_MEM + operation->context->executer_channe… in lm_dmae_initialize_sgl_loader_command()
400 …command->opcode = lm_dmae_opcode(pdev, source, dest, FALSE, TRUE, operation->context->change_endia… in lm_dmae_initialize_sgl_loader_command()
417 command->comp_addr_lo = lm_dmae_idx_to_go_cmd(operation->context->executer_channel) / 4; in lm_dmae_initialize_sgl_loader_command()
429 lm_dmae_operation_t* operation = NULL; in lm_dmae_operation_create_sgl() local
436operation = mm_alloc_phys_mem(pdev, sizeof(lm_dmae_operation_t), &operation_phys_addr, PHYS_MEM_TY… in lm_dmae_operation_create_sgl()
438 if (CHK_NULL(operation)) in lm_dmae_operation_create_sgl()
444 mm_mem_zero(operation, sizeof(lm_dmae_operation_t)); in lm_dmae_operation_create_sgl()
446 operation->mode = LM_DMAE_MODE_SGL; in lm_dmae_operation_create_sgl()
447 operation->context = context; in lm_dmae_operation_create_sgl()
448 operation->b_sync = b_sync; in lm_dmae_operation_create_sgl()
452 operation->executer_paddr = executer_phys_addr; in lm_dmae_operation_create_sgl()
454 lm_dmae_initialize_sgl_loader_command(pdev, operation, &operation->main_cmd); in lm_dmae_operation_create_sgl()
455 return operation; in lm_dmae_operation_create_sgl()
459 lm_dmae_operation_t* operation, in lm_dmae_operation_add_sge() argument
475 new_sge_idx = operation->next_free_block; in lm_dmae_operation_add_sge()
477 if (new_sge_idx >= ARRSIZE(operation->blocks)) in lm_dmae_operation_add_sge()
483 if (0 != operation->next_free_block) in lm_dmae_operation_add_sge()
485 last_sge_idx = operation->next_free_block-1; in lm_dmae_operation_add_sge()
486 last_sge = &operation->executer_cmd[last_sge_idx]; in lm_dmae_operation_add_sge()
490 last_sge->comp_addr_lo = lm_dmae_idx_to_go_cmd(operation->context->main_channel) / 4; in lm_dmae_operation_add_sge()
496 operation->blocks[new_sge_idx].source = source; in lm_dmae_operation_add_sge()
497 operation->blocks[new_sge_idx].dest = dest; in lm_dmae_operation_add_sge()
498 operation->blocks[new_sge_idx].length = length; in lm_dmae_operation_add_sge()
501 operation->context, in lm_dmae_operation_add_sge()
502 &operation->executer_cmd[new_sge_idx], in lm_dmae_operation_add_sge()
503 &operation->blocks[new_sge_idx], in lm_dmae_operation_add_sge()
510 operation->next_free_block++; in lm_dmae_operation_add_sge()
515 void lm_dmae_operation_clear_all_sges(lm_dmae_operation_t* operation) in lm_dmae_operation_clear_all_sges() argument
517 DbgBreakIf(LM_DMAE_MODE_SGL != operation->mode); in lm_dmae_operation_clear_all_sges()
519 operation->next_free_block = 0; in lm_dmae_operation_clear_all_sges()
522 u8_t lm_dmae_operation_is_complete(IN lm_dmae_operation_t* operation) in lm_dmae_operation_is_complete() argument
524 return operation->context->completion_word != operation->command_id; in lm_dmae_operation_is_complete()
541 lm_dmae_operation_wait(struct _lm_device_t* pdev, lm_dmae_operation_t* operation) in lm_dmae_operation_wait() argument
547 while (!lm_dmae_operation_is_complete(operation)) in lm_dmae_operation_wait()
554 …r operation %d to complete. Completion word is 0x%x expected 0x%x.\n",(u64_t)operation->command_id, in lm_dmae_operation_wait()
555 (u64_t)operation->context->completion_word, in lm_dmae_operation_wait()
556 (u64_t)operation->context->completion_value); in lm_dmae_operation_wait()
570 if (LM_STATUS_SUCCESS != lm_dmae_context_reset(operation->context)) in lm_dmae_operation_wait()
715 …text_execute(struct _lm_device_t* pdev, lm_dmae_context_t *context, lm_dmae_operation_t *operation) in lm_dmae_context_execute() argument
726 lm_status = lm_dmae_context_execute_unsafe(pdev, context,operation); in lm_dmae_context_execute()
830 …_execute_sgl(struct _lm_device_t* pdev, lm_dmae_context_t *context, lm_dmae_operation_t *operation) in lm_dmae_context_execute_sgl() argument
834 context->completion_word = operation->command_id; in lm_dmae_context_execute_sgl()
836 lm_dmae_post_command(pdev, context->main_channel, &operation->main_cmd); in lm_dmae_context_execute_sgl()
838 if (operation->b_sync) in lm_dmae_context_execute_sgl()
840 lm_status = lm_dmae_operation_wait(pdev, operation); in lm_dmae_context_execute_sgl()
877 lm_dmae_operation_t *operation, in lm_dmae_context_execute_sub_operation() argument
892 switch (operation->blocks[0].source.type) in lm_dmae_context_execute_sub_operation()
897 operation->main_cmd.src_addr_hi = src_addr.as_u32.high; in lm_dmae_context_execute_sub_operation()
898 operation->main_cmd.src_addr_lo = src_addr.as_u32.low; in lm_dmae_context_execute_sub_operation()
903 operation->main_cmd.src_addr_hi = context->intermediate_buffer_paddr.as_u32.high; in lm_dmae_context_execute_sub_operation()
904 operation->main_cmd.src_addr_lo = context->intermediate_buffer_paddr.as_u32.low; in lm_dmae_context_execute_sub_operation()
907 if (operation->le32_swap) in lm_dmae_context_execute_sub_operation()
924 switch (operation->blocks[0].dest.type) in lm_dmae_context_execute_sub_operation()
929 operation->main_cmd.dst_addr_hi = dst_addr.as_u32.high; in lm_dmae_context_execute_sub_operation()
930 operation->main_cmd.dst_addr_lo = dst_addr.as_u32.low; in lm_dmae_context_execute_sub_operation()
935 operation->main_cmd.dst_addr_hi = context->intermediate_buffer_paddr.as_u32.high; in lm_dmae_context_execute_sub_operation()
936 operation->main_cmd.dst_addr_lo = context->intermediate_buffer_paddr.as_u32.low; in lm_dmae_context_execute_sub_operation()
949 context->completion_word = operation->command_id; in lm_dmae_context_execute_sub_operation()
951 operation->main_cmd.len = length; in lm_dmae_context_execute_sub_operation()
953 lm_dmae_post_command(pdev, context->main_channel, &operation->main_cmd); in lm_dmae_context_execute_sub_operation()
955 lm_status = lm_dmae_operation_wait(pdev, operation); in lm_dmae_context_execute_sub_operation()
963 if (operation->blocks[0].dest.type == LM_DMAE_ADDRESS_HOST_VIRT) in lm_dmae_context_execute_sub_operation()
985 …single_block(struct _lm_device_t* pdev, lm_dmae_context_t *context, lm_dmae_operation_t *operation) in lm_dmae_context_execute_single_block() argument
997 …const u16_t length_limit = (operation->blocks[0].dest.type != LM_DMAE_ADDRESS_GRC) ? min… in lm_dmae_context_execute_single_block()
1003 cnt_split = operation->blocks[0].length / length_limit; in lm_dmae_context_execute_single_block()
1004 length_mod = operation->blocks[0].length % length_limit; in lm_dmae_context_execute_single_block()
1006 src_addr.as_u64 = lm_dmae_address_native_offset(&operation->blocks[0].source); in lm_dmae_context_execute_single_block()
1009 dst_addr.as_u64 = lm_dmae_address_native_offset(&operation->blocks[0].dest); in lm_dmae_context_execute_single_block()
1015 if ( CHK_NULL(pdev) || ERR_IF( 0 == operation->blocks[0].length ) ) in lm_dmae_context_execute_single_block()
1024 if( !operation->b_replicate_source ) in lm_dmae_context_execute_single_block()
1026 if (operation->blocks[0].source.type == LM_DMAE_ADDRESS_GRC) in lm_dmae_context_execute_single_block()
1036 if (operation->blocks[0].dest.type == LM_DMAE_ADDRESS_GRC) in lm_dmae_context_execute_single_block()
1050 …lm_status = lm_dmae_context_execute_sub_operation(pdev, context, operation, src_addr_split, dst_ad… in lm_dmae_context_execute_single_block()
1061 …ecute_unsafe(struct _lm_device_t* pdev, lm_dmae_context_t *context, lm_dmae_operation_t *operation) in lm_dmae_context_execute_unsafe() argument
1070 DbgBreakIf(context->mode != operation->mode); in lm_dmae_context_execute_unsafe()
1072 operation->command_id = lm_dmae_context_advance_command_id(context); in lm_dmae_context_execute_unsafe()
1078 lm_status = lm_dmae_context_execute_single_block(pdev, context, operation); in lm_dmae_context_execute_unsafe()
1083 lm_status = lm_dmae_context_execute_sgl(pdev, context, operation); in lm_dmae_context_execute_unsafe()
1207 lm_dmae_operation_t operation = {0}; in lm_dmae_reg_wr() local
1215 …mae_operation_create(pdev, source, dest, length, replicate_source, le32_swap, context, &operation); in lm_dmae_reg_wr()
1221 lm_status = lm_dmae_context_execute(pdev, context, &operation); in lm_dmae_reg_wr()
1234 lm_dmae_operation_t operation = {0}; in lm_dmae_reg_wr_phys() local
1239 …m_status = lm_dmae_operation_create(pdev, source, dest, length, FALSE, FALSE, context, &operation); in lm_dmae_reg_wr_phys()
1245 lm_status = lm_dmae_context_execute(pdev, context, &operation); in lm_dmae_reg_wr_phys()
1259 lm_dmae_operation_t operation = {0}; in lm_dmae_reg_rd() local
1267 …atus = lm_dmae_operation_create(pdev, source, dest, length, FALSE, le32_swap, context, &operation); in lm_dmae_reg_rd()
1273 lm_status = lm_dmae_context_execute(pdev, context, &operation); in lm_dmae_reg_rd()
1286 lm_dmae_operation_t operation = {0}; in lm_dmae_copy_phys_buffer_unsafe() local
1289 …m_status = lm_dmae_operation_create(pdev, source, dest, length, FALSE, FALSE, context, &operation); in lm_dmae_copy_phys_buffer_unsafe()
1295 lm_status = lm_dmae_context_execute_unsafe(pdev, context, &operation); in lm_dmae_copy_phys_buffer_unsafe()