[COMMON] media: mfc: parse dts for checking debug_mode
authorJeonghee Kim <jhhhh.kim@samsung.com>
Thu, 17 May 2018 10:04:26 +0000 (19:04 +0900)
committerSunyoung Kang <sy0816.kang@samsung.com>
Tue, 29 May 2018 06:59:18 +0000 (15:59 +0900)
Change-Id: I0c48bb82030134cc10905e82f19c32abd3a3e1fe
Signed-off-by: Jeonghee Kim <jhhhh.kim@samsung.com>
drivers/media/platform/exynos/mfc/s5p_mfc.c
drivers/media/platform/exynos/mfc/s5p_mfc_data_struct.h
drivers/media/platform/exynos/mfc/s5p_mfc_debug.h
drivers/media/platform/exynos/mfc/s5p_mfc_debugfs.c
drivers/media/platform/exynos/mfc/s5p_mfc_watchdog.c

index 35a91421b244cd66b914204388599c5b16363ed1..ba4c8566ed99cf340f23868621cf9dcfda4cd731 100644 (file)
@@ -947,6 +947,7 @@ static void mfc_parse_dt(struct device_node *np, struct s5p_mfc_dev *mfc)
                return;
 
        of_property_read_u32(np, "ip_ver", &pdata->ip_ver);
+       of_property_read_u32(np, "debug_mode", &pdata->debug_mode);
 #ifdef CONFIG_MFC_USE_BUS_DEVFREQ
        of_property_read_u32(np, "num_qos_steps", &pdata->num_qos_steps);
        of_property_read_u32(np, "max_qos_steps", &pdata->max_qos_steps);
index 4d26501a0dfcab9f98960ec5bbfbbf311fb742ff..b1faf6930c7ab9f0e165dafcf004d87b0016f293 100644 (file)
@@ -310,7 +310,6 @@ struct s5p_mfc_debugfs {
        struct dentry *sfr_dump;
        struct dentry *mmcache_dump;
        struct dentry *mmcache_disable;
-       struct dentry *debug_mode;
 };
 
 /**
@@ -372,6 +371,7 @@ struct s5p_mfc_qos {
 
 struct s5p_mfc_platdata {
        int ip_ver;
+       int debug_mode;
 #ifdef CONFIG_MFC_USE_BUS_DEVFREQ
        int num_qos_steps;
        int max_qos_steps;
index 2b9f45a743882f9610bde772932935800f0b5167..4d16ebcc330f0257b6c2d6caedc0db2d613d9df1 100644 (file)
@@ -27,7 +27,6 @@ extern unsigned int otf_dump;
 extern unsigned int sfr_dump;
 extern unsigned int mmcache_dump;
 extern unsigned int mmcache_disable;
-extern unsigned int debug_mode;
 
 #define mfc_debug(level, fmt, args...)                         \
        do {                                                    \
index a2b5d7fd4f2c6ede1347feab1c7c0bc08d82a86c..dba5337e52f9efa55f8a96aec7b87554220d1a4c 100644 (file)
@@ -31,8 +31,6 @@ unsigned int perf_measure_option;
 unsigned int sfr_dump;
 unsigned int mmcache_dump;
 unsigned int mmcache_disable;
-/* It will be disable after driver is stabilized */
-unsigned int debug_mode = 1;
 
 static int mfc_info_show(struct seq_file *s, void *unused)
 {
@@ -161,6 +159,4 @@ void s5p_mfc_init_debugfs(struct s5p_mfc_dev *dev)
                        0644, debugfs->root, &mmcache_dump);
        debugfs->mmcache_disable = debugfs_create_u32("mmcache_disable",
                        0644, debugfs->root, &mmcache_disable);
-       debugfs->debug_mode = debugfs_create_u32("debug_mode",
-                       0644, debugfs->root, &debug_mode);
 }
index fe779e8ccb7d19ee2cd74088d22e087254198d7d..8bab5649ebfd3177130cd4d65c5fb3d2843cb079 100644 (file)
@@ -289,7 +289,7 @@ static void mfc_dump_info_and_stop_hw(struct s5p_mfc_dev *dev)
 
 static void mfc_dump_info_and_stop_hw_debug(struct s5p_mfc_dev *dev)
 {
-       if (!debug_mode)
+       if (!dev->pdata->debug_mode)
                return;
 
        MFC_TRACE_DEV("** mfc will stop!!!\n");