• Hawking Zhang's avatar
    drm/amdgpu: move xgmi init/fini to xgmi_add/remove_device call (v2) · 0b9d3760
    Hawking Zhang authored
    For sriov, psp ip block has to be initialized before
    ih block for the dynamic register programming interface
    that needed for vf ih ring buffer. On the other hand,
    current psp ip block hw_init function will initialize
    xgmi session which actaully depends on interrupt to
    return session context. This results an empty xgmi ta
    session id and later failures on all the xgmi ta cmd
    invoked from vf. xgmi ta session initialization has to
    be done after ih ip block hw_init call.
    
    to unify xgmi session init/fini for both bare-metal
    sriov virtualization use scenario, move xgmi ta init
    to xgmi_add_device call, and accordingly terminate xgmi
    ta session in xgmi_remove_device call.
    
    The existing suspend/resume sequence will not be changed.
    
    v2: squash in return fix from Nirmoy
    Signed-off-by: default avatarHawking Zhang <Hawking.Zhang@amd.com>
    Reviewed-by: default avatarFrank Min <Frank.Min@amd.com>
    Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
    0b9d3760
amdgpu_psp.c 41.3 KB