hack: poor man's DRM debugging

This commit is contained in:
Simon Ser 2021-08-18 13:05:36 +02:00
parent bc0d0617ac
commit d706fc64f3

View file

@ -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;
} }