drm/nouveau/kms/nv50-: use NVIDIA's headers for core ntfy_init()
authorBen Skeggs <bskeggs@redhat.com>
Sun, 21 Jun 2020 07:21:16 +0000 (17:21 +1000)
committerBen Skeggs <bskeggs@redhat.com>
Fri, 24 Jul 2020 08:51:00 +0000 (18:51 +1000)
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
drivers/gpu/drm/nouveau/dispnv50/core507d.c
drivers/gpu/drm/nouveau/dispnv50/corec37d.c

index a0f470b..f28b91c 100644 (file)
@@ -63,7 +63,8 @@ core507d_ntfy_wait_done(struct nouveau_bo *bo, u32 offset,
 void
 core507d_ntfy_init(struct nouveau_bo *bo, u32 offset)
 {
-       nouveau_bo_wr32(bo, offset / 4, 0x00000000);
+       NVBO_WR32(bo, offset, NV_DISP_CORE_NOTIFIER_1, COMPLETION_0,
+                       NVDEF(NV_DISP_CORE_NOTIFIER_1, COMPLETION_0, DONE, FALSE));
 }
 
 int
index 008327e..b7a929d 100644 (file)
@@ -85,10 +85,11 @@ corec37d_ntfy_wait_done(struct nouveau_bo *bo, u32 offset,
 void
 corec37d_ntfy_init(struct nouveau_bo *bo, u32 offset)
 {
-       nouveau_bo_wr32(bo, offset / 4 + 0, 0x00000000);
-       nouveau_bo_wr32(bo, offset / 4 + 1, 0x00000000);
-       nouveau_bo_wr32(bo, offset / 4 + 2, 0x00000000);
-       nouveau_bo_wr32(bo, offset / 4 + 3, 0x00000000);
+       NVBO_WR32(bo, offset, NV_DISP_NOTIFIER, _0,
+                       NVDEF(NV_DISP_NOTIFIER, _0, STATUS, NOT_BEGUN));
+       NVBO_WR32(bo, offset, NV_DISP_NOTIFIER, _1, 0);
+       NVBO_WR32(bo, offset, NV_DISP_NOTIFIER, _2, 0);
+       NVBO_WR32(bo, offset, NV_DISP_NOTIFIER, _3, 0);
 }
 
 int corec37d_caps_init(struct nouveau_drm *drm, struct nv50_disp *disp)