diff options
author | Wolfgang Wiedmeyer <wolfgit@wiedmeyer.de> | 2015-10-23 01:34:08 +0200 |
---|---|---|
committer | Wolfgang Wiedmeyer <wolfgit@wiedmeyer.de> | 2015-10-23 01:34:08 +0200 |
commit | 5864eaf2f7f0ec3366be0efe9e7a5fd0476e25cc (patch) | |
tree | fd05a3a313d92c74af3854cca137797d76ebad71 /drivers/gpu/drm/nouveau/nouveau_dma.c | |
parent | 786208aedd8f75b0720e36b2ca66b3a411417301 (diff) | |
download | kernel_samsung_smdk4412-5864eaf2f7f0ec3366be0efe9e7a5fd0476e25cc.zip kernel_samsung_smdk4412-5864eaf2f7f0ec3366be0efe9e7a5fd0476e25cc.tar.gz kernel_samsung_smdk4412-5864eaf2f7f0ec3366be0efe9e7a5fd0476e25cc.tar.bz2 |
remove firmware files, merge more uncritical stuff from 3.0.101
Diffstat (limited to 'drivers/gpu/drm/nouveau/nouveau_dma.c')
-rw-r--r-- | drivers/gpu/drm/nouveau/nouveau_dma.c | 21 |
1 files changed, 7 insertions, 14 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_dma.c b/drivers/gpu/drm/nouveau/nouveau_dma.c index 4c2e4e5..568caed 100644 --- a/drivers/gpu/drm/nouveau/nouveau_dma.c +++ b/drivers/gpu/drm/nouveau/nouveau_dma.c @@ -134,13 +134,11 @@ OUT_RINGp(struct nouveau_channel *chan, const void *data, unsigned nr_dwords) * -EBUSY if timeout exceeded */ static inline int -READ_GET(struct nouveau_channel *chan, uint64_t *prev_get, int *timeout) +READ_GET(struct nouveau_channel *chan, uint32_t *prev_get, uint32_t *timeout) { - uint64_t val; + uint32_t val; val = nvchan_rd32(chan, chan->user_get); - if (chan->user_get_hi) - val |= (uint64_t)nvchan_rd32(chan, chan->user_get_hi) << 32; /* reset counter as long as GET is still advancing, this is * to avoid misdetecting a GPU lockup if the GPU happens to @@ -169,13 +167,8 @@ nv50_dma_push(struct nouveau_channel *chan, struct nouveau_bo *bo, int delta, int length) { struct nouveau_bo *pb = chan->pushbuf_bo; - struct nouveau_vma *vma; + uint64_t offset = bo->bo.offset + delta; int ip = (chan->dma.ib_put * 2) + chan->dma.ib_base; - u64 offset; - - vma = nouveau_bo_vma_find(bo, chan->vm); - BUG_ON(!vma); - offset = vma->offset + delta; BUG_ON(chan->dma.ib_free < 1); nouveau_bo_wr32(pb, ip++, lower_32_bits(offset)); @@ -220,8 +213,8 @@ nv50_dma_push_wait(struct nouveau_channel *chan, int count) static int nv50_dma_wait(struct nouveau_channel *chan, int slots, int count) { - uint64_t prev_get = 0; - int ret, cnt = 0; + uint32_t cnt = 0, prev_get = 0; + int ret; ret = nv50_dma_push_wait(chan, slots + 1); if (unlikely(ret)) @@ -263,8 +256,8 @@ nv50_dma_wait(struct nouveau_channel *chan, int slots, int count) int nouveau_dma_wait(struct nouveau_channel *chan, int slots, int size) { - uint64_t prev_get = 0; - int cnt = 0, get; + uint32_t prev_get = 0, cnt = 0; + int get; if (chan->dma.ib_max) return nv50_dma_wait(chan, slots, size); |