From: Tomasz Stanislawski <t.stanislaws@xxxxxxxxxxx> 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@xxxxxxxxxxx> Signed-off-by: Sylwester Nawrocki <s.nawrocki@xxxxxxxxxxx> --- drivers/media/platform/s5p-tv/mixer_video.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/media/platform/s5p-tv/mixer_video.c b/drivers/media/platform/s5p-tv/mixer_video.c index 7379e77..405414f 100644 --- a/drivers/media/platform/s5p-tv/mixer_video.c +++ b/drivers/media/platform/s5p-tv/mixer_video.c @@ -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 */ -- 1.7.4.1 -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html