drm/nouveau/kms/nv50-: use NVIDIA's headers for wndw image_clr()
authorBen Skeggs <bskeggs@redhat.com>
Sat, 20 Jun 2020 04:21:59 +0000 (14: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/base507c.c
drivers/gpu/drm/nouveau/dispnv50/wndwc37e.c

index fac830c..db81175 100644 (file)
@@ -56,8 +56,11 @@ base507c_image_clr(struct nv50_wndw *wndw)
        if ((ret = PUSH_WAIT(push, 4)))
                return ret;
 
-       PUSH_NVSQ(push, NV507C, 0x0084, 0x00000000);
-       PUSH_NVSQ(push, NV507C, 0x00c0, 0x00000000);
+       PUSH_MTHD(push, NV507C, SET_PRESENT_CONTROL,
+                 NVDEF(NV507C, SET_PRESENT_CONTROL, BEGIN_MODE, NON_TEARING) |
+                 NVVAL(NV507C, SET_PRESENT_CONTROL, MIN_PRESENT_INTERVAL, 0));
+
+       PUSH_MTHD(push, NV507C, SET_CONTEXT_DMA_ISO, 0x00000000);
        return 0;
 }
 
index a3ab226..b071cca 100644 (file)
@@ -127,8 +127,11 @@ wndwc37e_image_clr(struct nv50_wndw *wndw)
        if ((ret = PUSH_WAIT(push, 4)))
                return ret;
 
-       PUSH_NVSQ(push, NVC37E, 0x0308, 0x00000000);
-       PUSH_NVSQ(push, NVC37E, 0x0240, 0x00000000);
+       PUSH_MTHD(push, NVC37E, SET_PRESENT_CONTROL,
+                 NVVAL(NVC37E, SET_PRESENT_CONTROL, MIN_PRESENT_INTERVAL, 0) |
+                 NVDEF(NVC37E, SET_PRESENT_CONTROL, BEGIN_MODE, NON_TEARING));
+
+       PUSH_MTHD(push, NVC37E, SET_CONTEXT_DMA_ISO(0), 0x00000000);
        return 0;
 }