nouveau/gsp: don't free ctrl messages on errors
authorDave Airlie <airlied@gmail.com>
Fri, 22 Dec 2023 04:31:57 +0000 (14:31 +1000)
committerDave Airlie <airlied@redhat.com>
Fri, 5 Jan 2024 02:27:53 +0000 (12:27 +1000)
commit4ae3a20102b20d1927737e1a78615386d58e194d
treeb8e71e94c58f3d4c125cc806531a2b3f9d913a34
parent59f6a3d8db2573aba994b95074d8f9911c969bcb
nouveau/gsp: don't free ctrl messages on errors

It looks like for some messages the upper layers need to get access to the
results of the message so we can interpret it.

Rework the ctrl push interface to not free things and cleanup properly
whereever it errors out.

Requested-by: Lyude
Signed-off-by: Dave Airlie <airlied@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20231222043308.3090089-9-airlied@gmail.com
drivers/gpu/drm/nouveau/include/nvkm/subdev/gsp.h
drivers/gpu/drm/nouveau/nvkm/engine/disp/r535.c
drivers/gpu/drm/nouveau/nvkm/subdev/gsp/r535.c