[RAMEN9610-11632][9610] fimc-is2: add function for bts_update for thermal
authorWooyeon Kim <wooy88.kim@samsung.com>
Tue, 29 Jan 2019 08:21:01 +0000 (17:21 +0900)
committerhskang <hs1218.kang@samsung.com>
Thu, 31 Jan 2019 11:42:43 +0000 (20:42 +0900)
 - update bts function for thermal

Change-Id: Ic7ea5c425a9a839bf4db2921d7d1458a50243b29
Signed-off-by: Wooyeon Kim <wooy88.kim@samsung.com>
drivers/media/platform/exynos/fimc-is2/ischain/fimc-is-v6_10_0/fimc-is-hw-chain.c

index 9eb61c1c4419430839b151980af1edc0d3c71e3c..2444c0e296d6a612822e4140888d8a60be970716 100644 (file)
@@ -19,6 +19,7 @@
 #include <linux/smc.h>
 
 #include <asm/neon.h>
+#include <soc/samsung/bts.h>
 
 #include "fimc-is-config.h"
 #include "fimc-is-param.h"
@@ -1297,6 +1298,33 @@ u32 fimc_is_hw_find_settle(u32 mipi_speed)
        return fimc_is_csi_settle_table[m + 1];
 }
 
+void fimc_is_hw_set_bts_ext_ctrl(enum camera_bts_scn bts_scn, bool enable)
+{
+#ifdef CONFIG_EXYNOS_BTS
+       struct fimc_is_core *core = NULL;
+       struct fimc_is_resourcemgr *resourcemgr;
+
+       core = (struct fimc_is_core *)dev_get_drvdata(fimc_is_dev);
+       if (!core) {
+               err("core is NULL");
+               return;
+       }
+       resourcemgr = &core->resourcemgr;
+
+       switch (bts_scn) {
+       case BTS_SCN_THERMAL:
+               if (resourcemgr->throttling_bts != enable) {
+                       bts_update_scen(BS_CAMERA_THERMAL, (int)enable);
+                       resourcemgr->throttling_bts = enable;
+                       info("call bts_update_scen(%d) for thermal\n", enable);
+               }
+               break;
+       default:
+               err("wrong bts_scn(%d)\n", bts_scn);
+       }
+#endif
+}
+
 #ifdef ENABLE_FULLCHAIN_OVERFLOW_RECOVERY
 int fimc_is_hw_overflow_recovery(void)
 {