|
@@ -49,16 +49,13 @@ int mtk_vcodec_mem_alloc(struct mtk_vcodec_ctx *data,
|
|
|
struct mtk_vcodec_ctx *ctx = (struct mtk_vcodec_ctx *)data;
|
|
|
struct device *dev = &ctx->dev->plat_dev->dev;
|
|
|
|
|
|
- mem->va = dma_alloc_coherent(dev, size, &mem->dma_addr, GFP_KERNEL);
|
|
|
-
|
|
|
+ mem->va = dma_zalloc_coherent(dev, size, &mem->dma_addr, GFP_KERNEL);
|
|
|
if (!mem->va) {
|
|
|
mtk_v4l2_err("%s dma_alloc size=%ld failed!", dev_name(dev),
|
|
|
size);
|
|
|
return -ENOMEM;
|
|
|
}
|
|
|
|
|
|
- memset(mem->va, 0, size);
|
|
|
-
|
|
|
mtk_v4l2_debug(3, "[%d] - va = %p", ctx->id, mem->va);
|
|
|
mtk_v4l2_debug(3, "[%d] - dma = 0x%lx", ctx->id,
|
|
|
(unsigned long)mem->dma_addr);
|