From adc307ae91647d8d499476d8f815298c0d973b39 Mon Sep 17 00:00:00 2001 From: Jeonghee Kim Date: Thu, 26 Jul 2018 16:52:59 +0900 Subject: [PATCH] [COMMON] media: mfc: move __mfc_enc_check_resolution function This function should be called after otf_init, because the width/height information is needed. Change-Id: Icab18d34082252c8a28365d39c898fbc4dfdf174 Signed-off-by: Jeonghee Kim --- drivers/media/platform/exynos/mfc/mfc_enc_v4l2.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/media/platform/exynos/mfc/mfc_enc_v4l2.c b/drivers/media/platform/exynos/mfc/mfc_enc_v4l2.c index fd5eff5845aa..a9390a15c9a0 100644 --- a/drivers/media/platform/exynos/mfc/mfc_enc_v4l2.c +++ b/drivers/media/platform/exynos/mfc/mfc_enc_v4l2.c @@ -404,11 +404,6 @@ static int mfc_enc_s_fmt_vid_cap_mplane(struct file *file, void *priv, mfc_info_ctx("[STREAM] Enc dst codec(%d) : %s\n", ctx->codec_mode, ctx->dst_fmt->name); - if (__mfc_enc_check_resolution(ctx)) { - mfc_err_ctx("Unsupported resolution\n"); - return -EINVAL; - } - if (ctx->otf_handle) { if (ctx->dst_fmt->fourcc != V4L2_PIX_FMT_H264 && ctx->dst_fmt->fourcc != V4L2_PIX_FMT_HEVC) { @@ -422,6 +417,11 @@ static int mfc_enc_s_fmt_vid_cap_mplane(struct file *file, void *priv, } } + if (__mfc_enc_check_resolution(ctx)) { + mfc_err_ctx("Unsupported resolution\n"); + return -EINVAL; + } + enc->dst_buf_size = pix_fmt_mp->plane_fmt[0].sizeimage; pix_fmt_mp->plane_fmt[0].bytesperline = 0; -- 2.20.1