From: Bryce Harrington <bryce@canonical.com>
To: intel-gfx@lists.freedesktop.org, chris@chris-wilson.co.uk
Cc: Bryce Harrington <bryce@canonical.com>
Subject: [PATCH 4/8] xfree86: Keep trying to set interface on drm until it succeeds
Date: Fri, 15 Mar 2013 11:02:54 -0700 [thread overview]
Message-ID: <1363370578-30443-5-git-send-email-bryce@canonical.com> (raw)
In-Reply-To: <1363370578-30443-1-git-send-email-bryce@canonical.com>
Signed-off-by: Bryce Harrington <bryce@canonical.com>
---
hw/xfree86/os-support/linux/lnx_platform.c | 15 ++++++++++-----
1 file changed, 10 insertions(+), 5 deletions(-)
diff --git a/hw/xfree86/os-support/linux/lnx_platform.c b/hw/xfree86/os-support/linux/lnx_platform.c
index 3ae2db1..c4d128e 100644
--- a/hw/xfree86/os-support/linux/lnx_platform.c
+++ b/hw/xfree86/os-support/linux/lnx_platform.c
@@ -31,11 +31,16 @@ get_drm_info(struct OdevAttributes *attribs, char *path)
if (fd == -1)
return FALSE;
- 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);
+ while (1) {
+ 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)
+ break;
+ usleep(1000);
+ }
if (err) {
ErrorF("setversion 1.4 failed: %s\n", strerror(-err));
goto out;
--
1.7.9.5
next prev parent reply other threads:[~2013-03-15 18:03 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-15 18:02 [PATCH 0/8] Handle drm race condition Bryce Harrington
2013-03-15 18:02 ` [PATCH 1/8] xfree86: (Cleanup) Close fd if drm interface 1.4 could not be set Bryce Harrington
2013-03-15 18:02 ` [PATCH 2/8] xfree86: Track error code and add label for error handling Bryce Harrington
2013-03-15 18:02 ` [PATCH 3/8] xfree86: Provide more details on failure Bryce Harrington
2013-03-15 18:02 ` Bryce Harrington [this message]
2013-03-15 18:02 ` [PATCH 5/8] xfree86: After 2 sec, abort setting drm interface version Bryce Harrington
2013-03-18 11:00 ` Chris Wilson
2013-03-18 20:52 ` Bryce Harrington
2013-03-15 18:02 ` [PATCH 6/8] xfree86: Fix race condition failure opening drm Bryce Harrington
2013-03-15 18:02 ` [PATCH 7/8] xfree86: Be verbose if waiting on opening the drm device Bryce Harrington
2013-03-15 18:02 ` [PATCH 8/8] xfree86: Also handle EAGAIN errors from drmSetInterfaceVersion() Bryce Harrington
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1363370578-30443-5-git-send-email-bryce@canonical.com \
--to=bryce@canonical.com \
--cc=chris@chris-wilson.co.uk \
--cc=intel-gfx@lists.freedesktop.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox