Skip to contentSkip to conversation

nouveau: add OUT_RELOChl

PATCH In review Marcin Slusarz 1 participant 2 messages Jan 9, 2011 – Jan 12, 2011 1 message not in the archive

lore
Share & tools
lore
#0 lore raw

PATCH 2/3 nouveau: add OUT_RELOChl

---
 nouveau/nouveau_pushbuf.h |   11 +++++++++++
 1 files changed, 11 insertions(+), 0 deletions(-)
nouveau/nouveau_pushbuf.h +11 -0
index 70d0f28..5151e01 100644
@@ -142,4 +142,15 @@ OUT_RELOCh(struct nouveau_channel *chan, struct nouveau_bo *bo,
 	return OUT_RELOC(chan, bo, delta, flags | NOUVEAU_BO_HIGH, 0, 0);
 }
 
+/* High 32-bits, then low 32-bits of offset */
+static __inline__ int
+OUT_RELOChl(struct nouveau_channel *chan, struct nouveau_bo *bo,
+	   unsigned delta, unsigned flags)
+{
+	int r = OUT_RELOC(chan, bo, delta, flags | NOUVEAU_BO_HIGH, 0, 0);
+	if (r)
+		return r;
+	return OUT_RELOC(chan, bo, delta, flags | NOUVEAU_BO_LOW, 0, 0);
+}
+
 #endif
Signature · 1 line
1.7.3.3

A message that is not in the archive (sent off-list or not yet received): 1294594263-1862-2-git-send-email-marcin.slusarz-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org

#2 lore raw

PATCH v2 2/3 nouveau: add new OUT_RELOC2 (OUT_RELOCh + OUT_RELOCl)

---
 nouveau/nouveau_pushbuf.h |   11 +++++++++++
 1 files changed, 11 insertions(+), 0 deletions(-)

v2: s/OUT_RELOChl/OUT_RELOC2/g as requested

nouveau/nouveau_pushbuf.h +11 -0
index 70d0f28..9273272 100644
@@ -142,4 +142,15 @@ OUT_RELOCh(struct nouveau_channel *chan, struct nouveau_bo *bo,
 	return OUT_RELOC(chan, bo, delta, flags | NOUVEAU_BO_HIGH, 0, 0);
 }
 
+/* High 32-bits, then low 32-bits of offset */
+static __inline__ int
+OUT_RELOC2(struct nouveau_channel *chan, struct nouveau_bo *bo,
+	   unsigned delta, unsigned flags)
+{
+	int r = OUT_RELOC(chan, bo, delta, flags | NOUVEAU_BO_HIGH, 0, 0);
+	if (r)
+		return r;
+	return OUT_RELOC(chan, bo, delta, flags | NOUVEAU_BO_LOW, 0, 0);
+}
+
 #endif
Signature · 1 line
1.7.3.3