aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorBen Skeggs <bskeggs@redhat.com>2020-06-21 17:24:27 +1000
committerBen Skeggs <bskeggs@redhat.com>2020-07-24 18:51:01 +1000
commit4daef27cb802d3425dee3ef712cb4c0f013e2b71 (patch)
treee9acb2fb8f86cfdfd938bcda4ddee253f7b78c27
parentdrm/nouveau/kms/nv50-: use NVIDIA's headers for core caps_init() (diff)
downloadwireguard-linux-4daef27cb802d3425dee3ef712cb4c0f013e2b71.tar.xz
wireguard-linux-4daef27cb802d3425dee3ef712cb4c0f013e2b71.zip
drm/nouveau/kms/nv50-: use NVIDIA's headers for core ntfy_wait_done()
Signed-off-by: Ben Skeggs <bskeggs@redhat.com> Reviewed-by: Lyude Paul <lyude@redhat.com>
-rw-r--r--drivers/gpu/drm/nouveau/dispnv50/core507d.c2
-rw-r--r--drivers/gpu/drm/nouveau/dispnv50/corec37d.c4
2 files changed, 2 insertions, 4 deletions
diff --git a/drivers/gpu/drm/nouveau/dispnv50/core507d.c b/drivers/gpu/drm/nouveau/dispnv50/core507d.c
index 626f83904434..aa742bc71b84 100644
--- a/drivers/gpu/drm/nouveau/dispnv50/core507d.c
+++ b/drivers/gpu/drm/nouveau/dispnv50/core507d.c
@@ -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);
);
diff --git a/drivers/gpu/drm/nouveau/dispnv50/corec37d.c b/drivers/gpu/drm/nouveau/dispnv50/corec37d.c
index b7a929d8109f..37d125987b1a 100644
--- a/drivers/gpu/drm/nouveau/dispnv50/corec37d.c
+++ b/drivers/gpu/drm/nouveau/dispnv50/corec37d.c
@@ -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);
);