summaryrefslogtreecommitdiff
path: root/hw/xfree86
diff options
context:
space:
mode:
authorHans de Goede <hdegoede@redhat.com>2019-08-08 21:54:51 +0200
committerHans de Goede <hdegoede@redhat.com>2019-08-09 10:51:06 +0200
commit3dc838f77d9a9417adf6a03cc82aa4e9337153a7 (patch)
tree96890a405e7a76e1082735ccfebfa49c72e6e476 /hw/xfree86
parent12821852f0d82ecef686262382c84b2c1625a99f (diff)
modesetting: Improve page-flip error reporting
Before this commit ms_do_pageflip logged a single error for both the drmmode_bo_import failure path as well as for the queue_flip_on_crtc path. This commit splits this into 2 separate error logs so that it is clear what the cause of the flip-failure is. Reviewed-by: Michel Dänzer <michel.daenzer@amd.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Diffstat (limited to 'hw/xfree86')
-rw-r--r--hw/xfree86/drivers/modesetting/pageflip.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/hw/xfree86/drivers/modesetting/pageflip.c b/hw/xfree86/drivers/modesetting/pageflip.c
index 88a2f687c..830ec7599 100644
--- a/hw/xfree86/drivers/modesetting/pageflip.c
+++ b/hw/xfree86/drivers/modesetting/pageflip.c
@@ -284,8 +284,11 @@ ms_do_pageflip(ScreenPtr screen,
new_front_bo.width = new_front->drawable.width;
new_front_bo.height = new_front->drawable.height;
if (drmmode_bo_import(&ms->drmmode, &new_front_bo,
- &ms->drmmode.fb_id))
+ &ms->drmmode.fb_id)) {
+ xf86DrvMsg(scrn->scrnIndex, X_WARNING, "%s: Import BO failed: %s\n",
+ log_prefix, strerror(errno));
goto error_out;
+ }
flags = DRM_MODE_PAGE_FLIP_EVENT;
if (async)
@@ -309,6 +312,9 @@ ms_do_pageflip(ScreenPtr screen,
if (!queue_flip_on_crtc(screen, crtc, flipdata,
ref_crtc_vblank_pipe,
flags)) {
+ xf86DrvMsg(scrn->scrnIndex, X_WARNING,
+ "%s: Queue flip on CRTC %d failed: %s\n",
+ log_prefix, i, strerror(errno));
goto error_undo;
}
}
@@ -338,8 +344,6 @@ error_undo:
}
error_out:
- xf86DrvMsg(scrn->scrnIndex, X_WARNING, "%s: Page flip failed: %s\n",
- log_prefix, strerror(errno));
drmmode_bo_destroy(&ms->drmmode, &new_front_bo);
/* if only the local reference - free the structure,
* else drop the local reference and return */