• Thierry Reding's avatar
    drm/atomic: Add helpers for state-subclassing drivers · f5e7840b
    Thierry Reding authored
    Drivers that subclass CRTC, plane or connector state need to carefully
    duplicate the code that the atomic helpers have. This is bound to cause
    breakage eventually because it requires auditing all drivers and update
    them when code is added to the helpers.
    
    In order to avoid that, implement new helpers that perform the required
    steps when copying and destroying state. These new helpers are exported
    so that state-subclassing drivers can use them. The default helpers are
    implemented using them as well, providing a single location that needs
    to be changed when adding to base atomic states.
    Reviewed-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
    Reviewed-by: default avatarEric Anholt <eric@anholt.net>
    Signed-off-by: default avatarThierry Reding <treding@nvidia.com>
    f5e7840b
drm_atomic_helper.c 61.1 KB