[hal_h264e]: Fix H.264 vepu error on kernel 4.19

On kernel 4.19 the send registers and recv registers can be different.
But due to compatibility kernel 4.4 the register copy is needed.

Change-Id: I1af7bbf8c27671627bda1679283693ec7eb4b0b5
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
This commit is contained in:
Herman Chen
2020-04-21 08:37:43 +08:00
parent 8619ac32c0
commit a32733c54e
2 changed files with 6 additions and 2 deletions

View File

@@ -550,7 +550,9 @@ static MPP_RET hal_h264e_vepu1_start_v2(void *hal, HalEncTask *task)
hal_h264e_dbg_func("enter %p\n", hal);
if (ctx->dev_ctx) {
RK_U32 *regs = ctx->regs_set.val;
RK_U32 *regs = ctx->regs_get.val;
memcpy(&ctx->regs_get, &ctx->regs_set, sizeof(ctx->regs_get));
hal_h264e_dbg_detail("vpu client is sending %d regs", VEPU1_H264E_NUM_REGS);
ret = mpp_device_send_reg(ctx->dev_ctx, regs, VEPU1_H264E_NUM_REGS);

View File

@@ -577,7 +577,9 @@ static MPP_RET hal_h264e_vepu2_start_v2(void *hal, HalEncTask *task)
hal_h264e_dbg_func("enter %p\n", hal);
if (ctx->dev_ctx) {
RK_U32 *regs = ctx->regs_set.val;
RK_U32 *regs = ctx->regs_get.val;
memcpy(&ctx->regs_get, &ctx->regs_set, sizeof(ctx->regs_get));
hal_h264e_dbg_detail("vpu client is sending %d regs", VEPU2_H264E_NUM_REGS);
ret = mpp_device_send_reg(ctx->dev_ctx, regs, VEPU2_H264E_NUM_REGS);