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

Side by Side Diff: ui/ozone/platform/drm/gpu/crtc_controller.cc

Issue 1090263002: ozone: drm: Allow Modeset to succeed even if cursor fails (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 8 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/drm/gpu/crtc_controller.h" 5 #include "ui/ozone/platform/drm/gpu/crtc_controller.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/time/time.h" 8 #include "base/time/time.h"
9 #include "ui/ozone/platform/drm/gpu/drm_device.h" 9 #include "ui/ozone/platform/drm/gpu/drm_device.h"
10 #include "ui/ozone/platform/drm/gpu/page_flip_observer.h" 10 #include "ui/ozone/platform/drm/gpu/page_flip_observer.h"
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 is_disabled_ = false; 47 is_disabled_ = false;
48 48
49 // drmModeSetCrtc has an immediate effect, so we can assume that the current 49 // drmModeSetCrtc has an immediate effect, so we can assume that the current
50 // planes have been updated. However if a page flip is still pending, set the 50 // planes have been updated. However if a page flip is still pending, set the
51 // pending planes to the same values so that the callback keeps the correct 51 // pending planes to the same values so that the callback keeps the correct
52 // state. 52 // state.
53 current_planes_ = std::vector<OverlayPlane>(1, plane); 53 current_planes_ = std::vector<OverlayPlane>(1, plane);
54 if (page_flip_pending_) 54 if (page_flip_pending_)
55 pending_planes_ = current_planes_; 55 pending_planes_ = current_planes_;
56 56
57 if (!ResetCursor()) 57 ResetCursor();
58 return false;
59 58
60 return true; 59 return true;
61 } 60 }
62 61
63 bool CrtcController::Disable() { 62 bool CrtcController::Disable() {
64 if (is_disabled_) 63 if (is_disabled_)
65 return true; 64 return true;
66 65
67 is_disabled_ = true; 66 is_disabled_ = true;
68 return drm_->DisableCrtc(crtc_); 67 return drm_->DisableCrtc(crtc_);
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
153 if (!status) { 152 if (!status) {
154 PLOG(ERROR) << "drmModeSetCursor: device " << drm_->device_path().value() 153 PLOG(ERROR) << "drmModeSetCursor: device " << drm_->device_path().value()
155 << " crtc " << crtc_ << " handle " << handle << " size " 154 << " crtc " << crtc_ << " handle " << handle << " size "
156 << size.ToString(); 155 << size.ToString();
157 } 156 }
158 157
159 return status; 158 return status;
160 } 159 }
161 160
162 } // namespace ui 161 } // 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