Skip to content

Commit

Permalink
drm/nv50: add a memory barrier to pushbuf submission
Browse files Browse the repository at this point in the history
- This is useful for vram pushbuffers that are write combined.
- pre-nv50 has one too (in WRITE_PUT).

Signed-off-by: Maarten Maathuis <madman2003@gmail.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
  • Loading branch information
Maarten Maathuis authored and Ben Skeggs committed Mar 10, 2010
1 parent 8144157 commit ce48fa9
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions drivers/gpu/drm/nouveau/nouveau_dma.c
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,11 @@ nv50_dma_push(struct nouveau_channel *chan, struct nouveau_bo *bo,
nouveau_bo_wr32(pb, ip++, upper_32_bits(offset) | length << 8);

chan->dma.ib_put = (chan->dma.ib_put + 1) & chan->dma.ib_max;

DRM_MEMORYBARRIER();
/* Flush writes. */
nouveau_bo_rd32(pb, 0);

nvchan_wr32(chan, 0x8c, chan->dma.ib_put);
chan->dma.ib_free--;
}
Expand Down

0 comments on commit ce48fa9

Please sign in to comment.