Skip to content

Commit

Permalink
Revert of ozone: Add sync flag for atomic commit (patchset #2 id:2000…
Browse files Browse the repository at this point in the history
…1 of https://codereview.chromium.org/1099713005/)

Reason for revert:
Speculative revert - Linux ChromiumOS Ozone Tests is broken.
http://goo.gl/vykWsG

Related to https://codereview.chromium.org/1100803004/

Original issue's description:
> ozone: Add sync flag for atomic commit and page flip event handling
>
> Committed: https://crrev.com/f7553583492a8ea9a54d75cd6b2d3dd83c94512c
> Cr-Commit-Position: refs/heads/master@{#326863}

TBR=dnicoara@chromium.org,achaulk@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Review URL: https://codereview.chromium.org/1098093005

Cr-Commit-Position: refs/heads/master@{#327016}
  • Loading branch information
nkostylev authored and Commit bot committed Apr 27, 2015
1 parent 5c8771e commit ca0acea
Show file tree
Hide file tree
Showing 5 changed files with 1 addition and 21 deletions.
17 changes: 0 additions & 17 deletions ui/ozone/platform/drm/gpu/drm_device.cc
Original file line number Diff line number Diff line change
Expand Up @@ -498,31 +498,14 @@ bool DrmDevice::CloseBufferHandle(uint32_t handle) {

bool DrmDevice::CommitProperties(drmModePropertySet* properties,
uint32_t flags,
bool is_sync,
const PageFlipCallback& callback) {
#if defined(USE_DRM_ATOMIC)
flags |= DRM_MODE_PAGE_FLIP_EVENT;
if (!is_sync)
flags |= DRM_MODE_PAGE_FLIP_ASYNC;
scoped_ptr<PageFlipPayload> payload(
new PageFlipPayload(base::ThreadTaskRunnerHandle::Get(), callback));
if (!drmModePropertySetCommit(file_.GetPlatformFile(), flags, payload.get(),
properties)) {
// If successful the payload will be removed by the event
ignore_result(payload.release());

// If the flip was requested synchronous or if no watcher has been installed
// yet, then synchronously handle the page flip events.
if (is_sync || !watcher_) {
TRACE_EVENT1("drm", "OnDrmEvent", "socket", file_.GetPlatformFile());

drmEventContext event;
event.version = DRM_EVENT_CONTEXT_VERSION;
event.page_flip_handler = HandlePageFlipEventOnUI;
event.vblank_handler = nullptr;

drmHandleEvent(file_.GetPlatformFile(), &event);
}
return true;
}
return false;
Expand Down
1 change: 0 additions & 1 deletion ui/ozone/platform/drm/gpu/drm_device.h
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,6 @@ class OZONE_EXPORT DrmDevice : public base::RefCountedThreadSafe<DrmDevice> {

virtual bool CommitProperties(drmModePropertySet* properties,
uint32_t flags,
bool is_sync,
const PageFlipCallback& callback);

virtual bool SetCapability(uint64_t capability, uint64_t value);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ bool HardwareDisplayPlaneManagerAtomic::Commit(

plane_list->plane_list.swap(plane_list->old_plane_list);
plane_list->plane_list.clear();
if (!drm_->CommitProperties(plane_list->atomic_property_set.get(), 0, is_sync,
if (!drm_->CommitProperties(plane_list->atomic_property_set.get(), 0,
base::Bind(&AtomicPageFlipCallback))) {
PLOG(ERROR) << "Failed to commit properties";
return false;
Expand Down
1 change: 0 additions & 1 deletion ui/ozone/platform/drm/test/mock_drm_device.cc
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,6 @@ bool MockDrmDevice::CloseBufferHandle(uint32_t handle) {

bool MockDrmDevice::CommitProperties(drmModePropertySet* properties,
uint32_t flags,
bool is_sync,
const PageFlipCallback& callback) {
return false;
}
Expand Down
1 change: 0 additions & 1 deletion ui/ozone/platform/drm/test/mock_drm_device.h
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,6 @@ class MockDrmDevice : public ui::DrmDevice {
bool CloseBufferHandle(uint32_t handle) override;
bool CommitProperties(drmModePropertySet* properties,
uint32_t flags,
bool is_sync,
const PageFlipCallback& callback) override;
bool SetCapability(uint64_t capability, uint64_t value) override;

Expand Down

0 comments on commit ca0acea

Please sign in to comment.