Lines Matching refs:reg_ctx
358 Avs2dVdpu382RegCtx_t *reg_ctx = (Avs2dVdpu382RegCtx_t *)p_hal->reg_ctx; in hal_avs2d_rcb_info_update() local
362 RK_S32 loop = p_hal->fast_mode ? MPP_ARRAY_ELEMS(reg_ctx->reg_buf) : 1; in hal_avs2d_rcb_info_update()
364 reg_ctx->rcb_buf_size = vdpu382_get_rcb_buf_size(reg_ctx->rcb_info, width, height); in hal_avs2d_rcb_info_update()
365 avs2d_refine_rcb_size(reg_ctx->rcb_info, hw_regs, width, height, (void *)&p_hal->syntax); in hal_avs2d_rcb_info_update()
370 if (reg_ctx->rcb_buf[i]) { in hal_avs2d_rcb_info_update()
371 mpp_buffer_put(reg_ctx->rcb_buf[i]); in hal_avs2d_rcb_info_update()
372 reg_ctx->rcb_buf[i] = NULL; in hal_avs2d_rcb_info_update()
375 ret = mpp_buffer_get(p_hal->buf_group, &rcb_buf, reg_ctx->rcb_buf_size); in hal_avs2d_rcb_info_update()
380 reg_ctx->rcb_buf[i] = rcb_buf; in hal_avs2d_rcb_info_update()
545 Avs2dVdpu382RegCtx_t *reg_ctx = (Avs2dVdpu382RegCtx_t *)p_hal->reg_ctx; in hal_avs2d_vdpu382_deinit() local
549 INP_CHECK(ret, NULL == reg_ctx); in hal_avs2d_vdpu382_deinit()
552 loop = p_hal->fast_mode ? MPP_ARRAY_ELEMS(reg_ctx->reg_buf) : 1; in hal_avs2d_vdpu382_deinit()
554 if (reg_ctx->rcb_buf[i]) { in hal_avs2d_vdpu382_deinit()
555 mpp_buffer_put(reg_ctx->rcb_buf[i]); in hal_avs2d_vdpu382_deinit()
556 reg_ctx->rcb_buf[i] = NULL; in hal_avs2d_vdpu382_deinit()
559 MPP_FREE(reg_ctx->reg_buf[i].regs); in hal_avs2d_vdpu382_deinit()
562 if (reg_ctx->bufs) { in hal_avs2d_vdpu382_deinit()
563 mpp_buffer_put(reg_ctx->bufs); in hal_avs2d_vdpu382_deinit()
564 reg_ctx->bufs = NULL; in hal_avs2d_vdpu382_deinit()
572 MPP_FREE(p_hal->reg_ctx); in hal_avs2d_vdpu382_deinit()
583 Avs2dVdpu382RegCtx_t *reg_ctx; in hal_avs2d_vdpu382_init() local
590 MEM_CHECK(ret, p_hal->reg_ctx = mpp_calloc_size(void, sizeof(Avs2dVdpu382RegCtx_t))); in hal_avs2d_vdpu382_init()
591 reg_ctx = (Avs2dVdpu382RegCtx_t *)p_hal->reg_ctx; in hal_avs2d_vdpu382_init()
594 loop = p_hal->fast_mode ? MPP_ARRAY_ELEMS(reg_ctx->reg_buf) : 1; in hal_avs2d_vdpu382_init()
595 FUN_CHECK(ret = mpp_buffer_get(p_hal->buf_group, ®_ctx->bufs, AVS2_ALL_TBL_BUF_SIZE(loop))); in hal_avs2d_vdpu382_init()
596 reg_ctx->bufs_fd = mpp_buffer_get_fd(reg_ctx->bufs); in hal_avs2d_vdpu382_init()
597 reg_ctx->bufs_ptr = mpp_buffer_get_ptr(reg_ctx->bufs); in hal_avs2d_vdpu382_init()
600 reg_ctx->reg_buf[i].regs = mpp_calloc(Vdpu382Avs2dRegSet, 1); in hal_avs2d_vdpu382_init()
601 init_common_regs(reg_ctx->reg_buf[i].regs); in hal_avs2d_vdpu382_init()
602 reg_ctx->reg_buf[i].offset_shph = AVS2_SHPH_OFFSET(i); in hal_avs2d_vdpu382_init()
603 reg_ctx->reg_buf[i].offset_sclst = AVS2_SCALIST_OFFSET(i); in hal_avs2d_vdpu382_init()
607 reg_ctx->regs = reg_ctx->reg_buf[0].regs; in hal_avs2d_vdpu382_init()
608 reg_ctx->shph_offset = reg_ctx->reg_buf[0].offset_shph; in hal_avs2d_vdpu382_init()
609 reg_ctx->sclst_offset = reg_ctx->reg_buf[0].offset_sclst; in hal_avs2d_vdpu382_init()
675 Avs2dVdpu382RegCtx_t *reg_ctx; in hal_avs2d_vdpu382_gen_regs() local
693 reg_ctx = (Avs2dVdpu382RegCtx_t *)p_hal->reg_ctx; in hal_avs2d_vdpu382_gen_regs()
698 for (i = 0; i < MPP_ARRAY_ELEMS(reg_ctx->reg_buf); i++) { in hal_avs2d_vdpu382_gen_regs()
699 if (!reg_ctx->reg_buf[i].valid) { in hal_avs2d_vdpu382_gen_regs()
701 regs = reg_ctx->reg_buf[i].regs; in hal_avs2d_vdpu382_gen_regs()
702 reg_ctx->shph_offset = reg_ctx->reg_buf[i].offset_shph; in hal_avs2d_vdpu382_gen_regs()
703 reg_ctx->sclst_offset = reg_ctx->reg_buf[i].offset_sclst; in hal_avs2d_vdpu382_gen_regs()
704 reg_ctx->regs = reg_ctx->reg_buf[i].regs; in hal_avs2d_vdpu382_gen_regs()
705 reg_ctx->reg_buf[i].valid = 1; in hal_avs2d_vdpu382_gen_regs()
713 regs = reg_ctx->regs; in hal_avs2d_vdpu382_gen_regs()
715 prepare_header(p_hal, reg_ctx->shph_dat, sizeof(reg_ctx->shph_dat)); in hal_avs2d_vdpu382_gen_regs()
716 prepare_scalist(p_hal, reg_ctx->scalist_dat, sizeof(reg_ctx->scalist_dat)); in hal_avs2d_vdpu382_gen_regs()
724 … memcpy(reg_ctx->bufs_ptr + reg_ctx->shph_offset, reg_ctx->shph_dat, sizeof(reg_ctx->shph_dat)); in hal_avs2d_vdpu382_gen_regs()
725 …memcpy(reg_ctx->bufs_ptr + reg_ctx->sclst_offset, reg_ctx->scalist_dat, sizeof(reg_ctx->scalist_da… in hal_avs2d_vdpu382_gen_regs()
728 regs->avs2d_addr.head_base = reg_ctx->bufs_fd; in hal_avs2d_vdpu382_gen_regs()
729 mpp_dev_set_reg_offset(p_hal->dev, 161, reg_ctx->shph_offset); in hal_avs2d_vdpu382_gen_regs()
734 regs->avs2d_addr.scanlist_addr = reg_ctx->bufs_fd; in hal_avs2d_vdpu382_gen_regs()
735 mpp_dev_set_reg_offset(p_hal->dev, 180, reg_ctx->sclst_offset); in hal_avs2d_vdpu382_gen_regs()
743 fwrite(reg_ctx->bufs_ptr + reg_ctx->shph_offset, 1, sizeof(reg_ctx->shph_dat), fp_shph); in hal_avs2d_vdpu382_gen_regs()
752 … fwrite(reg_ctx->bufs_ptr + reg_ctx->sclst_offset, 1, sizeof(reg_ctx->scalist_dat), fp_scalist); in hal_avs2d_vdpu382_gen_regs()
760 reg_ctx->rcb_buf[task->dec.reg_index] : reg_ctx->rcb_buf[0], in hal_avs2d_vdpu382_gen_regs()
761 reg_ctx->rcb_info); in hal_avs2d_vdpu382_gen_regs()
771 base = mpp_buffer_get_ptr(reg_ctx->rcb_buf[0]); in hal_avs2d_vdpu382_gen_regs()
772 fwrite(base, 1, reg_ctx->rcb_buf_size, fp_rcb); in hal_avs2d_vdpu382_gen_regs()
778 mpp_buffer_sync_end(reg_ctx->bufs); in hal_avs2d_vdpu382_gen_regs()
869 Avs2dVdpu382RegCtx_t *reg_ctx; in hal_avs2d_vdpu382_start() local
882 reg_ctx = (Avs2dVdpu382RegCtx_t *)p_hal->reg_ctx; in hal_avs2d_vdpu382_start()
883 regs = p_hal->fast_mode ? reg_ctx->reg_buf[task->dec.reg_index].regs : reg_ctx->regs; in hal_avs2d_vdpu382_start()
977 memset(reg_ctx->reg_out, 0, sizeof(reg_ctx->reg_out)); in hal_avs2d_vdpu382_start()
978 rd_cfg.reg = reg_ctx->reg_out; in hal_avs2d_vdpu382_start()
979 rd_cfg.size = sizeof(reg_ctx->reg_out); in hal_avs2d_vdpu382_start()
985 vdpu382_set_rcbinfo(dev, reg_ctx->rcb_info); in hal_avs2d_vdpu382_start()
1098 Avs2dVdpu382RegCtx_t *reg_ctx; in hal_avs2d_vdpu382_wait() local
1102 reg_ctx = (Avs2dVdpu382RegCtx_t *)p_hal->reg_ctx; in hal_avs2d_vdpu382_wait()
1103 p_regs = p_hal->fast_mode ? reg_ctx->reg_buf[task->dec.reg_index].regs : reg_ctx->regs; in hal_avs2d_vdpu382_wait()
1127 fprintf(fp_reg, "%08x\n", reg_ctx->reg_out[i]); in hal_avs2d_vdpu382_wait()
1168 reg_ctx->reg_buf[task->dec.reg_index].valid = 0; in hal_avs2d_vdpu382_wait()