Skip to content

Commit 8914a48

Browse files
Yu Qiaoweirkhuangtao
authored andcommitted
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
1 parent c2006b9 commit 8914a48

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

drivers/video/rockchip/rga2/rga2_drv.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -926,14 +926,14 @@ static void rga2_try_set_reg(void)
926926
rga2_copy_reg(reg, 0);
927927
rga2_reg_from_wait_to_run(reg);
928928

929-
rga2_dma_flush_range(&rga2_service.cmd_buff[0], &rga2_service.cmd_buff[32]);
929+
rga2_dma_flush_range(&reg->cmd_reg[0], &reg->cmd_reg[32]);
930930

931931
//rga2_soft_reset();
932932

933933
rga2_write(0x0, RGA2_SYS_CTRL);
934934

935935
/* CMD buff */
936-
rga2_write(virt_to_phys(rga2_service.cmd_buff), RGA2_CMD_BASE);
936+
rga2_write(virt_to_phys(reg->cmd_reg), RGA2_CMD_BASE);
937937

938938
#if RGA2_DEBUGFS
939939
if (RGA2_TEST_REG) {

0 commit comments

Comments
 (0)