• KuoHsiang Chou's avatar
    drm/ast: Create the driver for ASPEED proprietory Display-Port · 594e9c04
    KuoHsiang Chou authored
    V1:
    1. The MCU FW controling ASPEED DP is loaded by BMC boot loader.
    2. Driver starts after CR[3:1] == 111b that indicates Tx is ASTDP,
       and CRD1[5] has been asserted by BMVC boot loader.
    3. EDID is prioritized by DP monitor.
    4. DP's EDID has high priority to decide resolution supporting.
    
    V2:
    Modules description:
    1. ASTDP (ASPEED DisplayPort) is controlled by dedicated
       AST-MCU (ASPEED propriatary MCU).
    2. MCU is looping in charged of HPD, Read EDID, Link Training with
       DP sink.
    3. ASTDP and AST-MUC reside in BMC (Baseboard Management controller)
       addressing-space.
    4. ASPEED DRM driver requests MCU to get HPD and EDID by CR-scratched
       register.
    
    Booting sequence:
    1. Check if TX is ASTDP					// ast_dp_launch()
    2. Check if DP-MCU FW has loaded					// ast_dp_launch()
    3. Read EDID					// ast_dp_read_edid()
    4. Resolution switch					// ast_dp_SetOutput()
    
    V3:
    1. Remove unneeded semicolon.
    2. Apply to git://anongit.freedesktop.org/drm/drm, instead of
       git://anongit.freedesktop.org/drm/drm-misc
    3. Resolve auto build test WARNINGs on V1 patch.
    
    V4:
    1. Sync code-base with kernel 5.17_rc6
    2. Remove the define of DPControlPower, because DP chips need to be
       powered on to be used.
    3. Remove the switches of PHY and Display from EDID procedure.
    4. Revise increaing delay to fixed delay, because this version kernel
       doesn't detect minitor consistenntly.
    5. Create clean-up code used for reset of power state on errors with
       -EIO manner.
    6. Revise the DP detection by TX type and its DP-FW status during
       booting and resume.
    7. Correct the CamelCase Style.
    8. Use register reading while needing, and remove to hold full
       register.
    9. Instead of 'u8', revise to 'bool' on swwitch of PHY and video.
    10.Correct typo
    11.Remove the duplicated copy of TX definition.
    12.Use EDID_LENGTH as the constant of 128.
    Signed-off-by: default avatarKuoHsiang Chou <kuohsiang_chou@aspeedtech.com>
    Reviewed-by: default avatarThomas Zimmermann <tzimmermann@suse.de>
    Signed-off-by: default avatarThomas Zimmermann <tzimmermann@suse.de>
    Link: https://patchwork.freedesktop.org/patch/msgid/20220428075603.20904-1-kuohsiang_chou@aspeedtech.com
    594e9c04
ast_mode.c 47.8 KB