Thread (13 messages) 13 messages, 2 authors, 2018-03-06
STALE3017d

[PATCH 5/7] media: sun6i: Support the YUYV format properly

From: Maxime Ripard <hidden>
Date: 2018-03-05 09:35:50
Also in: linux-media
Subsystem: allwinner a31 csi driver, media input infrastructure (v4l/dvb), the rest · Maintainers: Yong Deng, Paul Kocialkowski, Mauro Carvalho Chehab, Linus Torvalds

Currently, if we ever start a capture using the YUYV format, the switch
case in the get_csi_input_seq function will not catch it since it considers
it the default case.

However, that switch default also calls dev_warn to log an error, which is
this case will be either an unsupported format, or the YUYV format.

Obviously, the latter creates a spurious message. Make sure this isn't the
case.

Signed-off-by: Maxime Ripard <redacted>
---
 drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.c | 4 ++++
 1 file changed, 4 insertions(+)
diff --git a/drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.c b/drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.c
index 9a25aad8b6b1..e0b39ea641aa 100644
--- a/drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.c
+++ b/drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.c
@@ -357,6 +357,10 @@ static enum csi_input_seq get_csi_input_seq(struct sun6i_csi_dev *sdev,
 			break;
 		}
 		break;
+
+	case V4L2_PIX_FMT_YUYV:
+		return CSI_INPUT_SEQ_YUYV;
+
 	default:
 		dev_warn(sdev->dev, "Unsupported pixformat: 0x%x, defaulting to YUYV\n",
 			 pixformat);
-- 
2.14.3
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help