Commit 3143f8a1 authored by Ezequiel Garcia's avatar Ezequiel Garcia Committed by Mauro Carvalho Chehab
Browse files

media: hantro: Rename {prepare,finish}_run to {start,end}_prepare_run



hantro_prepare_run() and hantro_finish_run() are
slightly misleading, so let's rename it to something
a bit more clear.

Signed-off-by: default avatarEzequiel Garcia <ezequiel@collabora.com>
Signed-off-by: default avatarHans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+huawei@kernel.org>
parent 5980d402
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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;

+1 −1
Original line number Diff line number Diff line
@@ -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,
+2 −2
Original line number Diff line number Diff line
@@ -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));
+2 −2
Original line number Diff line number Diff line
@@ -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);
}
+2 −2
Original line number Diff line number Diff line
@@ -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);
}
Loading