debian/patches/drm_device_keep_trying.patch | 40 +++++++++++++++++++++------- 1 file changed, 30 insertions(+), 10 deletions(-)
New commits: commit 0a59773cadfbca1bf1806e11c1ad76ab0a2dc821 Author: Maarten Lankhorst <[email protected]> Date: Tue Mar 12 13:40:41 2013 +0100 sigh, next attempt, with spinning in get_drm_master diff --git a/debian/patches/drm_device_keep_trying.patch b/debian/patches/drm_device_keep_trying.patch index 3ff1eab..b36a226 100644 --- a/debian/patches/drm_device_keep_trying.patch +++ b/debian/patches/drm_device_keep_trying.patch @@ -26,7 +26,31 @@ Signed-off-by: Bryce Harrington <[email protected]> /* Linux platform device support */ #include "xf86_OSproc.h" -@@ -23,17 +24,40 @@ +@@ -17,23 +18,60 @@ + + #include "hotplug.h" + ++static Bool get_drm_master(int fd) ++{ ++ int ret, tries = 400; ++ ++ LogMessage(X_INFO, "spinning!\n"); ++ ++ while (tries--) { ++ if (drmSetMaster(fd) >= 0) ++ return TRUE; ++ ++ if (errno != EINVAL) ++ break; ++ ++ usleep(10000); ++ } ++ return FALSE; ++} ++ + static Bool + get_drm_info(struct OdevAttributes *attribs, char *path) + { drmSetVersion sv; char *buf; int fd; @@ -57,17 +81,13 @@ Signed-off-by: Bryce Harrington <[email protected]> + if (!err) + break; + -+ if (err != -EACCES) { ++ if (err == -EACCES) { ++ if (get_drm_master(fd)) ++ continue; ++ ErrorF("drmSetMaster failed with -%i(%m)\n", errno); ++ } else + ErrorF("drmSetInterfaceVersion failed with %i(%s)\n", err, strerror(-err)); -+ goto err; -+ } -+ -+ err = drmSetMaster(fd); -+ if (!err) -+ /* retry */ -+ continue; + -+ ErrorF("drmSetMaster failed with %i(%m)\n", errno); +err: + close(fd); return FALSE; -- To UNSUBSCRIBE, email to [email protected] with a subject of "unsubscribe". Trouble? Contact [email protected] Archive: http://lists.debian.org/[email protected]

