]> git.ipfire.org Git - thirdparty/linux.git/commit
drm/nouveau: always map device
authorBen Skeggs <bskeggs@nvidia.com>
Fri, 26 Jul 2024 04:38:15 +0000 (14:38 +1000)
committerDanilo Krummrich <dakr@kernel.org>
Sat, 27 Jul 2024 01:05:35 +0000 (03:05 +0200)
commitcced63c3dd23e061f0fca754a3aeb35b62b0a628
tree84e01b614a88c4e3fe1a6eaaef82d7825a617d0c
parentfabc65d16337b6cee1cbbd1470bbb903f6daf3ea
drm/nouveau: always map device

The next commit removes the nvif rd/wr methods from nvif_device, which
were probably a bad idea, and mostly intended as a fallback if ioremap()
failed (or wasn't available, as was the case in some tools I once used).

The nv04 KMS driver already mapped the device, because it's mostly been
kept alive on life-support for many years and still directly bashes PRI
a lot for modesetting.

Post-nv50, I tried pretty hard to keep PRI accesses out of the DRM code,
but there's still a few random places where we do, and those were using
the rd/wr paths prior to this commit.

This allocates and maps a new nvif_device (which will replace the usage
of nouveau_drm.master.device later on), and replicates this pointer to
all other possible users.

This will be cleaned up by the end of another patch series, after it's
been made safe to do so.

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-25-bskeggs@nvidia.com
drivers/gpu/drm/nouveau/dispnv04/disp.c
drivers/gpu/drm/nouveau/include/nvif/device.h
drivers/gpu/drm/nouveau/nouveau_drm.c
drivers/gpu/drm/nouveau/nouveau_drv.h
drivers/gpu/drm/nouveau/nvif/device.c