summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/rcar-du/rcar_du_vsp.c
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>2017-12-01 14:59:55 +0300
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>2018-05-17 13:22:08 +0300
commit47a52d024e89be114df910d8331c5cabd229da98 (patch)
treea36bfb30d2017a4fb9f6859109cd527605b3c6dc /drivers/gpu/drm/rcar-du/rcar_du_vsp.c
parent5e824f989e6e8621b095e017b23ac888a827e019 (diff)
downloadlinux-47a52d024e89be114df910d8331c5cabd229da98.tar.xz
media: drm: rcar-du: Add support for CRC computation
Implement CRC computation configuration and reporting through the DRM debugfs-based CRC API. The CRC source can be configured to any input plane or the pipeline output. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Diffstat (limited to 'drivers/gpu/drm/rcar-du/rcar_du_vsp.c')
-rw-r--r--drivers/gpu/drm/rcar-du/rcar_du_vsp.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/gpu/drm/rcar-du/rcar_du_vsp.c b/drivers/gpu/drm/rcar-du/rcar_du_vsp.c
index bdcec201591f..af7822a66dee 100644
--- a/drivers/gpu/drm/rcar-du/rcar_du_vsp.c
+++ b/drivers/gpu/drm/rcar-du/rcar_du_vsp.c
@@ -40,6 +40,8 @@ static void rcar_du_vsp_complete(void *private, bool completed, u32 crc)
if (completed)
rcar_du_crtc_finish_page_flip(crtc);
+
+ drm_crtc_add_crc_entry(&crtc->crtc, false, 0, &crc);
}
void rcar_du_vsp_enable(struct rcar_du_crtc *crtc)
@@ -103,6 +105,10 @@ void rcar_du_vsp_atomic_begin(struct rcar_du_crtc *crtc)
void rcar_du_vsp_atomic_flush(struct rcar_du_crtc *crtc)
{
struct vsp1_du_atomic_pipe_config cfg = { { 0, } };
+ struct rcar_du_crtc_state *state;
+
+ state = to_rcar_crtc_state(crtc->crtc.state);
+ cfg.crc = state->crc;
vsp1_du_atomic_flush(crtc->vsp->vsp, crtc->vsp_pipe, &cfg);
}