summaryrefslogtreecommitdiff
path: root/libhwc2.1
diff options
context:
space:
mode:
authorlinpeter <linpeter@google.com>2023-03-14 19:25:02 +0800
committerPeter Lin <linpeter@google.com>2023-03-20 08:01:18 +0000
commit1e8dc49afce865e100ae4ea0eee3160d1319a300 (patch)
tree6b721a55f6989298a7294ebb40c42a30ecb9a24b /libhwc2.1
parente7adbac231cd80541ba9e66c971e2a425fd4f443 (diff)
libhwc2.1: clear brightness dirty flag if go sysfs path
When go sysfs path, it does not clear brightness dirty flag. It will apply the privious brightness via drm path. Bug: 272629068 Bug: 272202831 Test: set brightness via HWCService cmd Change-Id: I6d320a5a9673409bc7984eaf02d256c7048ab31e
Diffstat (limited to 'libhwc2.1')
-rw-r--r--libhwc2.1/libdevice/BrightnessController.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/libhwc2.1/libdevice/BrightnessController.cpp b/libhwc2.1/libdevice/BrightnessController.cpp
index b4603c3..5a226e0 100644
--- a/libhwc2.1/libdevice/BrightnessController.cpp
+++ b/libhwc2.1/libdevice/BrightnessController.cpp
@@ -246,7 +246,8 @@ int BrightnessController::processDisplayBrightness(float brightness, const nsecs
} else {
level = brightness < 0 ? 0 : static_cast<uint32_t>(brightness * mMaxBrightness + 0.5f);
}
- // go sysfs path
+ // clear dirty before go sysfs path
+ mBrightnessFloatReq.clear_dirty();
}
// Sysfs path is faster than drm path. If there is an unchecked drm path change, the sysfs