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

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

Issue 2772113002: Revert of "Update linux sysroot from Wheezy to Jessie" (Closed)
Patch Set: Created 3 years, 9 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 | « tools/mb/mb_config.pyl ('k') | 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/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 661 matching lines...) Expand 10 before | Expand all | Expand 10 after
672 page_flip_manager_->RegisterCallback(id, crtc_count, callback); 672 page_flip_manager_->RegisterCallback(id, crtc_count, callback);
673 673
674 return true; 674 return true;
675 } 675 }
676 return false; 676 return false;
677 } 677 }
678 678
679 bool DrmDevice::SetCapability(uint64_t capability, uint64_t value) { 679 bool DrmDevice::SetCapability(uint64_t capability, uint64_t value) {
680 DCHECK(file_.IsValid()); 680 DCHECK(file_.IsValid());
681 681
682 #ifndef DRM_IOCTL_SET_CLIENT_CAP
683 // drmSetClientCap was introduced in a later version of libdrm than the wheezy
684 // sysroot supplies.
685 // TODO(thomasanderson): Remove this when support for the wheezy sysroot is
686 // dropped in favor of jessie.
687 #define DRM_IOCTL_SET_CLIENT_CAP DRM_IOW(0x0d, struct drm_set_client_cap)
688 struct drm_set_client_cap {
689 __u64 capability;
690 __u64 value;
691 };
692 #endif
693
682 struct drm_set_client_cap cap = {capability, value}; 694 struct drm_set_client_cap cap = {capability, value};
683 return !drmIoctl(file_.GetPlatformFile(), DRM_IOCTL_SET_CLIENT_CAP, &cap); 695 return !drmIoctl(file_.GetPlatformFile(), DRM_IOCTL_SET_CLIENT_CAP, &cap);
684 } 696 }
685 697
686 bool DrmDevice::SetMaster() { 698 bool DrmDevice::SetMaster() {
687 TRACE_EVENT1("drm", "DrmDevice::SetMaster", "path", device_path_.value()); 699 TRACE_EVENT1("drm", "DrmDevice::SetMaster", "path", device_path_.value());
688 DCHECK(file_.IsValid()); 700 DCHECK(file_.IsValid());
689 return (drmSetMaster(file_.GetPlatformFile()) == 0); 701 return (drmSetMaster(file_.GetPlatformFile()) == 0);
690 } 702 }
691 703
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
809 reinterpret_cast<unsigned char*>(ctm_blob_data.get()), 821 reinterpret_cast<unsigned char*>(ctm_blob_data.get()),
810 sizeof(DrmColorCtm))) 822 sizeof(DrmColorCtm)))
811 return false; 823 return false;
812 } 824 }
813 } 825 }
814 826
815 return true; 827 return true;
816 } 828 }
817 829
818 } // namespace ui 830 } // namespace ui
OLDNEW
« no previous file with comments | « tools/mb/mb_config.pyl ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698