Lines Matching refs:vpu
13 static inline struct mtk_mdp_ctx *vpu_to_ctx(struct mtk_mdp_vpu *vpu) in vpu_to_ctx() argument
15 return container_of(vpu, struct mtk_mdp_ctx, vpu); in vpu_to_ctx()
20 struct mtk_mdp_vpu *vpu = (struct mtk_mdp_vpu *) in mtk_mdp_vpu_handle_init_ack() local
24 vpu->vsi = (struct mdp_process_vsi *) in mtk_mdp_vpu_handle_init_ack()
25 vpu_mapping_dm_addr(vpu->pdev, msg->vpu_inst_addr); in mtk_mdp_vpu_handle_init_ack()
26 vpu->inst_addr = msg->vpu_inst_addr; in mtk_mdp_vpu_handle_init_ack()
33 struct mtk_mdp_vpu *vpu = (struct mtk_mdp_vpu *) in mtk_mdp_vpu_ipi_handler() local
37 vpu->failure = msg->status; in mtk_mdp_vpu_ipi_handler()
38 if (!vpu->failure) { in mtk_mdp_vpu_ipi_handler()
47 ctx = vpu_to_ctx(vpu); in mtk_mdp_vpu_ipi_handler()
54 ctx = vpu_to_ctx(vpu); in mtk_mdp_vpu_ipi_handler()
56 msg_id, vpu->failure); in mtk_mdp_vpu_ipi_handler()
74 static int mtk_mdp_vpu_send_msg(void *msg, int len, struct mtk_mdp_vpu *vpu, in mtk_mdp_vpu_send_msg() argument
77 struct mtk_mdp_ctx *ctx = vpu_to_ctx(vpu); in mtk_mdp_vpu_send_msg()
80 if (!vpu->pdev) { in mtk_mdp_vpu_send_msg()
86 err = vpu_ipi_send(vpu->pdev, (enum ipi_id)id, msg, len); in mtk_mdp_vpu_send_msg()
95 static int mtk_mdp_vpu_send_ap_ipi(struct mtk_mdp_vpu *vpu, uint32_t msg_id) in mtk_mdp_vpu_send_ap_ipi() argument
102 msg.vpu_inst_addr = vpu->inst_addr; in mtk_mdp_vpu_send_ap_ipi()
103 msg.ap_inst = (unsigned long)vpu; in mtk_mdp_vpu_send_ap_ipi()
104 err = mtk_mdp_vpu_send_msg((void *)&msg, sizeof(msg), vpu, IPI_MDP); in mtk_mdp_vpu_send_ap_ipi()
105 if (!err && vpu->failure) in mtk_mdp_vpu_send_ap_ipi()
111 int mtk_mdp_vpu_init(struct mtk_mdp_vpu *vpu) in mtk_mdp_vpu_init() argument
115 struct mtk_mdp_ctx *ctx = vpu_to_ctx(vpu); in mtk_mdp_vpu_init()
117 vpu->pdev = ctx->mdp_dev->vpu_dev; in mtk_mdp_vpu_init()
121 msg.ap_inst = (unsigned long)vpu; in mtk_mdp_vpu_init()
122 err = mtk_mdp_vpu_send_msg((void *)&msg, sizeof(msg), vpu, IPI_MDP); in mtk_mdp_vpu_init()
123 if (!err && vpu->failure) in mtk_mdp_vpu_init()
129 int mtk_mdp_vpu_deinit(struct mtk_mdp_vpu *vpu) in mtk_mdp_vpu_deinit() argument
131 return mtk_mdp_vpu_send_ap_ipi(vpu, AP_MDP_DEINIT); in mtk_mdp_vpu_deinit()
134 int mtk_mdp_vpu_process(struct mtk_mdp_vpu *vpu) in mtk_mdp_vpu_process() argument
136 return mtk_mdp_vpu_send_ap_ipi(vpu, AP_MDP_PROCESS); in mtk_mdp_vpu_process()