summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKamil Debski <k.debski@samsung.com>2014-05-16 09:03:43 -0300
committerMauro Carvalho Chehab <m.chehab@samsung.com>2014-05-23 15:31:23 -0300
commit264e5bacb38067a07956b120569f009e75449f9f (patch)
tree48dec0311df07c650681b9e9ca0ba4d62139b6b7
parent109b794c87487f3cb9da77b8252f4edb1a428217 (diff)
[media] v4l: s5p-mfc: Fix default pixel format selection for decoder
The patch adding the v6 version of MFC changed the default format for the CAPTURE queue, but this also affects the v5 version. This patch solves this problem by checking the MFC version before assigning the default format. Signed-off-by: Kamil Debski <k.debski@samsung.com> Acked-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
-rw-r--r--drivers/media/platform/s5p-mfc/s5p_mfc_dec.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/media/platform/s5p-mfc/s5p_mfc_dec.c b/drivers/media/platform/s5p-mfc/s5p_mfc_dec.c
index a4e666862f11..ac43a4af4fd7 100644
--- a/drivers/media/platform/s5p-mfc/s5p_mfc_dec.c
+++ b/drivers/media/platform/s5p-mfc/s5p_mfc_dec.c
@@ -32,9 +32,6 @@
#include "s5p_mfc_opr.h"
#include "s5p_mfc_pm.h"
-#define DEF_SRC_FMT_DEC V4L2_PIX_FMT_H264
-#define DEF_DST_FMT_DEC V4L2_PIX_FMT_NV12MT_16X16
-
static struct s5p_mfc_fmt formats[] = {
{
.name = "4:2:0 2 Planes 16x16 Tiles",
@@ -1190,9 +1187,12 @@ void s5p_mfc_dec_ctrls_delete(struct s5p_mfc_ctx *ctx)
void s5p_mfc_dec_init(struct s5p_mfc_ctx *ctx)
{
struct v4l2_format f;
- f.fmt.pix_mp.pixelformat = DEF_SRC_FMT_DEC;
+ f.fmt.pix_mp.pixelformat = V4L2_PIX_FMT_H264;
ctx->src_fmt = find_format(&f, MFC_FMT_DEC);
- f.fmt.pix_mp.pixelformat = DEF_DST_FMT_DEC;
+ if (IS_MFCV6_PLUS(ctx->dev))
+ f.fmt.pix_mp.pixelformat = V4L2_PIX_FMT_NV12MT_16X16;
+ else
+ f.fmt.pix_mp.pixelformat = V4L2_PIX_FMT_NV12MT;
ctx->dst_fmt = find_format(&f, MFC_FMT_RAW);
mfc_debug(2, "Default src_fmt is %x, dest_fmt is %x\n",
(unsigned int)ctx->src_fmt, (unsigned int)ctx->dst_fmt);