diff mbox

[v2,7/7] xfree86: Also handle EAGAIN errors from drmSetInterfaceVersion().

Message ID 1363639911-21239-8-git-send-email-bryce@canonical.com (mailing list archive)
State New, archived
Headers show

Commit Message

Bryce Harrington March 18, 2013, 8:51 p.m. UTC
It has been suggested that the kernel may pass EAGAIN when the device is
unavailable.  This hasn't been seen in practice, and examination of the
function definition in libdrm suggests EAGAIN is handled internally so
would not be seen by the xserver when making this call.  So, this patch
is probably unneeded.  But include support anyway.

Signed-off-by: Bryce Harrington <bryce@canonical.com>
---
 hw/xfree86/os-support/linux/lnx_platform.c |    3 +++
 1 file changed, 3 insertions(+)
diff mbox

Patch

diff --git a/hw/xfree86/os-support/linux/lnx_platform.c b/hw/xfree86/os-support/linux/lnx_platform.c
index 3386b67..b05719d 100644
--- a/hw/xfree86/os-support/linux/lnx_platform.c
+++ b/hw/xfree86/os-support/linux/lnx_platform.c
@@ -46,6 +46,9 @@  get_drm_info(struct OdevAttributes *attribs, char *path)
 	} if (err == -EACCES) {
 	    if (tries % 500 == 0)
 		LogMessage(X_INFO, "waiting on drm device...\n");
+	} if (err == -EAGAIN) {
+	    if (tries % 500 == 0)
+		LogMessage(X_INFO, "drm device busy...\n");
 	} else {
 	    break;
 	}