diff options
author | Dave Airlie <airlied@redhat.com> | 2017-01-08 18:47:19 -0500 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2017-01-08 18:47:19 -0500 |
commit | 6edd870bca30b3aa69370a99bcefc1e5f2b8b190 (patch) | |
tree | 00a11830aa92cca60ddac28911b9d57d353d6ff4 | |
parent | 6906407eeb690ed31b183a38ae10db2907cc3a58 (diff) | |
parent | 7192c54a68013f6058b1bb505645fcd07015191c (diff) |
Merge branch 'drm-fixes-4.10' of git://people.freedesktop.org/~agd5f/linux into drm-fixes
Fixes for 4.10:
- Polaris 12 support
- Add new amd-gfx mailing list to MAINTAINERS file
- UVD clockgating fix
- SI dpm fixes
* 'drm-fixes-4.10' of git://people.freedesktop.org/~agd5f/linux:
drm/amdgpu: drop verde dpm quirks
drm/radeon: drop verde dpm quirks
drm/radeon: update smc firmware selection for SI
drm/amdgpu: update si kicker smc firmware
drm/amd/powerplay: extend smu's response timeout time.
drm/amdgpu: remove static integer for uvd pp state
drm/amd/amdgpu: add Polaris12 PCI ID
drm/amdgpu/powerplay: add Polaris12 support
drm/amd/amdgpu: add Polaris12 support (v3)
MAINTAINERS: Update mailing list for radeon and amdgpu
21 files changed, 146 insertions, 106 deletions
diff --git a/MAINTAINERS b/MAINTAINERS index 5f0420a0da5b..35c9cbfe4f2d 100644 --- a/MAINTAINERS +++ b/MAINTAINERS | |||
@@ -4117,7 +4117,7 @@ F: drivers/gpu/drm/cirrus/ | |||
4117 | RADEON and AMDGPU DRM DRIVERS | 4117 | RADEON and AMDGPU DRM DRIVERS |
4118 | M: Alex Deucher <alexander.deucher@amd.com> | 4118 | M: Alex Deucher <alexander.deucher@amd.com> |
4119 | M: Christian König <christian.koenig@amd.com> | 4119 | M: Christian König <christian.koenig@amd.com> |
4120 | L: dri-devel@lists.freedesktop.org | 4120 | L: amd-gfx@lists.freedesktop.org |
4121 | T: git git://people.freedesktop.org/~agd5f/linux | 4121 | T: git git://people.freedesktop.org/~agd5f/linux |
4122 | S: Supported | 4122 | S: Supported |
4123 | F: drivers/gpu/drm/radeon/ | 4123 | F: drivers/gpu/drm/radeon/ |
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_cgs.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_cgs.c index 9ada56c16a58..4c851fde1e82 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_cgs.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_cgs.c | |||
@@ -840,6 +840,9 @@ static int amdgpu_cgs_get_firmware_info(struct cgs_device *cgs_device, | |||
840 | else if (type == CGS_UCODE_ID_SMU_SK) | 840 | else if (type == CGS_UCODE_ID_SMU_SK) |
841 | strcpy(fw_name, "amdgpu/polaris10_smc_sk.bin"); | 841 | strcpy(fw_name, "amdgpu/polaris10_smc_sk.bin"); |
842 | break; | 842 | break; |
843 | case CHIP_POLARIS12: | ||
844 | strcpy(fw_name, "amdgpu/polaris12_smc.bin"); | ||
845 | break; | ||
843 | default: | 846 | default: |
844 | DRM_ERROR("SMC firmware not supported\n"); | 847 | DRM_ERROR("SMC firmware not supported\n"); |
845 | return -EINVAL; | 848 | return -EINVAL; |
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c index 60bd4afe45c8..fe3bb94fe58d 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | |||
@@ -73,6 +73,7 @@ static const char *amdgpu_asic_name[] = { | |||
73 | "STONEY", | 73 | "STONEY", |
74 | "POLARIS10", | 74 | "POLARIS10", |
75 | "POLARIS11", | 75 | "POLARIS11", |
76 | "POLARIS12", | ||
76 | "LAST", | 77 | "LAST", |
77 | }; | 78 | }; |
78 | 79 | ||
@@ -1277,6 +1278,7 @@ static int amdgpu_early_init(struct amdgpu_device *adev) | |||
1277 | case CHIP_FIJI: | 1278 | case CHIP_FIJI: |
1278 | case CHIP_POLARIS11: | 1279 | case CHIP_POLARIS11: |
1279 | case CHIP_POLARIS10: | 1280 | case CHIP_POLARIS10: |
1281 | case CHIP_POLARIS12: | ||
1280 | case CHIP_CARRIZO: | 1282 | case CHIP_CARRIZO: |
1281 | case CHIP_STONEY: | 1283 | case CHIP_STONEY: |
1282 | if (adev->asic_type == CHIP_CARRIZO || adev->asic_type == CHIP_STONEY) | 1284 | if (adev->asic_type == CHIP_CARRIZO || adev->asic_type == CHIP_STONEY) |
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c index 8cb937b2bfcc..2534adaebe30 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | |||
@@ -418,6 +418,13 @@ static const struct pci_device_id pciidlist[] = { | |||
418 | {0x1002, 0x67CA, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_POLARIS10}, | 418 | {0x1002, 0x67CA, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_POLARIS10}, |
419 | {0x1002, 0x67CC, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_POLARIS10}, | 419 | {0x1002, 0x67CC, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_POLARIS10}, |
420 | {0x1002, 0x67CF, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_POLARIS10}, | 420 | {0x1002, 0x67CF, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_POLARIS10}, |
421 | /* Polaris12 */ | ||
422 | {0x1002, 0x6980, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_POLARIS12}, | ||
423 | {0x1002, 0x6981, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_POLARIS12}, | ||
424 | {0x1002, 0x6985, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_POLARIS12}, | ||
425 | {0x1002, 0x6986, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_POLARIS12}, | ||
426 | {0x1002, 0x6987, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_POLARIS12}, | ||
427 | {0x1002, 0x699F, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_POLARIS12}, | ||
421 | 428 | ||
422 | {0, 0, 0} | 429 | {0, 0, 0} |
423 | }; | 430 | }; |
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_powerplay.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_powerplay.c index fc592c2b0e16..95a568df8551 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_powerplay.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_powerplay.c | |||
@@ -98,6 +98,7 @@ static int amdgpu_pp_early_init(void *handle) | |||
98 | switch (adev->asic_type) { | 98 | switch (adev->asic_type) { |
99 | case CHIP_POLARIS11: | 99 | case CHIP_POLARIS11: |
100 | case CHIP_POLARIS10: | 100 | case CHIP_POLARIS10: |
101 | case CHIP_POLARIS12: | ||
101 | case CHIP_TONGA: | 102 | case CHIP_TONGA: |
102 | case CHIP_FIJI: | 103 | case CHIP_FIJI: |
103 | case CHIP_TOPAZ: | 104 | case CHIP_TOPAZ: |
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c index a81dfaeeb8c0..1d564beb0fde 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c | |||
@@ -65,6 +65,7 @@ | |||
65 | #define FIRMWARE_STONEY "amdgpu/stoney_uvd.bin" | 65 | #define FIRMWARE_STONEY "amdgpu/stoney_uvd.bin" |
66 | #define FIRMWARE_POLARIS10 "amdgpu/polaris10_uvd.bin" | 66 | #define FIRMWARE_POLARIS10 "amdgpu/polaris10_uvd.bin" |
67 | #define FIRMWARE_POLARIS11 "amdgpu/polaris11_uvd.bin" | 67 | #define FIRMWARE_POLARIS11 "amdgpu/polaris11_uvd.bin" |
68 | #define FIRMWARE_POLARIS12 "amdgpu/polaris12_uvd.bin" | ||
68 | 69 | ||
69 | /** | 70 | /** |
70 | * amdgpu_uvd_cs_ctx - Command submission parser context | 71 | * amdgpu_uvd_cs_ctx - Command submission parser context |
@@ -98,6 +99,7 @@ MODULE_FIRMWARE(FIRMWARE_FIJI); | |||
98 | MODULE_FIRMWARE(FIRMWARE_STONEY); | 99 | MODULE_FIRMWARE(FIRMWARE_STONEY); |
99 | MODULE_FIRMWARE(FIRMWARE_POLARIS10); | 100 | MODULE_FIRMWARE(FIRMWARE_POLARIS10); |
100 | MODULE_FIRMWARE(FIRMWARE_POLARIS11); | 101 | MODULE_FIRMWARE(FIRMWARE_POLARIS11); |
102 | MODULE_FIRMWARE(FIRMWARE_POLARIS12); | ||
101 | 103 | ||
102 | static void amdgpu_uvd_idle_work_handler(struct work_struct *work); | 104 | static void amdgpu_uvd_idle_work_handler(struct work_struct *work); |
103 | 105 | ||
@@ -149,6 +151,9 @@ int amdgpu_uvd_sw_init(struct amdgpu_device *adev) | |||
149 | case CHIP_POLARIS11: | 151 | case CHIP_POLARIS11: |
150 | fw_name = FIRMWARE_POLARIS11; | 152 | fw_name = FIRMWARE_POLARIS11; |
151 | break; | 153 | break; |
154 | case CHIP_POLARIS12: | ||
155 | fw_name = FIRMWARE_POLARIS12; | ||
156 | break; | ||
152 | default: | 157 | default: |
153 | return -EINVAL; | 158 | return -EINVAL; |
154 | } | 159 | } |
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c index 69b66b9e7f57..8fec802d3908 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c | |||
@@ -52,6 +52,7 @@ | |||
52 | #define FIRMWARE_STONEY "amdgpu/stoney_vce.bin" | 52 | #define FIRMWARE_STONEY "amdgpu/stoney_vce.bin" |
53 | #define FIRMWARE_POLARIS10 "amdgpu/polaris10_vce.bin" | 53 | #define FIRMWARE_POLARIS10 "amdgpu/polaris10_vce.bin" |
54 | #define FIRMWARE_POLARIS11 "amdgpu/polaris11_vce.bin" | 54 | #define FIRMWARE_POLARIS11 "amdgpu/polaris11_vce.bin" |
55 | #define FIRMWARE_POLARIS12 "amdgpu/polaris12_vce.bin" | ||
55 | 56 | ||
56 | #ifdef CONFIG_DRM_AMDGPU_CIK | 57 | #ifdef CONFIG_DRM_AMDGPU_CIK |
57 | MODULE_FIRMWARE(FIRMWARE_BONAIRE); | 58 | MODULE_FIRMWARE(FIRMWARE_BONAIRE); |
@@ -66,6 +67,7 @@ MODULE_FIRMWARE(FIRMWARE_FIJI); | |||
66 | MODULE_FIRMWARE(FIRMWARE_STONEY); | 67 | MODULE_FIRMWARE(FIRMWARE_STONEY); |
67 | MODULE_FIRMWARE(FIRMWARE_POLARIS10); | 68 | MODULE_FIRMWARE(FIRMWARE_POLARIS10); |
68 | MODULE_FIRMWARE(FIRMWARE_POLARIS11); | 69 | MODULE_FIRMWARE(FIRMWARE_POLARIS11); |
70 | MODULE_FIRMWARE(FIRMWARE_POLARIS12); | ||
69 | 71 | ||
70 | static void amdgpu_vce_idle_work_handler(struct work_struct *work); | 72 | static void amdgpu_vce_idle_work_handler(struct work_struct *work); |
71 | 73 | ||
@@ -121,6 +123,9 @@ int amdgpu_vce_sw_init(struct amdgpu_device *adev, unsigned long size) | |||
121 | case CHIP_POLARIS11: | 123 | case CHIP_POLARIS11: |
122 | fw_name = FIRMWARE_POLARIS11; | 124 | fw_name = FIRMWARE_POLARIS11; |
123 | break; | 125 | break; |
126 | case CHIP_POLARIS12: | ||
127 | fw_name = FIRMWARE_POLARIS12; | ||
128 | break; | ||
124 | 129 | ||
125 | default: | 130 | default: |
126 | return -EINVAL; | 131 | return -EINVAL; |
diff --git a/drivers/gpu/drm/amd/amdgpu/dce_v11_0.c b/drivers/gpu/drm/amd/amdgpu/dce_v11_0.c index b3d62b909f43..2006abbbfb62 100644 --- a/drivers/gpu/drm/amd/amdgpu/dce_v11_0.c +++ b/drivers/gpu/drm/amd/amdgpu/dce_v11_0.c | |||
@@ -167,6 +167,7 @@ static void dce_v11_0_init_golden_registers(struct amdgpu_device *adev) | |||
167 | (const u32)ARRAY_SIZE(stoney_golden_settings_a11)); | 167 | (const u32)ARRAY_SIZE(stoney_golden_settings_a11)); |
168 | break; | 168 | break; |
169 | case CHIP_POLARIS11: | 169 | case CHIP_POLARIS11: |
170 | case CHIP_POLARIS12: | ||
170 | amdgpu_program_register_sequence(adev, | 171 | amdgpu_program_register_sequence(adev, |
171 | polaris11_golden_settings_a11, | 172 | polaris11_golden_settings_a11, |
172 | (const u32)ARRAY_SIZE(polaris11_golden_settings_a11)); | 173 | (const u32)ARRAY_SIZE(polaris11_golden_settings_a11)); |
@@ -608,6 +609,7 @@ static int dce_v11_0_get_num_crtc (struct amdgpu_device *adev) | |||
608 | num_crtc = 6; | 609 | num_crtc = 6; |
609 | break; | 610 | break; |
610 | case CHIP_POLARIS11: | 611 | case CHIP_POLARIS11: |
612 | case CHIP_POLARIS12: | ||
611 | num_crtc = 5; | 613 | num_crtc = 5; |
612 | break; | 614 | break; |
613 | default: | 615 | default: |
@@ -1589,6 +1591,7 @@ static int dce_v11_0_audio_init(struct amdgpu_device *adev) | |||
1589 | adev->mode_info.audio.num_pins = 8; | 1591 | adev->mode_info.audio.num_pins = 8; |
1590 | break; | 1592 | break; |
1591 | case CHIP_POLARIS11: | 1593 | case CHIP_POLARIS11: |
1594 | case CHIP_POLARIS12: | ||
1592 | adev->mode_info.audio.num_pins = 6; | 1595 | adev->mode_info.audio.num_pins = 6; |
1593 | break; | 1596 | break; |
1594 | default: | 1597 | default: |
@@ -2388,7 +2391,8 @@ static u32 dce_v11_0_pick_pll(struct drm_crtc *crtc) | |||
2388 | int pll; | 2391 | int pll; |
2389 | 2392 | ||
2390 | if ((adev->asic_type == CHIP_POLARIS10) || | 2393 | if ((adev->asic_type == CHIP_POLARIS10) || |
2391 | (adev->asic_type == CHIP_POLARIS11)) { | 2394 | (adev->asic_type == CHIP_POLARIS11) || |
2395 | (adev->asic_type == CHIP_POLARIS12)) { | ||
2392 | struct amdgpu_encoder *amdgpu_encoder = | 2396 | struct amdgpu_encoder *amdgpu_encoder = |
2393 | to_amdgpu_encoder(amdgpu_crtc->encoder); | 2397 | to_amdgpu_encoder(amdgpu_crtc->encoder); |
2394 | struct amdgpu_encoder_atom_dig *dig = amdgpu_encoder->enc_priv; | 2398 | struct amdgpu_encoder_atom_dig *dig = amdgpu_encoder->enc_priv; |
@@ -2822,7 +2826,8 @@ static int dce_v11_0_crtc_mode_set(struct drm_crtc *crtc, | |||
2822 | return -EINVAL; | 2826 | return -EINVAL; |
2823 | 2827 | ||
2824 | if ((adev->asic_type == CHIP_POLARIS10) || | 2828 | if ((adev->asic_type == CHIP_POLARIS10) || |
2825 | (adev->asic_type == CHIP_POLARIS11)) { | 2829 | (adev->asic_type == CHIP_POLARIS11) || |
2830 | (adev->asic_type == CHIP_POLARIS12)) { | ||
2826 | struct amdgpu_encoder *amdgpu_encoder = | 2831 | struct amdgpu_encoder *amdgpu_encoder = |
2827 | to_amdgpu_encoder(amdgpu_crtc->encoder); | 2832 | to_amdgpu_encoder(amdgpu_crtc->encoder); |
2828 | int encoder_mode = | 2833 | int encoder_mode = |
@@ -2992,6 +2997,7 @@ static int dce_v11_0_early_init(void *handle) | |||
2992 | adev->mode_info.num_dig = 6; | 2997 | adev->mode_info.num_dig = 6; |
2993 | break; | 2998 | break; |
2994 | case CHIP_POLARIS11: | 2999 | case CHIP_POLARIS11: |
3000 | case CHIP_POLARIS12: | ||
2995 | adev->mode_info.num_hpd = 5; | 3001 | adev->mode_info.num_hpd = 5; |
2996 | adev->mode_info.num_dig = 5; | 3002 | adev->mode_info.num_dig = 5; |
2997 | break; | 3003 | break; |
@@ -3101,7 +3107,8 @@ static int dce_v11_0_hw_init(void *handle) | |||
3101 | amdgpu_atombios_crtc_powergate_init(adev); | 3107 | amdgpu_atombios_crtc_powergate_init(adev); |
3102 | amdgpu_atombios_encoder_init_dig(adev); | 3108 | amdgpu_atombios_encoder_init_dig(adev); |
3103 | if ((adev->asic_type == CHIP_POLARIS10) || | 3109 | if ((adev->asic_type == CHIP_POLARIS10) || |
3104 | (adev->asic_type == CHIP_POLARIS11)) { | 3110 | (adev->asic_type == CHIP_POLARIS11) || |
3111 | (adev->asic_type == CHIP_POLARIS12)) { | ||
3105 | amdgpu_atombios_crtc_set_dce_clock(adev, adev->clock.default_dispclk, | 3112 | amdgpu_atombios_crtc_set_dce_clock(adev, adev->clock.default_dispclk, |
3106 | DCE_CLOCK_TYPE_DISPCLK, ATOM_GCK_DFS); | 3113 | DCE_CLOCK_TYPE_DISPCLK, ATOM_GCK_DFS); |
3107 | amdgpu_atombios_crtc_set_dce_clock(adev, 0, | 3114 | amdgpu_atombios_crtc_set_dce_clock(adev, 0, |
diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c index d0ec00986f38..373374164bd5 100644 --- a/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c +++ b/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | |||
@@ -139,6 +139,13 @@ MODULE_FIRMWARE("amdgpu/polaris10_mec.bin"); | |||
139 | MODULE_FIRMWARE("amdgpu/polaris10_mec2.bin"); | 139 | MODULE_FIRMWARE("amdgpu/polaris10_mec2.bin"); |
140 | MODULE_FIRMWARE("amdgpu/polaris10_rlc.bin"); | 140 | MODULE_FIRMWARE("amdgpu/polaris10_rlc.bin"); |
141 | 141 | ||
142 | MODULE_FIRMWARE("amdgpu/polaris12_ce.bin"); | ||
143 | MODULE_FIRMWARE("amdgpu/polaris12_pfp.bin"); | ||
144 | MODULE_FIRMWARE("amdgpu/polaris12_me.bin"); | ||
145 | MODULE_FIRMWARE("amdgpu/polaris12_mec.bin"); | ||
146 | MODULE_FIRMWARE("amdgpu/polaris12_mec2.bin"); | ||
147 | MODULE_FIRMWARE("amdgpu/polaris12_rlc.bin"); | ||
148 | |||
142 | static const struct amdgpu_gds_reg_offset amdgpu_gds_reg_offset[] = | 149 | static const struct amdgpu_gds_reg_offset amdgpu_gds_reg_offset[] = |
143 | { | 150 | { |
144 | {mmGDS_VMID0_BASE, mmGDS_VMID0_SIZE, mmGDS_GWS_VMID0, mmGDS_OA_VMID0}, | 151 | {mmGDS_VMID0_BASE, mmGDS_VMID0_SIZE, mmGDS_GWS_VMID0, mmGDS_OA_VMID0}, |
@@ -689,6 +696,7 @@ static void gfx_v8_0_init_golden_registers(struct amdgpu_device *adev) | |||
689 | (const u32)ARRAY_SIZE(tonga_golden_common_all)); | 696 | (const u32)ARRAY_SIZE(tonga_golden_common_all)); |
690 | break; | 697 | break; |
691 | case CHIP_POLARIS11: | 698 | case CHIP_POLARIS11: |
699 | case CHIP_POLARIS12: | ||
692 | amdgpu_program_register_sequence(adev, | 700 | amdgpu_program_register_sequence(adev, |
693 | golden_settings_polaris11_a11, | 701 | golden_settings_polaris11_a11, |
694 | (const u32)ARRAY_SIZE(golden_settings_polaris11_a11)); | 702 | (const u32)ARRAY_SIZE(golden_settings_polaris11_a11)); |
@@ -903,6 +911,9 @@ static int gfx_v8_0_init_microcode(struct amdgpu_device *adev) | |||
903 | case CHIP_POLARIS10: | 911 | case CHIP_POLARIS10: |
904 | chip_name = "polaris10"; | 912 | chip_name = "polaris10"; |
905 | break; | 913 | break; |
914 | case CHIP_POLARIS12: | ||
915 | chip_name = "polaris12"; | ||
916 | break; | ||
906 | case CHIP_STONEY: | 917 | case CHIP_STONEY: |
907 | chip_name = "stoney"; | 918 | chip_name = "stoney"; |
908 | break; | 919 | break; |
@@ -1768,6 +1779,7 @@ static int gfx_v8_0_gpu_early_init(struct amdgpu_device *adev) | |||
1768 | gb_addr_config = TONGA_GB_ADDR_CONFIG_GOLDEN; | 1779 | gb_addr_config = TONGA_GB_ADDR_CONFIG_GOLDEN; |
1769 | break; | 1780 | break; |
1770 | case CHIP_POLARIS11: | 1781 | case CHIP_POLARIS11: |
1782 | case CHIP_POLARIS12: | ||
1771 | ret = amdgpu_atombios_get_gfx_info(adev); | 1783 | ret = amdgpu_atombios_get_gfx_info(adev); |
1772 | if (ret) | 1784 | if (ret) |
1773 | return ret; | 1785 | return ret; |
@@ -2682,6 +2694,7 @@ static void gfx_v8_0_tiling_mode_table_init(struct amdgpu_device *adev) | |||
2682 | 2694 | ||
2683 | break; | 2695 | break; |
2684 | case CHIP_POLARIS11: | 2696 | case CHIP_POLARIS11: |
2697 | case CHIP_POLARIS12: | ||
2685 | modearray[0] = (ARRAY_MODE(ARRAY_2D_TILED_THIN1) | | 2698 | modearray[0] = (ARRAY_MODE(ARRAY_2D_TILED_THIN1) | |
2686 | PIPE_CONFIG(ADDR_SURF_P4_16x16) | | 2699 | PIPE_CONFIG(ADDR_SURF_P4_16x16) | |
2687 | TILE_SPLIT(ADDR_SURF_TILE_SPLIT_64B) | | 2700 | TILE_SPLIT(ADDR_SURF_TILE_SPLIT_64B) | |
@@ -3503,6 +3516,7 @@ gfx_v8_0_raster_config(struct amdgpu_device *adev, u32 *rconf, u32 *rconf1) | |||
3503 | *rconf1 |= 0x0; | 3516 | *rconf1 |= 0x0; |
3504 | break; | 3517 | break; |
3505 | case CHIP_POLARIS11: | 3518 | case CHIP_POLARIS11: |
3519 | case CHIP_POLARIS12: | ||
3506 | *rconf |= RB_MAP_PKR0(2) | RB_XSEL2(1) | SE_MAP(2) | | 3520 | *rconf |= RB_MAP_PKR0(2) | RB_XSEL2(1) | SE_MAP(2) | |
3507 | SE_XSEL(1) | SE_YSEL(1); | 3521 | SE_XSEL(1) | SE_YSEL(1); |
3508 | *rconf1 |= 0x0; | 3522 | *rconf1 |= 0x0; |
@@ -4021,7 +4035,8 @@ static void gfx_v8_0_init_pg(struct amdgpu_device *adev) | |||
4021 | cz_enable_cp_power_gating(adev, true); | 4035 | cz_enable_cp_power_gating(adev, true); |
4022 | else | 4036 | else |
4023 | cz_enable_cp_power_gating(adev, false); | 4037 | cz_enable_cp_power_gating(adev, false); |
4024 | } else if (adev->asic_type == CHIP_POLARIS11) { | 4038 | } else if ((adev->asic_type == CHIP_POLARIS11) || |
4039 | (adev->asic_type == CHIP_POLARIS12)) { | ||
4025 | gfx_v8_0_init_csb(adev); | 4040 | gfx_v8_0_init_csb(adev); |
4026 | gfx_v8_0_init_save_restore_list(adev); | 4041 | gfx_v8_0_init_save_restore_list(adev); |
4027 | gfx_v8_0_enable_save_restore_machine(adev); | 4042 | gfx_v8_0_enable_save_restore_machine(adev); |
@@ -4095,7 +4110,8 @@ static int gfx_v8_0_rlc_resume(struct amdgpu_device *adev) | |||
4095 | RLC_CGCG_CGLS_CTRL__CGLS_EN_MASK); | 4110 | RLC_CGCG_CGLS_CTRL__CGLS_EN_MASK); |
4096 | WREG32(mmRLC_CGCG_CGLS_CTRL, tmp); | 4111 | WREG32(mmRLC_CGCG_CGLS_CTRL, tmp); |
4097 | if (adev->asic_type == CHIP_POLARIS11 || | 4112 | if (adev->asic_type == CHIP_POLARIS11 || |
4098 | adev->asic_type == CHIP_POLARIS10) { | 4113 | adev->asic_type == CHIP_POLARIS10 || |
4114 | adev->asic_type == CHIP_POLARIS12) { | ||
4099 | tmp = RREG32(mmRLC_CGCG_CGLS_CTRL_3D); | 4115 | tmp = RREG32(mmRLC_CGCG_CGLS_CTRL_3D); |
4100 | tmp &= ~0x3; | 4116 | tmp &= ~0x3; |
4101 | WREG32(mmRLC_CGCG_CGLS_CTRL_3D, tmp); | 4117 | WREG32(mmRLC_CGCG_CGLS_CTRL_3D, tmp); |
@@ -4283,6 +4299,7 @@ static int gfx_v8_0_cp_gfx_start(struct amdgpu_device *adev) | |||
4283 | amdgpu_ring_write(ring, 0x0000002A); | 4299 | amdgpu_ring_write(ring, 0x0000002A); |
4284 | break; | 4300 | break; |
4285 | case CHIP_POLARIS11: | 4301 | case CHIP_POLARIS11: |
4302 | case CHIP_POLARIS12: | ||
4286 | amdgpu_ring_write(ring, 0x16000012); | 4303 | amdgpu_ring_write(ring, 0x16000012); |
4287 | amdgpu_ring_write(ring, 0x00000000); | 4304 | amdgpu_ring_write(ring, 0x00000000); |
4288 | break; | 4305 | break; |
@@ -4664,7 +4681,8 @@ static int gfx_v8_0_cp_compute_resume(struct amdgpu_device *adev) | |||
4664 | (adev->asic_type == CHIP_FIJI) || | 4681 | (adev->asic_type == CHIP_FIJI) || |
4665 | (adev->asic_type == CHIP_STONEY) || | 4682 | (adev->asic_type == CHIP_STONEY) || |
4666 | (adev->asic_type == CHIP_POLARIS11) || | 4683 | (adev->asic_type == CHIP_POLARIS11) || |
4667 | (adev->asic_type == CHIP_POLARIS10)) { | 4684 | (adev->asic_type == CHIP_POLARIS10) || |
4685 | (adev->asic_type == CHIP_POLARIS12)) { | ||
4668 | WREG32(mmCP_MEC_DOORBELL_RANGE_LOWER, | 4686 | WREG32(mmCP_MEC_DOORBELL_RANGE_LOWER, |
4669 | AMDGPU_DOORBELL_KIQ << 2); | 4687 | AMDGPU_DOORBELL_KIQ << 2); |
4670 | WREG32(mmCP_MEC_DOORBELL_RANGE_UPPER, | 4688 | WREG32(mmCP_MEC_DOORBELL_RANGE_UPPER, |
@@ -4700,7 +4718,8 @@ static int gfx_v8_0_cp_compute_resume(struct amdgpu_device *adev) | |||
4700 | mqd->cp_hqd_persistent_state = tmp; | 4718 | mqd->cp_hqd_persistent_state = tmp; |
4701 | if (adev->asic_type == CHIP_STONEY || | 4719 | if (adev->asic_type == CHIP_STONEY || |
4702 | adev->asic_type == CHIP_POLARIS11 || | 4720 | adev->asic_type == CHIP_POLARIS11 || |
4703 | adev->asic_type == CHIP_POLARIS10) { | 4721 | adev->asic_type == CHIP_POLARIS10 || |
4722 | adev->asic_type == CHIP_POLARIS12) { | ||
4704 | tmp = RREG32(mmCP_ME1_PIPE3_INT_CNTL); | 4723 | tmp = RREG32(mmCP_ME1_PIPE3_INT_CNTL); |
4705 | tmp = REG_SET_FIELD(tmp, CP_ME1_PIPE3_INT_CNTL, GENERIC2_INT_ENABLE, 1); | 4724 | tmp = REG_SET_FIELD(tmp, CP_ME1_PIPE3_INT_CNTL, GENERIC2_INT_ENABLE, 1); |
4706 | WREG32(mmCP_ME1_PIPE3_INT_CNTL, tmp); | 4725 | WREG32(mmCP_ME1_PIPE3_INT_CNTL, tmp); |
@@ -5279,7 +5298,8 @@ static int gfx_v8_0_late_init(void *handle) | |||
5279 | static void gfx_v8_0_enable_gfx_static_mg_power_gating(struct amdgpu_device *adev, | 5298 | static void gfx_v8_0_enable_gfx_static_mg_power_gating(struct amdgpu_device *adev, |
5280 | bool enable) | 5299 | bool enable) |
5281 | { | 5300 | { |
5282 | if (adev->asic_type == CHIP_POLARIS11) | 5301 | if ((adev->asic_type == CHIP_POLARIS11) || |
5302 | (adev->asic_type == CHIP_POLARIS12)) | ||
5283 | /* Send msg to SMU via Powerplay */ | 5303 | /* Send msg to SMU via Powerplay */ |
5284 | amdgpu_set_powergating_state(adev, | 5304 | amdgpu_set_powergating_state(adev, |
5285 | AMD_IP_BLOCK_TYPE_SMC, | 5305 | AMD_IP_BLOCK_TYPE_SMC, |
@@ -5353,6 +5373,7 @@ static int gfx_v8_0_set_powergating_state(void *handle, | |||
5353 | gfx_v8_0_enable_gfx_dynamic_mg_power_gating(adev, false); | 5373 | gfx_v8_0_enable_gfx_dynamic_mg_power_gating(adev, false); |
5354 | break; | 5374 | break; |
5355 | case CHIP_POLARIS11: | 5375 | case CHIP_POLARIS11: |
5376 | case CHIP_POLARIS12: | ||
5356 | if ((adev->pg_flags & AMD_PG_SUPPORT_GFX_SMG) && enable) | 5377 | if ((adev->pg_flags & AMD_PG_SUPPORT_GFX_SMG) && enable) |
5357 | gfx_v8_0_enable_gfx_static_mg_power_gating(adev, true); | 5378 | gfx_v8_0_enable_gfx_static_mg_power_gating(adev, true); |
5358 | else | 5379 | else |
diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c b/drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c index 0daac3a5be79..476bc9f1954b 100644 --- a/drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c +++ b/drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c | |||
@@ -46,6 +46,7 @@ static int gmc_v8_0_wait_for_idle(void *handle); | |||
46 | MODULE_FIRMWARE("amdgpu/tonga_mc.bin"); | 46 | MODULE_FIRMWARE("amdgpu/tonga_mc.bin"); |
47 | MODULE_FIRMWARE("amdgpu/polaris11_mc.bin"); | 47 | MODULE_FIRMWARE("amdgpu/polaris11_mc.bin"); |
48 | MODULE_FIRMWARE("amdgpu/polaris10_mc.bin"); | 48 | MODULE_FIRMWARE("amdgpu/polaris10_mc.bin"); |
49 | MODULE_FIRMWARE("amdgpu/polaris12_mc.bin"); | ||
49 | 50 | ||
50 | static const u32 golden_settings_tonga_a11[] = | 51 | static const u32 golden_settings_tonga_a11[] = |
51 | { | 52 | { |
@@ -130,6 +131,7 @@ static void gmc_v8_0_init_golden_registers(struct amdgpu_device *adev) | |||
130 | (const u32)ARRAY_SIZE(golden_settings_tonga_a11)); | 131 | (const u32)ARRAY_SIZE(golden_settings_tonga_a11)); |
131 | break; | 132 | break; |
132 | case CHIP_POLARIS11: | 133 | case CHIP_POLARIS11: |
134 | case CHIP_POLARIS12: | ||
133 | amdgpu_program_register_sequence(adev, | 135 | amdgpu_program_register_sequence(adev, |
134 | golden_settings_polaris11_a11, | 136 | golden_settings_polaris11_a11, |
135 | (const u32)ARRAY_SIZE(golden_settings_polaris11_a11)); | 137 | (const u32)ARRAY_SIZE(golden_settings_polaris11_a11)); |
@@ -225,6 +227,9 @@ static int gmc_v8_0_init_microcode(struct amdgpu_device *adev) | |||
225 | case CHIP_POLARIS10: | 227 | case CHIP_POLARIS10: |
226 | chip_name = "polaris10"; | 228 | chip_name = "polaris10"; |
227 | break; | 229 | break; |
230 | case CHIP_POLARIS12: | ||
231 | chip_name = "polaris12"; | ||
232 | break; | ||
228 | case CHIP_FIJI: | 233 | case CHIP_FIJI: |
229 | case CHIP_CARRIZO: | 234 | case CHIP_CARRIZO: |
230 | case CHIP_STONEY: | 235 | case CHIP_STONEY: |
diff --git a/drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c b/drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c index 1170a64a3184..034ace79ed49 100644 --- a/drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c +++ b/drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c | |||
@@ -60,6 +60,8 @@ MODULE_FIRMWARE("amdgpu/polaris10_sdma.bin"); | |||
60 | MODULE_FIRMWARE("amdgpu/polaris10_sdma1.bin"); | 60 | MODULE_FIRMWARE("amdgpu/polaris10_sdma1.bin"); |
61 | MODULE_FIRMWARE("amdgpu/polaris11_sdma.bin"); | 61 | MODULE_FIRMWARE("amdgpu/polaris11_sdma.bin"); |
62 | MODULE_FIRMWARE("amdgpu/polaris11_sdma1.bin"); | 62 | MODULE_FIRMWARE("amdgpu/polaris11_sdma1.bin"); |
63 | MODULE_FIRMWARE("amdgpu/polaris12_sdma.bin"); | ||
64 | MODULE_FIRMWARE("amdgpu/polaris12_sdma1.bin"); | ||
63 | 65 | ||
64 | 66 | ||
65 | static const u32 sdma_offsets[SDMA_MAX_INSTANCE] = | 67 | static const u32 sdma_offsets[SDMA_MAX_INSTANCE] = |
@@ -206,6 +208,7 @@ static void sdma_v3_0_init_golden_registers(struct amdgpu_device *adev) | |||
206 | (const u32)ARRAY_SIZE(golden_settings_tonga_a11)); | 208 | (const u32)ARRAY_SIZE(golden_settings_tonga_a11)); |
207 | break; | 209 | break; |
208 | case CHIP_POLARIS11: | 210 | case CHIP_POLARIS11: |
211 | case CHIP_POLARIS12: | ||
209 | amdgpu_program_register_sequence(adev, | 212 | amdgpu_program_register_sequence(adev, |
210 | golden_settings_polaris11_a11, | 213 | golden_settings_polaris11_a11, |
211 | (const u32)ARRAY_SIZE(golden_settings_polaris11_a11)); | 214 | (const u32)ARRAY_SIZE(golden_settings_polaris11_a11)); |
@@ -278,6 +281,9 @@ static int sdma_v3_0_init_microcode(struct amdgpu_device *adev) | |||
278 | case CHIP_POLARIS10: | 281 | case CHIP_POLARIS10: |
279 | chip_name = "polaris10"; | 282 | chip_name = "polaris10"; |
280 | break; | 283 | break; |
284 | case CHIP_POLARIS12: | ||
285 | chip_name = "polaris12"; | ||
286 | break; | ||
281 | case CHIP_CARRIZO: | 287 | case CHIP_CARRIZO: |
282 | chip_name = "carrizo"; | 288 | chip_name = "carrizo"; |
283 | break; | 289 | break; |
diff --git a/drivers/gpu/drm/amd/amdgpu/si_dpm.c b/drivers/gpu/drm/amd/amdgpu/si_dpm.c index 6c65a1a2de79..10bedfac27b8 100644 --- a/drivers/gpu/drm/amd/amdgpu/si_dpm.c +++ b/drivers/gpu/drm/amd/amdgpu/si_dpm.c | |||
@@ -56,7 +56,6 @@ | |||
56 | #define BIOS_SCRATCH_4 0x5cd | 56 | #define BIOS_SCRATCH_4 0x5cd |
57 | 57 | ||
58 | MODULE_FIRMWARE("radeon/tahiti_smc.bin"); | 58 | MODULE_FIRMWARE("radeon/tahiti_smc.bin"); |
59 | MODULE_FIRMWARE("radeon/tahiti_k_smc.bin"); | ||
60 | MODULE_FIRMWARE("radeon/pitcairn_smc.bin"); | 59 | MODULE_FIRMWARE("radeon/pitcairn_smc.bin"); |
61 | MODULE_FIRMWARE("radeon/pitcairn_k_smc.bin"); | 60 | MODULE_FIRMWARE("radeon/pitcairn_k_smc.bin"); |
62 | MODULE_FIRMWARE("radeon/verde_smc.bin"); | 61 | MODULE_FIRMWARE("radeon/verde_smc.bin"); |
@@ -3488,19 +3487,6 @@ static void si_apply_state_adjust_rules(struct amdgpu_device *adev, | |||
3488 | (adev->pdev->device == 0x6817) || | 3487 | (adev->pdev->device == 0x6817) || |
3489 | (adev->pdev->device == 0x6806)) | 3488 | (adev->pdev->device == 0x6806)) |
3490 | max_mclk = 120000; | 3489 | max_mclk = 120000; |
3491 | } else if (adev->asic_type == CHIP_VERDE) { | ||
3492 | if ((adev->pdev->revision == 0x81) || | ||
3493 | (adev->pdev->revision == 0x83) || | ||
3494 | (adev->pdev->revision == 0x87) || | ||
3495 | (adev->pdev->device == 0x6820) || | ||
3496 | (adev->pdev->device == 0x6821) || | ||
3497 | (adev->pdev->device == 0x6822) || | ||
3498 | (adev->pdev->device == 0x6823) || | ||
3499 | (adev->pdev->device == 0x682A) || | ||
3500 | (adev->pdev->device == 0x682B)) { | ||
3501 | max_sclk = 75000; | ||
3502 | max_mclk = 80000; | ||
3503 | } | ||
3504 | } else if (adev->asic_type == CHIP_OLAND) { | 3490 | } else if (adev->asic_type == CHIP_OLAND) { |
3505 | if ((adev->pdev->revision == 0xC7) || | 3491 | if ((adev->pdev->revision == 0xC7) || |
3506 | (adev->pdev->revision == 0x80) || | 3492 | (adev->pdev->revision == 0x80) || |
@@ -7687,49 +7673,49 @@ static int si_dpm_init_microcode(struct amdgpu_device *adev) | |||
7687 | chip_name = "tahiti"; | 7673 | chip_name = "tahiti"; |
7688 | break; | 7674 | break; |
7689 | case CHIP_PITCAIRN: | 7675 | case CHIP_PITCAIRN: |
7690 | if ((adev->pdev->revision == 0x81) || | 7676 | if ((adev->pdev->revision == 0x81) && |
7691 | (adev->pdev->device == 0x6810) || | 7677 | ((adev->pdev->device == 0x6810) || |
7692 | (adev->pdev->device == 0x6811) || | 7678 | (adev->pdev->device == 0x6811))) |
7693 | (adev->pdev->device == 0x6816) || | ||
7694 | (adev->pdev->device == 0x6817) || | ||
7695 | (adev->pdev->device == 0x6806)) | ||
7696 | chip_name = "pitcairn_k"; | 7679 | chip_name = "pitcairn_k"; |
7697 | else | 7680 | else |
7698 | chip_name = "pitcairn"; | 7681 | chip_name = "pitcairn"; |
7699 | break; | 7682 | break; |
7700 | case CHIP_VERDE: | 7683 | case CHIP_VERDE: |
7701 | if ((adev->pdev->revision == 0x81) || | 7684 | if (((adev->pdev->device == 0x6820) && |
7702 | (adev->pdev->revision == 0x83) || | 7685 | ((adev->pdev->revision == 0x81) || |
7703 | (adev->pdev->revision == 0x87) || | 7686 | (adev->pdev->revision == 0x83))) || |
7704 | (adev->pdev->device == 0x6820) || | 7687 | ((adev->pdev->device == 0x6821) && |
7705 | (adev->pdev->device == 0x6821) || | 7688 | ((adev->pdev->revision == 0x83) || |
7706 | (adev->pdev->device == 0x6822) || | 7689 | (adev->pdev->revision == 0x87))) || |
7707 | (adev->pdev->device == 0x6823) || | 7690 | ((adev->pdev->revision == 0x87) && |
7708 | (adev->pdev->device == 0x682A) || | 7691 | ((adev->pdev->device == 0x6823) || |
7709 | (adev->pdev->device == 0x682B)) | 7692 | (adev->pdev->device == 0x682b)))) |
7710 | chip_name = "verde_k"; | 7693 | chip_name = "verde_k"; |
7711 | else | 7694 | else |
7712 | chip_name = "verde"; | 7695 | chip_name = "verde"; |
7713 | break; | 7696 | break; |
7714 | case CHIP_OLAND: | 7697 | case CHIP_OLAND: |
7715 | if ((adev->pdev->revision == 0xC7) || | 7698 | if (((adev->pdev->revision == 0x81) && |
7716 | (adev->pdev->revision == 0x80) || | 7699 | ((adev->pdev->device == 0x6600) || |
7717 | (adev->pdev->revision == 0x81) || | 7700 | (adev->pdev->device == 0x6604) || |
7718 | (adev->pdev->revision == 0x83) || | 7701 | (adev->pdev->device == 0x6605) || |
7719 | (adev->pdev->revision == 0x87) || | 7702 | (adev->pdev->device == 0x6610))) || |
7720 | (adev->pdev->device == 0x6604) || | 7703 | ((adev->pdev->revision == 0x83) && |
7721 | (adev->pdev->device == 0x6605)) | 7704 | (adev->pdev->device == 0x6610))) |
7722 | chip_name = "oland_k"; | 7705 | chip_name = "oland_k"; |
7723 | else | 7706 | else |
7724 | chip_name = "oland"; | 7707 | chip_name = "oland"; |
7725 | break; | 7708 | break; |
7726 | case CHIP_HAINAN: | 7709 | case CHIP_HAINAN: |
7727 | if ((adev->pdev->revision == 0x81) || | 7710 | if (((adev->pdev->revision == 0x81) && |
7728 | (adev->pdev->revision == 0x83) || | 7711 | (adev->pdev->device == 0x6660)) || |
7729 | (adev->pdev->revision == 0xC3) || | 7712 | ((adev->pdev->revision == 0x83) && |
7730 | (adev->pdev->device == 0x6664) || | 7713 | ((adev->pdev->device == 0x6660) || |
7731 | (adev->pdev->device == 0x6665) || | 7714 | (adev->pdev->device == 0x6663) || |
7732 | (adev->pdev->device == 0x6667)) | 7715 | (adev->pdev->device == 0x6665) || |
7716 | (adev->pdev->device == 0x6667))) || | ||
7717 | ((adev->pdev->revision == 0xc3) && | ||
7718 | (adev->pdev->device == 0x6665))) | ||
7733 | chip_name = "hainan_k"; | 7719 | chip_name = "hainan_k"; |
7734 | else | 7720 | else |
7735 | chip_name = "hainan"; | 7721 | chip_name = "hainan"; |
diff --git a/drivers/gpu/drm/amd/amdgpu/uvd_v5_0.c b/drivers/gpu/drm/amd/amdgpu/uvd_v5_0.c index a79e283590fb..6de6becce745 100644 --- a/drivers/gpu/drm/amd/amdgpu/uvd_v5_0.c +++ b/drivers/gpu/drm/amd/amdgpu/uvd_v5_0.c | |||
@@ -791,15 +791,10 @@ static int uvd_v5_0_set_clockgating_state(void *handle, | |||
791 | { | 791 | { |
792 | struct amdgpu_device *adev = (struct amdgpu_device *)handle; | 792 | struct amdgpu_device *adev = (struct amdgpu_device *)handle; |
793 | bool enable = (state == AMD_CG_STATE_GATE) ? true : false; | 793 | bool enable = (state == AMD_CG_STATE_GATE) ? true : false; |
794 | static int curstate = -1; | ||
795 | 794 | ||
796 | if (!(adev->cg_flags & AMD_CG_SUPPORT_UVD_MGCG)) | 795 | if (!(adev->cg_flags & AMD_CG_SUPPORT_UVD_MGCG)) |
797 | return 0; | 796 | return 0; |
798 | 797 | ||
799 | if (curstate == state) | ||
800 | return 0; | ||
801 | |||
802 | curstate = state; | ||
803 | if (enable) { | 798 | if (enable) { |
804 | /* wait for STATUS to clear */ | 799 | /* wait for STATUS to clear */ |
805 | if (uvd_v5_0_wait_for_idle(handle)) | 800 | if (uvd_v5_0_wait_for_idle(handle)) |
diff --git a/drivers/gpu/drm/amd/amdgpu/vce_v3_0.c b/drivers/gpu/drm/amd/amdgpu/vce_v3_0.c index 6b3293a1c7b8..5fb0b7f5c065 100644 --- a/drivers/gpu/drm/amd/amdgpu/vce_v3_0.c +++ b/drivers/gpu/drm/amd/amdgpu/vce_v3_0.c | |||
@@ -320,11 +320,12 @@ static unsigned vce_v3_0_get_harvest_config(struct amdgpu_device *adev) | |||
320 | { | 320 | { |
321 | u32 tmp; | 321 | u32 tmp; |
322 | 322 | ||
323 | /* Fiji, Stoney, Polaris10, Polaris11 are single pipe */ | 323 | /* Fiji, Stoney, Polaris10, Polaris11, Polaris12 are single pipe */ |
324 | if ((adev->asic_type == CHIP_FIJI) || | 324 | if ((adev->asic_type == CHIP_FIJI) || |
325 | (adev->asic_type == CHIP_STONEY) || | 325 | (adev->asic_type == CHIP_STONEY) || |
326 | (adev->asic_type == CHIP_POLARIS10) || | 326 | (adev->asic_type == CHIP_POLARIS10) || |
327 | (adev->asic_type == CHIP_POLARIS11)) | 327 | (adev->asic_type == CHIP_POLARIS11) || |
328 | (adev->asic_type == CHIP_POLARIS12)) | ||
328 | return AMDGPU_VCE_HARVEST_VCE1; | 329 | return AMDGPU_VCE_HARVEST_VCE1; |
329 | 330 | ||
330 | /* Tonga and CZ are dual or single pipe */ | 331 | /* Tonga and CZ are dual or single pipe */ |
diff --git a/drivers/gpu/drm/amd/amdgpu/vi.c b/drivers/gpu/drm/amd/amdgpu/vi.c index bf088d6d9bf1..c2ac54f11341 100644 --- a/drivers/gpu/drm/amd/amdgpu/vi.c +++ b/drivers/gpu/drm/amd/amdgpu/vi.c | |||
@@ -88,6 +88,7 @@ MODULE_FIRMWARE("amdgpu/polaris10_smc.bin"); | |||
88 | MODULE_FIRMWARE("amdgpu/polaris10_smc_sk.bin"); | 88 | MODULE_FIRMWARE("amdgpu/polaris10_smc_sk.bin"); |
89 | MODULE_FIRMWARE("amdgpu/polaris11_smc.bin"); | 89 | MODULE_FIRMWARE("amdgpu/polaris11_smc.bin"); |
90 | MODULE_FIRMWARE("amdgpu/polaris11_smc_sk.bin"); | 90 | MODULE_FIRMWARE("amdgpu/polaris11_smc_sk.bin"); |
91 | MODULE_FIRMWARE("amdgpu/polaris12_smc.bin"); | ||
91 | 92 | ||
92 | /* | 93 | /* |
93 | * Indirect registers accessor | 94 | * Indirect registers accessor |
@@ -312,6 +313,7 @@ static void vi_init_golden_registers(struct amdgpu_device *adev) | |||
312 | break; | 313 | break; |
313 | case CHIP_POLARIS11: | 314 | case CHIP_POLARIS11: |
314 | case CHIP_POLARIS10: | 315 | case CHIP_POLARIS10: |
316 | case CHIP_POLARIS12: | ||
315 | default: | 317 | default: |
316 | break; | 318 | break; |
317 | } | 319 | } |
@@ -671,6 +673,7 @@ static int vi_read_register(struct amdgpu_device *adev, u32 se_num, | |||
671 | case CHIP_TONGA: | 673 | case CHIP_TONGA: |
672 | case CHIP_POLARIS11: | 674 | case CHIP_POLARIS11: |
673 | case CHIP_POLARIS10: | 675 | case CHIP_POLARIS10: |
676 | case CHIP_POLARIS12: | ||
674 | case CHIP_CARRIZO: | 677 | case CHIP_CARRIZO: |
675 | case CHIP_STONEY: | 678 | case CHIP_STONEY: |
676 | asic_register_table = cz_allowed_read_registers; | 679 | asic_register_table = cz_allowed_read_registers; |
@@ -994,6 +997,11 @@ static int vi_common_early_init(void *handle) | |||
994 | adev->pg_flags = 0; | 997 | adev->pg_flags = 0; |
995 | adev->external_rev_id = adev->rev_id + 0x50; | 998 | adev->external_rev_id = adev->rev_id + 0x50; |
996 | break; | 999 | break; |
1000 | case CHIP_POLARIS12: | ||
1001 | adev->cg_flags = AMD_CG_SUPPORT_UVD_MGCG; | ||
1002 | adev->pg_flags = 0; | ||
1003 | adev->external_rev_id = adev->rev_id + 0x64; | ||
1004 | break; | ||
997 | case CHIP_CARRIZO: | 1005 | case CHIP_CARRIZO: |
998 | adev->cg_flags = AMD_CG_SUPPORT_UVD_MGCG | | 1006 | adev->cg_flags = AMD_CG_SUPPORT_UVD_MGCG | |
999 | AMD_CG_SUPPORT_GFX_MGCG | | 1007 | AMD_CG_SUPPORT_GFX_MGCG | |
@@ -1346,6 +1354,7 @@ static int vi_common_set_clockgating_state(void *handle, | |||
1346 | case CHIP_TONGA: | 1354 | case CHIP_TONGA: |
1347 | case CHIP_POLARIS10: | 1355 | case CHIP_POLARIS10: |
1348 | case CHIP_POLARIS11: | 1356 | case CHIP_POLARIS11: |
1357 | case CHIP_POLARIS12: | ||
1349 | vi_common_set_clockgating_state_by_smu(adev, state); | 1358 | vi_common_set_clockgating_state_by_smu(adev, state); |
1350 | default: | 1359 | default: |
1351 | break; | 1360 | break; |
@@ -1429,6 +1438,7 @@ int vi_set_ip_blocks(struct amdgpu_device *adev) | |||
1429 | break; | 1438 | break; |
1430 | case CHIP_POLARIS11: | 1439 | case CHIP_POLARIS11: |
1431 | case CHIP_POLARIS10: | 1440 | case CHIP_POLARIS10: |
1441 | case CHIP_POLARIS12: | ||
1432 | amdgpu_ip_block_add(adev, &vi_common_ip_block); | 1442 | amdgpu_ip_block_add(adev, &vi_common_ip_block); |
1433 | amdgpu_ip_block_add(adev, &gmc_v8_1_ip_block); | 1443 | amdgpu_ip_block_add(adev, &gmc_v8_1_ip_block); |
1434 | amdgpu_ip_block_add(adev, &tonga_ih_ip_block); | 1444 | amdgpu_ip_block_add(adev, &tonga_ih_ip_block); |
diff --git a/drivers/gpu/drm/amd/include/amd_shared.h b/drivers/gpu/drm/amd/include/amd_shared.h index c02469ada9f1..85f358764bbc 100644 --- a/drivers/gpu/drm/amd/include/amd_shared.h +++ b/drivers/gpu/drm/amd/include/amd_shared.h | |||
@@ -23,7 +23,7 @@ | |||
23 | #ifndef __AMD_SHARED_H__ | 23 | #ifndef __AMD_SHARED_H__ |
24 | #define __AMD_SHARED_H__ | 24 | #define __AMD_SHARED_H__ |
25 | 25 | ||
26 | #define AMD_MAX_USEC_TIMEOUT 100000 /* 100 ms */ | 26 | #define AMD_MAX_USEC_TIMEOUT 200000 /* 200 ms */ |
27 | 27 | ||
28 | /* | 28 | /* |
29 | * Supported ASIC types | 29 | * Supported ASIC types |
@@ -46,6 +46,7 @@ enum amd_asic_type { | |||
46 | CHIP_STONEY, | 46 | CHIP_STONEY, |
47 | CHIP_POLARIS10, | 47 | CHIP_POLARIS10, |
48 | CHIP_POLARIS11, | 48 | CHIP_POLARIS11, |
49 | CHIP_POLARIS12, | ||
49 | CHIP_LAST, | 50 | CHIP_LAST, |
50 | }; | 51 | }; |
51 | 52 | ||
diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c b/drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c index dc6700aee18f..b03606405a53 100644 --- a/drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c +++ b/drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c | |||
@@ -95,6 +95,7 @@ int hwmgr_init(struct amd_pp_init *pp_init, struct pp_instance *handle) | |||
95 | break; | 95 | break; |
96 | case CHIP_POLARIS11: | 96 | case CHIP_POLARIS11: |
97 | case CHIP_POLARIS10: | 97 | case CHIP_POLARIS10: |
98 | case CHIP_POLARIS12: | ||
98 | polaris_set_asic_special_caps(hwmgr); | 99 | polaris_set_asic_special_caps(hwmgr); |
99 | hwmgr->feature_mask &= ~(PP_UVD_HANDSHAKE_MASK); | 100 | hwmgr->feature_mask &= ~(PP_UVD_HANDSHAKE_MASK); |
100 | break; | 101 | break; |
@@ -745,7 +746,7 @@ int polaris_set_asic_special_caps(struct pp_hwmgr *hwmgr) | |||
745 | phm_cap_set(hwmgr->platform_descriptor.platformCaps, | 746 | phm_cap_set(hwmgr->platform_descriptor.platformCaps, |
746 | PHM_PlatformCaps_TablelessHardwareInterface); | 747 | PHM_PlatformCaps_TablelessHardwareInterface); |
747 | 748 | ||
748 | if (hwmgr->chip_id == CHIP_POLARIS11) | 749 | if ((hwmgr->chip_id == CHIP_POLARIS11) || (hwmgr->chip_id == CHIP_POLARIS12)) |
749 | phm_cap_set(hwmgr->platform_descriptor.platformCaps, | 750 | phm_cap_set(hwmgr->platform_descriptor.platformCaps, |
750 | PHM_PlatformCaps_SPLLShutdownSupport); | 751 | PHM_PlatformCaps_SPLLShutdownSupport); |
751 | return 0; | 752 | return 0; |
diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/smu7_powertune.c b/drivers/gpu/drm/amd/powerplay/hwmgr/smu7_powertune.c index 26477f0f09dc..6cd1287a7a8f 100644 --- a/drivers/gpu/drm/amd/powerplay/hwmgr/smu7_powertune.c +++ b/drivers/gpu/drm/amd/powerplay/hwmgr/smu7_powertune.c | |||
@@ -521,7 +521,7 @@ int smu7_enable_didt_config(struct pp_hwmgr *hwmgr) | |||
521 | PP_ASSERT_WITH_CODE((result == 0), "DIDT Config failed.", return result); | 521 | PP_ASSERT_WITH_CODE((result == 0), "DIDT Config failed.", return result); |
522 | result = smu7_program_pt_config_registers(hwmgr, DIDTConfig_Polaris10); | 522 | result = smu7_program_pt_config_registers(hwmgr, DIDTConfig_Polaris10); |
523 | PP_ASSERT_WITH_CODE((result == 0), "DIDT Config failed.", return result); | 523 | PP_ASSERT_WITH_CODE((result == 0), "DIDT Config failed.", return result); |
524 | } else if (hwmgr->chip_id == CHIP_POLARIS11) { | 524 | } else if ((hwmgr->chip_id == CHIP_POLARIS11) || (hwmgr->chip_id == CHIP_POLARIS12)) { |
525 | result = smu7_program_pt_config_registers(hwmgr, GCCACConfig_Polaris11); | 525 | result = smu7_program_pt_config_registers(hwmgr, GCCACConfig_Polaris11); |
526 | PP_ASSERT_WITH_CODE((result == 0), "DIDT Config failed.", return result); | 526 | PP_ASSERT_WITH_CODE((result == 0), "DIDT Config failed.", return result); |
527 | result = smu7_program_pt_config_registers(hwmgr, DIDTConfig_Polaris11); | 527 | result = smu7_program_pt_config_registers(hwmgr, DIDTConfig_Polaris11); |
diff --git a/drivers/gpu/drm/amd/powerplay/smumgr/smumgr.c b/drivers/gpu/drm/amd/powerplay/smumgr/smumgr.c index e5812aa456f3..6e618aa20719 100644 --- a/drivers/gpu/drm/amd/powerplay/smumgr/smumgr.c +++ b/drivers/gpu/drm/amd/powerplay/smumgr/smumgr.c | |||
@@ -65,6 +65,7 @@ int smum_init(struct amd_pp_init *pp_init, struct pp_instance *handle) | |||
65 | break; | 65 | break; |
66 | case CHIP_POLARIS11: | 66 | case CHIP_POLARIS11: |
67 | case CHIP_POLARIS10: | 67 | case CHIP_POLARIS10: |
68 | case CHIP_POLARIS12: | ||
68 | polaris10_smum_init(smumgr); | 69 | polaris10_smum_init(smumgr); |
69 | break; | 70 | break; |
70 | default: | 71 | default: |
diff --git a/drivers/gpu/drm/radeon/si.c b/drivers/gpu/drm/radeon/si.c index ad4d7b8b8322..e8a38d296855 100644 --- a/drivers/gpu/drm/radeon/si.c +++ b/drivers/gpu/drm/radeon/si.c | |||
@@ -50,7 +50,6 @@ MODULE_FIRMWARE("radeon/tahiti_ce.bin"); | |||
50 | MODULE_FIRMWARE("radeon/tahiti_mc.bin"); | 50 | MODULE_FIRMWARE("radeon/tahiti_mc.bin"); |
51 | MODULE_FIRMWARE("radeon/tahiti_rlc.bin"); | 51 | MODULE_FIRMWARE("radeon/tahiti_rlc.bin"); |
52 | MODULE_FIRMWARE("radeon/tahiti_smc.bin"); | 52 | MODULE_FIRMWARE("radeon/tahiti_smc.bin"); |
53 | MODULE_FIRMWARE("radeon/tahiti_k_smc.bin"); | ||
54 | 53 | ||
55 | MODULE_FIRMWARE("radeon/PITCAIRN_pfp.bin"); | 54 | MODULE_FIRMWARE("radeon/PITCAIRN_pfp.bin"); |
56 | MODULE_FIRMWARE("radeon/PITCAIRN_me.bin"); | 55 | MODULE_FIRMWARE("radeon/PITCAIRN_me.bin"); |
@@ -1657,9 +1656,6 @@ static int si_init_microcode(struct radeon_device *rdev) | |||
1657 | switch (rdev->family) { | 1656 | switch (rdev->family) { |
1658 | case CHIP_TAHITI: | 1657 | case CHIP_TAHITI: |
1659 | chip_name = "TAHITI"; | 1658 | chip_name = "TAHITI"; |
1660 | /* XXX: figure out which Tahitis need the new ucode */ | ||
1661 | if (0) | ||
1662 | new_smc = true; | ||
1663 | new_chip_name = "tahiti"; | 1659 | new_chip_name = "tahiti"; |
1664 | pfp_req_size = SI_PFP_UCODE_SIZE * 4; | 1660 | pfp_req_size = SI_PFP_UCODE_SIZE * 4; |
1665 | me_req_size = SI_PM4_UCODE_SIZE * 4; | 1661 | me_req_size = SI_PM4_UCODE_SIZE * 4; |
@@ -1671,12 +1667,9 @@ static int si_init_microcode(struct radeon_device *rdev) | |||
1671 | break; | 1667 | break; |
1672 | case CHIP_PITCAIRN: | 1668 | case CHIP_PITCAIRN: |
1673 | chip_name = "PITCAIRN"; | 1669 | chip_name = "PITCAIRN"; |
1674 | if ((rdev->pdev->revision == 0x81) || | 1670 | if ((rdev->pdev->revision == 0x81) && |
1675 | (rdev->pdev->device == 0x6810) || | 1671 | ((rdev->pdev->device == 0x6810) || |
1676 | (rdev->pdev->device == 0x6811) || | 1672 | (rdev->pdev->device == 0x6811))) |
1677 | (rdev->pdev->device == 0x6816) || | ||
1678 | (rdev->pdev->device == 0x6817) || | ||
1679 | (rdev->pdev->device == 0x6806)) | ||
1680 | new_smc = true; | 1673 | new_smc = true; |
1681 | new_chip_name = "pitcairn"; | 1674 | new_chip_name = "pitcairn"; |
1682 | pfp_req_size = SI_PFP_UCODE_SIZE * 4; | 1675 | pfp_req_size = SI_PFP_UCODE_SIZE * 4; |
@@ -1689,15 +1682,15 @@ static int si_init_microcode(struct radeon_device *rdev) | |||
1689 | break; | 1682 | break; |
1690 | case CHIP_VERDE: | 1683 | case CHIP_VERDE: |
1691 | chip_name = "VERDE"; | 1684 | chip_name = "VERDE"; |
1692 | if ((rdev->pdev->revision == 0x81) || | 1685 | if (((rdev->pdev->device == 0x6820) && |
1693 | (rdev->pdev->revision == 0x83) || | 1686 | ((rdev->pdev->revision == 0x81) || |
1694 | (rdev->pdev->revision == 0x87) || | 1687 | (rdev->pdev->revision == 0x83))) || |
1695 | (rdev->pdev->device == 0x6820) || | 1688 | ((rdev->pdev->device == 0x6821) && |
1696 | (rdev->pdev->device == 0x6821) || | 1689 | ((rdev->pdev->revision == 0x83) || |
1697 | (rdev->pdev->device == 0x6822) || | 1690 | (rdev->pdev->revision == 0x87))) || |
1698 | (rdev->pdev->device == 0x6823) || | 1691 | ((rdev->pdev->revision == 0x87) && |
1699 | (rdev->pdev->device == 0x682A) || | 1692 | ((rdev->pdev->device == 0x6823) || |
1700 | (rdev->pdev->device == 0x682B)) | 1693 | (rdev->pdev->device == 0x682b)))) |
1701 | new_smc = true; | 1694 | new_smc = true; |
1702 | new_chip_name = "verde"; | 1695 | new_chip_name = "verde"; |
1703 | pfp_req_size = SI_PFP_UCODE_SIZE * 4; | 1696 | pfp_req_size = SI_PFP_UCODE_SIZE * 4; |
@@ -1710,13 +1703,13 @@ static int si_init_microcode(struct radeon_device *rdev) | |||
1710 | break; | 1703 | break; |
1711 | case CHIP_OLAND: | 1704 | case CHIP_OLAND: |
1712 | chip_name = "OLAND"; | 1705 | chip_name = "OLAND"; |
1713 | if ((rdev->pdev->revision == 0xC7) || | 1706 | if (((rdev->pdev->revision == 0x81) && |
1714 | (rdev->pdev->revision == 0x80) || | 1707 | ((rdev->pdev->device == 0x6600) || |
1715 | (rdev->pdev->revision == 0x81) || | 1708 | (rdev->pdev->device == 0x6604) || |
1716 | (rdev->pdev->revision == 0x83) || | 1709 | (rdev->pdev->device == 0x6605) || |
1717 | (rdev->pdev->revision == 0x87) || | 1710 | (rdev->pdev->device == 0x6610))) || |
1718 | (rdev->pdev->device == 0x6604) || | 1711 | ((rdev->pdev->revision == 0x83) && |
1719 | (rdev->pdev->device == 0x6605)) | 1712 | (rdev->pdev->device == 0x6610))) |
1720 | new_smc = true; | 1713 | new_smc = true; |
1721 | new_chip_name = "oland"; | 1714 | new_chip_name = "oland"; |
1722 | pfp_req_size = SI_PFP_UCODE_SIZE * 4; | 1715 | pfp_req_size = SI_PFP_UCODE_SIZE * 4; |
@@ -1728,12 +1721,15 @@ static int si_init_microcode(struct radeon_device *rdev) | |||
1728 | break; | 1721 | break; |
1729 | case CHIP_HAINAN: | 1722 | case CHIP_HAINAN: |
1730 | chip_name = "HAINAN"; | 1723 | chip_name = "HAINAN"; |
1731 | if ((rdev->pdev->revision == 0x81) || | 1724 | if (((rdev->pdev->revision == 0x81) && |
1732 | (rdev->pdev->revision == 0x83) || | 1725 | (rdev->pdev->device == 0x6660)) || |
1733 | (rdev->pdev->revision == 0xC3) || | 1726 | ((rdev->pdev->revision == 0x83) && |
1734 | (rdev->pdev->device == 0x6664) || | 1727 | ((rdev->pdev->device == 0x6660) || |
1735 | (rdev->pdev->device == 0x6665) || | 1728 | (rdev->pdev->device == 0x6663) || |
1736 | (rdev->pdev->device == 0x6667)) | 1729 | (rdev->pdev->device == 0x6665) || |
1730 | (rdev->pdev->device == 0x6667))) || | ||
1731 | ((rdev->pdev->revision == 0xc3) && | ||
1732 | (rdev->pdev->device == 0x6665))) | ||
1737 | new_smc = true; | 1733 | new_smc = true; |
1738 | new_chip_name = "hainan"; | 1734 | new_chip_name = "hainan"; |
1739 | pfp_req_size = SI_PFP_UCODE_SIZE * 4; | 1735 | pfp_req_size = SI_PFP_UCODE_SIZE * 4; |
diff --git a/drivers/gpu/drm/radeon/si_dpm.c b/drivers/gpu/drm/radeon/si_dpm.c index 8b5e697f2549..13ba73fd9b68 100644 --- a/drivers/gpu/drm/radeon/si_dpm.c +++ b/drivers/gpu/drm/radeon/si_dpm.c | |||
@@ -3008,19 +3008,6 @@ static void si_apply_state_adjust_rules(struct radeon_device *rdev, | |||
3008 | (rdev->pdev->device == 0x6817) || | 3008 | (rdev->pdev->device == 0x6817) || |
3009 | (rdev->pdev->device == 0x6806)) | 3009 | (rdev->pdev->device == 0x6806)) |
3010 | max_mclk = 120000; | 3010 | max_mclk = 120000; |
3011 | } else if (rdev->family == CHIP_VERDE) { | ||
3012 | if ((rdev->pdev->revision == 0x81) || | ||
3013 | (rdev->pdev->revision == 0x83) || | ||
3014 | (rdev->pdev->revision == 0x87) || | ||
3015 | (rdev->pdev->device == 0x6820) || | ||
3016 | (rdev->pdev->device == 0x6821) || | ||
3017 | (rdev->pdev->device == 0x6822) || | ||
3018 | (rdev->pdev->device == 0x6823) || | ||
3019 | (rdev->pdev->device == 0x682A) || | ||
3020 | (rdev->pdev->device == 0x682B)) { | ||
3021 | max_sclk = 75000; | ||
3022 | max_mclk = 80000; | ||
3023 | } | ||
3024 | } else if (rdev->family == CHIP_OLAND) { | 3011 | } else if (rdev->family == CHIP_OLAND) { |
3025 | if ((rdev->pdev->revision == 0xC7) || | 3012 | if ((rdev->pdev->revision == 0xC7) || |
3026 | (rdev->pdev->revision == 0x80) || | 3013 | (rdev->pdev->revision == 0x80) || |