From: Jeonghee Kim Date: Thu, 17 May 2018 10:04:26 +0000 (+0900) Subject: [COMMON] media: mfc: parse dts for checking debug_mode X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=4189b61adaea33fe7a9ccf0f87133e7d64fd3efc;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git [COMMON] media: mfc: parse dts for checking debug_mode Change-Id: I0c48bb82030134cc10905e82f19c32abd3a3e1fe Signed-off-by: Jeonghee Kim --- diff --git a/drivers/media/platform/exynos/mfc/s5p_mfc.c b/drivers/media/platform/exynos/mfc/s5p_mfc.c index 35a91421b244..ba4c8566ed99 100644 --- a/drivers/media/platform/exynos/mfc/s5p_mfc.c +++ b/drivers/media/platform/exynos/mfc/s5p_mfc.c @@ -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); diff --git a/drivers/media/platform/exynos/mfc/s5p_mfc_data_struct.h b/drivers/media/platform/exynos/mfc/s5p_mfc_data_struct.h index 4d26501a0dfc..b1faf6930c7a 100644 --- a/drivers/media/platform/exynos/mfc/s5p_mfc_data_struct.h +++ b/drivers/media/platform/exynos/mfc/s5p_mfc_data_struct.h @@ -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; diff --git a/drivers/media/platform/exynos/mfc/s5p_mfc_debug.h b/drivers/media/platform/exynos/mfc/s5p_mfc_debug.h index 2b9f45a74388..4d16ebcc330f 100644 --- a/drivers/media/platform/exynos/mfc/s5p_mfc_debug.h +++ b/drivers/media/platform/exynos/mfc/s5p_mfc_debug.h @@ -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 { \ diff --git a/drivers/media/platform/exynos/mfc/s5p_mfc_debugfs.c b/drivers/media/platform/exynos/mfc/s5p_mfc_debugfs.c index a2b5d7fd4f2c..dba5337e52f9 100644 --- a/drivers/media/platform/exynos/mfc/s5p_mfc_debugfs.c +++ b/drivers/media/platform/exynos/mfc/s5p_mfc_debugfs.c @@ -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); } diff --git a/drivers/media/platform/exynos/mfc/s5p_mfc_watchdog.c b/drivers/media/platform/exynos/mfc/s5p_mfc_watchdog.c index fe779e8ccb7d..8bab5649ebfd 100644 --- a/drivers/media/platform/exynos/mfc/s5p_mfc_watchdog.c +++ b/drivers/media/platform/exynos/mfc/s5p_mfc_watchdog.c @@ -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");