drm/nouveau/kms/nv50-: use NVIDIA's headers for core ntfy_wait_done()
authorBen Skeggs <bskeggs@redhat.com>
Sun, 21 Jun 2020 07:24:27 +0000 (17:24 +1000)
committerBen Skeggs <bskeggs@redhat.com>
Fri, 24 Jul 2020 08:51:01 +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 626f839..aa742bc 100644 (file)
@@ -53,7 +53,7 @@ core507d_ntfy_wait_done(struct nouveau_bo *bo, u32 offset,
                        struct nvif_device *device)
 {
        s64 time = nvif_msec(device, 2000ULL,
-               if (nouveau_bo_rd32(bo, offset / 4))
+               if (NVBO_TD32(bo, offset, NV_DISP_CORE_NOTIFIER_1, COMPLETION_0, DONE, ==, TRUE))
                        break;
                usleep_range(1, 2);
        );
index b7a929d..37d1259 100644 (file)
@@ -72,10 +72,8 @@ int
 corec37d_ntfy_wait_done(struct nouveau_bo *bo, u32 offset,
                        struct nvif_device *device)
 {
-       u32 data;
        s64 time = nvif_msec(device, 2000ULL,
-               data = nouveau_bo_rd32(bo, offset / 4 + 0);
-               if ((data & 0xc0000000) == 0x80000000)
+               if (NVBO_TD32(bo, offset, NV_DISP_NOTIFIER, _0, STATUS, ==, FINISHED))
                        break;
                usleep_range(1, 2);
        );