video/rockchip: rga2: Compatible with kernel module

rga2 will be compiled into a kernel object, because cmd_buf
is a global variable and the address is stored in the modules
section, which makes it unable to obtain the physical address
through virt_to_phy(), so the local variable cmd_reg is used.

Signed-off-by: Yu Qiaowei <cerf.yu@rock-chips.com>
Change-Id: I3c088e727365fa8d515238ad88b2edaaee2b9a2b
This commit is contained in:
Yu Qiaowei
2020-08-20 09:58:09 +08:00
committed by Tao Huang
parent 29f6b4c722
commit 7ff0530f7b

View File

@@ -922,14 +922,14 @@ static void rga2_try_set_reg(void)
rga2_copy_reg(reg, 0);
rga2_reg_from_wait_to_run(reg);
rga2_dma_flush_range(&rga2_service.cmd_buff[0], &rga2_service.cmd_buff[32]);
rga2_dma_flush_range(&reg->cmd_reg[0], &reg->cmd_reg[32]);
//rga2_soft_reset();
rga2_write(0x0, RGA2_SYS_CTRL);
/* CMD buff */
rga2_write(virt_to_phys(rga2_service.cmd_buff), RGA2_CMD_BASE);
rga2_write(virt_to_phys(reg->cmd_reg), RGA2_CMD_BASE);
#if RGA2_DEBUGFS
if (RGA2_TEST_REG) {