summaryrefslogtreecommitdiffstats
path: root/chromeos/display
diff options
context:
space:
mode:
authorglotov@chromium.org <glotov@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-01-23 13:07:59 +0000
committerglotov@chromium.org <glotov@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-01-23 13:07:59 +0000
commit770d758dc7406ef169340065e403600c8e74c54c (patch)
tree6111bc33404f926f59f64b1c49eab4892b161749 /chromeos/display
parent7c264f395e3f3ade415c48c8bdba623a512fe0fc (diff)
downloadchromium_src-770d758dc7406ef169340065e403600c8e74c54c.zip
chromium_src-770d758dc7406ef169340065e403600c8e74c54c.tar.gz
chromium_src-770d758dc7406ef169340065e403600c8e74c54c.tar.bz2
Speculative revert 178195: Implement support for monitor suspend.
This change have made the following bots red: http://build.chromium.org/p/chromium.chromiumos/builders/ChromiumOS%20(x86) http://build.chromium.org/p/chromium.chromiumos/builders/ChromiumOS%20(amd64) http://build.chromium.org/p/chromium.chromiumos/builders/ChromiumOS%20(amd64) http://build.chromium.org/p/chromium.memory/builders/Chromium%20OS%20(amd64)%20ASAN > > This speeds up idle resume by around 2.5 seconds. > > Previously, we would turn the panel off before idle suspend. Then we would > suspend and resume. On resume, the kernel would restore the "off" state, and > the Chrome monitor code would kick in to turn the panel on. This is a huge > waste of time when each panel configuration step takes more than one second. > > Instead, just before suspending, we turn the backlight off and the panel on. > On resume the kernel sets the panel state to on right away, and power_manager > turns the backlight on. The Chrome monitor code still runs, but is a noop. > > This change needs this power_manager change to handle the backlight part: > https://gerrit.chromium.org/gerrit/#/c/40971/ > > BUG=chrome-os-partner:13364 > TEST=By hand: reduce the idle suspend timeout, let the machine idle and > TEST=suspend, press a key to resume and see how long it takes. The time > TEST=it takes shrinks from ~4 seconds to ~1.5 second. > > Change-Id: I610995c12ed08624eb0bc91057d7c9bfa8002fbf > > Review URL: https://chromiumcodereview.appspot.com/11783020 TBR=marcheu@chromium.org Review URL: https://codereview.chromium.org/12035051 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@178288 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chromeos/display')
-rw-r--r--chromeos/display/output_configurator.cc15
-rw-r--r--chromeos/display/output_configurator.h5
2 files changed, 2 insertions, 18 deletions
diff --git a/chromeos/display/output_configurator.cc b/chromeos/display/output_configurator.cc
index b689406..b6480de 100644
--- a/chromeos/display/output_configurator.cc
+++ b/chromeos/display/output_configurator.cc
@@ -769,9 +769,9 @@ bool OutputConfigurator::Dispatch(const base::NativeEvent& event) {
}
// Sets the timer for NotifyOnDisplayChanged(). When an output state change
- // is issued, several notifications should arrive and NotifyOnDisplayChanged()
+ // is issued, several notifications chould arrive and NotifyOnDisplayChanged()
// should be called once for the last one. The timer could lead at most a few
- // hundreds of milliseconds of delay for the notification, but it would be
+ // handreds milliseconds of delay for the notification, but it would be
// unrecognizable for users.
if (notification_timer_.get()) {
notification_timer_->Reset();
@@ -799,17 +799,6 @@ bool OutputConfigurator::IsInternalOutputName(const std::string& name) {
return name.find(kInternal_LVDS) == 0 || name.find(kInternal_eDP) == 0;
}
-void OutputConfigurator::SuspendDisplays() {
- // Turn displays on before suspend. At this point, the backlight is off,
- // so we turn on the internal display so that we can resume directly into
- // "on" state. This greatly reduces resume times.
- ScreenPowerSet(true, true);
- // We need to make sure that the monitor configuration we just did actually
- // completes before we return, because otherwise the X message could be
- // racing with the HandleSuspendReadiness message.
- XSync(base::MessagePumpAuraX11::GetDefaultXDisplay(), 0);
-}
-
void OutputConfigurator::NotifyOnDisplayChanged() {
notification_timer_.reset();
FOR_EACH_OBSERVER(Observer, observers_, OnDisplayModeChanged());
diff --git a/chromeos/display/output_configurator.h b/chromeos/display/output_configurator.h
index 418668e..abb89c3 100644
--- a/chromeos/display/output_configurator.h
+++ b/chromeos/display/output_configurator.h
@@ -101,11 +101,6 @@ class CHROMEOS_EXPORT OutputConfigurator : public MessageLoop::Dispatcher {
// Tells if the output specified by |name| is for internal display.
static bool IsInternalOutputName(const std::string& name);
- // Set all the displays into pre-suspend mode; usually this means configure
- // them for their resume state. This allows faster resume on machines where
- // display configuration is slow.
- void SuspendDisplays();
-
private:
// Fires OnDisplayModeChanged() event to the observers.
void NotifyOnDisplayChanged();