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 458 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
469 bool DrmDevice::SetMaster() { | 469 bool DrmDevice::SetMaster() { |
470 DCHECK(file_.IsValid()); | 470 DCHECK(file_.IsValid()); |
471 return (drmSetMaster(file_.GetPlatformFile()) == 0); | 471 return (drmSetMaster(file_.GetPlatformFile()) == 0); |
472 } | 472 } |
473 | 473 |
474 bool DrmDevice::DropMaster() { | 474 bool DrmDevice::DropMaster() { |
475 DCHECK(file_.IsValid()); | 475 DCHECK(file_.IsValid()); |
476 return (drmDropMaster(file_.GetPlatformFile()) == 0); | 476 return (drmDropMaster(file_.GetPlatformFile()) == 0); |
477 } | 477 } |
478 | 478 |
| 479 bool DrmDevice::SetGammaRamp(uint32_t crtc_id, |
| 480 uint32_t size, |
| 481 uint16_t* r, |
| 482 uint16_t* g, |
| 483 uint16_t* b) { |
| 484 DCHECK(file_.IsValid()); |
| 485 TRACE_EVENT0("drm", "DrmDevice::SetGamma"); |
| 486 return (drmModeCrtcSetGamma(file_.GetPlatformFile(), crtc_id, size, r, g, |
| 487 b) == 0); |
| 488 } |
| 489 |
479 } // namespace ui | 490 } // namespace ui |
OLD | NEW |