Skip to content
This repository has been archived by the owner on Oct 25, 2021. It is now read-only.

hack: poor man's DRM debugging #61

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions device.c
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,8 @@ device_test_commit(struct liftoff_device *device, drmModeAtomicReq *req,
{
int ret;

system("sudo dmesg -C");

flags &= ~DRM_MODE_PAGE_FLIP_EVENT;
do {
ret = drmModeAtomicCommit(device->drm_fd, req,
Expand All @@ -106,6 +108,9 @@ device_test_commit(struct liftoff_device *device, drmModeAtomicReq *req,
liftoff_log(LIFTOFF_ERROR, "drmModeAtomicCommit: %s",
strerror(-ret));
}
if (ret == -EINVAL || ret == -ERANGE) {
system("sudo dmesg");
}

return ret;
}