media: mfc: set 2bit DPB size before NAL START & NAL QUEUE.
authorJeonghee Kim <jhhhh.kim@samsung.com>
Thu, 5 Apr 2018 06:14:20 +0000 (15:14 +0900)
committerSunyoung Kang <sy0816.kang@samsung.com>
Tue, 29 May 2018 06:59:18 +0000 (15:59 +0900)
Change-Id: Ie0e9c2e79803f2c1e3065373e219b3e48e8dc94a
Signed-off-by: Jeonghee Kim <jhhhh.kim@samsung.com>
drivers/media/platform/exynos/mfc/s5p_mfc_nal_q.c
drivers/media/platform/exynos/mfc/s5p_mfc_reg.c

index 821815e01ee63f6829903485ddc32301cc00a7b4..02578cf2ca17e8cb2d14baef30be6b3bd457af43 100644 (file)
@@ -756,6 +756,8 @@ static int mfc_nal_q_run_in_buf_dec(struct s5p_mfc_ctx *ctx, DecoderInputStr *pI
        for (i = 0; i < raw->num_planes; i++) {
                pInStr->FrameSize[i] = raw->plane_size[i];
                pInStr->FrameAddr[i] = dst_mb->addr[0][i];
+               if (ctx->is_10bit)
+                       pInStr->Frame2BitSize[i] = raw->plane_size_2bits[i];
        }
        mfc_debug(2, "NAL Q: dst addr[0]: 0x%08llx\n",
                        dst_mb->addr[0][0]);
index 114d1032255b78c52fa743712c409917bbb98be9..3c515b82746b250eb96755b8e9b9cf6af6b08b7d 100644 (file)
@@ -479,9 +479,12 @@ int s5p_mfc_set_dynamic_dpb(struct s5p_mfc_ctx *ctx, struct s5p_mfc_buf *dst_mb)
 
        for (i = 0; i < raw->num_planes; i++) {
                MFC_WRITEL(raw->plane_size[i],
-                               S5P_FIMV_D_FIRST_PLANE_DPB_SIZE + i*4);
+                               S5P_FIMV_D_FIRST_PLANE_DPB_SIZE + i * 4);
                MFC_WRITEL(dst_mb->addr[0][i],
-                               S5P_FIMV_D_FIRST_PLANE_DPB0 + (i*0x100 + dst_index*4));
+                               S5P_FIMV_D_FIRST_PLANE_DPB0 + (i * 0x100 + dst_index * 4));
+               if (ctx->is_10bit)
+                       MFC_WRITEL(raw->plane_size_2bits[i],
+                                       S5P_FIMV_D_FIRST_PLANE_2BIT_DPB_SIZE + (i * 4));
        }
 
        MFC_TRACE_CTX("Set dst[%d] fd: %d, %#llx / avail %#lx used %#x\n",