drm/amdgpu/cik: don't mess with aspm if gpu is root bus
authorAlex Deucher <alexander.deucher@amd.com>
Thu, 4 Feb 2016 15:33:59 +0000 (10:33 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 8 Feb 2016 15:37:41 +0000 (10:37 -0500)
Pcie registers may not be available in a virtualized
environment.

Reviewed-by: monk liu <monk.liu@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/cik.c

index fd9c9588ef46335d7a154e664bce8275d62f3ae9..5c978e064f47f6b59e592a800ae9298b36ef2075 100644 (file)
@@ -1762,6 +1762,9 @@ static void cik_program_aspm(struct amdgpu_device *adev)
        if (amdgpu_aspm == 0)
                return;
 
+       if (pci_is_root_bus(adev->pdev->bus))
+               return;
+
        /* XXX double check APUs */
        if (adev->flags & AMD_IS_APU)
                return;