Commit 9f2b94b1 authored by Laurent Pinchart's avatar Laurent Pinchart Committed by Mauro Carvalho Chehab

media: ti-vpe: cal: Create consistent naming for context functions

Rename all functions related to contexts with a cal_ctx_ prefix to
increase readability.
Signed-off-by: default avatarLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: default avatarTomi Valkeinen <tomi.valkeinen@ti.com>
Reviewed-by: default avatarBenoit Parrot <bparrot@ti.com>
Signed-off-by: default avatarHans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+huawei@kernel.org>
parent f3ca1f9d
...@@ -1007,7 +1007,12 @@ static struct regmap *cal_get_camerarx_regmap(struct cal_dev *cal) ...@@ -1007,7 +1007,12 @@ static struct regmap *cal_get_camerarx_regmap(struct cal_dev *cal)
return regmap; return regmap;
} }
static void csi2_ctx_config(struct cal_ctx *ctx) /* ------------------------------------------------------------------
* Context Management
* ------------------------------------------------------------------
*/
static void cal_ctx_csi2_config(struct cal_ctx *ctx)
{ {
u32 val; u32 val;
...@@ -1033,7 +1038,7 @@ static void csi2_ctx_config(struct cal_ctx *ctx) ...@@ -1033,7 +1038,7 @@ static void csi2_ctx_config(struct cal_ctx *ctx)
reg_read(ctx->cal, CAL_CSI2_CTX0(ctx->csi2_port))); reg_read(ctx->cal, CAL_CSI2_CTX0(ctx->csi2_port)));
} }
static void pix_proc_config(struct cal_ctx *ctx) static void cal_ctx_pix_proc_config(struct cal_ctx *ctx)
{ {
u32 val, extract, pack; u32 val, extract, pack;
...@@ -1084,7 +1089,7 @@ static void pix_proc_config(struct cal_ctx *ctx) ...@@ -1084,7 +1089,7 @@ static void pix_proc_config(struct cal_ctx *ctx)
reg_read(ctx->cal, CAL_PIX_PROC(ctx->csi2_port))); reg_read(ctx->cal, CAL_PIX_PROC(ctx->csi2_port)));
} }
static void cal_wr_dma_config(struct cal_ctx *ctx, static void cal_ctx_wr_dma_config(struct cal_ctx *ctx,
unsigned int width, unsigned int height) unsigned int width, unsigned int height)
{ {
u32 val; u32 val;
...@@ -1138,7 +1143,7 @@ static void cal_wr_dma_config(struct cal_ctx *ctx, ...@@ -1138,7 +1143,7 @@ static void cal_wr_dma_config(struct cal_ctx *ctx,
ctx_dbg(3, ctx, "CAL_CTRL = 0x%08x\n", reg_read(ctx->cal, CAL_CTRL)); ctx_dbg(3, ctx, "CAL_CTRL = 0x%08x\n", reg_read(ctx->cal, CAL_CTRL));
} }
static void cal_wr_dma_addr(struct cal_ctx *ctx, unsigned int dmaaddr) static void cal_ctx_wr_dma_addr(struct cal_ctx *ctx, unsigned int dmaaddr)
{ {
reg_write(ctx->cal, CAL_WR_DMA_ADDR(ctx->csi2_port), dmaaddr); reg_write(ctx->cal, CAL_WR_DMA_ADDR(ctx->csi2_port), dmaaddr);
} }
...@@ -1154,7 +1159,7 @@ static inline void cal_schedule_next_buffer(struct cal_ctx *ctx) ...@@ -1154,7 +1159,7 @@ static inline void cal_schedule_next_buffer(struct cal_ctx *ctx)
list_del(&buf->list); list_del(&buf->list);
addr = vb2_dma_contig_plane_dma_addr(&buf->vb.vb2_buf, 0); addr = vb2_dma_contig_plane_dma_addr(&buf->vb.vb2_buf, 0);
cal_wr_dma_addr(ctx, addr); cal_ctx_wr_dma_addr(ctx, addr);
} }
static inline void cal_process_buffer_complete(struct cal_ctx *ctx) static inline void cal_process_buffer_complete(struct cal_ctx *ctx)
...@@ -1662,9 +1667,9 @@ static int cal_start_streaming(struct vb2_queue *vq, unsigned int count) ...@@ -1662,9 +1667,9 @@ static int cal_start_streaming(struct vb2_queue *vq, unsigned int count)
pm_runtime_get_sync(&ctx->cal->pdev->dev); pm_runtime_get_sync(&ctx->cal->pdev->dev);
csi2_ctx_config(ctx); cal_ctx_csi2_config(ctx);
pix_proc_config(ctx); cal_ctx_pix_proc_config(ctx);
cal_wr_dma_config(ctx, ctx->v_fmt.fmt.pix.bytesperline, cal_ctx_wr_dma_config(ctx, ctx->v_fmt.fmt.pix.bytesperline,
ctx->v_fmt.fmt.pix.height); ctx->v_fmt.fmt.pix.height);
cal_camerarx_lane_config(ctx->phy); cal_camerarx_lane_config(ctx->phy);
...@@ -1680,7 +1685,7 @@ static int cal_start_streaming(struct vb2_queue *vq, unsigned int count) ...@@ -1680,7 +1685,7 @@ static int cal_start_streaming(struct vb2_queue *vq, unsigned int count)
} }
cal_camerarx_wait_ready(ctx->phy); cal_camerarx_wait_ready(ctx->phy);
cal_wr_dma_addr(ctx, addr); cal_ctx_wr_dma_addr(ctx, addr);
cal_camerarx_ppi_enable(ctx->phy); cal_camerarx_ppi_enable(ctx->phy);
if (debug >= 4) if (debug >= 4)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment