• Alex Deucher's avatar
    drm/amdgpu: add a retry for IP discovery init · 3938eb95
    Alex Deucher authored
    AMD dGPUs have integrated FW that runs as soon as the
    device gets power and initializes the board (determines
    the amount of memory, provides configuration details to
    the driver, etc.).  For direct PCIe attached cards this
    happens as soon as power is applied and normally completes
    well before the OS has even started loading.  However, with
    hotpluggable ports like USB4, the driver needs to wait for
    this to complete before initializing the device.
    
    This normally takes 60-100ms, but could take longer on
    some older boards periodically due to memory training.
    
    Retry for up to a second.  In the non-hotplug case, there
    should be no change in behavior and this should complete
    on the first try.
    
    v2: adjust test criteria
    v3: adjust checks for the masks, only enable on removable devices
    v4: skip bif_fb_en check
    
    Link: https://gitlab.freedesktop.org/drm/amd/-/issues/2925Reviewed-by: default avatarMario Limonciello <mario.limonciello@amd.com>
    Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
    Cc: stable@vger.kernel.org
    3938eb95
amdgpu_discovery.c 78.3 KB