rdma: enable rdma mem_PD g12a
authorBrian Zhu <brian.zhu@amlogic.com>
Sat, 3 Feb 2018 08:21:23 +0000 (16:21 +0800)
committerYixun Lan <yixun.lan@amlogic.com>
Mon, 5 Mar 2018 06:11:34 +0000 (14:11 +0800)
PD#156734: rdma: enable rdma mem_PD g12a

Change-Id: I3e2f74b524f07372a54a172d7d05b5a55c8f01df
Signed-off-by: Brian Zhu <brian.zhu@amlogic.com>
drivers/amlogic/media/common/rdma/rdma_mgr.c

index 7f5a68d..e965ce0 100644 (file)
@@ -39,6 +39,7 @@
 
 #include <linux/amlogic/media/utils/vdec_reg.h>
 #include <linux/amlogic/media/rdma/rdma_mgr.h>
+#include <linux/amlogic/media/vpu/vpu.h>
 #include "rdma.h"
 
 #define DRIVER_NAME "amlogic-rdma"
@@ -772,6 +773,8 @@ static int rdma_probe(struct platform_device *pdev)
 
        pr_info("%s\n", __func__);
 
+       switch_vpu_mem_pd_vmod(VPU_RDMA, VPU_MEM_POWER_ON);
+
        WRITE_VCBUS_REG(VPU_VDISP_ASYNC_HOLD_CTRL, 0x18101810);
        WRITE_VCBUS_REG(VPU_VPUARB2_ASYNC_HOLD_CTRL, 0x18101810);
 
@@ -826,7 +829,7 @@ static int rdma_probe(struct platform_device *pdev)
 static int rdma_remove(struct platform_device *pdev)
 {
        pr_error("RDMA driver removed.\n");
-
+       switch_vpu_mem_pd_vmod(VPU_RDMA, VPU_MEM_POWER_DOWN);
        return 0;
 }