diff options
| author | 2018-03-13 20:39:42 +0000 | |
|---|---|---|
| committer | 2018-03-13 20:39:42 +0000 | |
| commit | 9a34c1a968d70bd8041612ba26de2600455a7cbd (patch) | |
| tree | 36b3121bfe88ba50a598cda242b1924630bbf2b7 | |
| parent | 0edb3ca033097dccdb813610c29109596a9d49b7 (diff) | |
| parent | 9af9d4b9f7b5d64153c350d01e85fc013581387a (diff) | |
Merge "Remove unused brightness control from HardwareComposer" into pi-dev
| -rw-r--r-- | libs/vr/libvrflinger/hardware_composer.cpp | 28 | ||||
| -rw-r--r-- | libs/vr/libvrflinger/hardware_composer.h | 5 |
2 files changed, 0 insertions, 33 deletions
diff --git a/libs/vr/libvrflinger/hardware_composer.cpp b/libs/vr/libvrflinger/hardware_composer.cpp index be8a721526..5b4964553c 100644 --- a/libs/vr/libvrflinger/hardware_composer.cpp +++ b/libs/vr/libvrflinger/hardware_composer.cpp @@ -45,9 +45,6 @@ namespace dvr { namespace { -const char kBacklightBrightnessSysFile[] = - "/sys/class/leds/lcd-backlight/brightness"; - const char kDvrPerformanceProperty[] = "sys.dvr.performance"; const char kDvrStandaloneProperty[] = "ro.boot.vr"; @@ -257,13 +254,6 @@ void HardwareComposer::OnPostThreadResumed() { EnableVsync(true); - // TODO(skiazyk): We need to do something about accessing this directly, - // supposedly there is a backlight service on the way. - // TODO(steventhomas): When we change the backlight setting, will surface - // flinger (or something else) set it back to its original value once we give - // control of the display back to surface flinger? - SetBacklightBrightness(255); - // Trigger target-specific performance mode change. property_set(kDvrPerformanceProperty, "performance"); } @@ -698,16 +688,6 @@ void HardwareComposer::PostThread() { bool thread_policy_setup = SetThreadPolicy("graphics:high", "/system/performance"); -#if ENABLE_BACKLIGHT_BRIGHTNESS - // TODO(hendrikw): This isn't required at the moment. It's possible that there - // is another method to access this when needed. - // Open the backlight brightness control sysfs node. - backlight_brightness_fd_ = LocalHandle(kBacklightBrightnessSysFile, O_RDWR); - ALOGW_IF(!backlight_brightness_fd_, - "HardwareComposer: Failed to open backlight brightness control: %s", - strerror(errno)); -#endif // ENABLE_BACKLIGHT_BRIGHTNESS - // Create a timerfd based on CLOCK_MONOTINIC. vsync_sleep_timer_fd_.Reset(timerfd_create(CLOCK_MONOTONIC, 0)); LOG_ALWAYS_FATAL_IF( @@ -983,14 +963,6 @@ void HardwareComposer::SetVSyncCallback(VSyncCallback callback) { vsync_callback_ = callback; } -void HardwareComposer::SetBacklightBrightness(int brightness) { - if (backlight_brightness_fd_) { - std::array<char, 32> text; - const int length = snprintf(text.data(), text.size(), "%d", brightness); - write(backlight_brightness_fd_.Get(), text.data(), length); - } -} - Return<void> HardwareComposer::ComposerCallback::onHotplug( Hwc2::Display display, IComposerCallback::Connection conn) { // Our first onHotplug callback is always for the primary display. diff --git a/libs/vr/libvrflinger/hardware_composer.h b/libs/vr/libvrflinger/hardware_composer.h index 1d0c7ef9f9..4a503f8500 100644 --- a/libs/vr/libvrflinger/hardware_composer.h +++ b/libs/vr/libvrflinger/hardware_composer.h @@ -391,8 +391,6 @@ class HardwareComposer { HWC::Error Validate(hwc2_display_t display); HWC::Error Present(hwc2_display_t display); - void SetBacklightBrightness(int brightness); - void PostLayers(); void PostThread(); @@ -499,9 +497,6 @@ class HardwareComposer { // notified via post_thread_wait_. bool boot_finished_ = false; - // Backlight LED brightness sysfs node. - pdx::LocalHandle backlight_brightness_fd_; - // VSync sleep timerfd. pdx::LocalHandle vsync_sleep_timer_fd_; |