From c3fe5959b100be43ff4842ad69348536aa91773a Mon Sep 17 00:00:00 2001 From: Jeonghee Kim Date: Thu, 5 Apr 2018 15:14:20 +0900 Subject: [PATCH] media: mfc: set 2bit DPB size before NAL START & NAL QUEUE. Change-Id: Ie0e9c2e79803f2c1e3065373e219b3e48e8dc94a Signed-off-by: Jeonghee Kim --- drivers/media/platform/exynos/mfc/s5p_mfc_nal_q.c | 2 ++ drivers/media/platform/exynos/mfc/s5p_mfc_reg.c | 7 +++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/drivers/media/platform/exynos/mfc/s5p_mfc_nal_q.c b/drivers/media/platform/exynos/mfc/s5p_mfc_nal_q.c index 821815e01ee6..02578cf2ca17 100644 --- a/drivers/media/platform/exynos/mfc/s5p_mfc_nal_q.c +++ b/drivers/media/platform/exynos/mfc/s5p_mfc_nal_q.c @@ -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]); diff --git a/drivers/media/platform/exynos/mfc/s5p_mfc_reg.c b/drivers/media/platform/exynos/mfc/s5p_mfc_reg.c index 114d1032255b..3c515b82746b 100644 --- a/drivers/media/platform/exynos/mfc/s5p_mfc_reg.c +++ b/drivers/media/platform/exynos/mfc/s5p_mfc_reg.c @@ -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", -- 2.20.1