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

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: revert PS4 Created 5 years, 7 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 557 matching lines...) Expand 10 before | Expand all | Expand 10 after
568 // If successful the payload will be removed by the event 568 // If successful the payload will be removed by the event
569 ignore_result(payload.release()); 569 ignore_result(payload.release());
570 return true; 570 return true;
571 } 571 }
572 return false; 572 return false;
573 #else 573 #else
574 return false; 574 return false;
575 #endif // defined(USE_DRM_ATOMIC) 575 #endif // defined(USE_DRM_ATOMIC)
576 } 576 }
577 577
578 bool DrmDevice::SetCapability(uint64_t capability, uint64_t value) {
579 DCHECK(file_.IsValid());
580 return !drmSetClientCap(file_.GetPlatformFile(), capability, value);
581 }
582
578 bool DrmDevice::SetMaster() { 583 bool DrmDevice::SetMaster() {
579 DCHECK(file_.IsValid()); 584 DCHECK(file_.IsValid());
580 return (drmSetMaster(file_.GetPlatformFile()) == 0); 585 return (drmSetMaster(file_.GetPlatformFile()) == 0);
581 } 586 }
582 587
583 bool DrmDevice::DropMaster() { 588 bool DrmDevice::DropMaster() {
584 DCHECK(file_.IsValid()); 589 DCHECK(file_.IsValid());
585 return (drmDropMaster(file_.GetPlatformFile()) == 0); 590 return (drmDropMaster(file_.GetPlatformFile()) == 0);
586 } 591 }
587 592
(...skipping 19 matching lines...) Expand all
607 b.push_back(lut[i].b); 612 b.push_back(lut[i].b);
608 } 613 }
609 614
610 DCHECK(file_.IsValid()); 615 DCHECK(file_.IsValid());
611 TRACE_EVENT0("drm", "DrmDevice::SetGamma"); 616 TRACE_EVENT0("drm", "DrmDevice::SetGamma");
612 return (drmModeCrtcSetGamma(file_.GetPlatformFile(), crtc_id, r.size(), &r[0], 617 return (drmModeCrtcSetGamma(file_.GetPlatformFile(), crtc_id, r.size(), &r[0],
613 &g[0], &b[0]) == 0); 618 &g[0], &b[0]) == 0);
614 } 619 }
615 620
616 } // namespace ui 621 } // 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