diff options
author | marcheu@chromium.org <marcheu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-12-08 22:49:38 +0000 |
---|---|---|
committer | marcheu@chromium.org <marcheu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-12-08 22:49:38 +0000 |
commit | 6370121de1f821519af0496aa10dd7c256ea5246 (patch) | |
tree | 9c9830ee7c6d0d81c6e99c6c878af6ec2b7f4c10 /chromeos | |
parent | 63363c745b2407e900677f0160f860ce33dafbf5 (diff) | |
download | chromium_src-6370121de1f821519af0496aa10dd7c256ea5246.zip chromium_src-6370121de1f821519af0496aa10dd7c256ea5246.tar.gz chromium_src-6370121de1f821519af0496aa10dd7c256ea5246.tar.bz2 |
output_configurator: Skip reallocating the framebuffer when not needed.
When configuring outputs, don't reallocate the framebuffer if it's already the
right size. This avoids the ConfigureCrtc calls which turn off all the
displays. This reconfiguration can take up to two seconds on Link, because
each panel on/off takes 500ms there.
This speeds up modesetting, and suspend/resume times. Note that this applies
to all Chrome OS machines, so will result in improving times across the board,
but the panel timings aren't as bad on other platforms so it makes less of a
difference.
BUG=chrome-os-partner:13364
TEST=by hand
Change-Id: Ia8344aa689c0307e8a1c85a5a2b75af6fb4b8371
Review URL: https://chromiumcodereview.appspot.com/11471039
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@171999 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chromeos')
-rw-r--r-- | chromeos/display/output_configurator.cc | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/chromeos/display/output_configurator.cc b/chromeos/display/output_configurator.cc index 690a53d..958553c 100644 --- a/chromeos/display/output_configurator.cc +++ b/chromeos/display/output_configurator.cc @@ -123,6 +123,13 @@ static void CreateFrameBuffer(Display* display, int width, int height) { VLOG(1) << "CreateFrameBuffer " << width << " by " << height; + + // Don't do anything if the framebuffer is already the right size. + // This speeds up modesetting and suspend/resume. + if (width == DisplayWidth(display, DefaultScreen (display)) && + height == DisplayHeight(display, DefaultScreen (display))) + return; + // Note that setting the screen size fails if any CRTCs are currently // pointing into it so disable them all. for (int i = 0; i < screen->ncrtc; ++i) { |