[PATCH] s5p-mfc: Fix buffer allocation in s5p_mfc_alloc_instance_buffer_v5

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The "s5p-mfc: Change internal buffer allocation from vb2 ops to
dma_alloc_coherent" patch has introduced a bug with allocation of instance
buffers buffers in MFC 5.1. This patch fixes this bug.

Reported-by: Arun Kumar K <arun.kk@xxxxxxxxxxx>
Signed-off-by: Kamil Debski <k.debski@xxxxxxxxxxx>
Signed-off-by: Kyungmin Park <kyungmin.park@xxxxxxxxxxx>
---
 drivers/media/platform/s5p-mfc/s5p_mfc_opr_v5.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/media/platform/s5p-mfc/s5p_mfc_opr_v5.c b/drivers/media/platform/s5p-mfc/s5p_mfc_opr_v5.c
index 11faddd..15f40e4 100644
--- a/drivers/media/platform/s5p-mfc/s5p_mfc_opr_v5.c
+++ b/drivers/media/platform/s5p-mfc/s5p_mfc_opr_v5.c
@@ -217,7 +217,7 @@ int s5p_mfc_alloc_instance_buffer_v5(struct s5p_mfc_ctx *ctx)
 		mfc_err("Failed to allocate instance buffer\n");
 		return ret;
 	}
-	ctx->ctx.ofs = ctx->ctx.dma - dev->bank1;
+	ctx->ctx.ofs = OFFSETA(ctx->ctx.dma);
 
 	/* Zero content of the allocated memory */
 	memset(ctx->ctx.virt, 0, ctx->ctx.size);
-- 
1.7.9.5

--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux