[PATCH 06/72] gpu: ipu-cpmem: Add ipu_cpmem_set_uv_offset()
Steve Longerbeam
steve_longerbeam at mentor.com
Mon Nov 3 14:52:40 PST 2014
On 11/03/2014 04:30 AM, Philipp Zabel wrote:
> Am Freitag, den 31.10.2014, 15:53 -0700 schrieb Steve Longerbeam:
>> Adds ipu_cpmem_set_uv_offset(), to set planar U/V offsets.
>>
>> Signed-off-by: Steve Longerbeam <steve_longerbeam at mentor.com>
>> ---
>> drivers/gpu/ipu-v3/ipu-cpmem.c | 7 +++++++
>> include/video/imx-ipu-v3.h | 1 +
>> 2 files changed, 8 insertions(+)
>>
>> diff --git a/drivers/gpu/ipu-v3/ipu-cpmem.c b/drivers/gpu/ipu-v3/ipu-cpmem.c
>> index 3bf05bc..2c93e9c 100644
>> --- a/drivers/gpu/ipu-v3/ipu-cpmem.c
>> +++ b/drivers/gpu/ipu-v3/ipu-cpmem.c
>> @@ -253,6 +253,13 @@ void ipu_cpmem_set_buffer(struct ipuv3_channel *ch, int bufnum, dma_addr_t buf)
>> }
>> EXPORT_SYMBOL_GPL(ipu_cpmem_set_buffer);
>>
>> +void ipu_cpmem_set_uv_offset(struct ipuv3_channel *ch, u32 u_off, u32 v_off)
>> +{
>> + ipu_ch_param_write_field(ch, IPU_FIELD_UBO, u_off / 8);
>> + ipu_ch_param_write_field(ch, IPU_FIELD_VBO, v_off / 8);
>> +}
>> +EXPORT_SYMBOL_GPL(ipu_cpmem_set_uv_offset);
>> +
>> void ipu_cpmem_interlaced_scan(struct ipuv3_channel *ch, int stride)
>> {
>> ipu_ch_param_write_field(ch, IPU_FIELD_SO, 1);
>> diff --git a/include/video/imx-ipu-v3.h b/include/video/imx-ipu-v3.h
>> index c74bf4a..03cda50 100644
>> --- a/include/video/imx-ipu-v3.h
>> +++ b/include/video/imx-ipu-v3.h
>> @@ -195,6 +195,7 @@ void ipu_cpmem_set_resolution(struct ipuv3_channel *ch, int xres, int yres);
>> void ipu_cpmem_set_stride(struct ipuv3_channel *ch, int stride);
>> void ipu_cpmem_set_high_priority(struct ipuv3_channel *ch);
>> void ipu_cpmem_set_buffer(struct ipuv3_channel *ch, int bufnum, dma_addr_t buf);
>> +void ipu_cpmem_set_uv_offset(struct ipuv3_channel *ch, u32 u_off, u32 v_off);
>> void ipu_cpmem_interlaced_scan(struct ipuv3_channel *ch, int stride);
>> void ipu_cpmem_set_axi_id(struct ipuv3_channel *ch, u32 id);
>> void ipu_cpmem_set_burstsize(struct ipuv3_channel *ch, int burstsize);
> Looks good to me, just where this be used where
> ipu_cpmem_set_yuv_planar_full can not?
It is useful when the U/V offsets are not the "standard" values for
planar formats. For instance for implementing tiling to support
IC output frames larger that 1024x1024. We use this function
in our mem2mem driver to support tiling.
Steve
More information about the dri-devel
mailing list