sdm: Reject brightness if panel is off
stop/start tests have revealed that sometimes SF tries to set the
brightness before turning the panel on. This in turn causes a brightness
node writing failure in DAL, causing errors to be flagged. Bailout if
current panel state is off.
Change-Id: I8879e785a4e1196d195c9685586271538e7d4a33
diff --git a/sdm/libs/core/display_builtin.cpp b/sdm/libs/core/display_builtin.cpp
index 328364c..0e3ff35 100644
--- a/sdm/libs/core/display_builtin.cpp
+++ b/sdm/libs/core/display_builtin.cpp
@@ -354,6 +354,10 @@
return kErrorParameters;
}
+ if (state_ == kStateOff) {
+ return kErrorNone;
+ }
+
// -1.0f = off, 0.0f = min, 1.0f = max
level_remainder_ = 0.0f;
int level = 0;