From fca91f223e4792cac40ba10dee96f01d9fe4071b Mon Sep 17 00:00:00 2001 From: Kamil Debski Date: Thu, 7 Aug 2014 15:38:40 +0200 Subject: v4l2-mfc-example: Add big disclaimer informing about FIMC pix_fmt change The format supported by FIMC was modified in kernel 3.16. Before it wrongfully supported V4L2_PIX_FMT_RGB32, but in reality the hardware uses the V4L2_PIX_FMT_BGR32 format. Please consult patch "s5p-fimc: Changed RGB32 to BGR32". https://patchwork.linuxtv.org/patch/23236/ http://www.spinics.net/lists/linux-media/msg74953.html Signed-off-by: Kamil Debski --- v4l2-mfc-example/fimc.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/v4l2-mfc-example/fimc.c b/v4l2-mfc-example/fimc.c index 0459c38..c193fdb 100644 --- a/v4l2-mfc-example/fimc.c +++ b/v4l2-mfc-example/fimc.c @@ -104,7 +104,14 @@ int fimc_sfmt(struct instance *i, int width, int height, fmt.fmt.pix_mp.height != height || fmt.fmt.pix_mp.num_planes != num_planes || fmt.fmt.pix_mp.pixelformat != pix_fmt) { - err("Format was changed by FIMC so we abort operations"); + err("Format was changed by FIMC so we abort operations\n" + "This may happen around kernel 3.16 as the format supported by FIMC\n" + "was changed.\n\n" + "To fix this please change function fimc_setup_capture in fimc.c (around line 162)\n" + "It should use V4L2_PIX_FMT_BGR32 for 3.16+ instead of V4L2_PIX_FMT_RGB32 used by 3.15-\n\n" + "Please read patch: \"s5p-fimc: Changed RGB32 to BGR32\"\n" + "\thttp://www.spinics.net/lists/linux-media/msg74953.html\n" + "\thttps://patchwork.linuxtv.org/patch/23236/"); return -1; } @@ -172,7 +179,7 @@ int fimc_setup_capture(struct instance *i) fmt = V4L2_PIX_FMT_RGB565; break; case 32: - fmt = V4L2_PIX_FMT_RGB32; + fmt = V4L2_PIX_FMT_BGR32; break; default: err("Framebuffer format in not recognized. Bpp=%d", i->fimc.bpp); -- cgit v1.2.3