summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWeizhung Ding <weizhungding@google.com>2023-05-18 09:39:26 +0000
committerWeizhung Ding <weizhungding@google.com>2023-05-18 09:42:51 +0000
commitad942489f62ab7224970d0813684fcc79de449c2 (patch)
tree0f4c27067f3d72e98be10256c5f52ddab9f43131
parent599d7747b97feb026075cfb056077602983048f6 (diff)
downloadfelix-ad942489f62ab7224970d0813684fcc79de449c2.tar.gz
display: ana6707: show idle refresh rate in AOD mode
The refresh rate indicator reads the sysfs node of display state, and the state shows the actual refresh rate according to whether panel idle refresh rate is set. This change sets idle refresh rate to 1 in AOD mode so that the indicator can show correct refresh rate. Bug: 273578204 Test: cat sys/class/backlight/panel0-backlight/state Change-Id: I1c67efb0405ad90243b95ae27a4a3f126ffa33ce
-rw-r--r--display/panel-samsung-ana6707-f10.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/display/panel-samsung-ana6707-f10.c b/display/panel-samsung-ana6707-f10.c
index a679640..927c6f0 100644
--- a/display/panel-samsung-ana6707-f10.c
+++ b/display/panel-samsung-ana6707-f10.c
@@ -849,12 +849,16 @@ static bool ana6707_f10_set_self_refresh(struct exynos_panel *ctx, bool enable)
if (unlikely(!pmode))
return false;
- mdata = pmode->priv_data;
- if (unlikely(!mdata))
+ /* self refresh is not supported in lp mode since that always makes use of early exit */
+ if (pmode->exynos_mode.is_lp_mode) {
+ /* set 1Hz while self refresh is active, otherwise clear it */
+ ctx->panel_idle_vrefresh = enable ? 1 : 0;
+ backlight_state_changed(ctx->bl);
return false;
+ }
- /* self refresh is not supported in lp mode since that always makes use of early exit */
- if (pmode->exynos_mode.is_lp_mode)
+ mdata = pmode->priv_data;
+ if (unlikely(!mdata))
return false;
idle_vrefresh = ana6707_f10_get_min_idle_vrefresh(ctx, pmode);