mirror of
https://gitlab.freedesktop.org/emersion/libliftoff.git
synced 2024-12-25 21:59:11 +01:00
hack: poor man's DRM debugging
This commit is contained in:
parent
bc0d0617ac
commit
d706fc64f3
1 changed files with 5 additions and 0 deletions
5
device.c
5
device.c
|
@ -95,6 +95,8 @@ device_test_commit(struct liftoff_device *device, drmModeAtomicReq *req,
|
||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
|
system("sudo dmesg -C");
|
||||||
|
|
||||||
flags &= ~DRM_MODE_PAGE_FLIP_EVENT;
|
flags &= ~DRM_MODE_PAGE_FLIP_EVENT;
|
||||||
do {
|
do {
|
||||||
ret = drmModeAtomicCommit(device->drm_fd, req,
|
ret = drmModeAtomicCommit(device->drm_fd, req,
|
||||||
|
@ -106,6 +108,9 @@ device_test_commit(struct liftoff_device *device, drmModeAtomicReq *req,
|
||||||
liftoff_log(LIFTOFF_ERROR, "drmModeAtomicCommit: %s",
|
liftoff_log(LIFTOFF_ERROR, "drmModeAtomicCommit: %s",
|
||||||
strerror(-ret));
|
strerror(-ret));
|
||||||
}
|
}
|
||||||
|
if (ret == -EINVAL || ret == -ERANGE) {
|
||||||
|
system("sudo dmesg");
|
||||||
|
}
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue