linux-imx/drivers/mxc/ipu3/vdoa.h
Liu Ying 430015db3d mxc: IPU3: Forward IPUv3 common driver from imx_4.19.y kernel
This patch forwards IPUv3 common driver from imx_4.19.y kernel.
This includs IPUv3 common, IPUv3 prefetch engine and VDOA support.

Reviewed-by: Sandor Yu <Sandor.yu@nxp.com>
Signed-off-by: Liu Ying <victor.liu@nxp.com>
[ Aisheng: squash legacy patches ]
Signed-off-by: Dong Aisheng <aisheng.dong@nxp.com>
[ Liu Ying: Use platform_get_irq() to get vdoa irq, not platform_get_resource() ]
[ Liu Ying: Check bypass_reset to do internal reset in ipu_probe() ]
Signed-off-by: Liu Ying <victor.liu@nxp.com>
[ Liu Ying: Set ipu->online to false if device_reset() fails ]
Signed-off-by: Liu Ying <victor.liu@nxp.com>
[ Liu Ying: Call dev_err_probe() if device_reset() fails in ipu_probe() ]
Signed-off-by: Liu Ying <victor.liu@nxp.com>
[ Robby Cai: Update class_create() api ]
Signed-off-by: Robby Cai <robby.cai@nxp.com>
2023-10-30 15:56:26 +08:00

63 lines
1.3 KiB
C

/*
* Copyright (C) 2012-2015 Freescale Semiconductor, Inc. All Rights Reserved.
*
* The code contained herein is licensed under the GNU General Public
* License. You may obtain a copy of the GNU General Public License
* Version 2 or later at the following locations:
*
* http://www.opensource.org/licenses/gpl-license.html
* http://www.gnu.org/copyleft/gpl.html
*/
#ifndef __VDOA_H__
#define __VDOA_H__
#define VDOA_PFS_YUYV (1)
#define VDOA_PFS_NV12 (0)
struct vfield_buf {
u32 prev_veba;
u32 cur_veba;
u32 next_veba;
u32 vubo;
};
struct vframe_buf {
u32 veba;
u32 vubo;
};
struct vdoa_params {
u32 width;
u32 height;
int vpu_stride;
int interlaced;
int scan_order;
int ipu_num;
int band_lines;
int band_mode;
int pfs;
u32 ieba0;
u32 ieba1;
u32 ieba2;
struct vframe_buf vframe_buf;
struct vfield_buf vfield_buf;
};
struct vdoa_ipu_buf {
u32 ieba0;
u32 ieba1;
u32 iubo;
};
struct vdoa_info;
typedef void *vdoa_handle_t;
int vdoa_setup(vdoa_handle_t handle, struct vdoa_params *params);
void vdoa_get_output_buf(vdoa_handle_t handle, struct vdoa_ipu_buf *buf);
int vdoa_start(vdoa_handle_t handle, int timeout_ms);
void vdoa_stop(vdoa_handle_t handle);
void vdoa_get_handle(vdoa_handle_t *handle);
void vdoa_put_handle(vdoa_handle_t *handle);
#endif