summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/nouveau/nouveau_bo5039.c
diff options
context:
space:
mode:
authorBen Skeggs <bskeggs@redhat.com>2020-06-22 09:29:45 +0300
committerBen Skeggs <bskeggs@redhat.com>2020-07-24 11:51:04 +0300
commite767835a52cd6d427a4ab6941118e530cbfa638c (patch)
tree489b930e599901ca9cb847ef6503d21f1a652c09 /drivers/gpu/drm/nouveau/nouveau_bo5039.c
parenta38f83d9014d14b7c6d0b53fd669b62684a11059 (diff)
downloadlinux-e767835a52cd6d427a4ab6941118e530cbfa638c.tar.xz
drm/nouveau/bo: use NVIDIA's headers for move init()
Signed-off-by: Ben Skeggs <bskeggs@redhat.com> Reviewed-by: Lyude Paul <lyude@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau/nouveau_bo5039.c')
-rw-r--r--drivers/gpu/drm/nouveau/nouveau_bo5039.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_bo5039.c b/drivers/gpu/drm/nouveau/nouveau_bo5039.c
index 19fb36b35ff9..232877f8b93d 100644
--- a/drivers/gpu/drm/nouveau/nouveau_bo5039.c
+++ b/drivers/gpu/drm/nouveau/nouveau_bo5039.c
@@ -33,6 +33,8 @@
#include <nvif/push206e.h>
+#include <nvhw/class/cl5039.h>
+
int
nv50_bo_move_m2mf(struct nouveau_channel *chan, struct ttm_buffer_object *bo,
struct ttm_mem_reg *old_reg, struct ttm_mem_reg *new_reg)
@@ -111,9 +113,9 @@ nv50_bo_move_init(struct nouveau_channel *chan, u32 handle)
if (ret)
return ret;
- PUSH_NVSQ(push, NV5039, 0x0000, handle);
- PUSH_NVSQ(push, NV5039, 0x0180, chan->drm->ntfy.handle,
- 0x0184, chan->vram.handle,
- 0x0188, chan->vram.handle);
+ PUSH_MTHD(push, NV5039, SET_OBJECT, handle);
+ PUSH_MTHD(push, NV5039, SET_CONTEXT_DMA_NOTIFY, chan->drm->ntfy.handle,
+ SET_CONTEXT_DMA_BUFFER_IN, chan->vram.handle,
+ SET_CONTEXT_DMA_BUFFER_OUT, chan->vram.handle);
return 0;
}