• Lyude Paul's avatar
    drm/nouveau/kms: Add INHERIT ioctl to nvkm/nvif for reading IOR state · 1b477f42
    Lyude Paul authored
    Now that we're supporting things like Ada and the GSP, there's situations
    where we really need to actually know the display state that we're starting
    with when loading the driver in order to prevent breaking GSP expectations.
    The first step in doing this is making it so that we can read the current
    state of IORs from nvkm in DRM, so that we can fill in said into into the
    atomic state.
    
    We do this by introducing an INHERIT ioctl to nvkm/nvif. This is basically
    another form of ACQUIRE, except that it will only acquire the given output
    path for userspace if it's already set up in hardware. This way, we can go
    through and probe each outp object we have in DRM in order to figure out
    the current hardware state of each one. If the outp isn't in use, it simply
    returns -ENODEV.
    
    This is also part of the work that will be required for implementing GSP
    support for display. While the GSP should mostly work without this commit,
    this commit should fix some edge case bugs that can occur on initial driver
    load. This also paves the way for some of the initial groundwork for
    fastboot support.
    Signed-off-by: default avatarLyude Paul <lyude@redhat.com>
    Signed-off-by: default avatarBen Skeggs <bskeggs@redhat.com>
    Acked-by: default avatarDanilo Krummrich <me@dakr.org>
    Link: https://patchwork.freedesktop.org/patch/msgid/20230919220442.202488-11-lyude@redhat.com
    1b477f42
dp.c 22.8 KB