media: mfc: OTF: Initialize after F/W allocation
authorJeonghee Kim <jhhhh.kim@samsung.com>
Thu, 29 Mar 2018 09:43:31 +0000 (18:43 +0900)
committerCosmin Tanislav <demonsingur@gmail.com>
Mon, 22 Apr 2024 17:22:22 +0000 (20:22 +0300)
Change-Id: Idd526d9a85aab06cb46a8ad0fece1a0a486e6f43
Signed-off-by: Jeonghee Kim <jhhhh.kim@samsung.com>
drivers/media/platform/exynos/mfc/s5p_mfc.c
drivers/media/platform/exynos/mfc/s5p_mfc_otf.c

index e753cd3deff67afe00dd438d2b6b130942644f2a..3eadb229fa53c7b52137bfdda3f3a554843c6b7c 100644 (file)
@@ -514,11 +514,6 @@ static int s5p_mfc_open(struct file *file)
        if (ret)
                goto err_ctx_init;
 
-       if (s5p_mfc_is_encoder_otf_node(node))
-               ret = s5p_mfc_otf_init(ctx);
-       if (ret)
-               mfc_err_ctx("OTF: failed otf init\n");
-
        ret = call_cop(ctx, init_ctx_ctrls, ctx);
        if (ret) {
                mfc_err_ctx("failed in init_ctx_ctrls\n");
@@ -562,6 +557,13 @@ static int s5p_mfc_open(struct file *file)
                        goto err_init_inst;
        }
 
+#ifdef CONFIG_VIDEO_EXYNOS_REPEATER
+       if (s5p_mfc_is_encoder_otf_node(node))
+               ret = s5p_mfc_otf_init(ctx);
+       if (ret)
+               mfc_err_ctx("OTF: failed otf init\n");
+#endif
+
        s5p_mfc_perf_init(dev);
        trace_mfc_node_open(ctx->num, dev->num_inst, ctx->type, ctx->is_drm);
        mfc_info_ctx("MFC open completed [%d:%d] dev = 0x%p, ctx = 0x%p, version = %d\n",
@@ -750,8 +752,10 @@ static int s5p_mfc_release(struct file *file)
        else if (ctx->type == MFCINST_ENCODER)
                mfc_deinit_enc_ctx(ctx);
 
+#ifdef CONFIG_VIDEO_EXYNOS_REPEATER
        if (ctx->otf_handle)
                s5p_mfc_otf_deinit(ctx);
+#endif
 
        s5p_mfc_destroy_listable_wq_ctx(ctx);
 
index 23096d98c005a1e08bce7ab07e90fe6297537795..c5be3770fbf60b8bc4386045018fca21334fbd1d 100644 (file)
@@ -515,8 +515,6 @@ int s5p_mfc_otf_handle_stream(struct s5p_mfc_ctx *ctx)
                        debug->frame_cnt = 0;
                /* print stream dump */
                print_size = (strm_size * 2) + 64;
-               if (print_size > 512 && otf_dump == 1)
-                       print_size = 512;
 
                if (buf->vaddr)
                        print_hex_dump(KERN_ERR, "OTF dump: ",