• Hans de Goede's avatar
    drm/nouveau: Fix drm-core using atomic code-paths on pre-nv50 hardware · 64d17f25
    Hans de Goede authored
    We do not support atomic modesetting on pre-nv50 hardware, but until now
    our connector code was setting drm_connector->state on pre-nv50 hardware.
    
    This causes the core to enter atomic modesetting paths in at least:
    
    1. drm_connector_get_encoder(), returning connector->state->best_encoder
    which is always 0, causing us to always report 0 as encoder_id in
    the drmModeConnector struct returned by drmModeGetConnector().
    
    2. drm_encoder_get_crtc(), returning NULL because uses_atomic get set,
    causing us to always report 0 as crtc_id in the drmModeEncoder struct
    returned by drmModeGetEncoder()
    
    Which in turn confuses userspace, at least plymouth thinks that the pipe
    has changed because of this and tries to reconfigure it unnecessarily.
    
    More in general we should not set drm_connector->state in the non-atomic
    code as this violates the drm-core's expectations.
    
    This commit fixes this by using a nouveau_conn_atom struct embedded in the
    nouveau_connector struct for property handling in the non-atomic case.
    
    Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1706557Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
    Signed-off-by: default avatarBen Skeggs <bskeggs@redhat.com>
    64d17f25
nouveau_connector.h 5.99 KB