From 2dfa2bb76d0ca0eeb954381b2c9729ab90904853 Mon Sep 17 00:00:00 2001 From: Randy Li Date: Tue, 25 Jul 2017 14:27:41 +0800 Subject: [PATCH] [jpege]: fixup mpp device The mpp encoder driver won't check the input format, you have to put all the other registers into zero or it will be regarded as an DMA buffer. Change-Id: Idb23de21d01944d72238c041e74ff53842c28e7d Signed-off-by: Randy Li --- mpp/hal/vpu/jpege/hal_jpege_vepu1.c | 2 +- mpp/hal/vpu/jpege/hal_jpege_vepu2.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/mpp/hal/vpu/jpege/hal_jpege_vepu1.c b/mpp/hal/vpu/jpege/hal_jpege_vepu1.c index 44a22552..e73cdc5b 100644 --- a/mpp/hal/vpu/jpege/hal_jpege_vepu1.c +++ b/mpp/hal/vpu/jpege/hal_jpege_vepu1.c @@ -72,7 +72,7 @@ MPP_RET hal_jpege_vepu1_init(void *hal, MppHalCfg *cfg) ctx->cfg = cfg->cfg; ctx->set = cfg->set; - ctx->ioctl_info.regs = mpp_malloc(RK_U32, VEPU_JPEGE_VEPU1_NUM_REGS); + ctx->ioctl_info.regs = mpp_calloc(RK_U32, VEPU_JPEGE_VEPU1_NUM_REGS); if (!ctx->ioctl_info.regs) { mpp_err_f("failed to malloc vdpu1 regs\n"); return MPP_NOK; diff --git a/mpp/hal/vpu/jpege/hal_jpege_vepu2.c b/mpp/hal/vpu/jpege/hal_jpege_vepu2.c index b28e2b1c..521f5f7e 100644 --- a/mpp/hal/vpu/jpege/hal_jpege_vepu2.c +++ b/mpp/hal/vpu/jpege/hal_jpege_vepu2.c @@ -71,7 +71,7 @@ MPP_RET hal_jpege_vepu2_init(void *hal, MppHalCfg *cfg) ctx->cfg = cfg->cfg; ctx->set = cfg->set; - ctx->ioctl_info.regs = mpp_malloc(RK_U32, VEPU_JPEGE_VEPU2_NUM_REGS); + ctx->ioctl_info.regs = mpp_calloc(RK_U32, VEPU_JPEGE_VEPU2_NUM_REGS); if (!ctx->ioctl_info.regs) { mpp_err_f("failed to malloc vdpu2 regs\n"); return MPP_NOK;