Lines Matching refs:shm
229 ctx->shm.size = buf_size->shm; in s5p_mfc_alloc_instance_buffer_v5()
230 ret = s5p_mfc_alloc_priv_buf(dev->mem_dev_l, dev->bank1, &ctx->shm); in s5p_mfc_alloc_instance_buffer_v5()
238 ctx->shm.ofs = ctx->shm.dma - dev->bank1; in s5p_mfc_alloc_instance_buffer_v5()
239 BUG_ON(ctx->shm.ofs & ((1 << MFC_BANK1_ALIGN_ORDER) - 1)); in s5p_mfc_alloc_instance_buffer_v5()
241 memset(ctx->shm.virt, 0, buf_size->shm); in s5p_mfc_alloc_instance_buffer_v5()
250 s5p_mfc_release_priv_buf(ctx->dev->mem_dev_l, &ctx->shm); in s5p_mfc_release_instance_buffer_v5()
268 *(u32 *)(ctx->shm.virt + ofs) = data; in s5p_mfc_write_info_v5()
276 return *(u32 *)(ctx->shm.virt + ofs); in s5p_mfc_read_info_v5()
363 mfc_write(dev, ctx->shm.ofs, S5P_FIMV_SI_CH0_HOST_WR_ADR); in s5p_mfc_set_shared_buffer()
684 unsigned int shm; in s5p_mfc_set_enc_params() local
749 shm = s5p_mfc_read_info_v5(ctx, EXT_ENC_CONTROL); in s5p_mfc_set_enc_params()
751 shm &= ~(0x1 << 3); in s5p_mfc_set_enc_params()
752 shm |= (p->seq_hdr_mode << 3); in s5p_mfc_set_enc_params()
754 shm &= ~(0x3 << 1); in s5p_mfc_set_enc_params()
755 shm |= (p->frame_skip_mode << 1); in s5p_mfc_set_enc_params()
756 s5p_mfc_write_info_v5(ctx, shm, EXT_ENC_CONTROL); in s5p_mfc_set_enc_params()
768 unsigned int shm; in s5p_mfc_set_enc_params_h264() local
869 shm = s5p_mfc_read_info_v5(ctx, P_B_FRAME_QP); in s5p_mfc_set_enc_params_h264()
870 shm &= ~(0xFFF); in s5p_mfc_set_enc_params_h264()
871 shm |= ((p_264->rc_b_frame_qp & 0x3F) << 6); in s5p_mfc_set_enc_params_h264()
872 shm |= (p_264->rc_p_frame_qp & 0x3F); in s5p_mfc_set_enc_params_h264()
873 s5p_mfc_write_info_v5(ctx, shm, P_B_FRAME_QP); in s5p_mfc_set_enc_params_h264()
876 shm = s5p_mfc_read_info_v5(ctx, EXT_ENC_CONTROL); in s5p_mfc_set_enc_params_h264()
878 shm &= ~(0x1 << 15); in s5p_mfc_set_enc_params_h264()
879 shm |= (p_264->vui_sar << 1); in s5p_mfc_set_enc_params_h264()
880 s5p_mfc_write_info_v5(ctx, shm, EXT_ENC_CONTROL); in s5p_mfc_set_enc_params_h264()
883 shm = s5p_mfc_read_info_v5(ctx, SAMPLE_ASPECT_RATIO_IDC); in s5p_mfc_set_enc_params_h264()
884 shm &= ~(0xFF); in s5p_mfc_set_enc_params_h264()
885 shm |= p_264->vui_sar_idc; in s5p_mfc_set_enc_params_h264()
886 s5p_mfc_write_info_v5(ctx, shm, SAMPLE_ASPECT_RATIO_IDC); in s5p_mfc_set_enc_params_h264()
889 shm = s5p_mfc_read_info_v5(ctx, EXTENDED_SAR); in s5p_mfc_set_enc_params_h264()
890 shm &= ~(0xFFFFFFFF); in s5p_mfc_set_enc_params_h264()
891 shm |= p_264->vui_ext_sar_width << 16; in s5p_mfc_set_enc_params_h264()
892 shm |= p_264->vui_ext_sar_height; in s5p_mfc_set_enc_params_h264()
893 s5p_mfc_write_info_v5(ctx, shm, EXTENDED_SAR); in s5p_mfc_set_enc_params_h264()
897 shm = s5p_mfc_read_info_v5(ctx, H264_I_PERIOD); in s5p_mfc_set_enc_params_h264()
899 shm &= ~(0x1 << 16); in s5p_mfc_set_enc_params_h264()
900 shm |= (p_264->open_gop << 16); in s5p_mfc_set_enc_params_h264()
903 shm &= ~(0xFFFF); in s5p_mfc_set_enc_params_h264()
904 shm |= p_264->open_gop_size; in s5p_mfc_set_enc_params_h264()
906 s5p_mfc_write_info_v5(ctx, shm, H264_I_PERIOD); in s5p_mfc_set_enc_params_h264()
908 shm = s5p_mfc_read_info_v5(ctx, EXT_ENC_CONTROL); in s5p_mfc_set_enc_params_h264()
912 shm &= ~(0xFFFF << 16); in s5p_mfc_set_enc_params_h264()
913 shm |= (p_264->cpb_size << 16); in s5p_mfc_set_enc_params_h264()
915 s5p_mfc_write_info_v5(ctx, shm, EXT_ENC_CONTROL); in s5p_mfc_set_enc_params_h264()
925 unsigned int shm; in s5p_mfc_set_enc_params_mpeg4() local
948 shm = s5p_mfc_read_info_v5(ctx, P_B_FRAME_QP); in s5p_mfc_set_enc_params_mpeg4()
949 shm &= ~(0xFFF); in s5p_mfc_set_enc_params_mpeg4()
950 shm |= ((p_mpeg4->rc_b_frame_qp & 0x3F) << 6); in s5p_mfc_set_enc_params_mpeg4()
951 shm |= (p_mpeg4->rc_p_frame_qp & 0x3F); in s5p_mfc_set_enc_params_mpeg4()
952 s5p_mfc_write_info_v5(ctx, shm, P_B_FRAME_QP); in s5p_mfc_set_enc_params_mpeg4()
961 shm = s5p_mfc_read_info_v5(ctx, RC_VOP_TIMING); in s5p_mfc_set_enc_params_mpeg4()
962 shm &= ~(0xFFFFFFFF); in s5p_mfc_set_enc_params_mpeg4()
963 shm |= (1 << 31); in s5p_mfc_set_enc_params_mpeg4()
964 shm |= ((p->rc_framerate_num & 0x7FFF) << 16); in s5p_mfc_set_enc_params_mpeg4()
965 shm |= (p->rc_framerate_denom & 0xFFFF); in s5p_mfc_set_enc_params_mpeg4()
966 s5p_mfc_write_info_v5(ctx, shm, RC_VOP_TIMING); in s5p_mfc_set_enc_params_mpeg4()
987 shm = s5p_mfc_read_info_v5(ctx, EXT_ENC_CONTROL); in s5p_mfc_set_enc_params_mpeg4()
991 shm &= ~(0xFFFF << 16); in s5p_mfc_set_enc_params_mpeg4()
992 shm |= (p->vbv_size << 16); in s5p_mfc_set_enc_params_mpeg4()
994 s5p_mfc_write_info_v5(ctx, shm, EXT_ENC_CONTROL); in s5p_mfc_set_enc_params_mpeg4()
1004 unsigned int shm; in s5p_mfc_set_enc_params_h263() local
1009 shm = s5p_mfc_read_info_v5(ctx, P_B_FRAME_QP); in s5p_mfc_set_enc_params_h263()
1010 shm &= ~(0xFFF); in s5p_mfc_set_enc_params_h263()
1011 shm |= (p_h263->rc_p_frame_qp & 0x3F); in s5p_mfc_set_enc_params_h263()
1012 s5p_mfc_write_info_v5(ctx, shm, P_B_FRAME_QP); in s5p_mfc_set_enc_params_h263()
1036 shm = s5p_mfc_read_info_v5(ctx, EXT_ENC_CONTROL); in s5p_mfc_set_enc_params_h263()
1040 shm &= ~(0xFFFF << 16); in s5p_mfc_set_enc_params_h263()
1041 shm |= (p->vbv_size << 16); in s5p_mfc_set_enc_params_h263()
1043 s5p_mfc_write_info_v5(ctx, shm, EXT_ENC_CONTROL); in s5p_mfc_set_enc_params_h263()