summaryrefslogtreecommitdiff
path: root/drivers/media/platform/mtk-vcodec/vdec_vpu_if.c
diff options
context:
space:
mode:
authorAlexandre Courbot <acourbot@chromium.org>2019-09-06 08:55:02 -0300
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>2019-10-01 16:45:25 -0300
commit2abb4db289d757cddf2bf8aae34be65bad653bb7 (patch)
treee41374e8da840101df8cebfed41fe3b51f633369 /drivers/media/platform/mtk-vcodec/vdec_vpu_if.c
parentdda8415e17c99ad3d6ac56d8aa722198f816fc74 (diff)
media: mtk-vcodec: vdec: set VPI IPI handler in one place
Each of the supported decoder formats used to set the same RPC interrupt handler by themselves, even though this could be done by the IF init function itself. Move it to the right place and stop making its symbol public. Signed-off-by: Alexandre Courbot <acourbot@chromium.org> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Diffstat (limited to 'drivers/media/platform/mtk-vcodec/vdec_vpu_if.c')
-rw-r--r--drivers/media/platform/mtk-vcodec/vdec_vpu_if.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/media/platform/mtk-vcodec/vdec_vpu_if.c b/drivers/media/platform/mtk-vcodec/vdec_vpu_if.c
index 3f38cc4509ef..70abfd4cd4b9 100644
--- a/drivers/media/platform/mtk-vcodec/vdec_vpu_if.c
+++ b/drivers/media/platform/mtk-vcodec/vdec_vpu_if.c
@@ -25,10 +25,16 @@ static void handle_init_ack_msg(struct vdec_vpu_ipi_init_ack *msg)
}
/*
+ * vpu_dec_ipi_handler - Handler for VPU ipi message.
+ *
+ * @data: ipi message
+ * @len : length of ipi message
+ * @priv: callback private data which is passed by decoder when register.
+ *
* This function runs in interrupt context and it means there's an IPI MSG
* from VPU.
*/
-void vpu_dec_ipi_handler(void *data, unsigned int len, void *priv)
+static void vpu_dec_ipi_handler(void *data, unsigned int len, void *priv)
{
struct vdec_vpu_ipi_ack *msg = data;
struct vdec_vpu_inst *vpu = (struct vdec_vpu_inst *)
@@ -102,6 +108,7 @@ int vpu_dec_init(struct vdec_vpu_inst *vpu)
mtk_vcodec_debug_enter(vpu);
init_waitqueue_head(&vpu->wq);
+ vpu->handler = vpu_dec_ipi_handler;
err = vpu_ipi_register(vpu->dev, vpu->id, vpu->handler, "vdec", NULL);
if (err != 0) {