drm/nouveau: move allocation of root client out of nouveau_cli_init()
authorBen Skeggs <bskeggs@nvidia.com>
Fri, 26 Jul 2024 04:37:57 +0000 (14:37 +1000)
committerDanilo Krummrich <dakr@kernel.org>
Sat, 27 Jul 2024 01:05:21 +0000 (03:05 +0200)
commitea94c8e217f9a845bf2c565b77c5eb078e975eae
tree5f777fb8f670339e8827d76594d698f1010ad25c
parent6777264dfabe2a7c75453031bee5bcc2e7882cf7
drm/nouveau: move allocation of root client out of nouveau_cli_init()

drm->master isn't really a nouveau_cli, and is mostly just used to get
at an nvif_mmu object to implement a hack around issues with the ioctl
interface to nvkm.

Later patches in this series allocate nvif_device/mmu objects in
nouveau_drm directly, removing the need for master.

A pending series to remove the "ioctl" layer between DRM and NVKM
removes the need for the above-mentioned hack entirely.

The only other member of drm->master that's needed is the nvif_client,
and is a dependency of device/mmu.  So the first step is to move its
allocation out of code handling nouveau_cli init.

v2:
- modified slightly due to the addition of tegra/pci cleanup patches
v3:
- move nvif init below drm_dev_alloc() to avoid changing nouveau_name()

Signed-off-by: Ben Skeggs <bskeggs@nvidia.com>
Signed-off-by: Danilo Krummrich <dakr@kernel.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20240726043828.58966-7-bskeggs@nvidia.com
drivers/gpu/drm/nouveau/nouveau_drm.c