OSDN Git Service

Revert "nouveau: make sure there's always room to emit a fence"
authorEmil Velikov <emil.l.velikov@gmail.com>
Sat, 10 Oct 2015 15:15:08 +0000 (16:15 +0100)
committerEmil Velikov <emil.l.velikov@gmail.com>
Sat, 10 Oct 2015 15:15:08 +0000 (16:15 +0100)
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
src/gallium/drivers/nouveau/nv30/nv30_screen.c
src/gallium/drivers/nouveau/nv50/nv50_screen.c
src/gallium/drivers/nouveau/nvc0/nvc0_screen.c

index a44fd3e..389a229 100644 (file)
@@ -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;
index 0aea4c0..efa3a59 100644 (file)
@@ -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);
 }
index 1cc16b6..6d015c4 100644 (file)
@@ -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);
index 51aaf7a..3fb4d8c 100644 (file)
@@ -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);