| 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 DCHECK(file_.IsValid()); | |
| 509 return !drmSetClientCap(file_.GetPlatformFile(), capability, value); | |
| 510 } | |
| 511 | |
| 512 bool DrmDevice::SetMaster() { | 507 bool DrmDevice::SetMaster() { |
| 513 DCHECK(file_.IsValid()); | 508 DCHECK(file_.IsValid()); |
| 514 return (drmSetMaster(file_.GetPlatformFile()) == 0); | 509 return (drmSetMaster(file_.GetPlatformFile()) == 0); |
| 515 } | 510 } |
| 516 | 511 |
| 517 bool DrmDevice::DropMaster() { | 512 bool DrmDevice::DropMaster() { |
| 518 DCHECK(file_.IsValid()); | 513 DCHECK(file_.IsValid()); |
| 519 return (drmDropMaster(file_.GetPlatformFile()) == 0); | 514 return (drmDropMaster(file_.GetPlatformFile()) == 0); |
| 520 } | 515 } |
| 521 | 516 |
| 522 } // namespace ui | 517 } // namespace ui |
| OLD | NEW |