Commit cc271b67 authored by Laurent Pinchart's avatar Laurent Pinchart Committed by Mauro Carvalho Chehab

media: imx: capture: Return -EPIPE from __capture_legacy_try_fmt()

The correct return code to report an invalid pipeline configuration is
-EPIPE. Return it instead of -EINVAL from __capture_legacy_try_fmt()
when the capture format doesn't match the media bus format of the
connected subdev.
Signed-off-by: default avatarLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: default avatarRui Miguel Silva <rmfrfs@gmail.com>
Signed-off-by: default avatarHans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+huawei@kernel.org>
parent 6cc20944
...@@ -554,7 +554,7 @@ static int capture_validate_fmt(struct capture_priv *priv) ...@@ -554,7 +554,7 @@ static int capture_validate_fmt(struct capture_priv *priv)
priv->vdev.fmt.height != pixfmt.height || priv->vdev.fmt.height != pixfmt.height ||
priv->vdev.cc->cs != cc->cs || priv->vdev.cc->cs != cc->cs ||
priv->vdev.compose.width != compose.width || priv->vdev.compose.width != compose.width ||
priv->vdev.compose.height != compose.height) ? -EINVAL : 0; priv->vdev.compose.height != compose.height) ? -EPIPE : 0;
} }
static int capture_start_streaming(struct vb2_queue *vq, unsigned int count) static int capture_start_streaming(struct vb2_queue *vq, unsigned int count)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment