• Daniel Vetter's avatar
    drm/atomic-helpers: Make encoder picking more robust · 6ea76f3c
    Daniel Vetter authored
    We've had a few issues with atomic where subtle bugs in the encoder
    picking logic lead to accidental self-stealing of the encoder,
    resulting in a NULL connector_state->crtc in update_connector_routing
    and subsequent.
    
    Linus applied some duct-tape for an mst regression in
    
    commit 27667f47
    Author: Linus Torvalds <torvalds@linux-foundation.org>
    Date:   Wed Jul 29 22:18:16 2015 -0700
    
        i915: temporary fix for DP MST docking station NULL pointer dereference
    
    But that was incomplete (the code will still oops when debuggin is
    enabled) and mangled the state even further. So instead WARN and bail
    out as the more future-proof option.
    
    Cc: Theodore Ts'o <tytso@mit.edu>
    Cc: Linus Torvalds <torvalds@linux-foundation.org>
    Reviewed-by: default avatarThierry Reding <treding@nvidia.com>
    Reviewed-by: default avatarAnder Conselvan de Oliveira <conselvan2@gmail.com>
    Signed-off-by: default avatarDaniel Vetter <daniel.vetter@intel.com>
    6ea76f3c
drm_atomic_helper.c 64.1 KB