summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRamkumar Radhakrishnan <ramkumar@codeaurora.org>2016-12-07 13:52:45 -0800
committerGerrit - the friendly Code Review server <code-review@localhost>2016-12-14 12:36:24 -0800
commita9a915add8afa0f7813ef9ed5e41c752154e7071 (patch)
tree67cb84283d80db7a5457a1d17f9fc0206f9ab4dc
parentbd5a8c7595e63560bf96bf6e3d7bdb27f7d57d97 (diff)
downloaddisplay-a9a915add8afa0f7813ef9ed5e41c752154e7071.tar.gz
sdm: Handle AVR and dynamic fps concurrency scenario.
Change the refresh rate of the panel only when AVR feature is disabled or AVR feature is not supported to avoid ping pong time out Change-Id: Id1728849a01eea60d9b088417399f7b9d223498a CRs-Fixed: 1098635
-rw-r--r--sdm/libs/core/fb/hw_primary.cpp6
-rw-r--r--sdm/libs/core/fb/hw_primary.h1
2 files changed, 7 insertions, 0 deletions
diff --git a/sdm/libs/core/fb/hw_primary.cpp b/sdm/libs/core/fb/hw_primary.cpp
index cf474ec6..d5f1733a 100644
--- a/sdm/libs/core/fb/hw_primary.cpp
+++ b/sdm/libs/core/fb/hw_primary.cpp
@@ -105,6 +105,8 @@ DisplayError HWPrimary::Init() {
EnableHotPlugDetection(1);
InitializeConfigs();
+ avr_prop_disabled_ = Debug::IsAVRDisabled();
+
return error;
}
@@ -296,6 +298,10 @@ DisplayError HWPrimary::SetDisplayAttributes(uint32_t index) {
DisplayError HWPrimary::SetRefreshRate(uint32_t refresh_rate) {
char node_path[kMaxStringLength] = {0};
+ if (hw_resource_.has_avr && !avr_prop_disabled_) {
+ return kErrorNotSupported;
+ }
+
if (refresh_rate == display_attributes_.fps) {
return kErrorNone;
}
diff --git a/sdm/libs/core/fb/hw_primary.h b/sdm/libs/core/fb/hw_primary.h
index ae453184..bd6ea2f9 100644
--- a/sdm/libs/core/fb/hw_primary.h
+++ b/sdm/libs/core/fb/hw_primary.h
@@ -85,6 +85,7 @@ class HWPrimary : public HWDevice {
const char *kBrightnessNode = "/sys/class/leds/lcd-backlight/brightness";
const char *kAutoRefreshNode = "/sys/devices/virtual/graphics/fb0/msm_cmd_autorefresh_en";
bool auto_refresh_ = false;
+ bool avr_prop_disabled_ = false;
};
} // namespace sdm