drm/nouveau/kms/nv50-: use NVIDIA's headers for wndw ntfy_wait_begun()
authorBen Skeggs <bskeggs@redhat.com>
Sun, 21 Jun 2020 07:12:19 +0000 (17:12 +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/ovly827e.c

index a468fae7da6a72b2ea5bb798ea7421a557842847..412270e4783ca03e3fec110229350a2efef59374 100644 (file)
@@ -123,8 +123,7 @@ base507c_ntfy_wait_begun(struct nouveau_bo *bo, u32 offset,
                         struct nvif_device *device)
 {
        s64 time = nvif_msec(device, 2000ULL,
-               u32 data = nouveau_bo_rd32(bo, offset / 4);
-               if ((data & 0xc0000000) == 0x40000000)
+               if (NVBO_TD32(bo, offset, NV_DISP_BASE_NOTIFIER_1, _0, STATUS, ==, BEGUN))
                        break;
                usleep_range(1, 2);
        );
index 199f6ddfccd7aa6ca1013d33d9ccf01b6cf1dd5c..63b0047eb34f4ef46043f043df5e60bf45ed5345 100644 (file)
@@ -57,8 +57,7 @@ ovly827e_ntfy_wait_begun(struct nouveau_bo *bo, u32 offset,
                         struct nvif_device *device)
 {
        s64 time = nvif_msec(device, 2000ULL,
-               u32 data = nouveau_bo_rd32(bo, offset / 4 + 3);
-               if ((data & 0xffff0000) == 0xffff0000)
+               if (NVBO_TD32(bo, offset, NV_DISP_NOTIFICATION_1, _3, STATUS, ==, BEGUN))
                        break;
                usleep_range(1, 2);
        );