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

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

Issue 1100803004: ozone: Add ability to set clinet capabilities which we will need for atomic (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
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/drm_device.h" 5 #include "ui/ozone/platform/drm/gpu/drm_device.h"
6 6
7 #include <fcntl.h> 7 #include <fcntl.h>
8 #include <sys/mman.h> 8 #include <sys/mman.h>
9 #include <unistd.h> 9 #include <unistd.h>
10 #include <xf86drm.h> 10 #include <xf86drm.h>
(...skipping 486 matching lines...) Expand 10 before | Expand all | Expand 10 after
497 // If successful the payload will be removed by the event 497 // If successful the payload will be removed by the event
498 ignore_result(payload.release()); 498 ignore_result(payload.release());
499 return true; 499 return true;
500 } 500 }
501 return false; 501 return false;
502 #else 502 #else
503 return false; 503 return false;
504 #endif // defined(USE_DRM_ATOMIC) 504 #endif // defined(USE_DRM_ATOMIC)
505 } 505 }
506 506
507 bool DrmDevice::SetCapability(uint64_t capability, uint64_t value) {
508 return !drmSetClientCap(file_.GetPlatformFile(), capability, value);
dnicoara 2015/04/24 19:38:55 nit:DCHECK(file_.IsValid());
509 }
510
507 bool DrmDevice::SetMaster() { 511 bool DrmDevice::SetMaster() {
508 DCHECK(file_.IsValid()); 512 DCHECK(file_.IsValid());
509 return (drmSetMaster(file_.GetPlatformFile()) == 0); 513 return (drmSetMaster(file_.GetPlatformFile()) == 0);
510 } 514 }
511 515
512 bool DrmDevice::DropMaster() { 516 bool DrmDevice::DropMaster() {
513 DCHECK(file_.IsValid()); 517 DCHECK(file_.IsValid());
514 return (drmDropMaster(file_.GetPlatformFile()) == 0); 518 return (drmDropMaster(file_.GetPlatformFile()) == 0);
515 } 519 }
516 520
517 } // namespace ui 521 } // namespace ui
OLDNEW
« no previous file with comments | « ui/ozone/platform/drm/gpu/drm_device.h ('k') | ui/ozone/platform/drm/gpu/hardware_display_plane_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698