From: Jeonghee Kim Date: Thu, 5 Apr 2018 06:14:20 +0000 (+0900) Subject: media: mfc: set 2bit DPB size before NAL START & NAL QUEUE. X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=bbd79749b546beeaf18205c461b383a1bad8fa0e;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git media: mfc: set 2bit DPB size before NAL START & NAL QUEUE. Change-Id: Ie0e9c2e79803f2c1e3065373e219b3e48e8dc94a Signed-off-by: Jeonghee Kim --- 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",