From: Jeonghee Kim Date: Mon, 28 May 2018 11:56:17 +0000 (+0900) Subject: [COMMON] media: mfc: fix the plane number check. X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=792b6f85ef5589eb1684c043e6798c3609bac62e;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git [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 --- 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;