video/rockchip: fix rga driver compile when LPAE
[firefly-linux-kernel-4.4.55.git] / drivers / video / rockchip / rga / rga_drv.c
index cd76e6396c8e20e654074cee13b270a9e40f269f..171b09ad7f1b7095cac1543972688b071e91dbf2 100755 (executable)
@@ -262,7 +262,7 @@ static void rga_dump(void)
 \r
 static inline void rga_queue_power_off_work(void)\r
 {\r
-       queue_delayed_work(system_nrt_wq, &drvdata->power_off_work, RGA_POWER_OFF_DELAY);\r
+       queue_delayed_work(system_wq, &drvdata->power_off_work, RGA_POWER_OFF_DELAY);\r
 }\r
 \r
 /* Caller must hold rga_service.lock */\r
@@ -1349,7 +1349,8 @@ static int __init rga_init(void)
     unsigned long *mmu_buf_virtual;\r
     uint32_t i;\r
     uint32_t *buf_p;\r
-\r
+    uint32_t *buf;
+
     /* malloc pre scale mid buf mmu table */\r
     mmu_buf = kzalloc(1024*8, GFP_KERNEL);\r
     mmu_buf_virtual = kzalloc(1024*2*sizeof(unsigned long), GFP_KERNEL);\r
@@ -1374,7 +1375,12 @@ static int __init rga_init(void)
 \r
     buf_p = kmalloc(1024*256, GFP_KERNEL);\r
     rga_mmu_buf.buf_virtual = buf_p;\r
-    rga_mmu_buf.buf = (uint32_t *)virt_to_phys((void *)((unsigned long)buf_p));\r
+#if (defined(CONFIG_ARM) && defined(CONFIG_ARM_LPAE))
+    buf = (uint32_t *)(uint32_t)virt_to_phys((void *)((unsigned long)buf_p));
+#else
+    buf = (uint32_t *)virt_to_phys((void *)((unsigned long)buf_p));
+#endif
+    rga_mmu_buf.buf = buf;
     rga_mmu_buf.front = 0;\r
     rga_mmu_buf.back = 64*1024;\r
     rga_mmu_buf.size = 64*1024;\r