• Hersen Wu's avatar
    drm/amd/display: add debugfs disallow edp psr · 13b3d6bd
    Hersen Wu authored
    [Why]
    fix reading edp rx crc timeout failure. after
    bootup, kernel setup psr with dpcd 0x170 = 5. this
    notify rx psr enable and let rx fw start checking crc
    for fw internal logic. rx fw may not update crc read
    count within dpcd 0x246. read count is always 0. this
    will lead tx crc reading timeout.
    
    [How]
    add debugfs to let test app to disbable rx crc
    checking for rx internal logic. then test app can read
    rx crc dpcd 0x246 successfully.
    expected app sequence is as below:
    1. disable eDP PHY and notify eDP rx with dpcd 0x600 = 2.
    2. echo 0x1 /sys/kernel/debug/dri/0/eDP-X/disallow_edp_enter_psr
    3. enable eDP PHY and notify eDP rx with dpcd 0x600 = 1 but
       without dpcd 0x170 = 5.
    4. read crc from rx dpcd 0x270, 0x246, etc.
    5. echo 0x0 /sys/kernel/debug/dri/0/eDP-X/disallow_edp_enter_psr.
       this will let eDP back to normal with psr setup dpcd 0x170 = 5.
    Reviewed-by: default avatarWayne Lin <wayne.lin@amd.com>
    Acked-by: default avatarTom Chung <chiahsuan.chung@amd.com>
    Signed-off-by: default avatarHersen Wu <hersenxs.wu@amd.com>
    Tested-by: default avatarDaniel Wheeler <daniel.wheeler@amd.com>
    Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
    13b3d6bd
amdgpu_dm.h 24.8 KB