ArchiveOrangemail archive

Nouveau development list


nouveau.lists.freedesktop.org
(List home) (Recent threads) (87 other Freedesktop.org lists)

Subscription Options

  • RSS or Atom: Read-only subscription using a browser or aggregator. This is the recommended way if you don't need to send messages to the list. You can learn more about feed syndication and clients here.
  • Conventional: All messages are delivered to your mail address, and you can reply. To subscribe, send an email to the list's subscribe address with "subscribe" in the subject line, or visit the list's homepage here.
  • Moderate traffic list: up to 30 messages per day
  • This list contains about 18,045 messages, beginning May 2007
  • 4 messages added yesterday
Report the Spam
This button sends a spam report to the moderator. Please use it sparingly. For other removal requests, read this.
Are you sure? yes no

drm/nouveau: do not call ttm_bo_wait_unreserved()

Ad
Pekka Paalanen 1252357524Mon, 07 Sep 2009 21:05:24 +0000 (UTC)
In nouveau_gem_puhsbuf_validate() path, ttm_bo_reserve() already calls
ttm_bo_wait_unreserved() internally. Calling it again is not only racy
and needless, but it makes the X process hang in uninterruptible sleep.

Remove the call to ttm_bo_wait_unreserved() from
nouveau_gem_pushbuf_validate().

Signed-off-by: Pekka Paalanen ---

NOTE!

This is a tentative patch, I didn't even have the time to compile-test it.
On top of the previous.

 drivers/gpu/drm/nouveau/nouveau_gem.c |   17 ++++++-----------
 1 files changed, 6 insertions(+), 11 deletions(-)

diff --git a/drivers/gpu/drm/nouveau/nouveau_gem.c b/drivers/gpu/drm/nouveau/nouveau_gem.c
index 55e7988..b339de2 100644
--- a/drivers/gpu/drm/nouveau/nouveau_gem.c
+++ b/drivers/gpu/drm/nouveau/nouveau_gem.c
@@ -286,19 +286,14 @@ nouveau_gem_pushbuf_lookup_and_reserve(struct nouveau_channel *chan, 	ret = ttm_bo_reserve(&nvbo->bo, false, false, true,
 			     chan->fence.sequence);
-	switch (ret) {
-	case 0:
-		*bop = nvbo;
-		return 0;
-	case -EAGAIN:
-		ret = ttm_bo_wait_unreserved(&nvbo->bo, false);
-		if (ret == 0)
-			ret = -EAGAIN;
-		/* fall through */
-	default:
+
+	if (ret) {
 		drm_gem_object_unreference(gem);
+		return ret;
 	}
-	return ret;
+
+	*bop = nvbo;
+	return 0;
 } static int
Home | About | Privacy