diff options
author | Ben Skeggs <bskeggs@redhat.com> | 2021-01-13 17:12:52 +1000 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2021-01-15 10:25:17 +1000 |
commit | caeb6ab899c3d36a74cda6e299c6e1c9c4e2a22e (patch) | |
tree | 2553b8912f868e2f8ddb1f37db6828cd9d7a4c02 /drivers/gpu/drm/nouveau/dispnv50/disp.c | |
parent | add42781ad76c5ae65127bf13852a4c6b2f08849 (diff) | |
download | lwn-caeb6ab899c3d36a74cda6e299c6e1c9c4e2a22e.tar.gz lwn-caeb6ab899c3d36a74cda6e299c6e1c9c4e2a22e.zip |
drm/nouveau/kms/nv50-: fix case where notifier buffer is at offset 0
VRAM offset 0 is a valid address, triggered on GA102.
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau/dispnv50/disp.c')
-rw-r--r-- | drivers/gpu/drm/nouveau/dispnv50/disp.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpu/drm/nouveau/dispnv50/disp.c b/drivers/gpu/drm/nouveau/dispnv50/disp.c index 33fff388dd83..c6367035970e 100644 --- a/drivers/gpu/drm/nouveau/dispnv50/disp.c +++ b/drivers/gpu/drm/nouveau/dispnv50/disp.c @@ -222,7 +222,7 @@ nv50_dmac_wait(struct nvif_push *push, u32 size) int nv50_dmac_create(struct nvif_device *device, struct nvif_object *disp, - const s32 *oclass, u8 head, void *data, u32 size, u64 syncbuf, + const s32 *oclass, u8 head, void *data, u32 size, s64 syncbuf, struct nv50_dmac *dmac) { struct nouveau_cli *cli = (void *)device->object.client; @@ -271,7 +271,7 @@ nv50_dmac_create(struct nvif_device *device, struct nvif_object *disp, if (ret) return ret; - if (!syncbuf) + if (syncbuf < 0) return 0; ret = nvif_object_ctor(&dmac->base.user, "kmsSyncCtxDma", NV50_DISP_HANDLE_SYNCBUF, |