From d706fc64f3f5acb596a5fb19a91f5fee877748eb Mon Sep 17 00:00:00 2001 From: Simon Ser Date: Wed, 18 Aug 2021 13:05:36 +0200 Subject: [PATCH] hack: poor man's DRM debugging --- device.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/device.c b/device.c index 2a2a5d4..cf7d7fb 100644 --- a/device.c +++ b/device.c @@ -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, @@ -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; }