drm/amdgpu: fix incorrect pcie_gen_mask in passthrough case
authorTong Liu01 <Tong.Liu01@amd.com>
Tue, 16 May 2023 06:50:04 +0000 (14:50 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 9 Jun 2023 14:40:00 +0000 (10:40 -0400)
commit04e8595819480bec2754bd2cc4377270e7e6c799
treea842d15f549f8cbd46eb7ce42736c3cfa14a8334
parent8789989b476b5f3bb0bf1a63b5223f6e76cfd13d
drm/amdgpu: fix incorrect pcie_gen_mask in passthrough case

[why]
Passthrough case is treated as root bus and pcie_gen_mask is set as
default value that does not support GEN 3 and GEN 4 for PCIe link
speed. So PCIe link speed will be downgraded at smu hw init in
passthrough condition

[how]
Move get pci info after detect virtualization and check if it is
passthrough case when set pcie_gen_mask

Signed-off-by: Tong Liu01 <Tong.Liu01@amd.com>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c