Mesa (11.0): Revert "nouveau: make sure there' s always room to emit a fence"

Emil Velikov evelikov at kemper.freedesktop.org
Sat Oct 10 16:07:04 UTC 2015


Module: Mesa
Branch: 11.0
Commit: d0c22560a151a1ea726df4a6e001048a7c5b225e
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=d0c22560a151a1ea726df4a6e001048a7c5b225e

Author: Emil Velikov <emil.l.velikov at gmail.com>
Date:   Sat Oct 10 16:15:08 2015 +0100

Revert "nouveau: make sure there's always room to emit a fence"

This reverts commit 30570b262971c881366deab58caf8d8d48d7d79d.

As mentioned by Ilia Mirkin:

 Please remove this one from your list of cherry-picked patches. While
  it fixes real issues on nv30 (and probably the other generations too),
  it appears to introduce some new ones on nvc0. I've figured out what's
  causing it, but haven't figured out a proper fix. Not sure I'll be
  able to before you do a release.

---

 src/gallium/drivers/nouveau/nouveau_winsys.h   |    2 --
 src/gallium/drivers/nouveau/nv30/nv30_screen.c |    4 +---
 src/gallium/drivers/nouveau/nv50/nv50_screen.c |    1 -
 src/gallium/drivers/nouveau/nvc0/nvc0_screen.c |    3 +--
 4 files changed, 2 insertions(+), 8 deletions(-)

diff --git a/src/gallium/drivers/nouveau/nouveau_winsys.h b/src/gallium/drivers/nouveau/nouveau_winsys.h
index a44fd3e..389a229 100644
--- a/src/gallium/drivers/nouveau/nouveau_winsys.h
+++ b/src/gallium/drivers/nouveau/nouveau_winsys.h
@@ -24,8 +24,6 @@ PUSH_AVAIL(struct nouveau_pushbuf *push)
 static inline bool
 PUSH_SPACE(struct nouveau_pushbuf *push, uint32_t size)
 {
-   /* Provide a buffer so that fences always have room to be emitted */
-   size += 8;
    if (PUSH_AVAIL(push) < size)
       return nouveau_pushbuf_space(push, size, 0, 0) == 0;
    return true;
diff --git a/src/gallium/drivers/nouveau/nv30/nv30_screen.c b/src/gallium/drivers/nouveau/nv30/nv30_screen.c
index 0aea4c0..efa3a59 100644
--- a/src/gallium/drivers/nouveau/nv30/nv30_screen.c
+++ b/src/gallium/drivers/nouveau/nv30/nv30_screen.c
@@ -345,9 +345,7 @@ nv30_screen_fence_emit(struct pipe_screen *pscreen, uint32_t *sequence)
 
    *sequence = ++screen->base.fence.sequence;
 
-   assert(PUSH_AVAIL(push) >= 3);
-   PUSH_DATA (push, NV30_3D_FENCE_OFFSET |
-              (2 /* size */ << 18) | (7 /* subchan */ << 13));
+   BEGIN_NV04(push, NV30_3D(FENCE_OFFSET), 2);
    PUSH_DATA (push, 0);
    PUSH_DATA (push, *sequence);
 }
diff --git a/src/gallium/drivers/nouveau/nv50/nv50_screen.c b/src/gallium/drivers/nouveau/nv50/nv50_screen.c
index 1cc16b6..6d015c4 100644
--- a/src/gallium/drivers/nouveau/nv50/nv50_screen.c
+++ b/src/gallium/drivers/nouveau/nv50/nv50_screen.c
@@ -386,7 +386,6 @@ nv50_screen_fence_emit(struct pipe_screen *pscreen, u32 *sequence)
    /* we need to do it after possible flush in MARK_RING */
    *sequence = ++screen->base.fence.sequence;
 
-   assert(PUSH_AVAIL(push) >= 5);
    PUSH_DATA (push, NV50_FIFO_PKHDR(NV50_3D(QUERY_ADDRESS_HIGH), 4));
    PUSH_DATAh(push, screen->fence.bo->offset);
    PUSH_DATA (push, screen->fence.bo->offset);
diff --git a/src/gallium/drivers/nouveau/nvc0/nvc0_screen.c b/src/gallium/drivers/nouveau/nvc0/nvc0_screen.c
index 51aaf7a..3fb4d8c 100644
--- a/src/gallium/drivers/nouveau/nvc0/nvc0_screen.c
+++ b/src/gallium/drivers/nouveau/nvc0/nvc0_screen.c
@@ -535,8 +535,7 @@ nvc0_screen_fence_emit(struct pipe_screen *pscreen, u32 *sequence)
    /* we need to do it after possible flush in MARK_RING */
    *sequence = ++screen->base.fence.sequence;
 
-   assert(PUSH_AVAIL(push) >= 5);
-   PUSH_DATA (push, NVC0_FIFO_PKHDR_SQ(NVC0_3D(QUERY_ADDRESS_HIGH), 4));
+   BEGIN_NVC0(push, NVC0_3D(QUERY_ADDRESS_HIGH), 4);
    PUSH_DATAh(push, screen->fence.bo->offset);
    PUSH_DATA (push, screen->fence.bo->offset);
    PUSH_DATA (push, *sequence);




More information about the mesa-commit mailing list