From fe8c2b190a1856d5e8e8aea7eb553268a080ba42 Mon Sep 17 00:00:00 2001 From: Jeonghee Kim Date: Mon, 28 May 2018 20:56:17 +0900 Subject: [PATCH] [COMMON] media: mfc: fix the plane number check. In the DRM encoder scenario, a dma_buf with null value was used. get_dmabuf should be called according to the number of fds, not the number of planes. Change-Id: Ia7eb1c2eb1b57712b2376d82fec78de8d3418d07 Signed-off-by: Jeonghee Kim --- drivers/media/platform/exynos/mfc/s5p_mfc_enc_vb2_ops.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/platform/exynos/mfc/s5p_mfc_enc_vb2_ops.c b/drivers/media/platform/exynos/mfc/s5p_mfc_enc_vb2_ops.c index db868b3a155e..df3bfe47aba4 100644 --- a/drivers/media/platform/exynos/mfc/s5p_mfc_enc_vb2_ops.c +++ b/drivers/media/platform/exynos/mfc/s5p_mfc_enc_vb2_ops.c @@ -197,7 +197,7 @@ static int s5p_mfc_enc_buf_prepare(struct vb2_buffer *vb) } } - for (i = 0; i < ctx->src_fmt->num_planes; i++) { + for (i = 0; i < ctx->src_fmt->mem_planes; i++) { dmabuf = s5p_mfc_mem_get_dmabuf(vb->planes[i].m.fd); if (!dmabuf) return -ENOMEM; -- 2.20.1