Commit b07759bf authored by Ilija Hadzic's avatar Ilija Hadzic Committed by Dave Airlie

drm/radeon: allow pcie gen2 speed on Cayman

Looks like the same pcie gen2 speed initialization for
Evergreen also works on Cayman and seems to come up fine,
so enable it if the module parameter says so
Signed-off-by: default avatarIlija Hadzic <ihadzic@research.bell-labs.com>
Reviewed-by: default avatarAlex Deucher <alexander.deucher@amd.com>
Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
parent cd54033a
...@@ -39,7 +39,7 @@ ...@@ -39,7 +39,7 @@
static void evergreen_gpu_init(struct radeon_device *rdev); static void evergreen_gpu_init(struct radeon_device *rdev);
void evergreen_fini(struct radeon_device *rdev); void evergreen_fini(struct radeon_device *rdev);
static void evergreen_pcie_gen2_enable(struct radeon_device *rdev); void evergreen_pcie_gen2_enable(struct radeon_device *rdev);
void evergreen_fix_pci_max_read_req_size(struct radeon_device *rdev) void evergreen_fix_pci_max_read_req_size(struct radeon_device *rdev)
{ {
...@@ -3317,7 +3317,7 @@ void evergreen_fini(struct radeon_device *rdev) ...@@ -3317,7 +3317,7 @@ void evergreen_fini(struct radeon_device *rdev)
rdev->bios = NULL; rdev->bios = NULL;
} }
static void evergreen_pcie_gen2_enable(struct radeon_device *rdev) void evergreen_pcie_gen2_enable(struct radeon_device *rdev)
{ {
u32 link_width_cntl, speed_cntl; u32 link_width_cntl, speed_cntl;
......
...@@ -40,6 +40,7 @@ extern void evergreen_mc_program(struct radeon_device *rdev); ...@@ -40,6 +40,7 @@ extern void evergreen_mc_program(struct radeon_device *rdev);
extern void evergreen_irq_suspend(struct radeon_device *rdev); extern void evergreen_irq_suspend(struct radeon_device *rdev);
extern int evergreen_mc_init(struct radeon_device *rdev); extern int evergreen_mc_init(struct radeon_device *rdev);
extern void evergreen_fix_pci_max_read_req_size(struct radeon_device *rdev); extern void evergreen_fix_pci_max_read_req_size(struct radeon_device *rdev);
extern void evergreen_pcie_gen2_enable(struct radeon_device *rdev);
#define EVERGREEN_PFP_UCODE_SIZE 1120 #define EVERGREEN_PFP_UCODE_SIZE 1120
#define EVERGREEN_PM4_UCODE_SIZE 1376 #define EVERGREEN_PM4_UCODE_SIZE 1376
...@@ -1376,6 +1377,9 @@ static int cayman_startup(struct radeon_device *rdev) ...@@ -1376,6 +1377,9 @@ static int cayman_startup(struct radeon_device *rdev)
{ {
int r; int r;
/* enable pcie gen2 link */
evergreen_pcie_gen2_enable(rdev);
if (!rdev->me_fw || !rdev->pfp_fw || !rdev->rlc_fw || !rdev->mc_fw) { if (!rdev->me_fw || !rdev->pfp_fw || !rdev->rlc_fw || !rdev->mc_fw) {
r = ni_init_microcode(rdev); r = ni_init_microcode(rdev);
if (r) { if (r) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment