.link_validate = v4l2_subdev_link_validate,
};
-static int vfe_bpl_align(struct vfe_device *vfe)
+static int vfe_bpl_align_rdi(struct vfe_device *vfe)
{
int ret = 8;
return ret;
}
+static int vfe_bpl_align_pix(struct vfe_device *vfe)
+{
+ int ret = 16;
+
+ switch (vfe->camss->res->version) {
+ case CAMSS_2290:
+ /* The alignment/bpl depends solely on the pixel format and is
+ * computed dynamically in camss_format_get_bpl_alignment().
+ */
+ ret = 0;
+ break;
+ default:
+ break;
+ }
+
+ return ret;
+}
+
/*
* msm_vfe_register_entities - Register subdev node for VFE module
* @vfe: VFE device
}
video_out->ops = &vfe->video_ops;
- video_out->bpl_alignment = vfe_bpl_align(vfe);
- video_out->line_based = 0;
if (i == VFE_LINE_PIX) {
- video_out->bpl_alignment = 16;
+ video_out->bpl_alignment = vfe_bpl_align_pix(vfe);
video_out->line_based = 1;
+ } else {
+ video_out->bpl_alignment = vfe_bpl_align_rdi(vfe);
+ video_out->line_based = 0;
}
video_out->nformats = vfe->line[i].nformats;