All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marcin Slusarz <marcin.slusarz-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
Subject: [PATCH] nouveau: remove unnecessary EAGAIN loops
Date: Mon, 23 Apr 2012 00:31:48 +0200	[thread overview]
Message-ID: <20120422223148.GA8620@joi.lan> (raw)

drmCommandWrite / drmCommandWriteRead already loop on EAGAIN.
---
 nouveau/nouveau.c |    8 ++------
 nouveau/pushbuf.c |    7 ++-----
 2 files changed, 4 insertions(+), 11 deletions(-)

diff --git a/nouveau/nouveau.c b/nouveau/nouveau.c
index 699b9b7..f0bc2c3 100644
--- a/nouveau/nouveau.c
+++ b/nouveau/nouveau.c
@@ -461,12 +461,8 @@ nouveau_bo_wait(struct nouveau_bo *bo, uint32_t access,
 	if (access & NOUVEAU_BO_NOBLOCK)
 		req.flags |= NOUVEAU_GEM_CPU_PREP_NOWAIT;
 
-	do {
-		ret = drmCommandWrite(bo->device->fd,
-				      DRM_NOUVEAU_GEM_CPU_PREP,
-				      &req, sizeof(req));
-	} while (ret == -EAGAIN);
-
+	ret = drmCommandWrite(bo->device->fd, DRM_NOUVEAU_GEM_CPU_PREP,
+			      &req, sizeof(req));
 	if (ret == 0)
 		nvbo->access = 0;
 	return ret;
diff --git a/nouveau/pushbuf.c b/nouveau/pushbuf.c
index 103737e..7b9dbaa 100644
--- a/nouveau/pushbuf.c
+++ b/nouveau/pushbuf.c
@@ -341,11 +341,8 @@ pushbuf_submit(struct nouveau_pushbuf *push, struct nouveau_object *chan)
 			pushbuf_dump(krec, krec_id++, fifo->channel);
 
 #ifndef SIMULATE
-		do {
-			ret = drmCommandWriteRead(dev->fd,
-						  DRM_NOUVEAU_GEM_PUSHBUF,
-						  &req, sizeof(req));
-		} while (ret == -EAGAIN);
+		ret = drmCommandWriteRead(dev->fd, DRM_NOUVEAU_GEM_PUSHBUF,
+					  &req, sizeof(req));
 		nvpb->suffix0 = req.suffix0;
 		nvpb->suffix1 = req.suffix1;
 		dev->vram_limit = (req.vram_available * 80) / 100;
-- 
1.7.8.5

                 reply	other threads:[~2012-04-22 22:31 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20120422223148.GA8620@joi.lan \
    --to=marcin.slusarz-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
    --cc=nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.