Skip to content
  • Daniel Stone's avatar
    compositor-drm: Disable unused CRTCs/connectors · 6020f478
    Daniel Stone authored
    
    
    If we have an unused CRTC or connector, explicitly disable it during the
    end of the repaint cycle, or when we get VT-switched back in.
    
    This commit moves state_invalid from an output property to a backend
    property, as the unused CRTCs or connectors are likely not tracked by
    drm_outputs. This matches the mechanics of later commits, where we move
    to a global repaint-flush hook, applying the state for all outputs in
    one go.
    
    The output state_invalid flag originally provoked full changes on output
    creation (via setting the flag at output enable time) and session enter.
    
    For the new-output case, we will not have any FB in output->state_cur,
    so we still take the same path in repaint as if state_invalid were set.
    At session enter, we preserve the existing behaviour: as
    start_repaint_loop will fail when state_invalid is set, all outputs will
    be scheduled for repaint together, and state_invalid will not be cleared
    until after all outputs have been repainted, inside repaint_flush.
    
    Signed-off-by: default avatarDaniel Stone <daniels@collabora.com>
    Reviewed-by: default avatarPekka Paalanen <pekka.paalanen@collabora.co.uk>
    6020f478