Commit 4e1abf66 authored by Todor Tomov's avatar Todor Tomov Committed by Mauro Carvalho Chehab

media: camss: vfe: Add support for 8x96

Add VFE hardware dependent part for 8x96.
Signed-off-by: default avatarTodor Tomov <todor.tomov@linaro.org>
Signed-off-by: default avatarHans Verkuil <hansverk@cisco.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+samsung@kernel.org>
parent 051a01ac
...@@ -8,6 +8,7 @@ qcom-camss-objs += \ ...@@ -8,6 +8,7 @@ qcom-camss-objs += \
camss-csiphy.o \ camss-csiphy.o \
camss-ispif.o \ camss-ispif.o \
camss-vfe-4-1.o \ camss-vfe-4-1.o \
camss-vfe-4-7.o \
camss-vfe.o \ camss-vfe.o \
camss-video.o \ camss-video.o \
......
...@@ -789,6 +789,11 @@ static void vfe_set_qos(struct vfe_device *vfe) ...@@ -789,6 +789,11 @@ static void vfe_set_qos(struct vfe_device *vfe)
writel_relaxed(val7, vfe->base + VFE_0_BUS_BDG_QOS_CFG_7); writel_relaxed(val7, vfe->base + VFE_0_BUS_BDG_QOS_CFG_7);
} }
static void vfe_set_ds(struct vfe_device *vfe)
{
/* empty */
}
static void vfe_set_cgc_override(struct vfe_device *vfe, u8 wm, u8 enable) static void vfe_set_cgc_override(struct vfe_device *vfe, u8 wm, u8 enable)
{ {
u32 val = VFE_0_CGC_OVERRIDE_1_IMAGE_Mx_CGC_OVERRIDE(wm); u32 val = VFE_0_CGC_OVERRIDE_1_IMAGE_Mx_CGC_OVERRIDE(wm);
...@@ -995,6 +1000,7 @@ const struct vfe_hw_ops vfe_ops_4_1 = { ...@@ -995,6 +1000,7 @@ const struct vfe_hw_ops vfe_ops_4_1 = {
.set_crop_cfg = vfe_set_crop_cfg, .set_crop_cfg = vfe_set_crop_cfg,
.set_clamp_cfg = vfe_set_clamp_cfg, .set_clamp_cfg = vfe_set_clamp_cfg,
.set_qos = vfe_set_qos, .set_qos = vfe_set_qos,
.set_ds = vfe_set_ds,
.set_cgc_override = vfe_set_cgc_override, .set_cgc_override = vfe_set_cgc_override,
.set_camif_cfg = vfe_set_camif_cfg, .set_camif_cfg = vfe_set_camif_cfg,
.set_camif_cmd = vfe_set_camif_cmd, .set_camif_cmd = vfe_set_camif_cmd,
......
This diff is collapsed.
...@@ -691,6 +691,8 @@ static int vfe_enable(struct vfe_line *line) ...@@ -691,6 +691,8 @@ static int vfe_enable(struct vfe_line *line)
vfe->ops->bus_enable_wr_if(vfe, 1); vfe->ops->bus_enable_wr_if(vfe, 1);
vfe->ops->set_qos(vfe); vfe->ops->set_qos(vfe);
vfe->ops->set_ds(vfe);
} }
vfe->stream_count++; vfe->stream_count++;
...@@ -1855,6 +1857,8 @@ int msm_vfe_subdev_init(struct camss *camss, struct vfe_device *vfe, ...@@ -1855,6 +1857,8 @@ int msm_vfe_subdev_init(struct camss *camss, struct vfe_device *vfe,
if (camss->version == CAMSS_8x16) if (camss->version == CAMSS_8x16)
vfe->ops = &vfe_ops_4_1; vfe->ops = &vfe_ops_4_1;
else if (camss->version == CAMSS_8x96)
vfe->ops = &vfe_ops_4_7;
else else
return -EINVAL; return -EINVAL;
......
...@@ -118,6 +118,7 @@ struct vfe_hw_ops { ...@@ -118,6 +118,7 @@ struct vfe_hw_ops {
void (*set_crop_cfg)(struct vfe_device *vfe, struct vfe_line *line); void (*set_crop_cfg)(struct vfe_device *vfe, struct vfe_line *line);
void (*set_clamp_cfg)(struct vfe_device *vfe); void (*set_clamp_cfg)(struct vfe_device *vfe);
void (*set_qos)(struct vfe_device *vfe); void (*set_qos)(struct vfe_device *vfe);
void (*set_ds)(struct vfe_device *vfe);
void (*set_cgc_override)(struct vfe_device *vfe, u8 wm, u8 enable); void (*set_cgc_override)(struct vfe_device *vfe, u8 wm, u8 enable);
void (*set_camif_cfg)(struct vfe_device *vfe, struct vfe_line *line); void (*set_camif_cfg)(struct vfe_device *vfe, struct vfe_line *line);
void (*set_camif_cmd)(struct vfe_device *vfe, u8 enable); void (*set_camif_cmd)(struct vfe_device *vfe, u8 enable);
...@@ -176,5 +177,6 @@ void msm_vfe_get_vfe_line_id(struct media_entity *entity, enum vfe_line_id *id); ...@@ -176,5 +177,6 @@ void msm_vfe_get_vfe_line_id(struct media_entity *entity, enum vfe_line_id *id);
void msm_vfe_stop_streaming(struct vfe_device *vfe); void msm_vfe_stop_streaming(struct vfe_device *vfe);
extern const struct vfe_hw_ops vfe_ops_4_1; extern const struct vfe_hw_ops vfe_ops_4_1;
extern const struct vfe_hw_ops vfe_ops_4_7;
#endif /* QC_MSM_CAMSS_VFE_H */ #endif /* QC_MSM_CAMSS_VFE_H */
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