drm/nouveau/kms/nv50-: use NVIDIA's headers for wndw ntfy_set()
authorBen Skeggs <bskeggs@redhat.com>
Sat, 20 Jun 2020 01:25:25 +0000 (11:25 +1000)
committerBen Skeggs <bskeggs@redhat.com>
Fri, 24 Jul 2020 08:50:59 +0000 (18:50 +1000)
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
drivers/gpu/drm/nouveau/dispnv50/base507c.c
drivers/gpu/drm/nouveau/dispnv50/wndwc37e.c

index 3d31b4c9bc591de52820a90934b8e9d47cd102db..0c03835a658a56e52dad61325c32c126e2776f72 100644 (file)
@@ -153,9 +153,11 @@ base507c_ntfy_set(struct nv50_wndw *wndw, struct nv50_wndw_atom *asyw)
        if ((ret = PUSH_WAIT(push, 3)))
                return ret;
 
-       PUSH_NVSQ(push, NV507C, 0x00a0, asyw->ntfy.awaken << 30 |
-                                       asyw->ntfy.offset,
-                               0x00a4, asyw->ntfy.handle);
+       PUSH_MTHD(push, NV507C, SET_NOTIFIER_CONTROL,
+                 NVVAL(NV507C, SET_NOTIFIER_CONTROL, MODE, asyw->ntfy.awaken) |
+                 NVVAL(NV507C, SET_NOTIFIER_CONTROL, OFFSET, asyw->ntfy.offset >> 2),
+
+                               SET_CONTEXT_DMA_NOTIFIER, asyw->ntfy.handle);
        return 0;
 }
 
index fdc5d30f4cd46a4e9524235837f642afe997c3d3..2325c6420b6bfc75b758907396ace85efb7c5bd2 100644 (file)
@@ -182,9 +182,11 @@ wndwc37e_ntfy_set(struct nv50_wndw *wndw, struct nv50_wndw_atom *asyw)
        if ((ret = PUSH_WAIT(push, 3)))
                return ret;
 
-       PUSH_NVSQ(push, NVC37E, 0x021c, asyw->ntfy.handle,
-                               0x0220, asyw->ntfy.offset |
-                                       asyw->ntfy.awaken);
+       PUSH_MTHD(push, NVC37E, SET_CONTEXT_DMA_NOTIFIER, asyw->ntfy.handle,
+
+                               SET_NOTIFIER_CONTROL,
+                 NVVAL(NVC37E, SET_NOTIFIER_CONTROL, MODE, asyw->ntfy.awaken) |
+                 NVVAL(NVC37E, SET_NOTIFIER_CONTROL, OFFSET, asyw->ntfy.offset >> 4));
        return 0;
 }