|
@@ -36,6 +36,14 @@ void vsp1_drm_display_start(struct vsp1_device *vsp1)
|
|
|
vsp1_dlm_irq_display_start(vsp1->drm->pipe.output->dlm);
|
|
|
}
|
|
|
|
|
|
+static void vsp1_du_pipeline_frame_end(struct vsp1_pipeline *pipe)
|
|
|
+{
|
|
|
+ struct vsp1_drm *drm = to_vsp1_drm(pipe);
|
|
|
+
|
|
|
+ if (drm->du_complete)
|
|
|
+ drm->du_complete(drm->du_private);
|
|
|
+}
|
|
|
+
|
|
|
/* -----------------------------------------------------------------------------
|
|
|
* DU Driver API
|
|
|
*/
|
|
@@ -95,6 +103,7 @@ int vsp1_du_setup_lif(struct device *dev, const struct vsp1_du_lif_config *cfg)
|
|
|
}
|
|
|
|
|
|
pipe->num_inputs = 0;
|
|
|
+ vsp1->drm->du_complete = NULL;
|
|
|
|
|
|
vsp1_dlm_reset(pipe->output->dlm);
|
|
|
vsp1_device_put(vsp1);
|
|
@@ -199,6 +208,13 @@ int vsp1_du_setup_lif(struct device *dev, const struct vsp1_du_lif_config *cfg)
|
|
|
if (ret < 0)
|
|
|
return ret;
|
|
|
|
|
|
+ /*
|
|
|
+ * Register a callback to allow us to notify the DRM driver of frame
|
|
|
+ * completion events.
|
|
|
+ */
|
|
|
+ vsp1->drm->du_complete = cfg->callback;
|
|
|
+ vsp1->drm->du_private = cfg->callback_data;
|
|
|
+
|
|
|
ret = media_pipeline_start(&pipe->output->entity.subdev.entity,
|
|
|
&pipe->pipe);
|
|
|
if (ret < 0) {
|
|
@@ -603,6 +619,7 @@ int vsp1_drm_init(struct vsp1_device *vsp1)
|
|
|
pipe->lif = &vsp1->lif->entity;
|
|
|
pipe->output = vsp1->wpf[0];
|
|
|
pipe->output->pipe = pipe;
|
|
|
+ pipe->frame_end = vsp1_du_pipeline_frame_end;
|
|
|
|
|
|
return 0;
|
|
|
}
|