diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-01-10 14:04:36 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-01-10 14:04:36 -0500 |
commit | 1a464cbb3d483f2f195b614cffa4aa1b910a0440 (patch) | |
tree | af57dee6436532dbb546b8670e9e1f6910d489b5 /drivers/gpu/drm/nouveau/nouveau_dma.c | |
parent | dbe950f201a8edd353b0bd9079e8d536ee4ce37c (diff) | |
parent | 095f979a539245a46b9e5d600ec9c720b4d928e5 (diff) |
Merge branch 'drm-core-next' of git://people.freedesktop.org/~airlied/linux
* 'drm-core-next' of git://people.freedesktop.org/~airlied/linux: (307 commits)
drm/nouveau/pm: fix build with HWMON off
gma500: silence gcc warnings in mid_get_vbt_data()
drm/ttm: fix condition (and vs or)
drm/radeon: double lock typo in radeon_vm_bo_rmv()
drm/radeon: use after free in radeon_vm_bo_add()
drm/sis|via: don't return stack garbage from free_mem ioctl
drm/radeon/kms: remove pointless CS flags priority struct
drm/radeon/kms: check if vm is supported in VA ioctl
drm: introduce drm_can_sleep and use in intel/radeon drivers. (v2)
radeon: Fix disabling PCI bus mastering on big endian hosts.
ttm: fix agp since ttm tt rework
agp: Fix multi-line warning message whitespace
drm/ttm/dma: Fix accounting error when calling ttm_mem_global_free_page and don't try to free freed pages.
drm/ttm/dma: Only call set_pages_array_wb when the page is not in WB pool.
drm/radeon/kms: sync across multiple rings when doing bo moves v3
drm/radeon/kms: Add support for multi-ring sync in CS ioctl (v2)
drm/radeon: GPU virtual memory support v22
drm: make DRM_UNLOCKED ioctls with their own mutex
drm: no need to hold global mutex for static data
drm/radeon/benchmark: common modes sweep ignores 640x480@32
...
Fix up trivial conflicts in radeon/evergreen.c and vmwgfx/vmwgfx_kms.c
Diffstat (limited to 'drivers/gpu/drm/nouveau/nouveau_dma.c')
-rw-r--r-- | drivers/gpu/drm/nouveau/nouveau_dma.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_dma.c b/drivers/gpu/drm/nouveau/nouveau_dma.c index 00bc6eaad558..4c2e4e5925fe 100644 --- a/drivers/gpu/drm/nouveau/nouveau_dma.c +++ b/drivers/gpu/drm/nouveau/nouveau_dma.c | |||
@@ -134,11 +134,13 @@ OUT_RINGp(struct nouveau_channel *chan, const void *data, unsigned nr_dwords) | |||
134 | * -EBUSY if timeout exceeded | 134 | * -EBUSY if timeout exceeded |
135 | */ | 135 | */ |
136 | static inline int | 136 | static inline int |
137 | READ_GET(struct nouveau_channel *chan, uint32_t *prev_get, uint32_t *timeout) | 137 | READ_GET(struct nouveau_channel *chan, uint64_t *prev_get, int *timeout) |
138 | { | 138 | { |
139 | uint32_t val; | 139 | uint64_t val; |
140 | 140 | ||
141 | val = nvchan_rd32(chan, chan->user_get); | 141 | val = nvchan_rd32(chan, chan->user_get); |
142 | if (chan->user_get_hi) | ||
143 | val |= (uint64_t)nvchan_rd32(chan, chan->user_get_hi) << 32; | ||
142 | 144 | ||
143 | /* reset counter as long as GET is still advancing, this is | 145 | /* reset counter as long as GET is still advancing, this is |
144 | * to avoid misdetecting a GPU lockup if the GPU happens to | 146 | * to avoid misdetecting a GPU lockup if the GPU happens to |
@@ -218,8 +220,8 @@ nv50_dma_push_wait(struct nouveau_channel *chan, int count) | |||
218 | static int | 220 | static int |
219 | nv50_dma_wait(struct nouveau_channel *chan, int slots, int count) | 221 | nv50_dma_wait(struct nouveau_channel *chan, int slots, int count) |
220 | { | 222 | { |
221 | uint32_t cnt = 0, prev_get = 0; | 223 | uint64_t prev_get = 0; |
222 | int ret; | 224 | int ret, cnt = 0; |
223 | 225 | ||
224 | ret = nv50_dma_push_wait(chan, slots + 1); | 226 | ret = nv50_dma_push_wait(chan, slots + 1); |
225 | if (unlikely(ret)) | 227 | if (unlikely(ret)) |
@@ -261,8 +263,8 @@ nv50_dma_wait(struct nouveau_channel *chan, int slots, int count) | |||
261 | int | 263 | int |
262 | nouveau_dma_wait(struct nouveau_channel *chan, int slots, int size) | 264 | nouveau_dma_wait(struct nouveau_channel *chan, int slots, int size) |
263 | { | 265 | { |
264 | uint32_t prev_get = 0, cnt = 0; | 266 | uint64_t prev_get = 0; |
265 | int get; | 267 | int cnt = 0, get; |
266 | 268 | ||
267 | if (chan->dma.ib_max) | 269 | if (chan->dma.ib_max) |
268 | return nv50_dma_wait(chan, slots, size); | 270 | return nv50_dma_wait(chan, slots, size); |