• Zhao Yakui's avatar
    drm: disable all the possible outputs/crtcs before entering KMS mode · b16d9acb
    Zhao Yakui authored
    Sometimes we will use a crtc for integerated LVDS, which is different with
    that assigned by BIOS. If we want to get flicker-free transitions,
    then we could read out the current state for it and set our current state
    accordingly.
    
    But it is true that if we aren't reading current state out, we do need
    to turn everything off before modesetting.  Otherwise the clocks can get very
    angry and we get things worse than a flicker at boot.
    In fact we also do the similar thing in UMS mode. We will disable all the
    possible outputs/crtcs for the first modesetting.
    
    So we disable all the possible outputs/crtcs before entering the KMS mode.
    Before we configure connector/encoder/crtc, the function of
    drm_helper_disable_unused_function can disable all the possible outputs/crtcs.
    Signed-off-by: default avatarZhao Yakui <yakui.zhao@intel.com>
    Reviewed-by: default avatarEric Anholt <eric@anholt.net>
    Reviewed-by: default avatarRafal Milecki <zajec5@gmail.com>
    Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
    b16d9acb
drm_crtc_helper.c 31 KB