Commit 9b5833f7 authored by Todor Tomov's avatar Todor Tomov Committed by Mauro Carvalho Chehab

media: camss: vfe: Format conversion support using PIX interface

Use VFE PIX input interface and do format conversion in VFE.

Supported input format is UYVY (single plane YUV 4:2:2) and
its different sample order variations.

Supported output formats are:
- NV12/NV21 (two plane YUV 4:2:0)
- NV16/NV61 (two plane YUV 4:2:2)
Signed-off-by: default avatarTodor Tomov <todor.tomov@linaro.org>
Signed-off-by: default avatarHans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@s-opensource.com>
parent f5c07494
...@@ -1003,6 +1003,8 @@ static enum ispif_intf ispif_get_intf(enum vfe_line_id line_id) ...@@ -1003,6 +1003,8 @@ static enum ispif_intf ispif_get_intf(enum vfe_line_id line_id)
return RDI1; return RDI1;
case (VFE_LINE_RDI2): case (VFE_LINE_RDI2):
return RDI2; return RDI2;
case (VFE_LINE_PIX):
return PIX0;
default: default:
return RDI0; return RDI0;
} }
......
...@@ -30,8 +30,9 @@ ...@@ -30,8 +30,9 @@
#define MSM_VFE_PAD_SRC 1 #define MSM_VFE_PAD_SRC 1
#define MSM_VFE_PADS_NUM 2 #define MSM_VFE_PADS_NUM 2
#define MSM_VFE_LINE_NUM 3 #define MSM_VFE_LINE_NUM 4
#define MSM_VFE_IMAGE_MASTERS_NUM 7 #define MSM_VFE_IMAGE_MASTERS_NUM 7
#define MSM_VFE_COMPOSITE_IRQ_NUM 4
#define MSM_VFE_VFE0_UB_SIZE 1023 #define MSM_VFE_VFE0_UB_SIZE 1023
#define MSM_VFE_VFE0_UB_SIZE_RDI (MSM_VFE_VFE0_UB_SIZE / 3) #define MSM_VFE_VFE0_UB_SIZE_RDI (MSM_VFE_VFE0_UB_SIZE / 3)
...@@ -51,11 +52,13 @@ enum vfe_line_id { ...@@ -51,11 +52,13 @@ enum vfe_line_id {
VFE_LINE_NONE = -1, VFE_LINE_NONE = -1,
VFE_LINE_RDI0 = 0, VFE_LINE_RDI0 = 0,
VFE_LINE_RDI1 = 1, VFE_LINE_RDI1 = 1,
VFE_LINE_RDI2 = 2 VFE_LINE_RDI2 = 2,
VFE_LINE_PIX = 3
}; };
struct vfe_output { struct vfe_output {
u8 wm_idx; u8 wm_num;
u8 wm_idx[3];
int active_buf; int active_buf;
struct camss_buffer *buf[2]; struct camss_buffer *buf[2];
...@@ -66,6 +69,10 @@ struct vfe_output { ...@@ -66,6 +69,10 @@ struct vfe_output {
enum vfe_output_state state; enum vfe_output_state state;
unsigned int sequence; unsigned int sequence;
int wait_sof;
int wait_reg_update;
struct completion sof;
struct completion reg_update;
}; };
struct vfe_line { struct vfe_line {
......
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
struct camss_buffer { struct camss_buffer {
struct vb2_v4l2_buffer vb; struct vb2_v4l2_buffer vb;
dma_addr_t addr; dma_addr_t addr[3];
struct list_head queue; struct list_head queue;
}; };
...@@ -41,6 +41,8 @@ struct camss_video_ops { ...@@ -41,6 +41,8 @@ struct camss_video_ops {
enum vb2_buffer_state state); enum vb2_buffer_state state);
}; };
struct camss_format_info;
struct camss_video { struct camss_video {
struct camss *camss; struct camss *camss;
struct vb2_queue vb2_q; struct vb2_queue vb2_q;
...@@ -52,12 +54,14 @@ struct camss_video { ...@@ -52,12 +54,14 @@ struct camss_video {
const struct camss_video_ops *ops; const struct camss_video_ops *ops;
struct mutex lock; struct mutex lock;
struct mutex q_lock; struct mutex q_lock;
const struct camss_format_info *formats;
unsigned int nformats;
}; };
void msm_video_stop_streaming(struct camss_video *video); void msm_video_stop_streaming(struct camss_video *video);
int msm_video_register(struct camss_video *video, struct v4l2_device *v4l2_dev, int msm_video_register(struct camss_video *video, struct v4l2_device *v4l2_dev,
const char *name); const char *name, int is_pix);
void msm_video_unregister(struct camss_video *video); void msm_video_unregister(struct camss_video *video);
......
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