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 <[email protected]>
Signed-off-by: Kamil Debski <[email protected]>
Signed-off-by: Kyungmin Park <[email protected]>
---
 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 [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to