media: hantro: Rename {prepare,finish}_run to {start,end}_prepare_run
authorEzequiel Garcia <ezequiel@collabora.com>
Thu, 5 Dec 2019 14:24:42 +0000 (15:24 +0100)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Mon, 16 Dec 2019 09:26:12 +0000 (10:26 +0100)
hantro_prepare_run() and hantro_finish_run() are
slightly misleading, so let's rename it to something
a bit more clear.

Signed-off-by: Ezequiel Garcia <ezequiel@collabora.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
drivers/staging/media/hantro/hantro_drv.c
drivers/staging/media/hantro/hantro_g1_h264_dec.c
drivers/staging/media/hantro/hantro_g1_mpeg2_dec.c
drivers/staging/media/hantro/hantro_g1_vp8_dec.c
drivers/staging/media/hantro/hantro_h1_jpeg_enc.c
drivers/staging/media/hantro/hantro_h264.c
drivers/staging/media/hantro/hantro_hw.h
drivers/staging/media/hantro/rk3399_vpu_hw_jpeg_enc.c
drivers/staging/media/hantro/rk3399_vpu_hw_mpeg2_dec.c
drivers/staging/media/hantro/rk3399_vpu_hw_vp8_dec.c

index 26108c96b674bfbdce793f606670150b43b9818a..974ac0a11dd181b22bc9d25fce646ffd28672fce 100644 (file)
@@ -152,7 +152,7 @@ void hantro_watchdog(struct work_struct *work)
        }
 }
 
-void hantro_prepare_run(struct hantro_ctx *ctx)
+void hantro_start_prepare_run(struct hantro_ctx *ctx)
 {
        struct vb2_v4l2_buffer *src_buf;
 
@@ -161,7 +161,7 @@ void hantro_prepare_run(struct hantro_ctx *ctx)
                                &ctx->ctrl_handler);
 }
 
-void hantro_finish_run(struct hantro_ctx *ctx)
+void hantro_end_prepare_run(struct hantro_ctx *ctx)
 {
        struct vb2_v4l2_buffer *src_buf;
 
index 3cd40a8f0daa08080fc179a2cb8d812dc8b0dd7e..887dc521044781ed8568efb34fcfad8ad74d2585 100644 (file)
@@ -288,7 +288,7 @@ void hantro_g1_h264_dec_run(struct hantro_ctx *ctx)
        set_ref(ctx);
        set_buffers(ctx);
 
-       hantro_finish_run(ctx);
+       hantro_end_prepare_run(ctx);
 
        /* Start decoding! */
        vdpu_write_relaxed(vpu,
index f3bf67d8a289a2e6141e0446848f602226460a35..d6dde70f20b413e48de5df31b02488189825501d 100644 (file)
@@ -168,7 +168,7 @@ void hantro_g1_mpeg2_dec_run(struct hantro_ctx *ctx)
        dst_buf = hantro_get_dst_buf(ctx);
 
        /* Apply request controls if any */
-       hantro_prepare_run(ctx);
+       hantro_start_prepare_run(ctx);
 
        slice_params = hantro_get_ctrl(ctx,
                                       V4L2_CID_MPEG_VIDEO_MPEG2_SLICE_PARAMS);
@@ -244,7 +244,7 @@ void hantro_g1_mpeg2_dec_run(struct hantro_ctx *ctx)
                                        &dst_buf->vb2_buf,
                                        sequence, picture, slice_params);
 
-       hantro_finish_run(ctx);
+       hantro_end_prepare_run(ctx);
 
        reg = G1_REG_DEC_E(1);
        vdpu_write(vpu, reg, G1_SWREG(1));
index cad18094fee0298fa186d41309935c1ec7bef151..a2333d35305de2e7439f29082ae62387d5ff4d68 100644 (file)
@@ -435,7 +435,7 @@ void hantro_g1_vp8_dec_run(struct hantro_ctx *ctx)
        u32 mb_width, mb_height;
        u32 reg;
 
-       hantro_prepare_run(ctx);
+       hantro_start_prepare_run(ctx);
 
        hdr = hantro_get_ctrl(ctx, V4L2_CID_MPEG_VIDEO_VP8_FRAME_HEADER);
        if (WARN_ON(!hdr))
@@ -496,7 +496,7 @@ void hantro_g1_vp8_dec_run(struct hantro_ctx *ctx)
        cfg_ref(ctx, hdr);
        cfg_buffers(ctx, hdr);
 
-       hantro_finish_run(ctx);
+       hantro_end_prepare_run(ctx);
 
        vdpu_write(vpu, G1_REG_INTERRUPT_DEC_E, G1_REG_INTERRUPT);
 }
index 938b48d4d3d9044167938d96b80f6502fac53e92..0d8afc3e5d711dd563af67d24fe1cf4913ad3c9e 100644 (file)
@@ -87,7 +87,7 @@ void hantro_h1_jpeg_enc_run(struct hantro_ctx *ctx)
        src_buf = hantro_get_src_buf(ctx);
        dst_buf = hantro_get_dst_buf(ctx);
 
-       hantro_prepare_run(ctx);
+       hantro_start_prepare_run(ctx);
 
        memset(&jpeg_ctx, 0, sizeof(jpeg_ctx));
        jpeg_ctx.buffer = vb2_plane_vaddr(&dst_buf->vb2_buf, 0);
@@ -122,7 +122,7 @@ void hantro_h1_jpeg_enc_run(struct hantro_ctx *ctx)
                | H1_REG_ENC_PIC_INTRA
                | H1_REG_ENC_CTRL_EN_BIT;
 
-       hantro_finish_run(ctx);
+       hantro_end_prepare_run(ctx);
 
        vepu_write(vpu, reg, H1_REG_ENC_CTRL);
 }
index 568640eab3a6dd7c51e3a145c75a130fa8c21b75..f2d3e81fb6ce8ef6ff20d19042ffd0e1bd28b8d8 100644 (file)
@@ -562,7 +562,7 @@ int hantro_h264_dec_prepare_run(struct hantro_ctx *ctx)
        struct hantro_h264_dec_ctrls *ctrls = &h264_ctx->ctrls;
        struct hantro_h264_reflist_builder reflist_builder;
 
-       hantro_prepare_run(ctx);
+       hantro_start_prepare_run(ctx);
 
        ctrls->scaling =
                hantro_get_ctrl(ctx, V4L2_CID_MPEG_VIDEO_H264_SCALING_MATRIX);
index fa91dd1848b71258d042fa41c27c1403890ac409..71de44bdb1e425668aaa12f3ed310c8408071b2d 100644 (file)
@@ -147,8 +147,8 @@ void hantro_watchdog(struct work_struct *work);
 void hantro_run(struct hantro_ctx *ctx);
 void hantro_irq_done(struct hantro_dev *vpu, unsigned int bytesused,
                     enum vb2_buffer_state result);
-void hantro_prepare_run(struct hantro_ctx *ctx);
-void hantro_finish_run(struct hantro_ctx *ctx);
+void hantro_start_prepare_run(struct hantro_ctx *ctx);
+void hantro_end_prepare_run(struct hantro_ctx *ctx);
 
 void hantro_h1_jpeg_enc_run(struct hantro_ctx *ctx);
 void rk3399_vpu_jpeg_enc_run(struct hantro_ctx *ctx);
index 067892345b5d071b020a3bcc3e7e33e0d52898c1..4c2d43fb6fd14019361ba6dc8673697accc74207 100644 (file)
@@ -118,7 +118,7 @@ void rk3399_vpu_jpeg_enc_run(struct hantro_ctx *ctx)
        src_buf = hantro_get_src_buf(ctx);
        dst_buf = hantro_get_dst_buf(ctx);
 
-       hantro_prepare_run(ctx);
+       hantro_start_prepare_run(ctx);
 
        memset(&jpeg_ctx, 0, sizeof(jpeg_ctx));
        jpeg_ctx.buffer = vb2_plane_vaddr(&dst_buf->vb2_buf, 0);
@@ -156,6 +156,6 @@ void rk3399_vpu_jpeg_enc_run(struct hantro_ctx *ctx)
                | VEPU_REG_ENCODE_ENABLE;
 
        /* Kick the watchdog and start encoding */
-       hantro_finish_run(ctx);
+       hantro_end_prepare_run(ctx);
        vepu_write(vpu, reg, VEPU_REG_ENCODE_START);
 }
index b40d2cdf832f181d6410f0e4577760661801c344..7e9aad67148963c5dc36f472bc7890005d5db808 100644 (file)
@@ -169,7 +169,7 @@ void rk3399_vpu_mpeg2_dec_run(struct hantro_ctx *ctx)
        src_buf = hantro_get_src_buf(ctx);
        dst_buf = hantro_get_dst_buf(ctx);
 
-       hantro_prepare_run(ctx);
+       hantro_start_prepare_run(ctx);
 
        slice_params = hantro_get_ctrl(ctx,
                                       V4L2_CID_MPEG_VIDEO_MPEG2_SLICE_PARAMS);
@@ -250,7 +250,7 @@ void rk3399_vpu_mpeg2_dec_run(struct hantro_ctx *ctx)
                                         sequence, picture, slice_params);
 
        /* Kick the watchdog and start decoding */
-       hantro_finish_run(ctx);
+       hantro_end_prepare_run(ctx);
 
        reg = vdpu_read(vpu, VDPU_SWREG(57)) | VDPU_REG_DEC_E(1);
        vdpu_write(vpu, reg, VDPU_SWREG(57));
index 76d7ed3fd69ae742161af11a63a3fa289510ffd5..a4a792f00b11162132e8f34942493ce3da86e7f6 100644 (file)
@@ -513,7 +513,7 @@ void rk3399_vpu_vp8_dec_run(struct hantro_ctx *ctx)
        u32 mb_width, mb_height;
        u32 reg;
 
-       hantro_prepare_run(ctx);
+       hantro_start_prepare_run(ctx);
 
        hdr = hantro_get_ctrl(ctx, V4L2_CID_MPEG_VIDEO_VP8_FRAME_HEADER);
        if (WARN_ON(!hdr))
@@ -587,7 +587,7 @@ void rk3399_vpu_vp8_dec_run(struct hantro_ctx *ctx)
        cfg_ref(ctx, hdr);
        cfg_buffers(ctx, hdr);
 
-       hantro_finish_run(ctx);
+       hantro_end_prepare_run(ctx);
 
        hantro_reg_write(vpu, &vp8_dec_start_dec, 1);
 }