Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(341)

Side by Side Diff: ui/ozone/platform/dri/native_display_delegate_dri.cc

Issue 877213005: [Ozone-Dri] Set DPMS to off when disabling a display (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ui/ozone/platform/dri/native_display_delegate_dri.h" 5 #include "ui/ozone/platform/dri/native_display_delegate_dri.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "ui/display/types/native_display_observer.h" 8 #include "ui/display/types/native_display_observer.h"
9 #include "ui/events/ozone/device/device_event.h" 9 #include "ui/events/ozone/device/device_event.h"
10 #include "ui/ozone/platform/dri/display_mode_dri.h" 10 #include "ui/ozone/platform/dri/display_mode_dri.h"
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
193 193
194 if (mode) { 194 if (mode) {
195 if (!screen_manager_->ConfigureDisplayController( 195 if (!screen_manager_->ConfigureDisplayController(
196 dri_output.crtc(), dri_output.connector(), origin, 196 dri_output.crtc(), dri_output.connector(), origin,
197 static_cast<const DisplayModeDri*>(mode)->mode_info())) { 197 static_cast<const DisplayModeDri*>(mode)->mode_info())) {
198 VLOG(1) << "Failed to configure: crtc=" << dri_output.crtc() 198 VLOG(1) << "Failed to configure: crtc=" << dri_output.crtc()
199 << " connector=" << dri_output.connector(); 199 << " connector=" << dri_output.connector();
200 return false; 200 return false;
201 } 201 }
202 } else { 202 } else {
203 if (dri_output.dpms_property()) {
204 dri_->SetProperty(dri_output.connector(),
205 dri_output.dpms_property()->prop_id, DRM_MODE_DPMS_OFF);
206 }
207
203 if (!screen_manager_->DisableDisplayController(dri_output.crtc())) { 208 if (!screen_manager_->DisableDisplayController(dri_output.crtc())) {
204 VLOG(1) << "Failed to disable crtc=" << dri_output.crtc(); 209 VLOG(1) << "Failed to disable crtc=" << dri_output.crtc();
205 return false; 210 return false;
206 } 211 }
207 } 212 }
208 213
209 return true; 214 return true;
210 } 215 }
211 216
212 void NativeDisplayDelegateDri::Configure(const DisplaySnapshot& output, 217 void NativeDisplayDelegateDri::Configure(const DisplaySnapshot& output,
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
316 std::find_if(old_displays.begin(), old_displays.end(), 321 std::find_if(old_displays.begin(), old_displays.end(),
317 DisplaySnapshotComparator(new_displays[i])); 322 DisplaySnapshotComparator(new_displays[i]));
318 323
319 if (it == old_displays.end()) 324 if (it == old_displays.end())
320 screen_manager_->AddDisplayController(dri_, new_displays[i]->crtc(), 325 screen_manager_->AddDisplayController(dri_, new_displays[i]->crtc(),
321 new_displays[i]->connector()); 326 new_displays[i]->connector());
322 } 327 }
323 } 328 }
324 329
325 } // namespace ui 330 } // namespace ui
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698