]> git.baikalelectronics.ru Git - kernel.git/commitdiff
drm/nouveau/fifo/ga102: initialise chid on return from channel creation
authorBen Skeggs <bskeggs@redhat.com>
Tue, 21 Sep 2021 09:07:35 +0000 (19:07 +1000)
committerMaarten Lankhorst <maarten.lankhorst@linux.intel.com>
Wed, 6 Oct 2021 09:12:18 +0000 (11:12 +0200)
Turns out caller isn't zero-initialised after-all.

Fixes: 2afd00829b4d ("drm/nouveau/ga102-: support ttm buffer moves via copy engine")
Reported-by: Karol Herbst <kherbst@redhat.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20210921090735.247236-1-skeggsb@gmail.com
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
drivers/gpu/drm/nouveau/nvkm/engine/fifo/ga102.c

index f897bef13acf52ff9c27148f723a63e454eeafda..c630dbd2911aef914750520673670512a09995a7 100644 (file)
@@ -179,6 +179,9 @@ ga102_chan_new(struct nvkm_device *device,
                return -ENODEV;
 
        chan->ctrl.chan = nvkm_rd32(device, chan->ctrl.runl + 0x004) & 0xfffffff0;
+
+       args->chid = 0;
+       args->inst = 0;
        args->token = nvkm_rd32(device, chan->ctrl.runl + 0x008) & 0xffff0000;
 
        ret = nvkm_memory_new(device, NVKM_MEM_TARGET_INST, 0x1000, 0x1000, true, &chan->mthd);