#include <linux/rockchip_ion.h>\r
#endif\r
\r
-#if defined(CONFIG_ROCKCHIP_IOMMU)\r
-//#define CONFIG_VCODEC_MMU\r
+#if defined(CONFIG_ROCKCHIP_IOMMU) & defined(CONFIG_ION_ROCKCHIP)\r
+#define CONFIG_VCODEC_MMU\r
#endif\r
\r
#ifdef CONFIG_VCODEC_MMU\r
struct dentry *debugfs_file_regs;\r
\r
u32 irq_status;\r
-#if defined(CONFIG_ION_ROCKCHIP) \r
+#if defined(CONFIG_VCODEC_MMU) \r
struct ion_client * ion_client;\r
#endif \r
\r
mutex_unlock(&pservice->lock);\r
break;\r
}\r
+ case VPU_IOC_PROBE_IOMMU_STATUS: {\r
+#if defined(CONFIG_VCODEC_MMU)\r
+ int iommu_enable = 1;\r
+#else\r
+ int iommu_enable = 0;\r
+#endif\r
+ if (copy_to_user((void __user *)arg, &iommu_enable, sizeof(int))) {\r
+ pr_err("error: VPU_IOC_PROBE_IOMMU_STATUS copy_to_user failed\n");\r
+ return -EFAULT;\r
+ }\r
+ break;\r
+ }\r
default : {\r
pr_err("error: unknow vpu service ioctl cmd %x\n", cmd);\r
break;\r
#define VPU_IOC_SET_REG _IOW(VPU_IOC_MAGIC, 3, unsigned long)\r
#define VPU_IOC_GET_REG _IOW(VPU_IOC_MAGIC, 4, unsigned long)\r
\r
+#define VPU_IOC_PROBE_IOMMU_STATUS _IOR(VPU_IOC_MAGIC, 5, unsigned long)\r
+\r
typedef enum VPU_CLIENT_TYPE {\r
VPU_ENC = 0x0,\r
VPU_DEC = 0x1,\r