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>
This commit is contained in:
parent
12821852f0
commit
3dc838f77d
|
@ -284,8 +284,11 @@ ms_do_pageflip(ScreenPtr screen,
|
||||||
new_front_bo.width = new_front->drawable.width;
|
new_front_bo.width = new_front->drawable.width;
|
||||||
new_front_bo.height = new_front->drawable.height;
|
new_front_bo.height = new_front->drawable.height;
|
||||||
if (drmmode_bo_import(&ms->drmmode, &new_front_bo,
|
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;
|
goto error_out;
|
||||||
|
}
|
||||||
|
|
||||||
flags = DRM_MODE_PAGE_FLIP_EVENT;
|
flags = DRM_MODE_PAGE_FLIP_EVENT;
|
||||||
if (async)
|
if (async)
|
||||||
|
@ -309,6 +312,9 @@ ms_do_pageflip(ScreenPtr screen,
|
||||||
if (!queue_flip_on_crtc(screen, crtc, flipdata,
|
if (!queue_flip_on_crtc(screen, crtc, flipdata,
|
||||||
ref_crtc_vblank_pipe,
|
ref_crtc_vblank_pipe,
|
||||||
flags)) {
|
flags)) {
|
||||||
|
xf86DrvMsg(scrn->scrnIndex, X_WARNING,
|
||||||
|
"%s: Queue flip on CRTC %d failed: %s\n",
|
||||||
|
log_prefix, i, strerror(errno));
|
||||||
goto error_undo;
|
goto error_undo;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -338,8 +344,6 @@ error_undo:
|
||||||
}
|
}
|
||||||
|
|
||||||
error_out:
|
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);
|
drmmode_bo_destroy(&ms->drmmode, &new_front_bo);
|
||||||
/* if only the local reference - free the structure,
|
/* if only the local reference - free the structure,
|
||||||
* else drop the local reference and return */
|
* else drop the local reference and return */
|
||||||
|
|
Loading…
Reference in New Issue