OLD | NEW |
---|---|
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 Loading... | |
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 |
OLD | NEW |