#include "rcar_du_kms.h"
 #include "rcar_du_vsp.h"
 
-static void rcar_du_vsp_complete(void *private, bool completed)
+static void rcar_du_vsp_complete(void *private, bool completed, u32 crc)
 {
        struct rcar_du_crtc *crtc = private;
 
 
 void rcar_du_vsp_atomic_flush(struct rcar_du_crtc *crtc)
 {
-       vsp1_du_atomic_flush(crtc->vsp->vsp, crtc->vsp_pipe);
+       struct vsp1_du_atomic_pipe_config cfg = { { 0, } };
+
+       vsp1_du_atomic_flush(crtc->vsp->vsp, crtc->vsp_pipe, &cfg);
 }
 
 /* Keep the two tables in sync. */
 
        bool complete = completion == VSP1_DL_FRAME_END_COMPLETED;
 
        if (drm_pipe->du_complete)
-               drm_pipe->du_complete(drm_pipe->du_private, complete);
+               drm_pipe->du_complete(drm_pipe->du_private, complete, 0);
 
        if (completion & VSP1_DL_FRAME_END_INTERNAL) {
                drm_pipe->force_brx_release = false;
  * vsp1_du_atomic_flush - Commit an atomic update
  * @dev: the VSP device
  * @pipe_index: the DRM pipeline index
+ * @cfg: atomic pipe configuration
  */
-void vsp1_du_atomic_flush(struct device *dev, unsigned int pipe_index)
+void vsp1_du_atomic_flush(struct device *dev, unsigned int pipe_index,
+                         const struct vsp1_du_atomic_pipe_config *cfg)
 {
        struct vsp1_device *vsp1 = dev_get_drvdata(dev);
        struct vsp1_drm_pipeline *drm_pipe = &vsp1->drm->pipe[pipe_index];
 
        unsigned int width;
        unsigned int height;
 
-       void (*callback)(void *, bool);
+       void (*callback)(void *data, bool completed, u32 crc);
        void *callback_data;
 };
 
        unsigned int zpos;
 };
 
+/**
+ * enum vsp1_du_crc_source - Source used for CRC calculation
+ * @VSP1_DU_CRC_NONE: CRC calculation disabled
+ * @VSP1_DU_CRC_PLANE: Perform CRC calculation on an input plane
+ * @VSP1_DU_CRC_OUTPUT: Perform CRC calculation on the composed output
+ */
+enum vsp1_du_crc_source {
+       VSP1_DU_CRC_NONE,
+       VSP1_DU_CRC_PLANE,
+       VSP1_DU_CRC_OUTPUT,
+};
+
+/**
+ * struct vsp1_du_crc_config - VSP CRC computation configuration parameters
+ * @source: source for CRC calculation
+ * @index: index of the CRC source plane (when source is set to plane)
+ */
+struct vsp1_du_crc_config {
+       enum vsp1_du_crc_source source;
+       unsigned int index;
+};
+
+/**
+ * struct vsp1_du_atomic_pipe_config - VSP atomic pipe configuration parameters
+ * @crc: CRC computation configuration
+ */
+struct vsp1_du_atomic_pipe_config {
+       struct vsp1_du_crc_config crc;
+};
+
 void vsp1_du_atomic_begin(struct device *dev, unsigned int pipe_index);
 int vsp1_du_atomic_update(struct device *dev, unsigned int pipe_index,
                          unsigned int rpf,
                          const struct vsp1_du_atomic_config *cfg);
-void vsp1_du_atomic_flush(struct device *dev, unsigned int pipe_index);
+void vsp1_du_atomic_flush(struct device *dev, unsigned int pipe_index,
+                         const struct vsp1_du_atomic_pipe_config *cfg);
 int vsp1_du_map_sg(struct device *dev, struct sg_table *sgt);
 void vsp1_du_unmap_sg(struct device *dev, struct sg_table *sgt);