Skip to content

Commit e5e8690

Browse files
slongerbeampH5
authored andcommitted
gpu: ipu-cpmem: Add ipu_cpmem_set_uv_offset()
Adds ipu_cpmem_set_uv_offset(), to set planar U/V offsets. Signed-off-by: Steve Longerbeam <steve_longerbeam@mentor.com> Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
1 parent 8892cc8 commit e5e8690

2 files changed

Lines changed: 8 additions & 0 deletions

File tree

‎drivers/gpu/ipu-v3/ipu-cpmem.c‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -253,6 +253,13 @@ void ipu_cpmem_set_buffer(struct ipuv3_channel *ch, int bufnum, dma_addr_t buf)
253253
}
254254
EXPORT_SYMBOL_GPL(ipu_cpmem_set_buffer);
255255

256+
void ipu_cpmem_set_uv_offset(struct ipuv3_channel *ch, u32 u_off, u32 v_off)
257+
{
258+
ipu_ch_param_write_field(ch, IPU_FIELD_UBO, u_off / 8);
259+
ipu_ch_param_write_field(ch, IPU_FIELD_VBO, v_off / 8);
260+
}
261+
EXPORT_SYMBOL_GPL(ipu_cpmem_set_uv_offset);
262+
256263
void ipu_cpmem_interlaced_scan(struct ipuv3_channel *ch, int stride)
257264
{
258265
ipu_ch_param_write_field(ch, IPU_FIELD_SO, 1);

‎include/video/imx-ipu-v3.h‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,7 @@ void ipu_cpmem_set_resolution(struct ipuv3_channel *ch, int xres, int yres);
184184
void ipu_cpmem_set_stride(struct ipuv3_channel *ch, int stride);
185185
void ipu_cpmem_set_high_priority(struct ipuv3_channel *ch);
186186
void ipu_cpmem_set_buffer(struct ipuv3_channel *ch, int bufnum, dma_addr_t buf);
187+
void ipu_cpmem_set_uv_offset(struct ipuv3_channel *ch, u32 u_off, u32 v_off);
187188
void ipu_cpmem_interlaced_scan(struct ipuv3_channel *ch, int stride);
188189
void ipu_cpmem_set_axi_id(struct ipuv3_channel *ch, u32 id);
189190
void ipu_cpmem_set_burstsize(struct ipuv3_channel *ch, int burstsize);

0 commit comments

Comments
 (0)