[PATCH] drm/nouveau/fifo/ga102: initialise chid on return from channel creation

Karol Herbst kherbst at redhat.com
Tue Sep 21 11:44:25 UTC 2021


On Tue, Sep 21, 2021 at 11:07 AM Ben Skeggs <skeggsb at gmail.com> wrote:
>
> From: Ben Skeggs <bskeggs at redhat.com>
>
> Turns out caller isn't zero-initialised after-all.
>
> Fixes: 6b457230bfa1 ("drm/nouveau/ga102-: support ttm buffer moves via copy engine")
> Reported-by: Karol Herbst <kherbst at redhat.com>
> Signed-off-by: Ben Skeggs <bskeggs at redhat.com>
> ---
>  drivers/gpu/drm/nouveau/nvkm/engine/fifo/ga102.c | 3 +++
>  1 file changed, 3 insertions(+)
>
> diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/fifo/ga102.c b/drivers/gpu/drm/nouveau/nvkm/engine/fifo/ga102.c
> index f897bef13acf..c630dbd2911a 100644
> --- a/drivers/gpu/drm/nouveau/nvkm/engine/fifo/ga102.c
> +++ b/drivers/gpu/drm/nouveau/nvkm/engine/fifo/ga102.c
> @@ -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);
> --
> 2.31.1
>

Reviewed-by: Karol Herbst <kherbst at redhat.com>



More information about the dri-devel mailing list