• Ben Skeggs's avatar
    drm/nouveau: always map device · cced63c3
    Ben Skeggs authored
    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: default avatarBen Skeggs <bskeggs@nvidia.com>
    Signed-off-by: default avatarDanilo Krummrich <dakr@kernel.org>
    Link: https://patchwork.freedesktop.org/patch/msgid/20240726043828.58966-25-bskeggs@nvidia.com
    cced63c3
device.c 2.19 KB