diff options
author | Ben Skeggs <bskeggs@nvidia.com> | 2024-07-26 14:38:18 +1000 |
---|---|---|
committer | Danilo Krummrich <dakr@kernel.org> | 2024-07-27 03:05:38 +0200 |
commit | 6901f1d6479b6f81b537672cc16720b06b2ab3a5 (patch) | |
tree | 033715204d774c6314fc43bf4ee2a582025fa16d /drivers/gpu/drm/nouveau/nouveau_drm.c | |
parent | 8d7b2d3a7e3aa4fac309f9a496e6b237729d2b01 (diff) | |
download | lwn-6901f1d6479b6f81b537672cc16720b06b2ab3a5.tar.gz lwn-6901f1d6479b6f81b537672cc16720b06b2ab3a5.zip |
drm/nouveau: move nvxx_* definitions to nouveau_drv.h
These are some dodgy "convenience" macros for the DRM driver to peek
into NVKM state. They're still used in a few places, but don't belong
in nvif/device.h in any case.
Move them to nouveau_drv.h, and modify callers to pass a nouveau_drm
instead of an nvif_device.
v2:
- use drm->nvkm pointer for nvxx_*() macros, removing some void*
v3:
- add some explanation of the nvxx_*() macros
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-28-bskeggs@nvidia.com
Diffstat (limited to 'drivers/gpu/drm/nouveau/nouveau_drm.c')
-rw-r--r-- | drivers/gpu/drm/nouveau/nouveau_drm.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_drm.c b/drivers/gpu/drm/nouveau/nouveau_drm.c index 316f7877047d..16104a61b7b8 100644 --- a/drivers/gpu/drm/nouveau/nouveau_drm.c +++ b/drivers/gpu/drm/nouveau/nouveau_drm.c @@ -424,8 +424,7 @@ nouveau_accel_gr_init(struct nouveau_drm *drm) * any GPU where it's possible we'll end up using M2MF for BO moves. */ if (device->info.family < NV_DEVICE_INFO_V0_FERMI) { - ret = nvkm_gpuobj_new(nvxx_device(device), 32, 0, false, NULL, - &drm->notify); + ret = nvkm_gpuobj_new(nvxx_device(drm), 32, 0, false, NULL, &drm->notify); if (ret) { NV_ERROR(drm, "failed to allocate notifier, %d\n", ret); nouveau_accel_gr_fini(drm); |