summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/etnaviv
diff options
context:
space:
mode:
authorDanilo Krummrich <dakr@redhat.com>2024-02-02 01:05:50 +0100
committerDanilo Krummrich <dakr@redhat.com>2024-02-12 11:40:46 +0100
commit9a0c32d698c1d0c4a6f5642ac017da31febad1eb (patch)
tree163a433fd1a84a562eadce69ce4a0a9125626c4f /drivers/gpu/drm/etnaviv
parent28083ff18d3f65ecd64857f4495623135dd1f132 (diff)
downloadlinux-stable-9a0c32d698c1d0c4a6f5642ac017da31febad1eb.tar.gz
linux-stable-9a0c32d698c1d0c4a6f5642ac017da31febad1eb.tar.bz2
linux-stable-9a0c32d698c1d0c4a6f5642ac017da31febad1eb.zip
drm/nouveau: don't fini scheduler if not initialized
nouveau_abi16_ioctl_channel_alloc() and nouveau_cli_init() simply call their corresponding *_fini() counterpart. This can lead to nouveau_sched_fini() being called without struct nouveau_sched ever being initialized in the first place. Instead of embedding struct nouveau_sched into struct nouveau_cli and struct nouveau_chan_abi16, allocate struct nouveau_sched separately, such that we can check for the corresponding pointer to be NULL in the particular *_fini() functions. It makes sense to allocate struct nouveau_sched separately anyway, since in a subsequent commit we can also avoid to allocate a struct nouveau_sched in nouveau_abi16_ioctl_channel_alloc() at all, if the VM_BIND uAPI has been disabled due to the legacy uAPI being used. Fixes: 5f03a507b29e ("drm/nouveau: implement 1:1 scheduler - entity relationship") Reported-by: Timur Tabi <ttabi@nvidia.com> Tested-by: Timur Tabi <ttabi@nvidia.com> Closes: https://lore.kernel.org/nouveau/20240131213917.1545604-1-ttabi@nvidia.com/ Reviewed-by: Dave Airlie <airlied@redhat.com> Signed-off-by: Danilo Krummrich <dakr@redhat.com> Link: https://patchwork.freedesktop.org/patch/msgid/20240202000606.3526-1-dakr@redhat.com
Diffstat (limited to 'drivers/gpu/drm/etnaviv')
0 files changed, 0 insertions, 0 deletions