Skip to contentSkip to conversation

nouveau: when nouveau_bo_map fails you except it to not be mapped

PATCH In review Maarten Maathuis 1 participant 3 messages Dec 21, 2009 – Dec 23, 2009 2 messages not in the archive

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 nouveau: when nouveau_bo_map fails you except it to not be mapped

---
 nouveau/nouveau_bo.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
nouveau/nouveau_bo.c +3 -1
index 10cc8a6..9d584a3 100644
@@ -444,8 +444,10 @@ nouveau_bo_map_range(struct nouveau_bo *bo, uint32_t delta, uint32_t size,
 		if (!(flags & NOUVEAU_BO_NOSYNC)) {
 			ret = nouveau_bo_wait(bo, (flags & NOUVEAU_BO_WR),
 					      (flags & NOUVEAU_BO_NOWAIT), 0);
-			if (ret)
+			if (ret) {
+				nouveau_bo_unmap(bo);
 				return ret;
+			}
 		}
 
 		bo->map = (char *)nvbo->map + delta;
Signature · 1 line
1.6.5.4

A message that is not in the archive (sent off-list or not yet received): 1261410714-18055-1-git-send-email-madman2003-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org

#2 lore raw

Can this go in?

Quoted 24 lines · Maarten Maathuis

---
 nouveau/nouveau_bo.c |    4 +++-

 1 files changed, 3 insertions(+), 1 deletions(-)
nouveau/nouveau_bo.c +3 -2
index 10cc8a6..9d584a3 100644
@@ -444,8 +444,10 @@ nouveau_bo_map_range(struct nouveau_bo *bo, uint32_t delta, uint32_t size,
                if (!(flags & NOUVEAU_BO_NOSYNC)) {
                        ret = nouveau_bo_wait(bo, (flags & NOUVEAU_BO_WR),
                                              (flags & NOUVEAU_BO_NOWAIT), 0);
-                       if (ret)
+                       if (ret) {
+                               nouveau_bo_unmap(bo);
                                return ret;
+                       }
                }
 
                bo->map = (char *)nvbo->map + delta;
--

1.6.5.4

A message that is not in the archive (sent off-list or not yet received): 6d4bc9fc0912230731v4689e449u500e803e39fb3329-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org

#4 lore raw

That should be s/except/expect

Quoted 28 lines · Maarten Maathuis

Can this go in?

Quoted 24 lines · Maarten Maathuis

---
 nouveau/nouveau_bo.c |    4 +++-

 1 files changed, 3 insertions(+), 1 deletions(-)
nouveau/nouveau_bo.c +3 -2
index 10cc8a6..9d584a3 100644
@@ -444,8 +444,10 @@ nouveau_bo_map_range(struct nouveau_bo *bo, uint32_t delta, uint32_t size,
                if (!(flags & NOUVEAU_BO_NOSYNC)) {
                        ret = nouveau_bo_wait(bo, (flags & NOUVEAU_BO_WR),
                                              (flags & NOUVEAU_BO_NOWAIT), 0);
-                       if (ret)
+                       if (ret) {
+                               nouveau_bo_unmap(bo);
                                return ret;
+                       }
                }
 
                bo->map = (char *)nvbo->map + delta;
--

1.6.5.4