Message ID | 1363370578-30443-6-git-send-email-bryce@canonical.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On Fri, Mar 15, 2013 at 11:02:55AM -0700, Bryce Harrington wrote: > And if we've had to delay booting due to not being able to set the > interface, fess up. I would squash this into the previous patch. Adding an infinite loop is unpleasant, and therefore guaranteed to be hit on every bisection. -Chris
On Mon, Mar 18, 2013 at 11:00:55AM +0000, Chris Wilson wrote: > On Fri, Mar 15, 2013 at 11:02:55AM -0700, Bryce Harrington wrote: > > And if we've had to delay booting due to not being able to set the > > interface, fess up. > > I would squash this into the previous patch. Adding an infinite loop is > unpleasant, and therefore guaranteed to be hit on every bisection. > -Chris Sounds good, I've resubmitted the series. Thanks, Bryce
diff --git a/hw/xfree86/os-support/linux/lnx_platform.c b/hw/xfree86/os-support/linux/lnx_platform.c index c4d128e..4094866 100644 --- a/hw/xfree86/os-support/linux/lnx_platform.c +++ b/hw/xfree86/os-support/linux/lnx_platform.c @@ -26,19 +26,24 @@ get_drm_info(struct OdevAttributes *attribs, char *path) char *buf; int fd; int err = 0; + int tries = 0; fd = open(path, O_RDWR, O_CLOEXEC); if (fd == -1) return FALSE; - while (1) { + while (tries++ < 2000) { sv.drm_di_major = 1; sv.drm_di_minor = 4; sv.drm_dd_major = -1; /* Don't care */ sv.drm_dd_minor = -1; /* Don't care */ + err = drmSetInterfaceVersion(fd, &sv); - if (!err) + if (!err) { + if (tries > 1) + LogMessage(X_INFO, "setversion 1.4 succeeded on try #%d\n", tries); break; + } usleep(1000); } if (err) {
And if we've had to delay booting due to not being able to set the interface, fess up. Signed-off-by: Bryce Harrington <bryce@canonical.com> --- hw/xfree86/os-support/linux/lnx_platform.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-)