diff mbox

[RFC,03/21] media: vsp1: Set format to RPF input source

Message ID 1464624020-27709-4-git-send-email-ulrich.hecht+renesas@gmail.com (mailing list archive)
State New, archived
Headers show

Commit Message

Ulrich Hecht May 30, 2016, 4 p.m. UTC
From: Koji Matsuoka <koji.matsuoka.xm@renesas.com>

The output format of the RPF must be unified in RGB or YCbCr by
specification of the H/W. To unify the output format in RGB in
driver, if the input format is YCbCr, the output format must be
converted to RGB by CSC (Color Space Conversion).
The driver is missing the format setting of the RPF input source,
so it does not pass through the process to enable the CSC.
This patch adds format setting of the RPF input source.

Signed-off-by: Koji Matsuoka <koji.matsuoka.xm@renesas.com>
[geert: Rebased, s/fmtinfo/rpf->fmtinfo]
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
 drivers/media/platform/vsp1/vsp1_drm.c | 6 ++++++
 1 file changed, 6 insertions(+)
diff mbox

Patch

diff --git a/drivers/media/platform/vsp1/vsp1_drm.c b/drivers/media/platform/vsp1/vsp1_drm.c
index ff961b2..c5ee06b 100644
--- a/drivers/media/platform/vsp1/vsp1_drm.c
+++ b/drivers/media/platform/vsp1/vsp1_drm.c
@@ -383,6 +383,12 @@  static int vsp1_du_setup_rpf_pipe(struct vsp1_device *vsp1,
 
 	/* BRU sink, propagate the format from the RPF source. */
 	format.pad = bru_input;
+	format.format.code = rpf->fmtinfo->mbus;
+
+	ret = v4l2_subdev_call(&rpf->entity.subdev, pad, set_fmt, NULL,
+			       &format);
+	if (ret < 0)
+		return ret;
 
 	ret = v4l2_subdev_call(&vsp1->bru->entity.subdev, pad, set_fmt, NULL,
 			       &format);