]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
drm/radeon: add r600_get_pcie_lane_support helper
authorAlex Deucher <alexander.deucher@amd.com>
Tue, 14 May 2013 21:44:31 +0000 (17:44 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 30 Aug 2013 20:30:25 +0000 (16:30 -0400)
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/radeon/r600_dpm.c
drivers/gpu/drm/radeon/r600_dpm.h

index bf851ac5491a8fd242f869504c701a5c2f5a1e8d..34ea5d6ee4be779ced8b7c4893e608f4e5c92e0d 100644 (file)
@@ -1223,3 +1223,26 @@ enum radeon_pcie_gen r600_get_pcie_gen_support(struct radeon_device *rdev,
        }
        return RADEON_PCIE_GEN1;
 }
+
+u16 r600_get_pcie_lane_support(struct radeon_device *rdev,
+                              u16 asic_lanes,
+                              u16 default_lanes)
+{
+       switch (asic_lanes) {
+       case 0:
+       default:
+               return default_lanes;
+       case 1:
+               return 1;
+       case 2:
+               return 2;
+       case 4:
+               return 4;
+       case 8:
+               return 8;
+       case 12:
+               return 12;
+       case 16:
+               return 16;
+       }
+}
index 7c822d9ae53d62777bbea9bc8d3a6975b70286c5..71d5d93c371ba25721f43571de014572519a9ef9 100644 (file)
@@ -224,4 +224,8 @@ enum radeon_pcie_gen r600_get_pcie_gen_support(struct radeon_device *rdev,
                                               enum radeon_pcie_gen asic_gen,
                                               enum radeon_pcie_gen default_gen);
 
+u16 r600_get_pcie_lane_support(struct radeon_device *rdev,
+                              u16 asic_lanes,
+                              u16 default_lanes);
+
 #endif