• Nicholas Kazlauskas's avatar
    drm/amd/display: Fix plane address updates for video surface formats · e0634e8d
    Nicholas Kazlauskas authored
    [Why]
    For new DC planes the correct plane address fields are filled based
    on whether the plane had a graphics or video format.
    
    However, when we perform stream and plane updates using DC we only ever
    fill in the graphics format fields. This causing corruption and hangs
    when using video surface formats like NV12 for planes.
    
    [How]
    Use the same logic everywhere we update dc_plane_address - always
    fill in the correct fields based on the surface format type.
    
    There are 3 places this is done:
    
    - Atomic check, during DC plane creation
    - Atomic commit, during plane prepare_fb
    - Atomic commit tail, during amdgpu_dm_commit_planes
    
    We use the fill_plane_tiling_attributes in all 3 locations and it
    already needs the address to update DCC attributes, so the surface
    address update logic can be moved into this helper.
    Signed-off-by: default avatarNicholas Kazlauskas <nicholas.kazlauskas@amd.com>
    Reviewed-by: default avatarLeo Li <sunpeng.li@amd.com>
    Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
    e0634e8d
amdgpu_dm.c 174 KB