Commit 3718f7c5 authored by Martichou's avatar Martichou Committed by arnavpuranik
Browse files

msm: camera: Boost devfreq when focusing

Boosting Devfreq at focus time can help for the focus speed.
Let's try it out.
150ms won't affect battery too much as it's especially when you take photo.

Original idea form: https://github.com/YaroST12/MATA_Kernel/commit/c011ecb4cdf10e4568dc16a74de38309cde18b04

Signed-off-by: ronax's avatarronaxdevil <pratabidya.007@gmail.com>
Signed-off-by: arnavpuranik's avatararnavpuranik <puranikarnav@gmail.com>
parent 04e92d6c
......@@ -13,6 +13,7 @@
#define pr_fmt(fmt) "%s:%d " fmt, __func__, __LINE__
#include <linux/module.h>
#include <linux/devfreq_boost.h>
#include "msm_sd.h"
#include "msm_actuator.h"
#include "msm_cci.h"
......@@ -587,6 +588,7 @@ static int32_t msm_actuator_move_focus(
struct msm_camera_i2c_reg_setting reg_setting;
CDBG("called, dir %d, num_steps %d\n", dir, num_steps);
devfreq_boost_kick_max(DEVFREQ_MSM_CPUBW, 150);
if (a_ctrl->step_position_table == NULL) {
pr_err("Step Position Table is NULL\n");
......@@ -597,7 +599,6 @@ static int32_t msm_actuator_move_focus(
((dest_step_pos <= a_ctrl->total_steps) &&
(a_ctrl->step_position_table[dest_step_pos] ==
a_ctrl->step_position_table[a_ctrl->curr_step_pos])))
return rc;
if ((sign_dir > MSM_ACTUATOR_MOVE_SIGNED_NEAR) ||
(sign_dir < MSM_ACTUATOR_MOVE_SIGNED_FAR)) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment