aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarcin Slusarz2012-04-22 17:31:48 -0500
committerBen Skeggs2012-04-23 21:41:39 -0500
commitd954648b4872e6b40ec8768a14eee818bc7613a8 (patch)
tree9c2416e5ef2f9e09272190a3c86d113569f00fbb /nouveau
parent73b9a2881c37990dee0afb9cb23a6a1e85339ede (diff)
downloadlibdrm-d954648b4872e6b40ec8768a14eee818bc7613a8.tar.gz
libdrm-d954648b4872e6b40ec8768a14eee818bc7613a8.tar.xz
libdrm-d954648b4872e6b40ec8768a14eee818bc7613a8.zip
nouveau: remove unnecessary EAGAIN loops
drmCommandWrite / drmCommandWriteRead already loop on EAGAIN. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'nouveau')
-rw-r--r--nouveau/nouveau.c8
-rw-r--r--nouveau/pushbuf.c7
2 files changed, 4 insertions, 11 deletions
diff --git a/nouveau/nouveau.c b/nouveau/nouveau.c
index 699b9b76..f0bc2c3f 100644
--- a/nouveau/nouveau.c
+++ b/nouveau/nouveau.c
@@ -461,12 +461,8 @@ nouveau_bo_wait(struct nouveau_bo *bo, uint32_t access,
461 if (access & NOUVEAU_BO_NOBLOCK) 461 if (access & NOUVEAU_BO_NOBLOCK)
462 req.flags |= NOUVEAU_GEM_CPU_PREP_NOWAIT; 462 req.flags |= NOUVEAU_GEM_CPU_PREP_NOWAIT;
463 463
464 do { 464 ret = drmCommandWrite(bo->device->fd, DRM_NOUVEAU_GEM_CPU_PREP,
465 ret = drmCommandWrite(bo->device->fd, 465 &req, sizeof(req));
466 DRM_NOUVEAU_GEM_CPU_PREP,
467 &req, sizeof(req));
468 } while (ret == -EAGAIN);
469
470 if (ret == 0) 466 if (ret == 0)
471 nvbo->access = 0; 467 nvbo->access = 0;
472 return ret; 468 return ret;
diff --git a/nouveau/pushbuf.c b/nouveau/pushbuf.c
index 103737e6..7b9dbaad 100644
--- a/nouveau/pushbuf.c
+++ b/nouveau/pushbuf.c
@@ -341,11 +341,8 @@ pushbuf_submit(struct nouveau_pushbuf *push, struct nouveau_object *chan)
341 pushbuf_dump(krec, krec_id++, fifo->channel); 341 pushbuf_dump(krec, krec_id++, fifo->channel);
342 342
343#ifndef SIMULATE 343#ifndef SIMULATE
344 do { 344 ret = drmCommandWriteRead(dev->fd, DRM_NOUVEAU_GEM_PUSHBUF,
345 ret = drmCommandWriteRead(dev->fd, 345 &req, sizeof(req));
346 DRM_NOUVEAU_GEM_PUSHBUF,
347 &req, sizeof(req));
348 } while (ret == -EAGAIN);
349 nvpb->suffix0 = req.suffix0; 346 nvpb->suffix0 = req.suffix0;
350 nvpb->suffix1 = req.suffix1; 347 nvpb->suffix1 = req.suffix1;
351 dev->vram_limit = (req.vram_available * 80) / 100; 348 dev->vram_limit = (req.vram_available * 80) / 100;