vpu 219 drivers/media/platform/mtk-mdp/mtk_mdp_core.h struct mtk_mdp_vpu vpu; vpu 532 drivers/media/platform/mtk-mdp/mtk_mdp_m2m.c ret = mtk_mdp_vpu_process(&ctx->vpu); vpu 770 drivers/media/platform/mtk-mdp/mtk_mdp_m2m.c ret = mtk_mdp_vpu_init(&ctx->vpu); vpu 1177 drivers/media/platform/mtk-mdp/mtk_mdp_m2m.c mtk_mdp_vpu_deinit(&ctx->vpu); vpu 51 drivers/media/platform/mtk-mdp/mtk_mdp_regs.c struct mdp_buffer *src_buf = &ctx->vpu.vsi->src_buffer; vpu 61 drivers/media/platform/mtk-mdp/mtk_mdp_regs.c struct mdp_buffer *dst_buf = &ctx->vpu.vsi->dst_buffer; vpu 71 drivers/media/platform/mtk-mdp/mtk_mdp_regs.c struct mdp_config *config = &ctx->vpu.vsi->src_config; vpu 92 drivers/media/platform/mtk-mdp/mtk_mdp_regs.c struct mdp_config *config = &ctx->vpu.vsi->src_config; vpu 93 drivers/media/platform/mtk-mdp/mtk_mdp_regs.c struct mdp_buffer *src_buf = &ctx->vpu.vsi->src_buffer; vpu 107 drivers/media/platform/mtk-mdp/mtk_mdp_regs.c struct mdp_config *config = &ctx->vpu.vsi->dst_config; vpu 123 drivers/media/platform/mtk-mdp/mtk_mdp_regs.c struct mdp_config *config = &ctx->vpu.vsi->dst_config; vpu 124 drivers/media/platform/mtk-mdp/mtk_mdp_regs.c struct mdp_buffer *dst_buf = &ctx->vpu.vsi->dst_buffer; vpu 136 drivers/media/platform/mtk-mdp/mtk_mdp_regs.c struct mdp_config_misc *misc = &ctx->vpu.vsi->misc; vpu 145 drivers/media/platform/mtk-mdp/mtk_mdp_regs.c struct mdp_config_misc *misc = &ctx->vpu.vsi->misc; vpu 13 drivers/media/platform/mtk-mdp/mtk_mdp_vpu.c static inline struct mtk_mdp_ctx *vpu_to_ctx(struct mtk_mdp_vpu *vpu) vpu 15 drivers/media/platform/mtk-mdp/mtk_mdp_vpu.c return container_of(vpu, struct mtk_mdp_ctx, vpu); vpu 20 drivers/media/platform/mtk-mdp/mtk_mdp_vpu.c struct mtk_mdp_vpu *vpu = (struct mtk_mdp_vpu *) vpu 24 drivers/media/platform/mtk-mdp/mtk_mdp_vpu.c vpu->vsi = (struct mdp_process_vsi *) vpu 25 drivers/media/platform/mtk-mdp/mtk_mdp_vpu.c vpu_mapping_dm_addr(vpu->pdev, msg->vpu_inst_addr); vpu 26 drivers/media/platform/mtk-mdp/mtk_mdp_vpu.c vpu->inst_addr = msg->vpu_inst_addr; vpu 33 drivers/media/platform/mtk-mdp/mtk_mdp_vpu.c struct mtk_mdp_vpu *vpu = (struct mtk_mdp_vpu *) vpu 37 drivers/media/platform/mtk-mdp/mtk_mdp_vpu.c vpu->failure = msg->status; vpu 38 drivers/media/platform/mtk-mdp/mtk_mdp_vpu.c if (!vpu->failure) { vpu 47 drivers/media/platform/mtk-mdp/mtk_mdp_vpu.c ctx = vpu_to_ctx(vpu); vpu 54 drivers/media/platform/mtk-mdp/mtk_mdp_vpu.c ctx = vpu_to_ctx(vpu); vpu 56 drivers/media/platform/mtk-mdp/mtk_mdp_vpu.c msg_id, vpu->failure); vpu 74 drivers/media/platform/mtk-mdp/mtk_mdp_vpu.c static int mtk_mdp_vpu_send_msg(void *msg, int len, struct mtk_mdp_vpu *vpu, vpu 77 drivers/media/platform/mtk-mdp/mtk_mdp_vpu.c struct mtk_mdp_ctx *ctx = vpu_to_ctx(vpu); vpu 80 drivers/media/platform/mtk-mdp/mtk_mdp_vpu.c if (!vpu->pdev) { vpu 86 drivers/media/platform/mtk-mdp/mtk_mdp_vpu.c err = vpu_ipi_send(vpu->pdev, (enum ipi_id)id, msg, len); vpu 95 drivers/media/platform/mtk-mdp/mtk_mdp_vpu.c static int mtk_mdp_vpu_send_ap_ipi(struct mtk_mdp_vpu *vpu, uint32_t msg_id) vpu 102 drivers/media/platform/mtk-mdp/mtk_mdp_vpu.c msg.vpu_inst_addr = vpu->inst_addr; vpu 103 drivers/media/platform/mtk-mdp/mtk_mdp_vpu.c msg.ap_inst = (unsigned long)vpu; vpu 104 drivers/media/platform/mtk-mdp/mtk_mdp_vpu.c err = mtk_mdp_vpu_send_msg((void *)&msg, sizeof(msg), vpu, IPI_MDP); vpu 105 drivers/media/platform/mtk-mdp/mtk_mdp_vpu.c if (!err && vpu->failure) vpu 111 drivers/media/platform/mtk-mdp/mtk_mdp_vpu.c int mtk_mdp_vpu_init(struct mtk_mdp_vpu *vpu) vpu 115 drivers/media/platform/mtk-mdp/mtk_mdp_vpu.c struct mtk_mdp_ctx *ctx = vpu_to_ctx(vpu); vpu 117 drivers/media/platform/mtk-mdp/mtk_mdp_vpu.c vpu->pdev = ctx->mdp_dev->vpu_dev; vpu 121 drivers/media/platform/mtk-mdp/mtk_mdp_vpu.c msg.ap_inst = (unsigned long)vpu; vpu 122 drivers/media/platform/mtk-mdp/mtk_mdp_vpu.c err = mtk_mdp_vpu_send_msg((void *)&msg, sizeof(msg), vpu, IPI_MDP); vpu 123 drivers/media/platform/mtk-mdp/mtk_mdp_vpu.c if (!err && vpu->failure) vpu 129 drivers/media/platform/mtk-mdp/mtk_mdp_vpu.c int mtk_mdp_vpu_deinit(struct mtk_mdp_vpu *vpu) vpu 131 drivers/media/platform/mtk-mdp/mtk_mdp_vpu.c return mtk_mdp_vpu_send_ap_ipi(vpu, AP_MDP_DEINIT); vpu 134 drivers/media/platform/mtk-mdp/mtk_mdp_vpu.c int mtk_mdp_vpu_process(struct mtk_mdp_vpu *vpu) vpu 136 drivers/media/platform/mtk-mdp/mtk_mdp_vpu.c return mtk_mdp_vpu_send_ap_ipi(vpu, AP_MDP_PROCESS); vpu 29 drivers/media/platform/mtk-mdp/mtk_mdp_vpu.h int mtk_mdp_vpu_init(struct mtk_mdp_vpu *vpu); vpu 30 drivers/media/platform/mtk-mdp/mtk_mdp_vpu.h int mtk_mdp_vpu_deinit(struct mtk_mdp_vpu *vpu); vpu 31 drivers/media/platform/mtk-mdp/mtk_mdp_vpu.h int mtk_mdp_vpu_process(struct mtk_mdp_vpu *vpu); vpu 131 drivers/media/platform/mtk-vcodec/vdec/vdec_h264_if.c struct vdec_vpu_inst vpu; vpu 283 drivers/media/platform/mtk-vcodec/vdec/vdec_h264_if.c inst->vpu.id = IPI_VDEC_H264; vpu 284 drivers/media/platform/mtk-vcodec/vdec/vdec_h264_if.c inst->vpu.dev = ctx->dev->vpu_plat_dev; vpu 285 drivers/media/platform/mtk-vcodec/vdec/vdec_h264_if.c inst->vpu.ctx = ctx; vpu 286 drivers/media/platform/mtk-vcodec/vdec/vdec_h264_if.c inst->vpu.handler = vpu_dec_ipi_handler; vpu 288 drivers/media/platform/mtk-vcodec/vdec/vdec_h264_if.c err = vpu_dec_init(&inst->vpu); vpu 294 drivers/media/platform/mtk-vcodec/vdec/vdec_h264_if.c inst->vsi = (struct vdec_h264_vsi *)inst->vpu.vsi; vpu 305 drivers/media/platform/mtk-vcodec/vdec/vdec_h264_if.c vpu_dec_deinit(&inst->vpu); vpu 318 drivers/media/platform/mtk-vcodec/vdec/vdec_h264_if.c vpu_dec_deinit(&inst->vpu); vpu 341 drivers/media/platform/mtk-vcodec/vdec/vdec_h264_if.c struct vdec_vpu_inst *vpu = &inst->vpu; vpu 358 drivers/media/platform/mtk-vcodec/vdec/vdec_h264_if.c return vpu_dec_reset(vpu); vpu 390 drivers/media/platform/mtk-vcodec/vdec/vdec_h264_if.c err = vpu_dec_start(vpu, data, 2); vpu 422 drivers/media/platform/mtk-vcodec/vdec/vdec_h264_if.c vpu_dec_end(vpu); vpu 164 drivers/media/platform/mtk-vcodec/vdec/vdec_vp8_if.c struct vdec_vpu_inst vpu; vpu 402 drivers/media/platform/mtk-vcodec/vdec/vdec_vp8_if.c inst->vpu.id = IPI_VDEC_VP8; vpu 403 drivers/media/platform/mtk-vcodec/vdec/vdec_vp8_if.c inst->vpu.dev = ctx->dev->vpu_plat_dev; vpu 404 drivers/media/platform/mtk-vcodec/vdec/vdec_vp8_if.c inst->vpu.ctx = ctx; vpu 405 drivers/media/platform/mtk-vcodec/vdec/vdec_vp8_if.c inst->vpu.handler = vpu_dec_ipi_handler; vpu 407 drivers/media/platform/mtk-vcodec/vdec/vdec_vp8_if.c err = vpu_dec_init(&inst->vpu); vpu 413 drivers/media/platform/mtk-vcodec/vdec/vdec_vp8_if.c inst->vsi = (struct vdec_vp8_vsi *)inst->vpu.vsi; vpu 426 drivers/media/platform/mtk-vcodec/vdec/vdec_vp8_if.c vpu_dec_deinit(&inst->vpu); vpu 437 drivers/media/platform/mtk-vcodec/vdec/vdec_vp8_if.c struct vdec_vpu_inst *vpu = &inst->vpu; vpu 447 drivers/media/platform/mtk-vcodec/vdec/vdec_vp8_if.c return vpu_dec_reset(vpu); vpu 473 drivers/media/platform/mtk-vcodec/vdec/vdec_vp8_if.c err = vpu_dec_start(vpu, &data, 1); vpu 501 drivers/media/platform/mtk-vcodec/vdec/vdec_vp8_if.c err = vpu_dec_end(vpu); vpu 608 drivers/media/platform/mtk-vcodec/vdec/vdec_vp8_if.c vpu_dec_deinit(&inst->vpu); vpu 196 drivers/media/platform/mtk-vcodec/vdec/vdec_vp9_if.c struct vdec_vpu_inst vpu; vpu 586 drivers/media/platform/mtk-vcodec/vdec/vdec_vp9_if.c if (vpu_dec_end(&inst->vpu)) { vpu 663 drivers/media/platform/mtk-vcodec/vdec/vdec_vp9_if.c if (vpu_dec_reset(&inst->vpu)) vpu 766 drivers/media/platform/mtk-vcodec/vdec/vdec_vp9_if.c ret = vpu_dec_deinit(&inst->vpu); vpu 793 drivers/media/platform/mtk-vcodec/vdec/vdec_vp9_if.c inst->vpu.id = IPI_VDEC_VP9; vpu 794 drivers/media/platform/mtk-vcodec/vdec/vdec_vp9_if.c inst->vpu.dev = ctx->dev->vpu_plat_dev; vpu 795 drivers/media/platform/mtk-vcodec/vdec/vdec_vp9_if.c inst->vpu.ctx = ctx; vpu 796 drivers/media/platform/mtk-vcodec/vdec/vdec_vp9_if.c inst->vpu.handler = vpu_dec_ipi_handler; vpu 798 drivers/media/platform/mtk-vcodec/vdec/vdec_vp9_if.c if (vpu_dec_init(&inst->vpu)) { vpu 803 drivers/media/platform/mtk-vcodec/vdec/vdec_vp9_if.c inst->vsi = (struct vdec_vp9_vsi *)inst->vpu.vsi; vpu 875 drivers/media/platform/mtk-vcodec/vdec/vdec_vp9_if.c ret = vpu_dec_start(&inst->vpu, data, 3); vpu 14 drivers/media/platform/mtk-vcodec/vdec_vpu_if.c struct vdec_vpu_inst *vpu = (struct vdec_vpu_inst *) vpu 17 drivers/media/platform/mtk-vcodec/vdec_vpu_if.c mtk_vcodec_debug(vpu, "+ ap_inst_addr = 0x%llx", msg->ap_inst_addr); vpu 21 drivers/media/platform/mtk-vcodec/vdec_vpu_if.c vpu->vsi = vpu_mapping_dm_addr(vpu->dev, msg->vpu_inst_addr); vpu 22 drivers/media/platform/mtk-vcodec/vdec_vpu_if.c vpu->inst_addr = msg->vpu_inst_addr; vpu 24 drivers/media/platform/mtk-vcodec/vdec_vpu_if.c mtk_vcodec_debug(vpu, "- vpu_inst_addr = 0x%x", vpu->inst_addr); vpu 34 drivers/media/platform/mtk-vcodec/vdec_vpu_if.c struct vdec_vpu_inst *vpu = (struct vdec_vpu_inst *) vpu 37 drivers/media/platform/mtk-vcodec/vdec_vpu_if.c mtk_vcodec_debug(vpu, "+ id=%X", msg->msg_id); vpu 52 drivers/media/platform/mtk-vcodec/vdec_vpu_if.c mtk_vcodec_err(vpu, "invalid msg=%X", msg->msg_id); vpu 57 drivers/media/platform/mtk-vcodec/vdec_vpu_if.c mtk_vcodec_debug(vpu, "- id=%X", msg->msg_id); vpu 58 drivers/media/platform/mtk-vcodec/vdec_vpu_if.c vpu->failure = msg->status; vpu 59 drivers/media/platform/mtk-vcodec/vdec_vpu_if.c vpu->signaled = 1; vpu 62 drivers/media/platform/mtk-vcodec/vdec_vpu_if.c static int vcodec_vpu_send_msg(struct vdec_vpu_inst *vpu, void *msg, int len) vpu 66 drivers/media/platform/mtk-vcodec/vdec_vpu_if.c mtk_vcodec_debug(vpu, "id=%X", *(uint32_t *)msg); vpu 68 drivers/media/platform/mtk-vcodec/vdec_vpu_if.c vpu->failure = 0; vpu 69 drivers/media/platform/mtk-vcodec/vdec_vpu_if.c vpu->signaled = 0; vpu 71 drivers/media/platform/mtk-vcodec/vdec_vpu_if.c err = vpu_ipi_send(vpu->dev, vpu->id, msg, len); vpu 73 drivers/media/platform/mtk-vcodec/vdec_vpu_if.c mtk_vcodec_err(vpu, "send fail vpu_id=%d msg_id=%X status=%d", vpu 74 drivers/media/platform/mtk-vcodec/vdec_vpu_if.c vpu->id, *(uint32_t *)msg, err); vpu 78 drivers/media/platform/mtk-vcodec/vdec_vpu_if.c return vpu->failure; vpu 81 drivers/media/platform/mtk-vcodec/vdec_vpu_if.c static int vcodec_send_ap_ipi(struct vdec_vpu_inst *vpu, unsigned int msg_id) vpu 86 drivers/media/platform/mtk-vcodec/vdec_vpu_if.c mtk_vcodec_debug(vpu, "+ id=%X", msg_id); vpu 90 drivers/media/platform/mtk-vcodec/vdec_vpu_if.c msg.vpu_inst_addr = vpu->inst_addr; vpu 92 drivers/media/platform/mtk-vcodec/vdec_vpu_if.c err = vcodec_vpu_send_msg(vpu, &msg, sizeof(msg)); vpu 93 drivers/media/platform/mtk-vcodec/vdec_vpu_if.c mtk_vcodec_debug(vpu, "- id=%X ret=%d", msg_id, err); vpu 97 drivers/media/platform/mtk-vcodec/vdec_vpu_if.c int vpu_dec_init(struct vdec_vpu_inst *vpu) vpu 102 drivers/media/platform/mtk-vcodec/vdec_vpu_if.c mtk_vcodec_debug_enter(vpu); vpu 104 drivers/media/platform/mtk-vcodec/vdec_vpu_if.c init_waitqueue_head(&vpu->wq); vpu 106 drivers/media/platform/mtk-vcodec/vdec_vpu_if.c err = vpu_ipi_register(vpu->dev, vpu->id, vpu->handler, "vdec", NULL); vpu 108 drivers/media/platform/mtk-vcodec/vdec_vpu_if.c mtk_vcodec_err(vpu, "vpu_ipi_register fail status=%d", err); vpu 114 drivers/media/platform/mtk-vcodec/vdec_vpu_if.c msg.ap_inst_addr = (unsigned long)vpu; vpu 116 drivers/media/platform/mtk-vcodec/vdec_vpu_if.c mtk_vcodec_debug(vpu, "vdec_inst=%p", vpu); vpu 118 drivers/media/platform/mtk-vcodec/vdec_vpu_if.c err = vcodec_vpu_send_msg(vpu, (void *)&msg, sizeof(msg)); vpu 119 drivers/media/platform/mtk-vcodec/vdec_vpu_if.c mtk_vcodec_debug(vpu, "- ret=%d", err); vpu 123 drivers/media/platform/mtk-vcodec/vdec_vpu_if.c int vpu_dec_start(struct vdec_vpu_inst *vpu, uint32_t *data, unsigned int len) vpu 129 drivers/media/platform/mtk-vcodec/vdec_vpu_if.c mtk_vcodec_debug_enter(vpu); vpu 132 drivers/media/platform/mtk-vcodec/vdec_vpu_if.c mtk_vcodec_err(vpu, "invalid len = %d\n", len); vpu 138 drivers/media/platform/mtk-vcodec/vdec_vpu_if.c msg.vpu_inst_addr = vpu->inst_addr; vpu 143 drivers/media/platform/mtk-vcodec/vdec_vpu_if.c err = vcodec_vpu_send_msg(vpu, (void *)&msg, sizeof(msg)); vpu 144 drivers/media/platform/mtk-vcodec/vdec_vpu_if.c mtk_vcodec_debug(vpu, "- ret=%d", err); vpu 148 drivers/media/platform/mtk-vcodec/vdec_vpu_if.c int vpu_dec_end(struct vdec_vpu_inst *vpu) vpu 150 drivers/media/platform/mtk-vcodec/vdec_vpu_if.c return vcodec_send_ap_ipi(vpu, AP_IPIMSG_DEC_END); vpu 153 drivers/media/platform/mtk-vcodec/vdec_vpu_if.c int vpu_dec_deinit(struct vdec_vpu_inst *vpu) vpu 155 drivers/media/platform/mtk-vcodec/vdec_vpu_if.c return vcodec_send_ap_ipi(vpu, AP_IPIMSG_DEC_DEINIT); vpu 158 drivers/media/platform/mtk-vcodec/vdec_vpu_if.c int vpu_dec_reset(struct vdec_vpu_inst *vpu) vpu 160 drivers/media/platform/mtk-vcodec/vdec_vpu_if.c return vcodec_send_ap_ipi(vpu, AP_IPIMSG_DEC_RESET); vpu 42 drivers/media/platform/mtk-vcodec/vdec_vpu_if.h int vpu_dec_init(struct vdec_vpu_inst *vpu); vpu 52 drivers/media/platform/mtk-vcodec/vdec_vpu_if.h int vpu_dec_start(struct vdec_vpu_inst *vpu, uint32_t *data, unsigned int len); vpu 62 drivers/media/platform/mtk-vcodec/vdec_vpu_if.h int vpu_dec_end(struct vdec_vpu_inst *vpu); vpu 69 drivers/media/platform/mtk-vcodec/vdec_vpu_if.h int vpu_dec_deinit(struct vdec_vpu_inst *vpu); vpu 77 drivers/media/platform/mtk-vcodec/vdec_vpu_if.h int vpu_dec_reset(struct vdec_vpu_inst *vpu); vpu 11 drivers/media/platform/mtk-vcodec/venc_vpu_if.c static void handle_enc_init_msg(struct venc_vpu_inst *vpu, void *data) vpu 15 drivers/media/platform/mtk-vcodec/venc_vpu_if.c vpu->inst_addr = msg->vpu_inst_addr; vpu 16 drivers/media/platform/mtk-vcodec/venc_vpu_if.c vpu->vsi = vpu_mapping_dm_addr(vpu->dev, msg->vpu_inst_addr); vpu 19 drivers/media/platform/mtk-vcodec/venc_vpu_if.c static void handle_enc_encode_msg(struct venc_vpu_inst *vpu, void *data) vpu 23 drivers/media/platform/mtk-vcodec/venc_vpu_if.c vpu->state = msg->state; vpu 24 drivers/media/platform/mtk-vcodec/venc_vpu_if.c vpu->bs_size = msg->bs_size; vpu 25 drivers/media/platform/mtk-vcodec/venc_vpu_if.c vpu->is_key_frm = msg->is_key_frm; vpu 31 drivers/media/platform/mtk-vcodec/venc_vpu_if.c struct venc_vpu_inst *vpu = vpu 34 drivers/media/platform/mtk-vcodec/venc_vpu_if.c mtk_vcodec_debug(vpu, "msg_id %x inst %p status %d", vpu 35 drivers/media/platform/mtk-vcodec/venc_vpu_if.c msg->msg_id, vpu, msg->status); vpu 39 drivers/media/platform/mtk-vcodec/venc_vpu_if.c handle_enc_init_msg(vpu, data); vpu 44 drivers/media/platform/mtk-vcodec/venc_vpu_if.c handle_enc_encode_msg(vpu, data); vpu 49 drivers/media/platform/mtk-vcodec/venc_vpu_if.c mtk_vcodec_err(vpu, "unknown msg id %x", msg->msg_id); vpu 53 drivers/media/platform/mtk-vcodec/venc_vpu_if.c vpu->signaled = 1; vpu 54 drivers/media/platform/mtk-vcodec/venc_vpu_if.c vpu->failure = (msg->status != VENC_IPI_MSG_STATUS_OK); vpu 56 drivers/media/platform/mtk-vcodec/venc_vpu_if.c mtk_vcodec_debug_leave(vpu); vpu 59 drivers/media/platform/mtk-vcodec/venc_vpu_if.c static int vpu_enc_send_msg(struct venc_vpu_inst *vpu, void *msg, vpu 64 drivers/media/platform/mtk-vcodec/venc_vpu_if.c mtk_vcodec_debug_enter(vpu); vpu 66 drivers/media/platform/mtk-vcodec/venc_vpu_if.c if (!vpu->dev) { vpu 67 drivers/media/platform/mtk-vcodec/venc_vpu_if.c mtk_vcodec_err(vpu, "inst dev is NULL"); vpu 71 drivers/media/platform/mtk-vcodec/venc_vpu_if.c status = vpu_ipi_send(vpu->dev, vpu->id, msg, len); vpu 73 drivers/media/platform/mtk-vcodec/venc_vpu_if.c mtk_vcodec_err(vpu, "vpu_ipi_send msg_id %x len %d fail %d", vpu 77 drivers/media/platform/mtk-vcodec/venc_vpu_if.c if (vpu->failure) vpu 80 drivers/media/platform/mtk-vcodec/venc_vpu_if.c mtk_vcodec_debug_leave(vpu); vpu 85 drivers/media/platform/mtk-vcodec/venc_vpu_if.c int vpu_enc_init(struct venc_vpu_inst *vpu) vpu 90 drivers/media/platform/mtk-vcodec/venc_vpu_if.c mtk_vcodec_debug_enter(vpu); vpu 92 drivers/media/platform/mtk-vcodec/venc_vpu_if.c init_waitqueue_head(&vpu->wq_hd); vpu 93 drivers/media/platform/mtk-vcodec/venc_vpu_if.c vpu->signaled = 0; vpu 94 drivers/media/platform/mtk-vcodec/venc_vpu_if.c vpu->failure = 0; vpu 96 drivers/media/platform/mtk-vcodec/venc_vpu_if.c status = vpu_ipi_register(vpu->dev, vpu->id, vpu_enc_ipi_handler, vpu 99 drivers/media/platform/mtk-vcodec/venc_vpu_if.c mtk_vcodec_err(vpu, "vpu_ipi_register fail %d", status); vpu 105 drivers/media/platform/mtk-vcodec/venc_vpu_if.c out.venc_inst = (unsigned long)vpu; vpu 106 drivers/media/platform/mtk-vcodec/venc_vpu_if.c if (vpu_enc_send_msg(vpu, &out, sizeof(out))) { vpu 107 drivers/media/platform/mtk-vcodec/venc_vpu_if.c mtk_vcodec_err(vpu, "AP_IPIMSG_ENC_INIT fail"); vpu 111 drivers/media/platform/mtk-vcodec/venc_vpu_if.c mtk_vcodec_debug_leave(vpu); vpu 116 drivers/media/platform/mtk-vcodec/venc_vpu_if.c int vpu_enc_set_param(struct venc_vpu_inst *vpu, vpu 122 drivers/media/platform/mtk-vcodec/venc_vpu_if.c mtk_vcodec_debug(vpu, "id %d ->", id); vpu 126 drivers/media/platform/mtk-vcodec/venc_vpu_if.c out.vpu_inst_addr = vpu->inst_addr; vpu 155 drivers/media/platform/mtk-vcodec/venc_vpu_if.c mtk_vcodec_err(vpu, "id %d not supported", id); vpu 158 drivers/media/platform/mtk-vcodec/venc_vpu_if.c if (vpu_enc_send_msg(vpu, &out, sizeof(out))) { vpu 159 drivers/media/platform/mtk-vcodec/venc_vpu_if.c mtk_vcodec_err(vpu, vpu 164 drivers/media/platform/mtk-vcodec/venc_vpu_if.c mtk_vcodec_debug(vpu, "id %d <-", id); vpu 169 drivers/media/platform/mtk-vcodec/venc_vpu_if.c int vpu_enc_encode(struct venc_vpu_inst *vpu, unsigned int bs_mode, vpu 176 drivers/media/platform/mtk-vcodec/venc_vpu_if.c mtk_vcodec_debug(vpu, "bs_mode %d ->", bs_mode); vpu 180 drivers/media/platform/mtk-vcodec/venc_vpu_if.c out.vpu_inst_addr = vpu->inst_addr; vpu 190 drivers/media/platform/mtk-vcodec/venc_vpu_if.c mtk_vcodec_err(vpu, "dma_addr not align to 16"); vpu 198 drivers/media/platform/mtk-vcodec/venc_vpu_if.c if (vpu_enc_send_msg(vpu, &out, sizeof(out))) { vpu 199 drivers/media/platform/mtk-vcodec/venc_vpu_if.c mtk_vcodec_err(vpu, "AP_IPIMSG_ENC_ENCODE %d fail", vpu 204 drivers/media/platform/mtk-vcodec/venc_vpu_if.c mtk_vcodec_debug(vpu, "bs_mode %d state %d size %d key_frm %d <-", vpu 205 drivers/media/platform/mtk-vcodec/venc_vpu_if.c bs_mode, vpu->state, vpu->bs_size, vpu->is_key_frm); vpu 210 drivers/media/platform/mtk-vcodec/venc_vpu_if.c int vpu_enc_deinit(struct venc_vpu_inst *vpu) vpu 214 drivers/media/platform/mtk-vcodec/venc_vpu_if.c mtk_vcodec_debug_enter(vpu); vpu 218 drivers/media/platform/mtk-vcodec/venc_vpu_if.c out.vpu_inst_addr = vpu->inst_addr; vpu 219 drivers/media/platform/mtk-vcodec/venc_vpu_if.c if (vpu_enc_send_msg(vpu, &out, sizeof(out))) { vpu 220 drivers/media/platform/mtk-vcodec/venc_vpu_if.c mtk_vcodec_err(vpu, "AP_IPIMSG_ENC_DEINIT fail"); vpu 224 drivers/media/platform/mtk-vcodec/venc_vpu_if.c mtk_vcodec_debug_leave(vpu); vpu 42 drivers/media/platform/mtk-vcodec/venc_vpu_if.h int vpu_enc_init(struct venc_vpu_inst *vpu); vpu 43 drivers/media/platform/mtk-vcodec/venc_vpu_if.h int vpu_enc_set_param(struct venc_vpu_inst *vpu, vpu 46 drivers/media/platform/mtk-vcodec/venc_vpu_if.h int vpu_enc_encode(struct venc_vpu_inst *vpu, unsigned int bs_mode, vpu 50 drivers/media/platform/mtk-vcodec/venc_vpu_if.h int vpu_enc_deinit(struct venc_vpu_inst *vpu); vpu 218 drivers/media/platform/mtk-vpu/mtk_vpu.c static inline void vpu_cfg_writel(struct mtk_vpu *vpu, u32 val, u32 offset) vpu 220 drivers/media/platform/mtk-vpu/mtk_vpu.c writel(val, vpu->reg.cfg + offset); vpu 223 drivers/media/platform/mtk-vpu/mtk_vpu.c static inline u32 vpu_cfg_readl(struct mtk_vpu *vpu, u32 offset) vpu 225 drivers/media/platform/mtk-vpu/mtk_vpu.c return readl(vpu->reg.cfg + offset); vpu 228 drivers/media/platform/mtk-vpu/mtk_vpu.c static inline bool vpu_running(struct mtk_vpu *vpu) vpu 230 drivers/media/platform/mtk-vpu/mtk_vpu.c return vpu_cfg_readl(vpu, VPU_RESET) & BIT(0); vpu 233 drivers/media/platform/mtk-vpu/mtk_vpu.c static void vpu_clock_disable(struct mtk_vpu *vpu) vpu 236 drivers/media/platform/mtk-vpu/mtk_vpu.c mutex_lock(&vpu->vpu_mutex); vpu 237 drivers/media/platform/mtk-vpu/mtk_vpu.c if (!--vpu->wdt_refcnt) vpu 238 drivers/media/platform/mtk-vpu/mtk_vpu.c vpu_cfg_writel(vpu, vpu 239 drivers/media/platform/mtk-vpu/mtk_vpu.c vpu_cfg_readl(vpu, VPU_WDT_REG) & ~(1L << 31), vpu 241 drivers/media/platform/mtk-vpu/mtk_vpu.c mutex_unlock(&vpu->vpu_mutex); vpu 243 drivers/media/platform/mtk-vpu/mtk_vpu.c clk_disable(vpu->clk); vpu 246 drivers/media/platform/mtk-vpu/mtk_vpu.c static int vpu_clock_enable(struct mtk_vpu *vpu) vpu 250 drivers/media/platform/mtk-vpu/mtk_vpu.c ret = clk_enable(vpu->clk); vpu 254 drivers/media/platform/mtk-vpu/mtk_vpu.c mutex_lock(&vpu->vpu_mutex); vpu 255 drivers/media/platform/mtk-vpu/mtk_vpu.c if (!vpu->wdt_refcnt++) vpu 256 drivers/media/platform/mtk-vpu/mtk_vpu.c vpu_cfg_writel(vpu, vpu 257 drivers/media/platform/mtk-vpu/mtk_vpu.c vpu_cfg_readl(vpu, VPU_WDT_REG) | (1L << 31), vpu 259 drivers/media/platform/mtk-vpu/mtk_vpu.c mutex_unlock(&vpu->vpu_mutex); vpu 268 drivers/media/platform/mtk-vpu/mtk_vpu.c struct mtk_vpu *vpu = platform_get_drvdata(pdev); vpu 271 drivers/media/platform/mtk-vpu/mtk_vpu.c if (!vpu) { vpu 277 drivers/media/platform/mtk-vpu/mtk_vpu.c ipi_desc = vpu->ipi_desc; vpu 294 drivers/media/platform/mtk-vpu/mtk_vpu.c struct mtk_vpu *vpu = platform_get_drvdata(pdev); vpu 295 drivers/media/platform/mtk-vpu/mtk_vpu.c struct share_obj *send_obj = vpu->send_buf; vpu 301 drivers/media/platform/mtk-vpu/mtk_vpu.c dev_err(vpu->dev, "failed to send ipi message\n"); vpu 305 drivers/media/platform/mtk-vpu/mtk_vpu.c ret = vpu_clock_enable(vpu); vpu 307 drivers/media/platform/mtk-vpu/mtk_vpu.c dev_err(vpu->dev, "failed to enable vpu clock\n"); vpu 310 drivers/media/platform/mtk-vpu/mtk_vpu.c if (!vpu_running(vpu)) { vpu 311 drivers/media/platform/mtk-vpu/mtk_vpu.c dev_err(vpu->dev, "vpu_ipi_send: VPU is not running\n"); vpu 316 drivers/media/platform/mtk-vpu/mtk_vpu.c mutex_lock(&vpu->vpu_mutex); vpu 322 drivers/media/platform/mtk-vpu/mtk_vpu.c dev_err(vpu->dev, "vpu_ipi_send: IPI timeout!\n"); vpu 326 drivers/media/platform/mtk-vpu/mtk_vpu.c } while (vpu_cfg_readl(vpu, HOST_TO_VPU)); vpu 332 drivers/media/platform/mtk-vpu/mtk_vpu.c vpu->ipi_id_ack[id] = false; vpu 334 drivers/media/platform/mtk-vpu/mtk_vpu.c vpu_cfg_writel(vpu, 0x1, HOST_TO_VPU); vpu 336 drivers/media/platform/mtk-vpu/mtk_vpu.c mutex_unlock(&vpu->vpu_mutex); vpu 340 drivers/media/platform/mtk-vpu/mtk_vpu.c ret = wait_event_timeout(vpu->ack_wq, vpu->ipi_id_ack[id], timeout); vpu 341 drivers/media/platform/mtk-vpu/mtk_vpu.c vpu->ipi_id_ack[id] = false; vpu 343 drivers/media/platform/mtk-vpu/mtk_vpu.c dev_err(vpu->dev, "vpu ipi %d ack time out !", id); vpu 347 drivers/media/platform/mtk-vpu/mtk_vpu.c vpu_clock_disable(vpu); vpu 352 drivers/media/platform/mtk-vpu/mtk_vpu.c mutex_unlock(&vpu->vpu_mutex); vpu 354 drivers/media/platform/mtk-vpu/mtk_vpu.c vpu_clock_disable(vpu); vpu 363 drivers/media/platform/mtk-vpu/mtk_vpu.c struct mtk_vpu *vpu = container_of(wdt, struct mtk_vpu, wdt); vpu 367 drivers/media/platform/mtk-vpu/mtk_vpu.c dev_info(vpu->dev, "vpu reset\n"); vpu 368 drivers/media/platform/mtk-vpu/mtk_vpu.c ret = vpu_clock_enable(vpu); vpu 370 drivers/media/platform/mtk-vpu/mtk_vpu.c dev_err(vpu->dev, "[VPU] wdt enables clock failed %d\n", ret); vpu 373 drivers/media/platform/mtk-vpu/mtk_vpu.c mutex_lock(&vpu->vpu_mutex); vpu 374 drivers/media/platform/mtk-vpu/mtk_vpu.c vpu_cfg_writel(vpu, 0x0, VPU_RESET); vpu 375 drivers/media/platform/mtk-vpu/mtk_vpu.c vpu->fw_loaded = false; vpu 376 drivers/media/platform/mtk-vpu/mtk_vpu.c mutex_unlock(&vpu->vpu_mutex); vpu 377 drivers/media/platform/mtk-vpu/mtk_vpu.c vpu_clock_disable(vpu); vpu 382 drivers/media/platform/mtk-vpu/mtk_vpu.c dev_dbg(vpu->dev, "wdt handler func %d\n", index); vpu 391 drivers/media/platform/mtk-vpu/mtk_vpu.c struct mtk_vpu *vpu = platform_get_drvdata(pdev); vpu 394 drivers/media/platform/mtk-vpu/mtk_vpu.c if (!vpu) { vpu 399 drivers/media/platform/mtk-vpu/mtk_vpu.c handler = vpu->wdt.handler; vpu 402 drivers/media/platform/mtk-vpu/mtk_vpu.c dev_dbg(vpu->dev, "wdt register id %d\n", id); vpu 403 drivers/media/platform/mtk-vpu/mtk_vpu.c mutex_lock(&vpu->vpu_mutex); vpu 406 drivers/media/platform/mtk-vpu/mtk_vpu.c mutex_unlock(&vpu->vpu_mutex); vpu 410 drivers/media/platform/mtk-vpu/mtk_vpu.c dev_err(vpu->dev, "register vpu wdt handler failed\n"); vpu 417 drivers/media/platform/mtk-vpu/mtk_vpu.c struct mtk_vpu *vpu = platform_get_drvdata(pdev); vpu 419 drivers/media/platform/mtk-vpu/mtk_vpu.c return vpu->run.dec_capability; vpu 425 drivers/media/platform/mtk-vpu/mtk_vpu.c struct mtk_vpu *vpu = platform_get_drvdata(pdev); vpu 427 drivers/media/platform/mtk-vpu/mtk_vpu.c return vpu->run.enc_capability; vpu 434 drivers/media/platform/mtk-vpu/mtk_vpu.c struct mtk_vpu *vpu = platform_get_drvdata(pdev); vpu 438 drivers/media/platform/mtk-vpu/mtk_vpu.c dev_err(vpu->dev, "invalid virtual data memory address\n"); vpu 443 drivers/media/platform/mtk-vpu/mtk_vpu.c return (__force void *)(dtcm_dmem_addr + vpu->reg.tcm + vpu 446 drivers/media/platform/mtk-vpu/mtk_vpu.c return vpu->extmem[D_FW].va + (dtcm_dmem_addr - VPU_DTCM_SIZE); vpu 474 drivers/media/platform/mtk-vpu/mtk_vpu.c static int load_requested_vpu(struct mtk_vpu *vpu, vpu 486 drivers/media/platform/mtk-vpu/mtk_vpu.c ret = request_firmware(&vpu_fw, fw_name, vpu->dev); vpu 488 drivers/media/platform/mtk-vpu/mtk_vpu.c dev_err(vpu->dev, "Failed to load %s, %d\n", fw_name, ret); vpu 493 drivers/media/platform/mtk-vpu/mtk_vpu.c dev_err(vpu->dev, "fw %s size %zu is abnormal\n", fw_name, vpu 498 drivers/media/platform/mtk-vpu/mtk_vpu.c dev_dbg(vpu->dev, "Downloaded fw %s size: %zu.\n", vpu 502 drivers/media/platform/mtk-vpu/mtk_vpu.c vpu_cfg_writel(vpu, 0x0, VPU_RESET); vpu 506 drivers/media/platform/mtk-vpu/mtk_vpu.c dev_dbg(vpu->dev, "fw size %zu > limited fw size %zu\n", vpu 509 drivers/media/platform/mtk-vpu/mtk_vpu.c dev_dbg(vpu->dev, "extra_fw_size %zu\n", extra_fw_size); vpu 512 drivers/media/platform/mtk-vpu/mtk_vpu.c dest = (__force void *)vpu->reg.tcm; vpu 518 drivers/media/platform/mtk-vpu/mtk_vpu.c dest = vpu->extmem[fw_type].va; vpu 519 drivers/media/platform/mtk-vpu/mtk_vpu.c dev_dbg(vpu->dev, "download extended memory type %x\n", vpu 531 drivers/media/platform/mtk-vpu/mtk_vpu.c struct mtk_vpu *vpu; vpu 541 drivers/media/platform/mtk-vpu/mtk_vpu.c vpu = platform_get_drvdata(pdev); vpu 542 drivers/media/platform/mtk-vpu/mtk_vpu.c run = &vpu->run; vpu 544 drivers/media/platform/mtk-vpu/mtk_vpu.c mutex_lock(&vpu->vpu_mutex); vpu 545 drivers/media/platform/mtk-vpu/mtk_vpu.c if (vpu->fw_loaded) { vpu 546 drivers/media/platform/mtk-vpu/mtk_vpu.c mutex_unlock(&vpu->vpu_mutex); vpu 549 drivers/media/platform/mtk-vpu/mtk_vpu.c mutex_unlock(&vpu->vpu_mutex); vpu 551 drivers/media/platform/mtk-vpu/mtk_vpu.c ret = vpu_clock_enable(vpu); vpu 557 drivers/media/platform/mtk-vpu/mtk_vpu.c mutex_lock(&vpu->vpu_mutex); vpu 560 drivers/media/platform/mtk-vpu/mtk_vpu.c dev_dbg(vpu->dev, "firmware request\n"); vpu 562 drivers/media/platform/mtk-vpu/mtk_vpu.c ret = load_requested_vpu(vpu, P_FW); vpu 569 drivers/media/platform/mtk-vpu/mtk_vpu.c ret = load_requested_vpu(vpu, D_FW); vpu 575 drivers/media/platform/mtk-vpu/mtk_vpu.c vpu->fw_loaded = true; vpu 577 drivers/media/platform/mtk-vpu/mtk_vpu.c vpu_cfg_writel(vpu, 0x1, VPU_RESET); vpu 596 drivers/media/platform/mtk-vpu/mtk_vpu.c mutex_unlock(&vpu->vpu_mutex); vpu 597 drivers/media/platform/mtk-vpu/mtk_vpu.c vpu_clock_disable(vpu); vpu 605 drivers/media/platform/mtk-vpu/mtk_vpu.c struct mtk_vpu *vpu = (struct mtk_vpu *)priv; vpu 608 drivers/media/platform/mtk-vpu/mtk_vpu.c vpu->run.signaled = run->signaled; vpu 609 drivers/media/platform/mtk-vpu/mtk_vpu.c strscpy(vpu->run.fw_ver, run->fw_ver, sizeof(vpu->run.fw_ver)); vpu 610 drivers/media/platform/mtk-vpu/mtk_vpu.c vpu->run.dec_capability = run->dec_capability; vpu 611 drivers/media/platform/mtk-vpu/mtk_vpu.c vpu->run.enc_capability = run->enc_capability; vpu 612 drivers/media/platform/mtk-vpu/mtk_vpu.c wake_up_interruptible(&vpu->run.wq); vpu 624 drivers/media/platform/mtk-vpu/mtk_vpu.c struct mtk_vpu *vpu = dev_get_drvdata(dev); vpu 626 drivers/media/platform/mtk-vpu/mtk_vpu.c ret = vpu_clock_enable(vpu); vpu 628 drivers/media/platform/mtk-vpu/mtk_vpu.c dev_err(vpu->dev, "[VPU] enable clock failed %d\n", ret); vpu 633 drivers/media/platform/mtk-vpu/mtk_vpu.c running = vpu_running(vpu); vpu 634 drivers/media/platform/mtk-vpu/mtk_vpu.c pc = vpu_cfg_readl(vpu, VPU_PC_REG); vpu 635 drivers/media/platform/mtk-vpu/mtk_vpu.c wdt = vpu_cfg_readl(vpu, VPU_WDT_REG); vpu 636 drivers/media/platform/mtk-vpu/mtk_vpu.c host_to_vpu = vpu_cfg_readl(vpu, HOST_TO_VPU); vpu 637 drivers/media/platform/mtk-vpu/mtk_vpu.c vpu_to_host = vpu_cfg_readl(vpu, VPU_TO_HOST); vpu 638 drivers/media/platform/mtk-vpu/mtk_vpu.c vpu_clock_disable(vpu); vpu 647 drivers/media/platform/mtk-vpu/mtk_vpu.c vpu->run.fw_ver, pc, wdt, vpu 662 drivers/media/platform/mtk-vpu/mtk_vpu.c static void vpu_free_ext_mem(struct mtk_vpu *vpu, u8 fw_type) vpu 664 drivers/media/platform/mtk-vpu/mtk_vpu.c struct device *dev = vpu->dev; vpu 667 drivers/media/platform/mtk-vpu/mtk_vpu.c dma_free_coherent(dev, fw_ext_size, vpu->extmem[fw_type].va, vpu 668 drivers/media/platform/mtk-vpu/mtk_vpu.c vpu->extmem[fw_type].pa); vpu 671 drivers/media/platform/mtk-vpu/mtk_vpu.c static int vpu_alloc_ext_mem(struct mtk_vpu *vpu, u32 fw_type) vpu 673 drivers/media/platform/mtk-vpu/mtk_vpu.c struct device *dev = vpu->dev; vpu 677 drivers/media/platform/mtk-vpu/mtk_vpu.c u32 offset_4gb = vpu->enable_4GB ? 0x40000000 : 0; vpu 679 drivers/media/platform/mtk-vpu/mtk_vpu.c vpu->extmem[fw_type].va = dma_alloc_coherent(dev, vpu 681 drivers/media/platform/mtk-vpu/mtk_vpu.c &vpu->extmem[fw_type].pa, vpu 683 drivers/media/platform/mtk-vpu/mtk_vpu.c if (!vpu->extmem[fw_type].va) { vpu 689 drivers/media/platform/mtk-vpu/mtk_vpu.c vpu_cfg_writel(vpu, 0x1, vpu_ext_mem0); vpu 690 drivers/media/platform/mtk-vpu/mtk_vpu.c vpu_cfg_writel(vpu, (vpu->extmem[fw_type].pa & 0xFFFFF000) + offset_4gb, vpu 695 drivers/media/platform/mtk-vpu/mtk_vpu.c (unsigned long long)vpu->extmem[fw_type].pa, vpu 696 drivers/media/platform/mtk-vpu/mtk_vpu.c vpu->extmem[fw_type].va); vpu 701 drivers/media/platform/mtk-vpu/mtk_vpu.c static void vpu_ipi_handler(struct mtk_vpu *vpu) vpu 703 drivers/media/platform/mtk-vpu/mtk_vpu.c struct share_obj *rcv_obj = vpu->recv_buf; vpu 704 drivers/media/platform/mtk-vpu/mtk_vpu.c struct vpu_ipi_desc *ipi_desc = vpu->ipi_desc; vpu 711 drivers/media/platform/mtk-vpu/mtk_vpu.c vpu->ipi_id_ack[rcv_obj->id] = true; vpu 712 drivers/media/platform/mtk-vpu/mtk_vpu.c wake_up(&vpu->ack_wq); vpu 715 drivers/media/platform/mtk-vpu/mtk_vpu.c dev_err(vpu->dev, "No such ipi id = %d\n", rcv_obj->id); vpu 719 drivers/media/platform/mtk-vpu/mtk_vpu.c static int vpu_ipi_init(struct mtk_vpu *vpu) vpu 722 drivers/media/platform/mtk-vpu/mtk_vpu.c vpu_cfg_writel(vpu, 0x0, VPU_TO_HOST); vpu 725 drivers/media/platform/mtk-vpu/mtk_vpu.c vpu->recv_buf = (__force struct share_obj *)(vpu->reg.tcm + vpu 727 drivers/media/platform/mtk-vpu/mtk_vpu.c vpu->send_buf = vpu->recv_buf + 1; vpu 728 drivers/media/platform/mtk-vpu/mtk_vpu.c memset(vpu->recv_buf, 0, sizeof(struct share_obj)); vpu 729 drivers/media/platform/mtk-vpu/mtk_vpu.c memset(vpu->send_buf, 0, sizeof(struct share_obj)); vpu 736 drivers/media/platform/mtk-vpu/mtk_vpu.c struct mtk_vpu *vpu = priv; vpu 745 drivers/media/platform/mtk-vpu/mtk_vpu.c ret = clk_enable(vpu->clk); vpu 747 drivers/media/platform/mtk-vpu/mtk_vpu.c dev_err(vpu->dev, "[VPU] enable clock failed %d\n", ret); vpu 750 drivers/media/platform/mtk-vpu/mtk_vpu.c vpu_to_host = vpu_cfg_readl(vpu, VPU_TO_HOST); vpu 752 drivers/media/platform/mtk-vpu/mtk_vpu.c vpu_ipi_handler(vpu); vpu 754 drivers/media/platform/mtk-vpu/mtk_vpu.c dev_err(vpu->dev, "vpu watchdog timeout! 0x%x", vpu_to_host); vpu 755 drivers/media/platform/mtk-vpu/mtk_vpu.c queue_work(vpu->wdt.wq, &vpu->wdt.ws); vpu 759 drivers/media/platform/mtk-vpu/mtk_vpu.c vpu_cfg_writel(vpu, 0x0, VPU_TO_HOST); vpu 760 drivers/media/platform/mtk-vpu/mtk_vpu.c clk_disable(vpu->clk); vpu 770 drivers/media/platform/mtk-vpu/mtk_vpu.c struct mtk_vpu *vpu; vpu 778 drivers/media/platform/mtk-vpu/mtk_vpu.c vpu = devm_kzalloc(dev, sizeof(*vpu), GFP_KERNEL); vpu 779 drivers/media/platform/mtk-vpu/mtk_vpu.c if (!vpu) vpu 782 drivers/media/platform/mtk-vpu/mtk_vpu.c vpu->dev = &pdev->dev; vpu 784 drivers/media/platform/mtk-vpu/mtk_vpu.c vpu->reg.tcm = devm_ioremap_resource(dev, res); vpu 785 drivers/media/platform/mtk-vpu/mtk_vpu.c if (IS_ERR((__force void *)vpu->reg.tcm)) vpu 786 drivers/media/platform/mtk-vpu/mtk_vpu.c return PTR_ERR((__force void *)vpu->reg.tcm); vpu 789 drivers/media/platform/mtk-vpu/mtk_vpu.c vpu->reg.cfg = devm_ioremap_resource(dev, res); vpu 790 drivers/media/platform/mtk-vpu/mtk_vpu.c if (IS_ERR((__force void *)vpu->reg.cfg)) vpu 791 drivers/media/platform/mtk-vpu/mtk_vpu.c return PTR_ERR((__force void *)vpu->reg.cfg); vpu 794 drivers/media/platform/mtk-vpu/mtk_vpu.c vpu->clk = devm_clk_get(dev, "main"); vpu 795 drivers/media/platform/mtk-vpu/mtk_vpu.c if (IS_ERR(vpu->clk)) { vpu 797 drivers/media/platform/mtk-vpu/mtk_vpu.c return PTR_ERR(vpu->clk); vpu 800 drivers/media/platform/mtk-vpu/mtk_vpu.c platform_set_drvdata(pdev, vpu); vpu 802 drivers/media/platform/mtk-vpu/mtk_vpu.c ret = clk_prepare(vpu->clk); vpu 809 drivers/media/platform/mtk-vpu/mtk_vpu.c vpu->wdt.wq = create_singlethread_workqueue("vpu_wdt"); vpu 810 drivers/media/platform/mtk-vpu/mtk_vpu.c if (!vpu->wdt.wq) { vpu 814 drivers/media/platform/mtk-vpu/mtk_vpu.c INIT_WORK(&vpu->wdt.ws, vpu_wdt_reset_func); vpu 815 drivers/media/platform/mtk-vpu/mtk_vpu.c mutex_init(&vpu->vpu_mutex); vpu 817 drivers/media/platform/mtk-vpu/mtk_vpu.c ret = vpu_clock_enable(vpu); vpu 824 drivers/media/platform/mtk-vpu/mtk_vpu.c ret = vpu_ipi_init(vpu); vpu 832 drivers/media/platform/mtk-vpu/mtk_vpu.c "vpu_init", vpu); vpu 848 drivers/media/platform/mtk-vpu/mtk_vpu.c vpu_cfg_writel(vpu, 0x2, VPU_TCM_CFG); vpu 850 drivers/media/platform/mtk-vpu/mtk_vpu.c vpu->enable_4GB = !!(totalram_pages() > (SZ_2G >> PAGE_SHIFT)); vpu 851 drivers/media/platform/mtk-vpu/mtk_vpu.c dev_info(dev, "4GB mode %u\n", vpu->enable_4GB); vpu 853 drivers/media/platform/mtk-vpu/mtk_vpu.c if (vpu->enable_4GB) { vpu 860 drivers/media/platform/mtk-vpu/mtk_vpu.c ret = vpu_alloc_ext_mem(vpu, D_FW); vpu 866 drivers/media/platform/mtk-vpu/mtk_vpu.c ret = vpu_alloc_ext_mem(vpu, P_FW); vpu 872 drivers/media/platform/mtk-vpu/mtk_vpu.c init_waitqueue_head(&vpu->run.wq); vpu 873 drivers/media/platform/mtk-vpu/mtk_vpu.c init_waitqueue_head(&vpu->ack_wq); vpu 881 drivers/media/platform/mtk-vpu/mtk_vpu.c vpu->reg.irq = platform_get_irq(pdev, 0); vpu 882 drivers/media/platform/mtk-vpu/mtk_vpu.c ret = devm_request_irq(dev, vpu->reg.irq, vpu_irq_handler, 0, vpu 883 drivers/media/platform/mtk-vpu/mtk_vpu.c pdev->name, vpu); vpu 889 drivers/media/platform/mtk-vpu/mtk_vpu.c vpu_clock_disable(vpu); vpu 895 drivers/media/platform/mtk-vpu/mtk_vpu.c vpu_free_ext_mem(vpu, P_FW); vpu 897 drivers/media/platform/mtk-vpu/mtk_vpu.c vpu_free_ext_mem(vpu, D_FW); vpu 904 drivers/media/platform/mtk-vpu/mtk_vpu.c memset(vpu->ipi_desc, 0, sizeof(struct vpu_ipi_desc) * IPI_MAX); vpu 906 drivers/media/platform/mtk-vpu/mtk_vpu.c mutex_destroy(&vpu->vpu_mutex); vpu 908 drivers/media/platform/mtk-vpu/mtk_vpu.c vpu_clock_disable(vpu); vpu 910 drivers/media/platform/mtk-vpu/mtk_vpu.c destroy_workqueue(vpu->wdt.wq); vpu 925 drivers/media/platform/mtk-vpu/mtk_vpu.c struct mtk_vpu *vpu = platform_get_drvdata(pdev); vpu 930 drivers/media/platform/mtk-vpu/mtk_vpu.c if (vpu->wdt.wq) { vpu 931 drivers/media/platform/mtk-vpu/mtk_vpu.c flush_workqueue(vpu->wdt.wq); vpu 932 drivers/media/platform/mtk-vpu/mtk_vpu.c destroy_workqueue(vpu->wdt.wq); vpu 934 drivers/media/platform/mtk-vpu/mtk_vpu.c vpu_free_ext_mem(vpu, P_FW); vpu 935 drivers/media/platform/mtk-vpu/mtk_vpu.c vpu_free_ext_mem(vpu, D_FW); vpu 936 drivers/media/platform/mtk-vpu/mtk_vpu.c mutex_destroy(&vpu->vpu_mutex); vpu 937 drivers/media/platform/mtk-vpu/mtk_vpu.c clk_unprepare(vpu->clk); vpu 95 drivers/staging/media/hantro/hantro.h int (*init)(struct hantro_dev *vpu); vpu 96 drivers/staging/media/hantro/hantro.h int (*runtime_resume)(struct hantro_dev *vpu); vpu 325 drivers/staging/media/hantro/hantro.h static inline void vepu_write_relaxed(struct hantro_dev *vpu, vpu 329 drivers/staging/media/hantro/hantro.h writel_relaxed(val, vpu->enc_base + reg); vpu 332 drivers/staging/media/hantro/hantro.h static inline void vepu_write(struct hantro_dev *vpu, u32 val, u32 reg) vpu 335 drivers/staging/media/hantro/hantro.h writel(val, vpu->enc_base + reg); vpu 338 drivers/staging/media/hantro/hantro.h static inline u32 vepu_read(struct hantro_dev *vpu, u32 reg) vpu 340 drivers/staging/media/hantro/hantro.h u32 val = readl(vpu->enc_base + reg); vpu 346 drivers/staging/media/hantro/hantro.h static inline void vdpu_write_relaxed(struct hantro_dev *vpu, vpu 350 drivers/staging/media/hantro/hantro.h writel_relaxed(val, vpu->dec_base + reg); vpu 353 drivers/staging/media/hantro/hantro.h static inline void vdpu_write(struct hantro_dev *vpu, u32 val, u32 reg) vpu 356 drivers/staging/media/hantro/hantro.h writel(val, vpu->dec_base + reg); vpu 359 drivers/staging/media/hantro/hantro.h static inline u32 vdpu_read(struct hantro_dev *vpu, u32 reg) vpu 361 drivers/staging/media/hantro/hantro.h u32 val = readl(vpu->dec_base + reg); vpu 367 drivers/staging/media/hantro/hantro.h static inline void hantro_reg_write(struct hantro_dev *vpu, vpu 373 drivers/staging/media/hantro/hantro.h v = vdpu_read(vpu, reg->base); vpu 376 drivers/staging/media/hantro/hantro.h vdpu_write_relaxed(vpu, v, reg->base); vpu 91 drivers/staging/media/hantro/hantro_drv.c static void hantro_job_finish(struct hantro_dev *vpu, vpu 99 drivers/staging/media/hantro/hantro_drv.c pm_runtime_mark_last_busy(vpu->dev); vpu 100 drivers/staging/media/hantro/hantro_drv.c pm_runtime_put_autosuspend(vpu->dev); vpu 101 drivers/staging/media/hantro/hantro_drv.c clk_bulk_disable(vpu->variant->num_clocks, vpu->clocks); vpu 121 drivers/staging/media/hantro/hantro_drv.c v4l2_m2m_job_finish(vpu->m2m_dev, ctx->fh.m2m_ctx); vpu 124 drivers/staging/media/hantro/hantro_drv.c void hantro_irq_done(struct hantro_dev *vpu, unsigned int bytesused, vpu 128 drivers/staging/media/hantro/hantro_drv.c v4l2_m2m_get_curr_priv(vpu->m2m_dev); vpu 135 drivers/staging/media/hantro/hantro_drv.c if (cancel_delayed_work(&vpu->watchdog_work)) vpu 136 drivers/staging/media/hantro/hantro_drv.c hantro_job_finish(vpu, ctx, bytesused, result); vpu 141 drivers/staging/media/hantro/hantro_drv.c struct hantro_dev *vpu; vpu 144 drivers/staging/media/hantro/hantro_drv.c vpu = container_of(to_delayed_work(work), vpu 146 drivers/staging/media/hantro/hantro_drv.c ctx = v4l2_m2m_get_curr_priv(vpu->m2m_dev); vpu 150 drivers/staging/media/hantro/hantro_drv.c hantro_job_finish(vpu, ctx, 0, VB2_BUF_STATE_ERROR); vpu 362 drivers/staging/media/hantro/hantro_drv.c static int hantro_ctrls_setup(struct hantro_dev *vpu, vpu 393 drivers/staging/media/hantro/hantro_drv.c struct hantro_dev *vpu = video_drvdata(filp); vpu 412 drivers/staging/media/hantro/hantro_drv.c ctx->dev = vpu; vpu 414 drivers/staging/media/hantro/hantro_drv.c allowed_codecs = vpu->variant->codec & HANTRO_ENCODERS; vpu 416 drivers/staging/media/hantro/hantro_drv.c ctx->fh.m2m_ctx = v4l2_m2m_ctx_init(vpu->m2m_dev, ctx, vpu 419 drivers/staging/media/hantro/hantro_drv.c allowed_codecs = vpu->variant->codec & HANTRO_DECODERS; vpu 421 drivers/staging/media/hantro/hantro_drv.c ctx->fh.m2m_ctx = v4l2_m2m_ctx_init(vpu->m2m_dev, ctx, vpu 438 drivers/staging/media/hantro/hantro_drv.c ret = hantro_ctrls_setup(vpu, ctx, allowed_codecs); vpu 525 drivers/staging/media/hantro/hantro_drv.c static int hantro_attach_func(struct hantro_dev *vpu, vpu 528 drivers/staging/media/hantro/hantro_drv.c struct media_device *mdev = &vpu->mdev; vpu 628 drivers/staging/media/hantro/hantro_drv.c static int hantro_add_func(struct hantro_dev *vpu, unsigned int funcid) vpu 635 drivers/staging/media/hantro/hantro_drv.c match = of_match_node(of_hantro_match, vpu->dev->of_node); vpu 636 drivers/staging/media/hantro/hantro_drv.c func = devm_kzalloc(vpu->dev, sizeof(*func), GFP_KERNEL); vpu 638 drivers/staging/media/hantro/hantro_drv.c v4l2_err(&vpu->v4l2_dev, "Failed to allocate video device\n"); vpu 647 drivers/staging/media/hantro/hantro_drv.c vfd->lock = &vpu->vpu_mutex; vpu 648 drivers/staging/media/hantro/hantro_drv.c vfd->v4l2_dev = &vpu->v4l2_dev; vpu 656 drivers/staging/media/hantro/hantro_drv.c vpu->encoder = func; vpu 658 drivers/staging/media/hantro/hantro_drv.c vpu->decoder = func; vpu 660 drivers/staging/media/hantro/hantro_drv.c video_set_drvdata(vfd, vpu); vpu 664 drivers/staging/media/hantro/hantro_drv.c v4l2_err(&vpu->v4l2_dev, "Failed to register video device\n"); vpu 668 drivers/staging/media/hantro/hantro_drv.c ret = hantro_attach_func(vpu, func); vpu 670 drivers/staging/media/hantro/hantro_drv.c v4l2_err(&vpu->v4l2_dev, vpu 675 drivers/staging/media/hantro/hantro_drv.c v4l2_info(&vpu->v4l2_dev, "registered %s as /dev/video%d\n", vfd->name, vpu 685 drivers/staging/media/hantro/hantro_drv.c static int hantro_add_enc_func(struct hantro_dev *vpu) vpu 687 drivers/staging/media/hantro/hantro_drv.c if (!vpu->variant->enc_fmts) vpu 690 drivers/staging/media/hantro/hantro_drv.c return hantro_add_func(vpu, MEDIA_ENT_F_PROC_VIDEO_ENCODER); vpu 693 drivers/staging/media/hantro/hantro_drv.c static int hantro_add_dec_func(struct hantro_dev *vpu) vpu 695 drivers/staging/media/hantro/hantro_drv.c if (!vpu->variant->dec_fmts) vpu 698 drivers/staging/media/hantro/hantro_drv.c return hantro_add_func(vpu, MEDIA_ENT_F_PROC_VIDEO_DECODER); vpu 701 drivers/staging/media/hantro/hantro_drv.c static void hantro_remove_func(struct hantro_dev *vpu, vpu 707 drivers/staging/media/hantro/hantro_drv.c func = vpu->encoder; vpu 709 drivers/staging/media/hantro/hantro_drv.c func = vpu->decoder; vpu 718 drivers/staging/media/hantro/hantro_drv.c static void hantro_remove_enc_func(struct hantro_dev *vpu) vpu 720 drivers/staging/media/hantro/hantro_drv.c hantro_remove_func(vpu, MEDIA_ENT_F_PROC_VIDEO_ENCODER); vpu 723 drivers/staging/media/hantro/hantro_drv.c static void hantro_remove_dec_func(struct hantro_dev *vpu) vpu 725 drivers/staging/media/hantro/hantro_drv.c hantro_remove_func(vpu, MEDIA_ENT_F_PROC_VIDEO_DECODER); vpu 736 drivers/staging/media/hantro/hantro_drv.c struct hantro_dev *vpu; vpu 741 drivers/staging/media/hantro/hantro_drv.c vpu = devm_kzalloc(&pdev->dev, sizeof(*vpu), GFP_KERNEL); vpu 742 drivers/staging/media/hantro/hantro_drv.c if (!vpu) vpu 745 drivers/staging/media/hantro/hantro_drv.c vpu->dev = &pdev->dev; vpu 746 drivers/staging/media/hantro/hantro_drv.c vpu->pdev = pdev; vpu 747 drivers/staging/media/hantro/hantro_drv.c mutex_init(&vpu->vpu_mutex); vpu 748 drivers/staging/media/hantro/hantro_drv.c spin_lock_init(&vpu->irqlock); vpu 751 drivers/staging/media/hantro/hantro_drv.c vpu->variant = match->data; vpu 753 drivers/staging/media/hantro/hantro_drv.c INIT_DELAYED_WORK(&vpu->watchdog_work, hantro_watchdog); vpu 755 drivers/staging/media/hantro/hantro_drv.c vpu->clocks = devm_kcalloc(&pdev->dev, vpu->variant->num_clocks, vpu 756 drivers/staging/media/hantro/hantro_drv.c sizeof(*vpu->clocks), GFP_KERNEL); vpu 757 drivers/staging/media/hantro/hantro_drv.c if (!vpu->clocks) vpu 760 drivers/staging/media/hantro/hantro_drv.c for (i = 0; i < vpu->variant->num_clocks; i++) vpu 761 drivers/staging/media/hantro/hantro_drv.c vpu->clocks[i].id = vpu->variant->clk_names[i]; vpu 762 drivers/staging/media/hantro/hantro_drv.c ret = devm_clk_bulk_get(&pdev->dev, vpu->variant->num_clocks, vpu 763 drivers/staging/media/hantro/hantro_drv.c vpu->clocks); vpu 767 drivers/staging/media/hantro/hantro_drv.c num_bases = vpu->variant->num_regs ?: 1; vpu 768 drivers/staging/media/hantro/hantro_drv.c vpu->reg_bases = devm_kcalloc(&pdev->dev, num_bases, vpu 769 drivers/staging/media/hantro/hantro_drv.c sizeof(*vpu->reg_bases), GFP_KERNEL); vpu 770 drivers/staging/media/hantro/hantro_drv.c if (!vpu->reg_bases) vpu 774 drivers/staging/media/hantro/hantro_drv.c res = vpu->variant->reg_names ? vpu 775 drivers/staging/media/hantro/hantro_drv.c platform_get_resource_byname(vpu->pdev, IORESOURCE_MEM, vpu 776 drivers/staging/media/hantro/hantro_drv.c vpu->variant->reg_names[i]) : vpu 777 drivers/staging/media/hantro/hantro_drv.c platform_get_resource(vpu->pdev, IORESOURCE_MEM, 0); vpu 778 drivers/staging/media/hantro/hantro_drv.c vpu->reg_bases[i] = devm_ioremap_resource(vpu->dev, res); vpu 779 drivers/staging/media/hantro/hantro_drv.c if (IS_ERR(vpu->reg_bases[i])) vpu 780 drivers/staging/media/hantro/hantro_drv.c return PTR_ERR(vpu->reg_bases[i]); vpu 782 drivers/staging/media/hantro/hantro_drv.c vpu->enc_base = vpu->reg_bases[0] + vpu->variant->enc_offset; vpu 783 drivers/staging/media/hantro/hantro_drv.c vpu->dec_base = vpu->reg_bases[0] + vpu->variant->dec_offset; vpu 785 drivers/staging/media/hantro/hantro_drv.c ret = dma_set_coherent_mask(vpu->dev, DMA_BIT_MASK(32)); vpu 787 drivers/staging/media/hantro/hantro_drv.c dev_err(vpu->dev, "Could not set DMA coherent mask.\n"); vpu 792 drivers/staging/media/hantro/hantro_drv.c for (i = 0; i < vpu->variant->num_irqs; i++) { vpu 793 drivers/staging/media/hantro/hantro_drv.c const char *irq_name = vpu->variant->irqs[i].name; vpu 796 drivers/staging/media/hantro/hantro_drv.c if (!vpu->variant->irqs[i].handler) vpu 799 drivers/staging/media/hantro/hantro_drv.c irq = platform_get_irq_byname(vpu->pdev, irq_name); vpu 803 drivers/staging/media/hantro/hantro_drv.c ret = devm_request_irq(vpu->dev, irq, vpu 804 drivers/staging/media/hantro/hantro_drv.c vpu->variant->irqs[i].handler, 0, vpu 805 drivers/staging/media/hantro/hantro_drv.c dev_name(vpu->dev), vpu); vpu 807 drivers/staging/media/hantro/hantro_drv.c dev_err(vpu->dev, "Could not request %s IRQ.\n", vpu 813 drivers/staging/media/hantro/hantro_drv.c ret = vpu->variant->init(vpu); vpu 819 drivers/staging/media/hantro/hantro_drv.c pm_runtime_set_autosuspend_delay(vpu->dev, 100); vpu 820 drivers/staging/media/hantro/hantro_drv.c pm_runtime_use_autosuspend(vpu->dev); vpu 821 drivers/staging/media/hantro/hantro_drv.c pm_runtime_enable(vpu->dev); vpu 823 drivers/staging/media/hantro/hantro_drv.c ret = clk_bulk_prepare(vpu->variant->num_clocks, vpu->clocks); vpu 829 drivers/staging/media/hantro/hantro_drv.c ret = v4l2_device_register(&pdev->dev, &vpu->v4l2_dev); vpu 834 drivers/staging/media/hantro/hantro_drv.c platform_set_drvdata(pdev, vpu); vpu 836 drivers/staging/media/hantro/hantro_drv.c vpu->m2m_dev = v4l2_m2m_init(&vpu_m2m_ops); vpu 837 drivers/staging/media/hantro/hantro_drv.c if (IS_ERR(vpu->m2m_dev)) { vpu 838 drivers/staging/media/hantro/hantro_drv.c v4l2_err(&vpu->v4l2_dev, "Failed to init mem2mem device\n"); vpu 839 drivers/staging/media/hantro/hantro_drv.c ret = PTR_ERR(vpu->m2m_dev); vpu 843 drivers/staging/media/hantro/hantro_drv.c vpu->mdev.dev = vpu->dev; vpu 844 drivers/staging/media/hantro/hantro_drv.c strscpy(vpu->mdev.model, DRIVER_NAME, sizeof(vpu->mdev.model)); vpu 845 drivers/staging/media/hantro/hantro_drv.c strscpy(vpu->mdev.bus_info, "platform: " DRIVER_NAME, vpu 846 drivers/staging/media/hantro/hantro_drv.c sizeof(vpu->mdev.model)); vpu 847 drivers/staging/media/hantro/hantro_drv.c media_device_init(&vpu->mdev); vpu 848 drivers/staging/media/hantro/hantro_drv.c vpu->mdev.ops = &hantro_m2m_media_ops; vpu 849 drivers/staging/media/hantro/hantro_drv.c vpu->v4l2_dev.mdev = &vpu->mdev; vpu 851 drivers/staging/media/hantro/hantro_drv.c ret = hantro_add_enc_func(vpu); vpu 857 drivers/staging/media/hantro/hantro_drv.c ret = hantro_add_dec_func(vpu); vpu 863 drivers/staging/media/hantro/hantro_drv.c ret = media_device_register(&vpu->mdev); vpu 865 drivers/staging/media/hantro/hantro_drv.c v4l2_err(&vpu->v4l2_dev, "Failed to register mem2mem media device\n"); vpu 872 drivers/staging/media/hantro/hantro_drv.c hantro_remove_dec_func(vpu); vpu 874 drivers/staging/media/hantro/hantro_drv.c hantro_remove_enc_func(vpu); vpu 876 drivers/staging/media/hantro/hantro_drv.c media_device_cleanup(&vpu->mdev); vpu 877 drivers/staging/media/hantro/hantro_drv.c v4l2_m2m_release(vpu->m2m_dev); vpu 879 drivers/staging/media/hantro/hantro_drv.c v4l2_device_unregister(&vpu->v4l2_dev); vpu 881 drivers/staging/media/hantro/hantro_drv.c clk_bulk_unprepare(vpu->variant->num_clocks, vpu->clocks); vpu 882 drivers/staging/media/hantro/hantro_drv.c pm_runtime_dont_use_autosuspend(vpu->dev); vpu 883 drivers/staging/media/hantro/hantro_drv.c pm_runtime_disable(vpu->dev); vpu 889 drivers/staging/media/hantro/hantro_drv.c struct hantro_dev *vpu = platform_get_drvdata(pdev); vpu 891 drivers/staging/media/hantro/hantro_drv.c v4l2_info(&vpu->v4l2_dev, "Removing %s\n", pdev->name); vpu 893 drivers/staging/media/hantro/hantro_drv.c media_device_unregister(&vpu->mdev); vpu 894 drivers/staging/media/hantro/hantro_drv.c hantro_remove_dec_func(vpu); vpu 895 drivers/staging/media/hantro/hantro_drv.c hantro_remove_enc_func(vpu); vpu 896 drivers/staging/media/hantro/hantro_drv.c media_device_cleanup(&vpu->mdev); vpu 897 drivers/staging/media/hantro/hantro_drv.c v4l2_m2m_release(vpu->m2m_dev); vpu 898 drivers/staging/media/hantro/hantro_drv.c v4l2_device_unregister(&vpu->v4l2_dev); vpu 899 drivers/staging/media/hantro/hantro_drv.c clk_bulk_unprepare(vpu->variant->num_clocks, vpu->clocks); vpu 900 drivers/staging/media/hantro/hantro_drv.c pm_runtime_dont_use_autosuspend(vpu->dev); vpu 901 drivers/staging/media/hantro/hantro_drv.c pm_runtime_disable(vpu->dev); vpu 908 drivers/staging/media/hantro/hantro_drv.c struct hantro_dev *vpu = dev_get_drvdata(dev); vpu 910 drivers/staging/media/hantro/hantro_drv.c if (vpu->variant->runtime_resume) vpu 911 drivers/staging/media/hantro/hantro_drv.c return vpu->variant->runtime_resume(vpu); vpu 30 drivers/staging/media/hantro/hantro_g1_h264_dec.c struct hantro_dev *vpu = ctx->dev; vpu 51 drivers/staging/media/hantro/hantro_g1_h264_dec.c vdpu_write_relaxed(vpu, reg, G1_REG_DEC_CTRL0); vpu 57 drivers/staging/media/hantro/hantro_g1_h264_dec.c vdpu_write_relaxed(vpu, reg, G1_REG_DEC_CTRL1); vpu 68 drivers/staging/media/hantro/hantro_g1_h264_dec.c vdpu_write_relaxed(vpu, reg, G1_REG_DEC_CTRL2); vpu 74 drivers/staging/media/hantro/hantro_g1_h264_dec.c vdpu_write_relaxed(vpu, reg, G1_REG_DEC_CTRL3); vpu 88 drivers/staging/media/hantro/hantro_g1_h264_dec.c vdpu_write_relaxed(vpu, reg, G1_REG_DEC_CTRL4); vpu 103 drivers/staging/media/hantro/hantro_g1_h264_dec.c vdpu_write_relaxed(vpu, reg, G1_REG_DEC_CTRL5); vpu 110 drivers/staging/media/hantro/hantro_g1_h264_dec.c vdpu_write_relaxed(vpu, reg, G1_REG_DEC_CTRL6); vpu 113 drivers/staging/media/hantro/hantro_g1_h264_dec.c vdpu_write_relaxed(vpu, 0, G1_REG_ERR_CONC); vpu 116 drivers/staging/media/hantro/hantro_g1_h264_dec.c vdpu_write_relaxed(vpu, vpu 123 drivers/staging/media/hantro/hantro_g1_h264_dec.c vdpu_write_relaxed(vpu, 0, G1_REG_REF_BUF_CTRL); vpu 126 drivers/staging/media/hantro/hantro_g1_h264_dec.c vdpu_write_relaxed(vpu, G1_REG_REF_BUF_CTRL2_APF_THRESHOLD(8), vpu 134 drivers/staging/media/hantro/hantro_g1_h264_dec.c struct hantro_dev *vpu = ctx->dev; vpu 152 drivers/staging/media/hantro/hantro_g1_h264_dec.c vdpu_write_relaxed(vpu, dpb_valid << 16, G1_REG_VALID_REF); vpu 153 drivers/staging/media/hantro/hantro_g1_h264_dec.c vdpu_write_relaxed(vpu, dpb_longterm << 16, G1_REG_LT_REF); vpu 173 drivers/staging/media/hantro/hantro_g1_h264_dec.c vdpu_write_relaxed(vpu, reg, G1_REG_REF_PIC(i / 2)); vpu 192 drivers/staging/media/hantro/hantro_g1_h264_dec.c vdpu_write_relaxed(vpu, reg, G1_REG_BD_REF_PIC(reg_num++)); vpu 206 drivers/staging/media/hantro/hantro_g1_h264_dec.c vdpu_write_relaxed(vpu, reg, G1_REG_BD_P_REF_PIC); vpu 220 drivers/staging/media/hantro/hantro_g1_h264_dec.c vdpu_write_relaxed(vpu, reg, G1_REG_FWD_PIC(reg_num++)); vpu 227 drivers/staging/media/hantro/hantro_g1_h264_dec.c vdpu_write_relaxed(vpu, vb2_dma_contig_plane_dma_addr(buf, 0), vpu 236 drivers/staging/media/hantro/hantro_g1_h264_dec.c struct hantro_dev *vpu = ctx->dev; vpu 244 drivers/staging/media/hantro/hantro_g1_h264_dec.c vdpu_write_relaxed(vpu, src_dma, G1_REG_ADDR_STR); vpu 248 drivers/staging/media/hantro/hantro_g1_h264_dec.c vdpu_write_relaxed(vpu, dst_dma, G1_REG_ADDR_DST); vpu 258 drivers/staging/media/hantro/hantro_g1_h264_dec.c vdpu_write_relaxed(vpu, dst_dma + mv_offset, vpu 263 drivers/staging/media/hantro/hantro_g1_h264_dec.c vdpu_write_relaxed(vpu, ctx->h264_dec.priv.dma, G1_REG_ADDR_QTABLE); vpu 268 drivers/staging/media/hantro/hantro_g1_h264_dec.c struct hantro_dev *vpu = ctx->dev; vpu 282 drivers/staging/media/hantro/hantro_g1_h264_dec.c vdpu_write_relaxed(vpu, vpu 293 drivers/staging/media/hantro/hantro_g1_h264_dec.c vdpu_write(vpu, G1_REG_INTERRUPT_DEC_E, G1_REG_INTERRUPT); vpu 85 drivers/staging/media/hantro/hantro_g1_mpeg2_dec.c hantro_g1_mpeg2_dec_set_quantization(struct hantro_dev *vpu, vpu 94 drivers/staging/media/hantro/hantro_g1_mpeg2_dec.c vdpu_write_relaxed(vpu, ctx->mpeg2_dec.qtable.dma, vpu 99 drivers/staging/media/hantro/hantro_g1_mpeg2_dec.c hantro_g1_mpeg2_dec_set_buffers(struct hantro_dev *vpu, struct hantro_ctx *ctx, vpu 124 drivers/staging/media/hantro/hantro_g1_mpeg2_dec.c vdpu_write_relaxed(vpu, addr, G1_REG_RLC_VLC_BASE); vpu 132 drivers/staging/media/hantro/hantro_g1_mpeg2_dec.c vdpu_write_relaxed(vpu, addr, G1_REG_DEC_OUT_BASE); vpu 146 drivers/staging/media/hantro/hantro_g1_mpeg2_dec.c vdpu_write_relaxed(vpu, forward_addr, G1_REG_REFER0_BASE); vpu 147 drivers/staging/media/hantro/hantro_g1_mpeg2_dec.c vdpu_write_relaxed(vpu, forward_addr, G1_REG_REFER1_BASE); vpu 149 drivers/staging/media/hantro/hantro_g1_mpeg2_dec.c vdpu_write_relaxed(vpu, forward_addr, G1_REG_REFER0_BASE); vpu 150 drivers/staging/media/hantro/hantro_g1_mpeg2_dec.c vdpu_write_relaxed(vpu, current_addr, G1_REG_REFER1_BASE); vpu 152 drivers/staging/media/hantro/hantro_g1_mpeg2_dec.c vdpu_write_relaxed(vpu, current_addr, G1_REG_REFER0_BASE); vpu 153 drivers/staging/media/hantro/hantro_g1_mpeg2_dec.c vdpu_write_relaxed(vpu, forward_addr, G1_REG_REFER1_BASE); vpu 157 drivers/staging/media/hantro/hantro_g1_mpeg2_dec.c vdpu_write_relaxed(vpu, backward_addr, G1_REG_REFER2_BASE); vpu 158 drivers/staging/media/hantro/hantro_g1_mpeg2_dec.c vdpu_write_relaxed(vpu, backward_addr, G1_REG_REFER3_BASE); vpu 163 drivers/staging/media/hantro/hantro_g1_mpeg2_dec.c struct hantro_dev *vpu = ctx->dev; vpu 195 drivers/staging/media/hantro/hantro_g1_mpeg2_dec.c vdpu_write_relaxed(vpu, reg, G1_SWREG(2)); vpu 208 drivers/staging/media/hantro/hantro_g1_mpeg2_dec.c vdpu_write_relaxed(vpu, reg, G1_SWREG(3)); vpu 214 drivers/staging/media/hantro/hantro_g1_mpeg2_dec.c vdpu_write_relaxed(vpu, reg, G1_SWREG(4)); vpu 222 drivers/staging/media/hantro/hantro_g1_mpeg2_dec.c vdpu_write_relaxed(vpu, reg, G1_SWREG(5)); vpu 226 drivers/staging/media/hantro/hantro_g1_mpeg2_dec.c vdpu_write_relaxed(vpu, reg, G1_SWREG(6)); vpu 235 drivers/staging/media/hantro/hantro_g1_mpeg2_dec.c vdpu_write_relaxed(vpu, reg, G1_SWREG(18)); vpu 239 drivers/staging/media/hantro/hantro_g1_mpeg2_dec.c vdpu_write_relaxed(vpu, reg, G1_SWREG(48)); vpu 242 drivers/staging/media/hantro/hantro_g1_mpeg2_dec.c vdpu_write_relaxed(vpu, reg, G1_SWREG(55)); vpu 244 drivers/staging/media/hantro/hantro_g1_mpeg2_dec.c hantro_g1_mpeg2_dec_set_quantization(vpu, ctx); vpu 246 drivers/staging/media/hantro/hantro_g1_mpeg2_dec.c hantro_g1_mpeg2_dec_set_buffers(vpu, ctx, &src_buf->vb2_buf, vpu 253 drivers/staging/media/hantro/hantro_g1_mpeg2_dec.c vdpu_write(vpu, reg, G1_SWREG(1)); vpu 140 drivers/staging/media/hantro/hantro_g1_vp8_dec.c struct hantro_dev *vpu = ctx->dev; vpu 145 drivers/staging/media/hantro/hantro_g1_vp8_dec.c hantro_reg_write(vpu, &vp8_dec_lf_level[0], lf->level); vpu 151 drivers/staging/media/hantro/hantro_g1_vp8_dec.c hantro_reg_write(vpu, &vp8_dec_lf_level[i], lf_level); vpu 155 drivers/staging/media/hantro/hantro_g1_vp8_dec.c hantro_reg_write(vpu, &vp8_dec_lf_level[i], vpu 162 drivers/staging/media/hantro/hantro_g1_vp8_dec.c vdpu_write_relaxed(vpu, reg, G1_REG_REF_PIC(0)); vpu 166 drivers/staging/media/hantro/hantro_g1_vp8_dec.c hantro_reg_write(vpu, &vp8_dec_mb_adj[i], vpu 168 drivers/staging/media/hantro/hantro_g1_vp8_dec.c hantro_reg_write(vpu, &vp8_dec_ref_adj[i], vpu 182 drivers/staging/media/hantro/hantro_g1_vp8_dec.c struct hantro_dev *vpu = ctx->dev; vpu 186 drivers/staging/media/hantro/hantro_g1_vp8_dec.c hantro_reg_write(vpu, &vp8_dec_quant[0], q->y_ac_qi); vpu 192 drivers/staging/media/hantro/hantro_g1_vp8_dec.c hantro_reg_write(vpu, &vp8_dec_quant[i], quant); vpu 196 drivers/staging/media/hantro/hantro_g1_vp8_dec.c hantro_reg_write(vpu, &vp8_dec_quant[i], vpu 200 drivers/staging/media/hantro/hantro_g1_vp8_dec.c hantro_reg_write(vpu, &vp8_dec_quant_delta[0], q->y_dc_delta); vpu 201 drivers/staging/media/hantro/hantro_g1_vp8_dec.c hantro_reg_write(vpu, &vp8_dec_quant_delta[1], q->y2_dc_delta); vpu 202 drivers/staging/media/hantro/hantro_g1_vp8_dec.c hantro_reg_write(vpu, &vp8_dec_quant_delta[2], q->y2_ac_delta); vpu 203 drivers/staging/media/hantro/hantro_g1_vp8_dec.c hantro_reg_write(vpu, &vp8_dec_quant_delta[3], q->uv_dc_delta); vpu 204 drivers/staging/media/hantro/hantro_g1_vp8_dec.c hantro_reg_write(vpu, &vp8_dec_quant_delta[4], q->uv_ac_delta); vpu 235 drivers/staging/media/hantro/hantro_g1_vp8_dec.c struct hantro_dev *vpu = ctx->dev; vpu 270 drivers/staging/media/hantro/hantro_g1_vp8_dec.c vdpu_write_relaxed(vpu, (mb_offset_bytes & (~DEC_8190_ALIGN_MASK)) vpu 277 drivers/staging/media/hantro/hantro_g1_vp8_dec.c hantro_reg_write(vpu, ®, mb_start_bits); vpu 283 drivers/staging/media/hantro/hantro_g1_vp8_dec.c hantro_reg_write(vpu, ®, mb_size + 1); vpu 304 drivers/staging/media/hantro/hantro_g1_vp8_dec.c hantro_reg_write(vpu, ®, hdr->num_dct_parts - 1); vpu 307 drivers/staging/media/hantro/hantro_g1_vp8_dec.c vdpu_write_relaxed(vpu, vpu 316 drivers/staging/media/hantro/hantro_g1_vp8_dec.c hantro_reg_write(vpu, &vp8_dec_dct_base[i], vpu 319 drivers/staging/media/hantro/hantro_g1_vp8_dec.c hantro_reg_write(vpu, &vp8_dec_dct_start_bits[i], vpu 333 drivers/staging/media/hantro/hantro_g1_vp8_dec.c struct hantro_dev *vpu = ctx->dev; vpu 349 drivers/staging/media/hantro/hantro_g1_vp8_dec.c hantro_reg_write(vpu, &vp8_dec_pred_bc_tap[i][j], vpu 366 drivers/staging/media/hantro/hantro_g1_vp8_dec.c hantro_reg_write(vpu, ®, val); vpu 374 drivers/staging/media/hantro/hantro_g1_vp8_dec.c struct hantro_dev *vpu = ctx->dev; vpu 383 drivers/staging/media/hantro/hantro_g1_vp8_dec.c vdpu_write_relaxed(vpu, ref, G1_REG_ADDR_REF(0)); vpu 391 drivers/staging/media/hantro/hantro_g1_vp8_dec.c vdpu_write_relaxed(vpu, ref, G1_REG_ADDR_REF(4)); vpu 399 drivers/staging/media/hantro/hantro_g1_vp8_dec.c vdpu_write_relaxed(vpu, ref, G1_REG_ADDR_REF(5)); vpu 406 drivers/staging/media/hantro/hantro_g1_vp8_dec.c struct hantro_dev *vpu = ctx->dev; vpu 414 drivers/staging/media/hantro/hantro_g1_vp8_dec.c vdpu_write_relaxed(vpu, ctx->vp8_dec.prob_tbl.dma, vpu 424 drivers/staging/media/hantro/hantro_g1_vp8_dec.c vdpu_write_relaxed(vpu, reg, G1_REG_FWD_PIC(0)); vpu 427 drivers/staging/media/hantro/hantro_g1_vp8_dec.c vdpu_write_relaxed(vpu, dst_dma, G1_REG_ADDR_DST); vpu 433 drivers/staging/media/hantro/hantro_g1_vp8_dec.c struct hantro_dev *vpu = ctx->dev; vpu 461 drivers/staging/media/hantro/hantro_g1_vp8_dec.c vdpu_write_relaxed(vpu, reg, G1_REG_CONFIG); vpu 470 drivers/staging/media/hantro/hantro_g1_vp8_dec.c vdpu_write_relaxed(vpu, reg, G1_REG_DEC_CTRL0); vpu 479 drivers/staging/media/hantro/hantro_g1_vp8_dec.c vdpu_write_relaxed(vpu, reg, G1_REG_DEC_CTRL1); vpu 484 drivers/staging/media/hantro/hantro_g1_vp8_dec.c vdpu_write_relaxed(vpu, reg, G1_REG_DEC_CTRL2); vpu 491 drivers/staging/media/hantro/hantro_g1_vp8_dec.c vdpu_write_relaxed(vpu, reg, G1_REG_DEC_CTRL4); vpu 502 drivers/staging/media/hantro/hantro_g1_vp8_dec.c vdpu_write(vpu, G1_REG_INTERRUPT_DEC_E, G1_REG_INTERRUPT); vpu 18 drivers/staging/media/hantro/hantro_h1_jpeg_enc.c static void hantro_h1_set_src_img_ctrl(struct hantro_dev *vpu, vpu 28 drivers/staging/media/hantro/hantro_h1_jpeg_enc.c vepu_write_relaxed(vpu, reg, H1_REG_IN_IMG_CTRL); vpu 31 drivers/staging/media/hantro/hantro_h1_jpeg_enc.c static void hantro_h1_jpeg_enc_set_buffers(struct hantro_dev *vpu, vpu 40 drivers/staging/media/hantro/hantro_h1_jpeg_enc.c vepu_write_relaxed(vpu, ctx->jpeg_enc.bounce_buffer.dma, vpu 42 drivers/staging/media/hantro/hantro_h1_jpeg_enc.c vepu_write_relaxed(vpu, ctx->jpeg_enc.bounce_buffer.size, vpu 48 drivers/staging/media/hantro/hantro_h1_jpeg_enc.c vepu_write_relaxed(vpu, src[0], H1_REG_ADDR_IN_PLANE_0); vpu 52 drivers/staging/media/hantro/hantro_h1_jpeg_enc.c vepu_write_relaxed(vpu, src[0], H1_REG_ADDR_IN_PLANE_0); vpu 53 drivers/staging/media/hantro/hantro_h1_jpeg_enc.c vepu_write_relaxed(vpu, src[1], H1_REG_ADDR_IN_PLANE_1); vpu 58 drivers/staging/media/hantro/hantro_h1_jpeg_enc.c vepu_write_relaxed(vpu, src[0], H1_REG_ADDR_IN_PLANE_0); vpu 59 drivers/staging/media/hantro/hantro_h1_jpeg_enc.c vepu_write_relaxed(vpu, src[1], H1_REG_ADDR_IN_PLANE_1); vpu 60 drivers/staging/media/hantro/hantro_h1_jpeg_enc.c vepu_write_relaxed(vpu, src[2], H1_REG_ADDR_IN_PLANE_2); vpu 65 drivers/staging/media/hantro/hantro_h1_jpeg_enc.c hantro_h1_jpeg_enc_set_qtable(struct hantro_dev *vpu, vpu 78 drivers/staging/media/hantro/hantro_h1_jpeg_enc.c vepu_write_relaxed(vpu, reg, H1_REG_JPEG_LUMA_QUAT(i)); vpu 81 drivers/staging/media/hantro/hantro_h1_jpeg_enc.c vepu_write_relaxed(vpu, reg, H1_REG_JPEG_CHROMA_QUAT(i)); vpu 87 drivers/staging/media/hantro/hantro_h1_jpeg_enc.c struct hantro_dev *vpu = ctx->dev; vpu 105 drivers/staging/media/hantro/hantro_h1_jpeg_enc.c vepu_write_relaxed(vpu, H1_REG_ENC_CTRL_ENC_MODE_JPEG, vpu 108 drivers/staging/media/hantro/hantro_h1_jpeg_enc.c hantro_h1_set_src_img_ctrl(vpu, ctx); vpu 109 drivers/staging/media/hantro/hantro_h1_jpeg_enc.c hantro_h1_jpeg_enc_set_buffers(vpu, ctx, &src_buf->vb2_buf); vpu 110 drivers/staging/media/hantro/hantro_h1_jpeg_enc.c hantro_h1_jpeg_enc_set_qtable(vpu, vpu 122 drivers/staging/media/hantro/hantro_h1_jpeg_enc.c vepu_write(vpu, reg, H1_REG_AXI_CTRL); vpu 132 drivers/staging/media/hantro/hantro_h1_jpeg_enc.c vepu_write(vpu, reg, H1_REG_ENC_CTRL); vpu 610 drivers/staging/media/hantro/hantro_h264.c struct hantro_dev *vpu = ctx->dev; vpu 614 drivers/staging/media/hantro/hantro_h264.c dma_free_coherent(vpu->dev, priv->size, priv->cpu, priv->dma); vpu 619 drivers/staging/media/hantro/hantro_h264.c struct hantro_dev *vpu = ctx->dev; vpu 625 drivers/staging/media/hantro/hantro_h264.c priv->cpu = dma_alloc_coherent(vpu->dev, sizeof(*tbl), &priv->dma, vpu 151 drivers/staging/media/hantro/hantro_hw.h void hantro_irq_done(struct hantro_dev *vpu, unsigned int bytesused, vpu 40 drivers/staging/media/hantro/hantro_mpeg2.c struct hantro_dev *vpu = ctx->dev; vpu 44 drivers/staging/media/hantro/hantro_mpeg2.c dma_alloc_coherent(vpu->dev, vpu 55 drivers/staging/media/hantro/hantro_mpeg2.c struct hantro_dev *vpu = ctx->dev; vpu 57 drivers/staging/media/hantro/hantro_mpeg2.c dma_free_coherent(vpu->dev, vpu 78 drivers/staging/media/hantro/hantro_v4l2.c struct hantro_dev *vpu = video_drvdata(file); vpu 81 drivers/staging/media/hantro/hantro_v4l2.c strscpy(cap->driver, vpu->dev->driver->name, sizeof(cap->driver)); vpu 84 drivers/staging/media/hantro/hantro_v4l2.c vpu->dev->driver->name); vpu 147 drivers/staging/media/hantro/hantro_vp8.c struct hantro_dev *vpu = ctx->dev; vpu 164 drivers/staging/media/hantro/hantro_vp8.c aux_buf->cpu = dma_alloc_coherent(vpu->dev, aux_buf->size, vpu 175 drivers/staging/media/hantro/hantro_vp8.c aux_buf->cpu = dma_alloc_coherent(vpu->dev, aux_buf->size, vpu 185 drivers/staging/media/hantro/hantro_vp8.c dma_free_coherent(vpu->dev, ctx->vp8_dec.segment_map.size, vpu 195 drivers/staging/media/hantro/hantro_vp8.c struct hantro_dev *vpu = ctx->dev; vpu 197 drivers/staging/media/hantro/hantro_vp8.c dma_free_coherent(vpu->dev, vp8_dec->segment_map.size, vpu 199 drivers/staging/media/hantro/hantro_vp8.c dma_free_coherent(vpu->dev, vp8_dec->prob_tbl.size, vpu 107 drivers/staging/media/hantro/rk3288_vpu_hw.c struct hantro_dev *vpu = dev_id; vpu 111 drivers/staging/media/hantro/rk3288_vpu_hw.c status = vepu_read(vpu, H1_REG_INTERRUPT); vpu 112 drivers/staging/media/hantro/rk3288_vpu_hw.c bytesused = vepu_read(vpu, H1_REG_STR_BUF_LIMIT) / 8; vpu 116 drivers/staging/media/hantro/rk3288_vpu_hw.c vepu_write(vpu, 0, H1_REG_INTERRUPT); vpu 117 drivers/staging/media/hantro/rk3288_vpu_hw.c vepu_write(vpu, 0, H1_REG_AXI_CTRL); vpu 119 drivers/staging/media/hantro/rk3288_vpu_hw.c hantro_irq_done(vpu, bytesused, state); vpu 126 drivers/staging/media/hantro/rk3288_vpu_hw.c struct hantro_dev *vpu = dev_id; vpu 130 drivers/staging/media/hantro/rk3288_vpu_hw.c status = vdpu_read(vpu, G1_REG_INTERRUPT); vpu 134 drivers/staging/media/hantro/rk3288_vpu_hw.c vdpu_write(vpu, 0, G1_REG_INTERRUPT); vpu 135 drivers/staging/media/hantro/rk3288_vpu_hw.c vdpu_write(vpu, G1_REG_CONFIG_DEC_CLK_GATE_E, G1_REG_CONFIG); vpu 137 drivers/staging/media/hantro/rk3288_vpu_hw.c hantro_irq_done(vpu, 0, state); vpu 142 drivers/staging/media/hantro/rk3288_vpu_hw.c static int rk3288_vpu_hw_init(struct hantro_dev *vpu) vpu 145 drivers/staging/media/hantro/rk3288_vpu_hw.c clk_set_rate(vpu->clocks[0].clk, RK3288_ACLK_MAX_FREQ); vpu 151 drivers/staging/media/hantro/rk3288_vpu_hw.c struct hantro_dev *vpu = ctx->dev; vpu 153 drivers/staging/media/hantro/rk3288_vpu_hw.c vepu_write(vpu, H1_REG_INTERRUPT_DIS_BIT, H1_REG_INTERRUPT); vpu 154 drivers/staging/media/hantro/rk3288_vpu_hw.c vepu_write(vpu, 0, H1_REG_ENC_CTRL); vpu 155 drivers/staging/media/hantro/rk3288_vpu_hw.c vepu_write(vpu, 0, H1_REG_AXI_CTRL); vpu 160 drivers/staging/media/hantro/rk3288_vpu_hw.c struct hantro_dev *vpu = ctx->dev; vpu 162 drivers/staging/media/hantro/rk3288_vpu_hw.c vdpu_write(vpu, G1_REG_INTERRUPT_DEC_IRQ_DIS, G1_REG_INTERRUPT); vpu 163 drivers/staging/media/hantro/rk3288_vpu_hw.c vdpu_write(vpu, G1_REG_CONFIG_DEC_CLK_GATE_E, G1_REG_CONFIG); vpu 164 drivers/staging/media/hantro/rk3288_vpu_hw.c vdpu_write(vpu, 1, G1_REG_SOFT_RESET); vpu 93 drivers/staging/media/hantro/rk3399_vpu_hw.c struct hantro_dev *vpu = dev_id; vpu 97 drivers/staging/media/hantro/rk3399_vpu_hw.c status = vepu_read(vpu, VEPU_REG_INTERRUPT); vpu 98 drivers/staging/media/hantro/rk3399_vpu_hw.c bytesused = vepu_read(vpu, VEPU_REG_STR_BUF_LIMIT) / 8; vpu 102 drivers/staging/media/hantro/rk3399_vpu_hw.c vepu_write(vpu, 0, VEPU_REG_INTERRUPT); vpu 103 drivers/staging/media/hantro/rk3399_vpu_hw.c vepu_write(vpu, 0, VEPU_REG_AXI_CTRL); vpu 105 drivers/staging/media/hantro/rk3399_vpu_hw.c hantro_irq_done(vpu, bytesused, state); vpu 112 drivers/staging/media/hantro/rk3399_vpu_hw.c struct hantro_dev *vpu = dev_id; vpu 116 drivers/staging/media/hantro/rk3399_vpu_hw.c status = vdpu_read(vpu, VDPU_REG_INTERRUPT); vpu 120 drivers/staging/media/hantro/rk3399_vpu_hw.c vdpu_write(vpu, 0, VDPU_REG_INTERRUPT); vpu 121 drivers/staging/media/hantro/rk3399_vpu_hw.c vdpu_write(vpu, 0, VDPU_REG_AXI_CTRL); vpu 123 drivers/staging/media/hantro/rk3399_vpu_hw.c hantro_irq_done(vpu, 0, state); vpu 128 drivers/staging/media/hantro/rk3399_vpu_hw.c static int rk3399_vpu_hw_init(struct hantro_dev *vpu) vpu 131 drivers/staging/media/hantro/rk3399_vpu_hw.c clk_set_rate(vpu->clocks[0].clk, RK3399_ACLK_MAX_FREQ); vpu 137 drivers/staging/media/hantro/rk3399_vpu_hw.c struct hantro_dev *vpu = ctx->dev; vpu 139 drivers/staging/media/hantro/rk3399_vpu_hw.c vepu_write(vpu, VEPU_REG_INTERRUPT_DIS_BIT, VEPU_REG_INTERRUPT); vpu 140 drivers/staging/media/hantro/rk3399_vpu_hw.c vepu_write(vpu, 0, VEPU_REG_ENCODE_START); vpu 141 drivers/staging/media/hantro/rk3399_vpu_hw.c vepu_write(vpu, 0, VEPU_REG_AXI_CTRL); vpu 146 drivers/staging/media/hantro/rk3399_vpu_hw.c struct hantro_dev *vpu = ctx->dev; vpu 148 drivers/staging/media/hantro/rk3399_vpu_hw.c vdpu_write(vpu, VDPU_REG_INTERRUPT_DEC_IRQ_DIS, VDPU_REG_INTERRUPT); vpu 149 drivers/staging/media/hantro/rk3399_vpu_hw.c vdpu_write(vpu, 0, VDPU_REG_EN_FLAGS); vpu 150 drivers/staging/media/hantro/rk3399_vpu_hw.c vdpu_write(vpu, 1, VDPU_REG_SOFT_RESET); vpu 36 drivers/staging/media/hantro/rk3399_vpu_hw_jpeg_enc.c static void rk3399_vpu_set_src_img_ctrl(struct hantro_dev *vpu, vpu 47 drivers/staging/media/hantro/rk3399_vpu_hw_jpeg_enc.c vepu_write_relaxed(vpu, reg, VEPU_REG_INPUT_LUMA_INFO); vpu 57 drivers/staging/media/hantro/rk3399_vpu_hw_jpeg_enc.c vepu_write_relaxed(vpu, reg, VEPU_REG_ENC_OVER_FILL_STRM_OFFSET); vpu 60 drivers/staging/media/hantro/rk3399_vpu_hw_jpeg_enc.c vepu_write_relaxed(vpu, reg, VEPU_REG_ENC_CTRL1); vpu 63 drivers/staging/media/hantro/rk3399_vpu_hw_jpeg_enc.c static void rk3399_vpu_jpeg_enc_set_buffers(struct hantro_dev *vpu, vpu 72 drivers/staging/media/hantro/rk3399_vpu_hw_jpeg_enc.c vepu_write_relaxed(vpu, ctx->jpeg_enc.bounce_buffer.dma, vpu 74 drivers/staging/media/hantro/rk3399_vpu_hw_jpeg_enc.c vepu_write_relaxed(vpu, ctx->jpeg_enc.bounce_buffer.size, vpu 79 drivers/staging/media/hantro/rk3399_vpu_hw_jpeg_enc.c vepu_write_relaxed(vpu, src[0], VEPU_REG_ADDR_IN_PLANE_0); vpu 83 drivers/staging/media/hantro/rk3399_vpu_hw_jpeg_enc.c vepu_write_relaxed(vpu, src[0], VEPU_REG_ADDR_IN_PLANE_0); vpu 84 drivers/staging/media/hantro/rk3399_vpu_hw_jpeg_enc.c vepu_write_relaxed(vpu, src[1], VEPU_REG_ADDR_IN_PLANE_1); vpu 89 drivers/staging/media/hantro/rk3399_vpu_hw_jpeg_enc.c vepu_write_relaxed(vpu, src[0], VEPU_REG_ADDR_IN_PLANE_0); vpu 90 drivers/staging/media/hantro/rk3399_vpu_hw_jpeg_enc.c vepu_write_relaxed(vpu, src[1], VEPU_REG_ADDR_IN_PLANE_1); vpu 91 drivers/staging/media/hantro/rk3399_vpu_hw_jpeg_enc.c vepu_write_relaxed(vpu, src[2], VEPU_REG_ADDR_IN_PLANE_2); vpu 96 drivers/staging/media/hantro/rk3399_vpu_hw_jpeg_enc.c rk3399_vpu_jpeg_enc_set_qtable(struct hantro_dev *vpu, vpu 109 drivers/staging/media/hantro/rk3399_vpu_hw_jpeg_enc.c vepu_write_relaxed(vpu, reg, VEPU_REG_JPEG_LUMA_QUAT(i)); vpu 112 drivers/staging/media/hantro/rk3399_vpu_hw_jpeg_enc.c vepu_write_relaxed(vpu, reg, VEPU_REG_JPEG_CHROMA_QUAT(i)); vpu 118 drivers/staging/media/hantro/rk3399_vpu_hw_jpeg_enc.c struct hantro_dev *vpu = ctx->dev; vpu 136 drivers/staging/media/hantro/rk3399_vpu_hw_jpeg_enc.c vepu_write_relaxed(vpu, VEPU_REG_ENCODE_FORMAT_JPEG, vpu 139 drivers/staging/media/hantro/rk3399_vpu_hw_jpeg_enc.c rk3399_vpu_set_src_img_ctrl(vpu, ctx); vpu 140 drivers/staging/media/hantro/rk3399_vpu_hw_jpeg_enc.c rk3399_vpu_jpeg_enc_set_buffers(vpu, ctx, &src_buf->vb2_buf); vpu 141 drivers/staging/media/hantro/rk3399_vpu_hw_jpeg_enc.c rk3399_vpu_jpeg_enc_set_qtable(vpu, vpu 152 drivers/staging/media/hantro/rk3399_vpu_hw_jpeg_enc.c vepu_write(vpu, reg, VEPU_REG_DATA_ENDIAN); vpu 155 drivers/staging/media/hantro/rk3399_vpu_hw_jpeg_enc.c vepu_write_relaxed(vpu, reg, VEPU_REG_AXI_CTRL); vpu 165 drivers/staging/media/hantro/rk3399_vpu_hw_jpeg_enc.c vepu_write(vpu, reg, VEPU_REG_ENCODE_START); vpu 87 drivers/staging/media/hantro/rk3399_vpu_hw_mpeg2_dec.c rk3399_vpu_mpeg2_dec_set_quantization(struct hantro_dev *vpu, vpu 95 drivers/staging/media/hantro/rk3399_vpu_hw_mpeg2_dec.c vdpu_write_relaxed(vpu, ctx->mpeg2_dec.qtable.dma, vpu 100 drivers/staging/media/hantro/rk3399_vpu_hw_mpeg2_dec.c rk3399_vpu_mpeg2_dec_set_buffers(struct hantro_dev *vpu, vpu 126 drivers/staging/media/hantro/rk3399_vpu_hw_mpeg2_dec.c vdpu_write_relaxed(vpu, addr, VDPU_REG_RLC_VLC_BASE); vpu 134 drivers/staging/media/hantro/rk3399_vpu_hw_mpeg2_dec.c vdpu_write_relaxed(vpu, addr, VDPU_REG_DEC_OUT_BASE); vpu 148 drivers/staging/media/hantro/rk3399_vpu_hw_mpeg2_dec.c vdpu_write_relaxed(vpu, forward_addr, VDPU_REG_REFER0_BASE); vpu 149 drivers/staging/media/hantro/rk3399_vpu_hw_mpeg2_dec.c vdpu_write_relaxed(vpu, forward_addr, VDPU_REG_REFER1_BASE); vpu 151 drivers/staging/media/hantro/rk3399_vpu_hw_mpeg2_dec.c vdpu_write_relaxed(vpu, forward_addr, VDPU_REG_REFER0_BASE); vpu 152 drivers/staging/media/hantro/rk3399_vpu_hw_mpeg2_dec.c vdpu_write_relaxed(vpu, current_addr, VDPU_REG_REFER1_BASE); vpu 154 drivers/staging/media/hantro/rk3399_vpu_hw_mpeg2_dec.c vdpu_write_relaxed(vpu, current_addr, VDPU_REG_REFER0_BASE); vpu 155 drivers/staging/media/hantro/rk3399_vpu_hw_mpeg2_dec.c vdpu_write_relaxed(vpu, forward_addr, VDPU_REG_REFER1_BASE); vpu 159 drivers/staging/media/hantro/rk3399_vpu_hw_mpeg2_dec.c vdpu_write_relaxed(vpu, backward_addr, VDPU_REG_REFER2_BASE); vpu 160 drivers/staging/media/hantro/rk3399_vpu_hw_mpeg2_dec.c vdpu_write_relaxed(vpu, backward_addr, VDPU_REG_REFER3_BASE); vpu 165 drivers/staging/media/hantro/rk3399_vpu_hw_mpeg2_dec.c struct hantro_dev *vpu = ctx->dev; vpu 186 drivers/staging/media/hantro/rk3399_vpu_hw_mpeg2_dec.c vdpu_write_relaxed(vpu, reg, VDPU_SWREG(50)); vpu 190 drivers/staging/media/hantro/rk3399_vpu_hw_mpeg2_dec.c vdpu_write_relaxed(vpu, reg, VDPU_SWREG(51)); vpu 195 drivers/staging/media/hantro/rk3399_vpu_hw_mpeg2_dec.c vdpu_write_relaxed(vpu, reg, VDPU_SWREG(52)); vpu 198 drivers/staging/media/hantro/rk3399_vpu_hw_mpeg2_dec.c vdpu_write_relaxed(vpu, reg, VDPU_SWREG(53)); vpu 206 drivers/staging/media/hantro/rk3399_vpu_hw_mpeg2_dec.c vdpu_write_relaxed(vpu, reg, VDPU_SWREG(54)); vpu 212 drivers/staging/media/hantro/rk3399_vpu_hw_mpeg2_dec.c vdpu_write_relaxed(vpu, reg, VDPU_SWREG(56)); vpu 224 drivers/staging/media/hantro/rk3399_vpu_hw_mpeg2_dec.c vdpu_write_relaxed(vpu, reg, VDPU_SWREG(57)); vpu 230 drivers/staging/media/hantro/rk3399_vpu_hw_mpeg2_dec.c vdpu_write_relaxed(vpu, reg, VDPU_SWREG(120)); vpu 238 drivers/staging/media/hantro/rk3399_vpu_hw_mpeg2_dec.c vdpu_write_relaxed(vpu, reg, VDPU_SWREG(122)); vpu 247 drivers/staging/media/hantro/rk3399_vpu_hw_mpeg2_dec.c vdpu_write_relaxed(vpu, reg, VDPU_SWREG(136)); vpu 249 drivers/staging/media/hantro/rk3399_vpu_hw_mpeg2_dec.c rk3399_vpu_mpeg2_dec_set_quantization(vpu, ctx); vpu 251 drivers/staging/media/hantro/rk3399_vpu_hw_mpeg2_dec.c rk3399_vpu_mpeg2_dec_set_buffers(vpu, ctx, &src_buf->vb2_buf, vpu 258 drivers/staging/media/hantro/rk3399_vpu_hw_mpeg2_dec.c reg = vdpu_read(vpu, VDPU_SWREG(57)) | VDPU_REG_DEC_E(1); vpu 259 drivers/staging/media/hantro/rk3399_vpu_hw_mpeg2_dec.c vdpu_write(vpu, reg, VDPU_SWREG(57)); vpu 281 drivers/staging/media/hantro/rk3399_vpu_hw_vp8_dec.c struct hantro_dev *vpu = ctx->dev; vpu 286 drivers/staging/media/hantro/rk3399_vpu_hw_vp8_dec.c hantro_reg_write(vpu, &vp8_dec_lf_level[0], lf->level); vpu 292 drivers/staging/media/hantro/rk3399_vpu_hw_vp8_dec.c hantro_reg_write(vpu, &vp8_dec_lf_level[i], lf_level); vpu 296 drivers/staging/media/hantro/rk3399_vpu_hw_vp8_dec.c hantro_reg_write(vpu, &vp8_dec_lf_level[i], vpu 303 drivers/staging/media/hantro/rk3399_vpu_hw_vp8_dec.c vdpu_write_relaxed(vpu, reg, VDPU_REG_FILTER_MB_ADJ); vpu 307 drivers/staging/media/hantro/rk3399_vpu_hw_vp8_dec.c hantro_reg_write(vpu, &vp8_dec_mb_adj[i], vpu 309 drivers/staging/media/hantro/rk3399_vpu_hw_vp8_dec.c hantro_reg_write(vpu, &vp8_dec_ref_adj[i], vpu 320 drivers/staging/media/hantro/rk3399_vpu_hw_vp8_dec.c struct hantro_dev *vpu = ctx->dev; vpu 324 drivers/staging/media/hantro/rk3399_vpu_hw_vp8_dec.c hantro_reg_write(vpu, &vp8_dec_quant[0], q->y_ac_qi); vpu 330 drivers/staging/media/hantro/rk3399_vpu_hw_vp8_dec.c hantro_reg_write(vpu, &vp8_dec_quant[i], quant); vpu 334 drivers/staging/media/hantro/rk3399_vpu_hw_vp8_dec.c hantro_reg_write(vpu, &vp8_dec_quant[i], vpu 338 drivers/staging/media/hantro/rk3399_vpu_hw_vp8_dec.c hantro_reg_write(vpu, &vp8_dec_quant_delta[0], q->y_dc_delta); vpu 339 drivers/staging/media/hantro/rk3399_vpu_hw_vp8_dec.c hantro_reg_write(vpu, &vp8_dec_quant_delta[1], q->y2_dc_delta); vpu 340 drivers/staging/media/hantro/rk3399_vpu_hw_vp8_dec.c hantro_reg_write(vpu, &vp8_dec_quant_delta[2], q->y2_ac_delta); vpu 341 drivers/staging/media/hantro/rk3399_vpu_hw_vp8_dec.c hantro_reg_write(vpu, &vp8_dec_quant_delta[3], q->uv_dc_delta); vpu 342 drivers/staging/media/hantro/rk3399_vpu_hw_vp8_dec.c hantro_reg_write(vpu, &vp8_dec_quant_delta[4], q->uv_ac_delta); vpu 348 drivers/staging/media/hantro/rk3399_vpu_hw_vp8_dec.c struct hantro_dev *vpu = ctx->dev; vpu 382 drivers/staging/media/hantro/rk3399_vpu_hw_vp8_dec.c vdpu_write_relaxed(vpu, (mb_offset_bytes & (~DEC_8190_ALIGN_MASK)) + vpu 384 drivers/staging/media/hantro/rk3399_vpu_hw_vp8_dec.c hantro_reg_write(vpu, &vp8_dec_mb_start_bit, mb_start_bits); vpu 385 drivers/staging/media/hantro/rk3399_vpu_hw_vp8_dec.c hantro_reg_write(vpu, &vp8_dec_mb_aligned_data_len, mb_size); vpu 403 drivers/staging/media/hantro/rk3399_vpu_hw_vp8_dec.c hantro_reg_write(vpu, &vp8_dec_num_dct_partitions, vpu 407 drivers/staging/media/hantro/rk3399_vpu_hw_vp8_dec.c hantro_reg_write(vpu, &vp8_dec_stream_len, dct_part_total_len); vpu 414 drivers/staging/media/hantro/rk3399_vpu_hw_vp8_dec.c hantro_reg_write(vpu, &vp8_dec_dct_base[i], vpu 417 drivers/staging/media/hantro/rk3399_vpu_hw_vp8_dec.c hantro_reg_write(vpu, &vp8_dec_dct_start_bits[i], vpu 431 drivers/staging/media/hantro/rk3399_vpu_hw_vp8_dec.c struct hantro_dev *vpu = ctx->dev; vpu 440 drivers/staging/media/hantro/rk3399_vpu_hw_vp8_dec.c hantro_reg_write(vpu, vpu 450 drivers/staging/media/hantro/rk3399_vpu_hw_vp8_dec.c struct hantro_dev *vpu = ctx->dev; vpu 461 drivers/staging/media/hantro/rk3399_vpu_hw_vp8_dec.c vdpu_write_relaxed(vpu, ref, VDPU_REG_VP8_ADDR_REF0); vpu 469 drivers/staging/media/hantro/rk3399_vpu_hw_vp8_dec.c vdpu_write_relaxed(vpu, ref, VDPU_REG_VP8_ADDR_REF2_5(2)); vpu 477 drivers/staging/media/hantro/rk3399_vpu_hw_vp8_dec.c vdpu_write_relaxed(vpu, ref, VDPU_REG_VP8_ADDR_REF2_5(3)); vpu 484 drivers/staging/media/hantro/rk3399_vpu_hw_vp8_dec.c struct hantro_dev *vpu = ctx->dev; vpu 492 drivers/staging/media/hantro/rk3399_vpu_hw_vp8_dec.c vdpu_write_relaxed(vpu, ctx->vp8_dec.prob_tbl.dma, vpu 502 drivers/staging/media/hantro/rk3399_vpu_hw_vp8_dec.c vdpu_write_relaxed(vpu, reg, VDPU_REG_VP8_SEGMENT_VAL); vpu 506 drivers/staging/media/hantro/rk3399_vpu_hw_vp8_dec.c vdpu_write_relaxed(vpu, dst_dma, VDPU_REG_ADDR_DST); vpu 512 drivers/staging/media/hantro/rk3399_vpu_hw_vp8_dec.c struct hantro_dev *vpu = ctx->dev; vpu 544 drivers/staging/media/hantro/rk3399_vpu_hw_vp8_dec.c vdpu_write_relaxed(vpu, reg, VDPU_REG_EN_FLAGS); vpu 552 drivers/staging/media/hantro/rk3399_vpu_hw_vp8_dec.c vdpu_write_relaxed(vpu, reg, VDPU_REG_DATA_ENDIAN); vpu 555 drivers/staging/media/hantro/rk3399_vpu_hw_vp8_dec.c vdpu_write_relaxed(vpu, reg, VDPU_REG_AXI_CTRL); vpu 558 drivers/staging/media/hantro/rk3399_vpu_hw_vp8_dec.c vdpu_write_relaxed(vpu, reg, VDPU_REG_DEC_FORMAT); vpu 561 drivers/staging/media/hantro/rk3399_vpu_hw_vp8_dec.c hantro_reg_write(vpu, &vp8_dec_skip_mode, 1); vpu 563 drivers/staging/media/hantro/rk3399_vpu_hw_vp8_dec.c hantro_reg_write(vpu, &vp8_dec_filter_disable, 1); vpu 569 drivers/staging/media/hantro/rk3399_vpu_hw_vp8_dec.c hantro_reg_write(vpu, &vp8_dec_mb_width, mb_width); vpu 570 drivers/staging/media/hantro/rk3399_vpu_hw_vp8_dec.c hantro_reg_write(vpu, &vp8_dec_mb_height, mb_height); vpu 571 drivers/staging/media/hantro/rk3399_vpu_hw_vp8_dec.c hantro_reg_write(vpu, &vp8_dec_mb_width_ext, mb_width >> 9); vpu 572 drivers/staging/media/hantro/rk3399_vpu_hw_vp8_dec.c hantro_reg_write(vpu, &vp8_dec_mb_height_ext, mb_height >> 8); vpu 575 drivers/staging/media/hantro/rk3399_vpu_hw_vp8_dec.c hantro_reg_write(vpu, &vp8_dec_bool_range, hdr->coder_state.range); vpu 576 drivers/staging/media/hantro/rk3399_vpu_hw_vp8_dec.c hantro_reg_write(vpu, &vp8_dec_bool_value, hdr->coder_state.value); vpu 578 drivers/staging/media/hantro/rk3399_vpu_hw_vp8_dec.c reg = vdpu_read(vpu, VDPU_REG_VP8_DCT_START_BIT); vpu 583 drivers/staging/media/hantro/rk3399_vpu_hw_vp8_dec.c vdpu_write_relaxed(vpu, reg, VDPU_REG_VP8_DCT_START_BIT); vpu 594 drivers/staging/media/hantro/rk3399_vpu_hw_vp8_dec.c hantro_reg_write(vpu, &vp8_dec_start_dec, 1); vpu 261 include/uapi/drm/radeon_drm.h } vpu;