s5p-tv: mixer: fix handling of VIDIOC_S_FMT
Commit Message
From: Tomasz Stanislawski <t.stanislaws@samsung.com>
The VIDIOC_S_FMT ioctl must not fail if 4cc is invalid.
It should adjust proposed 4cc to the available one.
The s5p-mixer fails on s_fmt if unsupported 4cc is used.
This patch fixes this issue by using the default format
for a given layer.
Signed-off-by: Tomasz Stanislawski <t.stanislaws@samsung.com>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
---
drivers/media/platform/s5p-tv/mixer_video.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
1.7.4.1
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
@@ -324,10 +324,9 @@ static int mxr_s_fmt(struct file *file, void *priv,
pix = &f->fmt.pix_mp;
fmt = find_format_by_fourcc(layer, pix->pixelformat);
if (fmt == NULL) {
- mxr_warn(mdev, "not recognized fourcc: %08x\n",
+ mxr_dbg(mdev, "not recognized fourcc: %08x\n",
pix->pixelformat);
- return -EINVAL;
+ fmt = layer->fmt_array[0];
}
layer->fmt = fmt;
/* set source size to highest accepted value */
--