• Jyri Sarha's avatar
    drm/tidss: dispc: Fix broken plane positioning code · b33b5474
    Jyri Sarha authored
    The old implementation of placing planes on the CRTC while configuring
    the planes was naive and relied on the order in which the planes were
    configured, enabled, and disabled. The situation where a plane's zpos
    was changed on the fly was completely broken. The usual symptoms of
    this problem was scrambled display and a flood of sync lost errors,
    when a plane was active in two layers at the same time, or a missing
    plane, in case when a layer was accidentally disabled.
    
    The rewrite takes a more straight forward approach when HW is
    concerned. The plane positioning registers are in the CRTC (or
    actually OVR) register space and it is more natural to configure them
    in a one go when configuring the CRTC. To do this we need make sure we
    have all the planes on the updated CRTCs in the new atomic state. The
    untouched planes on CRTCs that need plane position update are added to
    the atomic state in tidss_atomic_check().
    Signed-off-by: default avatarJyri Sarha <jsarha@ti.com>
    Reviewed-by: default avatarTomi Valkeinen <tomi.valkeinen@ti.com>
    Link: https://patchwork.freedesktop.org/patch/msgid/20200227120052.23168-1-jsarha@ti.com
    b33b5474
tidss_crtc.c 11.2 KB