Displaying 9 results from an estimated 9 matches for "so_emit_reloc_mark".
2009 Dec 05
1
[PATCH] nouveau: avoid running out of relocs (attempt 4)
...uf_emit_reloc(chan, pb->cur + r->offset,
r->bo, r->data, 0, r->flags,
- r->vor, r->tor);
+ r->vor, r->tor))) {
+ debug_printf("so_emit failed reloc with error %d\n", ret);
+ return;
+ }
}
pb->cur += nr;
}
@@ -133,26 +142,39 @@ so_emit_reloc_markers(struct nouveau_channel *chan, struct nouveau_stateobj *so)
{
struct nouveau_pushbuf *pb = chan->pushbuf;
unsigned i;
+ int ret = 0;
if (!so)
return;
i = so->cur_reloc << 1;
- if (pb->remaining < i)
- nouveau_pushbuf_flush(chan, i);
+ /* This will flush if we ne...
2009 Dec 13
3
[PATCH] nouveau: avoid running out of relocs (attempt 5)
...ur + r->offset,
r->bo, r->data, 0, r->flags,
- r->vor, r->tor);
+ r->vor, r->tor))) {
+ debug_printf("so_emit failed reloc with error %d\n", ret);
+ pb->remaining += nr;
+ return;
+ }
}
pb->cur += nr;
}
@@ -134,26 +144,43 @@ so_emit_reloc_markers(struct nouveau_channel *chan, struct nouveau_stateobj *so)
{
struct nouveau_pushbuf *pb = chan->pushbuf;
unsigned i;
+ int ret = 0;
if (!so)
return;
i = so->cur_reloc << 1;
- if (pb->remaining < i)
- nouveau_pushbuf_flush(chan, i);
+ /* This will flush if we ne...
2009 Dec 04
3
[PATCH] nouveau: avoid running out of relocs
...->remaining < nr)
- nouveau_pushbuf_flush(chan, nr);
+ /* This will flush if we need space.
+ * We don't actually need the marker.
+ */
+ nouveau_pushbuf_marker_emit(chan, nr, so->cur_reloc);
pb->remaining -= nr;
memcpy(pb->cur, so->push, nr * 4);
@@ -138,8 +140,10 @@ so_emit_reloc_markers(struct nouveau_channel *chan, struct nouveau_stateobj *so)
return;
i = so->cur_reloc << 1;
- if (pb->remaining < i)
- nouveau_pushbuf_flush(chan, i);
+ /* This will flush if we need space.
+ * We don't actually need the marker.
+ */
+ nouveau_pushbuf_marker_emit(chan...
2009 Dec 05
0
[PATCH] nouveau: avoid running out of relocs (attempt 3)
...ailed reloc with error %d\n", ret);
+ return;
+ }
}
pb->cur += nr;
}
static INLINE void
+so_get_push_reloc_markers(struct nouveau_stateobj *so, int *push, int *reloc)
+{
+ *push += (so->cur_reloc << 1);
+ *reloc += (so->cur_reloc << 1);
+}
+
+static INLINE void
so_emit_reloc_markers(struct nouveau_channel *chan, struct nouveau_stateobj *so)
{
struct nouveau_pushbuf *pb = chan->pushbuf;
@@ -138,21 +158,30 @@ so_emit_reloc_markers(struct nouveau_channel *chan, struct nouveau_stateobj *so)
return;
i = so->cur_reloc << 1;
- if (pb->remaining < i)
-...
2010 Jan 18
1
[PATCH 1/2] nv30-nv40: Rewrite primitive splitting and emission
The current code for primitive splitting and emission on pre-nv50 is
severely broken.
In particular:
1. Quads and lines are totally broken because "&= 3" should be "&= ~3"
and similar for lines
2. Triangle fans and polygons are broken because the first vertex
must be repeated for each split chunk
3. Line loops are broken because the must be converted to a line strip,
2009 Dec 18
1
[PATCH] nouveau: don't emit reloc markers for bo's that are mapped
...9 insertions(+), 0 deletions(-)
diff --git a/src/gallium/drivers/nouveau/nouveau_stateobj.h b/src/gallium/drivers/nouveau/nouveau_stateobj.h
index 9aee9e4..6c40f64 100644
--- a/src/gallium/drivers/nouveau/nouveau_stateobj.h
+++ b/src/gallium/drivers/nouveau/nouveau_stateobj.h
@@ -163,6 +163,15 @@ so_emit_reloc_markers(struct nouveau_channel *chan, struct nouveau_stateobj *so)
for (i = 0; i < so->cur_reloc; i++) {
struct nouveau_stateobj_reloc *r = &so->reloc[i];
+ /* This is probably a vbo which has caused a pushbuf flush
+ * before mapping. Don't try to reloc it again, it will caus...
2009 Oct 10
0
[PATCH 1/7] nv50: use SIFC for TIC, TSC upload
...rivers/nv50/nv50_state_validate.c
@@ -222,6 +222,9 @@ nv50_state_flush_notify(struct nouveau_channel *chan)
{
struct nv50_context *nv50 = chan->user_private;
+ if (nv50->state.tic_upload && !(nv50->dirty & NV50_NEW_TEXTURE))
+ so_emit(chan, nv50->state.tic_upload);
+
so_emit_reloc_markers(chan, nv50->state.fb);
so_emit_reloc_markers(chan, nv50->state.vertprog);
so_emit_reloc_markers(chan, nv50->state.fragprog);
@@ -233,6 +236,7 @@ boolean
nv50_state_validate(struct nv50_context *nv50)
{
struct nouveau_grobj *tesla = nv50->screen->tesla;
+ struct nouveau_gro...
2009 Dec 20
2
[PATCH 1/2] nv50: don't emit reloc markers after a referenced vtxbuf is mapped
...ruct nouveau_stateobj *so)
unsigned nr, i;
int ret = 0;
+ /* We are reemiting, so this state is (once again) valid. */
+ so->emit_reloc_on_flush = true;
+
nr = so->cur - so->push;
/* This will flush if we need space.
* We don't actually need the marker.
@@ -146,7 +164,7 @@ so_emit_reloc_markers(struct nouveau_channel *chan, struct nouveau_stateobj *so)
unsigned i;
int ret = 0;
- if (!so)
+ if (!so || !so->emit_reloc_on_flush)
return;
i = so->cur_reloc << 1;
diff --git a/src/gallium/drivers/nv50/nv50_screen.c b/src/gallium/drivers/nv50/nv50_screen.c
index d443ca...
2009 Dec 30
4
[PATCH 1/3] nv50: remove vtxbuf stateobject after a referenced vtxbuf is mapped
- This avoids problematic "reloc'ed while mapped" messages and
some associated corruption as well.
Signed-off-by: Maarten Maathuis <madman2003 at gmail.com>
---
src/gallium/drivers/nouveau/nouveau_screen.c | 21 +++++++++++++++++++++
src/gallium/drivers/nouveau/nouveau_screen.h | 3 +++
src/gallium/drivers/nouveau/nouveau_stateobj.h | 13 +++++++++++++