projects
/
firefly-linux-kernel-4.4.55.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7f19cea
)
backlight:fix hdmi switch black screen
author
yzq
<yzq@rock-chips.com>
Thu, 24 Jan 2013 14:11:57 +0000
(22:11 +0800)
committer
wuhao
<wuhao@wuhao@rock-chips.com>
Thu, 24 Jan 2013 14:11:57 +0000
(22:11 +0800)
drivers/video/backlight/rk29_backlight.c
patch
|
blob
|
history
diff --git
a/drivers/video/backlight/rk29_backlight.c
b/drivers/video/backlight/rk29_backlight.c
index 5b4f473b626a7c9949f09ef1a0037d50d745c720..9a8fedf254d1f7ad0301fc240ab05258623cf53d 100755
(executable)
--- a/
drivers/video/backlight/rk29_backlight.c
+++ b/
drivers/video/backlight/rk29_backlight.c
@@
-142,9
+142,17
@@
static int rk29_bl_update_status(struct backlight_device *bl)
rk29_bl_info->pwm_resume();
clk_enable(pwm_clk);
msleep(1);
+ div_total = read_pwm_reg(PWM_REG_LRC);
+ if (ref) {
+ divh = div_total*brightness/BL_STEP;
+ } else {
+ divh = div_total*(BL_STEP-brightness)/BL_STEP;
+ }
+ rk_pwm_setup(id, PWM_DIV, divh, div_total);
}
+
DBG("%s:line=%d,brightness = %d, div_total = %d, divh = %d state=%x \n",__FUNCTION__,__LINE__,brightness, div_total, divh,bl->props.state);
out:
mutex_unlock(&backlight_mutex);