summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2019-11-07 22:07:58 -0500
committerDave Airlie <airlied@redhat.com>2019-11-07 22:07:58 -0500
commitff9234583d4fb53d4bcf57916ddfb16c53c81c88 (patch)
treeba6e46e2be7f8d418d4cb0a7c7bf297dadd5f604
parent67322bec979caa33e0ac4505306bf70af46208e4 (diff)
parent2c409ba81be25516afe05ae27a4a15da01740b01 (diff)
Merge tag 'drm-fixes-5.4-2019-11-06' of git://people.freedesktop.org/~agd5f/linux into drm-fixes
drm-fixes-5.4-2019-11-06: amdgpu: - Fix navi14 display issue root cause and revert workaround - GPU reset scheduler interaction fix - Fix fan boost on multi-GPU - Gfx10 and sdma5 fixes for navi - GFXOFF fix for renoir - Add navi14 PCI ID - GPUVM fix for arcturus radeon: - Port an SI power fix from amdgpu Signed-off-by: Dave Airlie <airlied@redhat.com> From: Alex Deucher <alexdeucher@gmail.com> Link: https://patchwork.freedesktop.org/patch/msgid/20191107032241.1021217-1-alexander.deucher@amd.com
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c5
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_device.c7
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c1
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.h1
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c1
-rw-r--r--drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c48
-rw-r--r--drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c13
-rw-r--r--drivers/gpu/drm/amd/amdgpu/gmc_v10_0.c8
-rw-r--r--drivers/gpu/drm/amd/amdgpu/mmhub_v9_4.c9
-rw-r--r--drivers/gpu/drm/amd/amdgpu/sdma_v5_0.c13
-rw-r--r--drivers/gpu/drm/amd/amdgpu/soc15.c5
-rw-r--r--drivers/gpu/drm/amd/display/dc/core/dc_link.c9
-rw-r--r--drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c5
-rw-r--r--drivers/gpu/drm/amd/powerplay/navi10_ppt.c2
-rw-r--r--drivers/gpu/drm/amd/powerplay/vega20_ppt.c2
-rw-r--r--drivers/gpu/drm/radeon/si_dpm.c1
16 files changed, 106 insertions, 24 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c
index 6614d8a6f4c8..2cdaf3b2a721 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c
@@ -604,8 +604,11 @@ void amdgpu_ctx_mgr_entity_fini(struct amdgpu_ctx_mgr *mgr)
604 continue; 604 continue;
605 } 605 }
606 606
607 for (i = 0; i < num_entities; i++) 607 for (i = 0; i < num_entities; i++) {
608 mutex_lock(&ctx->adev->lock_reset);
608 drm_sched_entity_fini(&ctx->entities[0][i].entity); 609 drm_sched_entity_fini(&ctx->entities[0][i].entity);
610 mutex_unlock(&ctx->adev->lock_reset);
611 }
609 } 612 }
610} 613}
611 614
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
index 5a1939dbd4e3..7a6c837c0a85 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
@@ -2885,6 +2885,13 @@ fence_driver_init:
2885 DRM_INFO("amdgpu: acceleration disabled, skipping benchmarks\n"); 2885 DRM_INFO("amdgpu: acceleration disabled, skipping benchmarks\n");
2886 } 2886 }
2887 2887
2888 /*
2889 * Register gpu instance before amdgpu_device_enable_mgpu_fan_boost.
2890 * Otherwise the mgpu fan boost feature will be skipped due to the
2891 * gpu instance is counted less.
2892 */
2893 amdgpu_register_gpu_instance(adev);
2894
2888 /* enable clockgating, etc. after ib tests, etc. since some blocks require 2895 /* enable clockgating, etc. after ib tests, etc. since some blocks require
2889 * explicit gating rather than handling it automatically. 2896 * explicit gating rather than handling it automatically.
2890 */ 2897 */
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
index 2a00a36106b2..e1c15721611a 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
@@ -1016,6 +1016,7 @@ static const struct pci_device_id pciidlist[] = {
1016 {0x1002, 0x7340, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_NAVI14|AMD_EXP_HW_SUPPORT}, 1016 {0x1002, 0x7340, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_NAVI14|AMD_EXP_HW_SUPPORT},
1017 {0x1002, 0x7341, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_NAVI14|AMD_EXP_HW_SUPPORT}, 1017 {0x1002, 0x7341, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_NAVI14|AMD_EXP_HW_SUPPORT},
1018 {0x1002, 0x7347, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_NAVI14|AMD_EXP_HW_SUPPORT}, 1018 {0x1002, 0x7347, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_NAVI14|AMD_EXP_HW_SUPPORT},
1019 {0x1002, 0x734F, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_NAVI14|AMD_EXP_HW_SUPPORT},
1019 1020
1020 /* Renoir */ 1021 /* Renoir */
1021 {0x1002, 0x1636, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RENOIR|AMD_IS_APU|AMD_EXP_HW_SUPPORT}, 1022 {0x1002, 0x1636, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RENOIR|AMD_IS_APU|AMD_EXP_HW_SUPPORT},
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.h
index 6ee4021910e2..6d19183b478b 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.h
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.h
@@ -289,6 +289,7 @@ struct amdgpu_gfx {
289 uint32_t mec2_feature_version; 289 uint32_t mec2_feature_version;
290 bool mec_fw_write_wait; 290 bool mec_fw_write_wait;
291 bool me_fw_write_wait; 291 bool me_fw_write_wait;
292 bool cp_fw_write_wait;
292 struct amdgpu_ring gfx_ring[AMDGPU_MAX_GFX_RINGS]; 293 struct amdgpu_ring gfx_ring[AMDGPU_MAX_GFX_RINGS];
293 unsigned num_gfx_rings; 294 unsigned num_gfx_rings;
294 struct amdgpu_ring compute_ring[AMDGPU_MAX_COMPUTE_RINGS]; 295 struct amdgpu_ring compute_ring[AMDGPU_MAX_COMPUTE_RINGS];
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c
index d55f5baa83d3..a042ef471fbd 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c
@@ -190,7 +190,6 @@ int amdgpu_driver_load_kms(struct drm_device *dev, unsigned long flags)
190 pm_runtime_put_autosuspend(dev->dev); 190 pm_runtime_put_autosuspend(dev->dev);
191 } 191 }
192 192
193 amdgpu_register_gpu_instance(adev);
194out: 193out:
195 if (r) { 194 if (r) {
196 /* balance pm_runtime_get_sync in amdgpu_driver_unload_kms */ 195 /* balance pm_runtime_get_sync in amdgpu_driver_unload_kms */
diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c
index 8dfc775626a7..53090eae0082 100644
--- a/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c
@@ -564,6 +564,32 @@ static void gfx_v10_0_free_microcode(struct amdgpu_device *adev)
564 kfree(adev->gfx.rlc.register_list_format); 564 kfree(adev->gfx.rlc.register_list_format);
565} 565}
566 566
567static void gfx_v10_0_check_fw_write_wait(struct amdgpu_device *adev)
568{
569 adev->gfx.cp_fw_write_wait = false;
570
571 switch (adev->asic_type) {
572 case CHIP_NAVI10:
573 case CHIP_NAVI12:
574 case CHIP_NAVI14:
575 if ((adev->gfx.me_fw_version >= 0x00000046) &&
576 (adev->gfx.me_feature_version >= 27) &&
577 (adev->gfx.pfp_fw_version >= 0x00000068) &&
578 (adev->gfx.pfp_feature_version >= 27) &&
579 (adev->gfx.mec_fw_version >= 0x0000005b) &&
580 (adev->gfx.mec_feature_version >= 27))
581 adev->gfx.cp_fw_write_wait = true;
582 break;
583 default:
584 break;
585 }
586
587 if (adev->gfx.cp_fw_write_wait == false)
588 DRM_WARN_ONCE("Warning: check cp_fw_version and update it to realize \
589 GRBM requires 1-cycle delay in cp firmware\n");
590}
591
592
567static void gfx_v10_0_init_rlc_ext_microcode(struct amdgpu_device *adev) 593static void gfx_v10_0_init_rlc_ext_microcode(struct amdgpu_device *adev)
568{ 594{
569 const struct rlc_firmware_header_v2_1 *rlc_hdr; 595 const struct rlc_firmware_header_v2_1 *rlc_hdr;
@@ -832,6 +858,7 @@ static int gfx_v10_0_init_microcode(struct amdgpu_device *adev)
832 } 858 }
833 } 859 }
834 860
861 gfx_v10_0_check_fw_write_wait(adev);
835out: 862out:
836 if (err) { 863 if (err) {
837 dev_err(adev->dev, 864 dev_err(adev->dev,
@@ -4765,6 +4792,24 @@ static void gfx_v10_0_ring_emit_reg_wait(struct amdgpu_ring *ring, uint32_t reg,
4765 gfx_v10_0_wait_reg_mem(ring, 0, 0, 0, reg, 0, val, mask, 0x20); 4792 gfx_v10_0_wait_reg_mem(ring, 0, 0, 0, reg, 0, val, mask, 0x20);
4766} 4793}
4767 4794
4795static void gfx_v10_0_ring_emit_reg_write_reg_wait(struct amdgpu_ring *ring,
4796 uint32_t reg0, uint32_t reg1,
4797 uint32_t ref, uint32_t mask)
4798{
4799 int usepfp = (ring->funcs->type == AMDGPU_RING_TYPE_GFX);
4800 struct amdgpu_device *adev = ring->adev;
4801 bool fw_version_ok = false;
4802
4803 fw_version_ok = adev->gfx.cp_fw_write_wait;
4804
4805 if (fw_version_ok)
4806 gfx_v10_0_wait_reg_mem(ring, usepfp, 0, 1, reg0, reg1,
4807 ref, mask, 0x20);
4808 else
4809 amdgpu_ring_emit_reg_write_reg_wait_helper(ring, reg0, reg1,
4810 ref, mask);
4811}
4812
4768static void 4813static void
4769gfx_v10_0_set_gfx_eop_interrupt_state(struct amdgpu_device *adev, 4814gfx_v10_0_set_gfx_eop_interrupt_state(struct amdgpu_device *adev,
4770 uint32_t me, uint32_t pipe, 4815 uint32_t me, uint32_t pipe,
@@ -5155,6 +5200,7 @@ static const struct amdgpu_ring_funcs gfx_v10_0_ring_funcs_gfx = {
5155 .emit_tmz = gfx_v10_0_ring_emit_tmz, 5200 .emit_tmz = gfx_v10_0_ring_emit_tmz,
5156 .emit_wreg = gfx_v10_0_ring_emit_wreg, 5201 .emit_wreg = gfx_v10_0_ring_emit_wreg,
5157 .emit_reg_wait = gfx_v10_0_ring_emit_reg_wait, 5202 .emit_reg_wait = gfx_v10_0_ring_emit_reg_wait,
5203 .emit_reg_write_reg_wait = gfx_v10_0_ring_emit_reg_write_reg_wait,
5158}; 5204};
5159 5205
5160static const struct amdgpu_ring_funcs gfx_v10_0_ring_funcs_compute = { 5206static const struct amdgpu_ring_funcs gfx_v10_0_ring_funcs_compute = {
@@ -5188,6 +5234,7 @@ static const struct amdgpu_ring_funcs gfx_v10_0_ring_funcs_compute = {
5188 .pad_ib = amdgpu_ring_generic_pad_ib, 5234 .pad_ib = amdgpu_ring_generic_pad_ib,
5189 .emit_wreg = gfx_v10_0_ring_emit_wreg, 5235 .emit_wreg = gfx_v10_0_ring_emit_wreg,
5190 .emit_reg_wait = gfx_v10_0_ring_emit_reg_wait, 5236 .emit_reg_wait = gfx_v10_0_ring_emit_reg_wait,
5237 .emit_reg_write_reg_wait = gfx_v10_0_ring_emit_reg_write_reg_wait,
5191}; 5238};
5192 5239
5193static const struct amdgpu_ring_funcs gfx_v10_0_ring_funcs_kiq = { 5240static const struct amdgpu_ring_funcs gfx_v10_0_ring_funcs_kiq = {
@@ -5218,6 +5265,7 @@ static const struct amdgpu_ring_funcs gfx_v10_0_ring_funcs_kiq = {
5218 .emit_rreg = gfx_v10_0_ring_emit_rreg, 5265 .emit_rreg = gfx_v10_0_ring_emit_rreg,
5219 .emit_wreg = gfx_v10_0_ring_emit_wreg, 5266 .emit_wreg = gfx_v10_0_ring_emit_wreg,
5220 .emit_reg_wait = gfx_v10_0_ring_emit_reg_wait, 5267 .emit_reg_wait = gfx_v10_0_ring_emit_reg_wait,
5268 .emit_reg_write_reg_wait = gfx_v10_0_ring_emit_reg_write_reg_wait,
5221}; 5269};
5222 5270
5223static void gfx_v10_0_set_ring_funcs(struct amdgpu_device *adev) 5271static void gfx_v10_0_set_ring_funcs(struct amdgpu_device *adev)
diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c
index dcadc73bffd2..dfca83a2de47 100644
--- a/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c
@@ -973,6 +973,13 @@ static void gfx_v9_0_check_fw_write_wait(struct amdgpu_device *adev)
973 adev->gfx.me_fw_write_wait = false; 973 adev->gfx.me_fw_write_wait = false;
974 adev->gfx.mec_fw_write_wait = false; 974 adev->gfx.mec_fw_write_wait = false;
975 975
976 if ((adev->gfx.mec_fw_version < 0x000001a5) ||
977 (adev->gfx.mec_feature_version < 46) ||
978 (adev->gfx.pfp_fw_version < 0x000000b7) ||
979 (adev->gfx.pfp_feature_version < 46))
980 DRM_WARN_ONCE("Warning: check cp_fw_version and update it to realize \
981 GRBM requires 1-cycle delay in cp firmware\n");
982
976 switch (adev->asic_type) { 983 switch (adev->asic_type) {
977 case CHIP_VEGA10: 984 case CHIP_VEGA10:
978 if ((adev->gfx.me_fw_version >= 0x0000009c) && 985 if ((adev->gfx.me_fw_version >= 0x0000009c) &&
@@ -1044,6 +1051,12 @@ static void gfx_v9_0_check_if_need_gfxoff(struct amdgpu_device *adev)
1044 AMD_PG_SUPPORT_CP | 1051 AMD_PG_SUPPORT_CP |
1045 AMD_PG_SUPPORT_RLC_SMU_HS; 1052 AMD_PG_SUPPORT_RLC_SMU_HS;
1046 break; 1053 break;
1054 case CHIP_RENOIR:
1055 if (adev->pm.pp_feature & PP_GFXOFF_MASK)
1056 adev->pg_flags |= AMD_PG_SUPPORT_GFX_PG |
1057 AMD_PG_SUPPORT_CP |
1058 AMD_PG_SUPPORT_RLC_SMU_HS;
1059 break;
1047 default: 1060 default:
1048 break; 1061 break;
1049 } 1062 }
diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v10_0.c b/drivers/gpu/drm/amd/amdgpu/gmc_v10_0.c
index 354e6200ca9a..5c7d5f73f54f 100644
--- a/drivers/gpu/drm/amd/amdgpu/gmc_v10_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/gmc_v10_0.c
@@ -344,11 +344,9 @@ static uint64_t gmc_v10_0_emit_flush_gpu_tlb(struct amdgpu_ring *ring,
344 amdgpu_ring_emit_wreg(ring, hub->ctx0_ptb_addr_hi32 + (2 * vmid), 344 amdgpu_ring_emit_wreg(ring, hub->ctx0_ptb_addr_hi32 + (2 * vmid),
345 upper_32_bits(pd_addr)); 345 upper_32_bits(pd_addr));
346 346
347 amdgpu_ring_emit_wreg(ring, hub->vm_inv_eng0_req + eng, req); 347 amdgpu_ring_emit_reg_write_reg_wait(ring, hub->vm_inv_eng0_req + eng,
348 348 hub->vm_inv_eng0_ack + eng,
349 /* wait for the invalidate to complete */ 349 req, 1 << vmid);
350 amdgpu_ring_emit_reg_wait(ring, hub->vm_inv_eng0_ack + eng,
351 1 << vmid, 1 << vmid);
352 350
353 return pd_addr; 351 return pd_addr;
354} 352}
diff --git a/drivers/gpu/drm/amd/amdgpu/mmhub_v9_4.c b/drivers/gpu/drm/amd/amdgpu/mmhub_v9_4.c
index 0cf7ef44b4b5..9ed178fa241c 100644
--- a/drivers/gpu/drm/amd/amdgpu/mmhub_v9_4.c
+++ b/drivers/gpu/drm/amd/amdgpu/mmhub_v9_4.c
@@ -219,6 +219,15 @@ static void mmhub_v9_4_init_cache_regs(struct amdgpu_device *adev, int hubid)
219 hubid * MMHUB_INSTANCE_REGISTER_OFFSET, tmp); 219 hubid * MMHUB_INSTANCE_REGISTER_OFFSET, tmp);
220 220
221 tmp = mmVML2PF0_VM_L2_CNTL3_DEFAULT; 221 tmp = mmVML2PF0_VM_L2_CNTL3_DEFAULT;
222 if (adev->gmc.translate_further) {
223 tmp = REG_SET_FIELD(tmp, VML2PF0_VM_L2_CNTL3, BANK_SELECT, 12);
224 tmp = REG_SET_FIELD(tmp, VML2PF0_VM_L2_CNTL3,
225 L2_CACHE_BIGK_FRAGMENT_SIZE, 9);
226 } else {
227 tmp = REG_SET_FIELD(tmp, VML2PF0_VM_L2_CNTL3, BANK_SELECT, 9);
228 tmp = REG_SET_FIELD(tmp, VML2PF0_VM_L2_CNTL3,
229 L2_CACHE_BIGK_FRAGMENT_SIZE, 6);
230 }
222 WREG32_SOC15_OFFSET(MMHUB, 0, mmVML2PF0_VM_L2_CNTL3, 231 WREG32_SOC15_OFFSET(MMHUB, 0, mmVML2PF0_VM_L2_CNTL3,
223 hubid * MMHUB_INSTANCE_REGISTER_OFFSET, tmp); 232 hubid * MMHUB_INSTANCE_REGISTER_OFFSET, tmp);
224 233
diff --git a/drivers/gpu/drm/amd/amdgpu/sdma_v5_0.c b/drivers/gpu/drm/amd/amdgpu/sdma_v5_0.c
index f6e81680dd7e..8493bfbbc148 100644
--- a/drivers/gpu/drm/amd/amdgpu/sdma_v5_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/sdma_v5_0.c
@@ -1173,6 +1173,16 @@ static void sdma_v5_0_ring_emit_reg_wait(struct amdgpu_ring *ring, uint32_t reg,
1173 SDMA_PKT_POLL_REGMEM_DW5_INTERVAL(10)); 1173 SDMA_PKT_POLL_REGMEM_DW5_INTERVAL(10));
1174} 1174}
1175 1175
1176static void sdma_v5_0_ring_emit_reg_write_reg_wait(struct amdgpu_ring *ring,
1177 uint32_t reg0, uint32_t reg1,
1178 uint32_t ref, uint32_t mask)
1179{
1180 amdgpu_ring_emit_wreg(ring, reg0, ref);
1181 /* wait for a cycle to reset vm_inv_eng*_ack */
1182 amdgpu_ring_emit_reg_wait(ring, reg0, 0, 0);
1183 amdgpu_ring_emit_reg_wait(ring, reg1, mask, mask);
1184}
1185
1176static int sdma_v5_0_early_init(void *handle) 1186static int sdma_v5_0_early_init(void *handle)
1177{ 1187{
1178 struct amdgpu_device *adev = (struct amdgpu_device *)handle; 1188 struct amdgpu_device *adev = (struct amdgpu_device *)handle;
@@ -1588,7 +1598,7 @@ static const struct amdgpu_ring_funcs sdma_v5_0_ring_funcs = {
1588 6 + /* sdma_v5_0_ring_emit_pipeline_sync */ 1598 6 + /* sdma_v5_0_ring_emit_pipeline_sync */
1589 /* sdma_v5_0_ring_emit_vm_flush */ 1599 /* sdma_v5_0_ring_emit_vm_flush */
1590 SOC15_FLUSH_GPU_TLB_NUM_WREG * 3 + 1600 SOC15_FLUSH_GPU_TLB_NUM_WREG * 3 +
1591 SOC15_FLUSH_GPU_TLB_NUM_REG_WAIT * 6 + 1601 SOC15_FLUSH_GPU_TLB_NUM_REG_WAIT * 6 * 2 +
1592 10 + 10 + 10, /* sdma_v5_0_ring_emit_fence x3 for user fence, vm fence */ 1602 10 + 10 + 10, /* sdma_v5_0_ring_emit_fence x3 for user fence, vm fence */
1593 .emit_ib_size = 7 + 6, /* sdma_v5_0_ring_emit_ib */ 1603 .emit_ib_size = 7 + 6, /* sdma_v5_0_ring_emit_ib */
1594 .emit_ib = sdma_v5_0_ring_emit_ib, 1604 .emit_ib = sdma_v5_0_ring_emit_ib,
@@ -1602,6 +1612,7 @@ static const struct amdgpu_ring_funcs sdma_v5_0_ring_funcs = {
1602 .pad_ib = sdma_v5_0_ring_pad_ib, 1612 .pad_ib = sdma_v5_0_ring_pad_ib,
1603 .emit_wreg = sdma_v5_0_ring_emit_wreg, 1613 .emit_wreg = sdma_v5_0_ring_emit_wreg,
1604 .emit_reg_wait = sdma_v5_0_ring_emit_reg_wait, 1614 .emit_reg_wait = sdma_v5_0_ring_emit_reg_wait,
1615 .emit_reg_write_reg_wait = sdma_v5_0_ring_emit_reg_write_reg_wait,
1605 .init_cond_exec = sdma_v5_0_ring_init_cond_exec, 1616 .init_cond_exec = sdma_v5_0_ring_init_cond_exec,
1606 .patch_cond_exec = sdma_v5_0_ring_patch_cond_exec, 1617 .patch_cond_exec = sdma_v5_0_ring_patch_cond_exec,
1607 .preempt_ib = sdma_v5_0_ring_preempt_ib, 1618 .preempt_ib = sdma_v5_0_ring_preempt_ib,
diff --git a/drivers/gpu/drm/amd/amdgpu/soc15.c b/drivers/gpu/drm/amd/amdgpu/soc15.c
index f8ab80c8801b..4ccfcdf8f16a 100644
--- a/drivers/gpu/drm/amd/amdgpu/soc15.c
+++ b/drivers/gpu/drm/amd/amdgpu/soc15.c
@@ -1186,11 +1186,6 @@ static int soc15_common_early_init(void *handle)
1186 AMD_PG_SUPPORT_VCN | 1186 AMD_PG_SUPPORT_VCN |
1187 AMD_PG_SUPPORT_VCN_DPG; 1187 AMD_PG_SUPPORT_VCN_DPG;
1188 adev->external_rev_id = adev->rev_id + 0x91; 1188 adev->external_rev_id = adev->rev_id + 0x91;
1189
1190 if (adev->pm.pp_feature & PP_GFXOFF_MASK)
1191 adev->pg_flags |= AMD_PG_SUPPORT_GFX_PG |
1192 AMD_PG_SUPPORT_CP |
1193 AMD_PG_SUPPORT_RLC_SMU_HS;
1194 break; 1189 break;
1195 default: 1190 default:
1196 /* FIXME: not supported yet */ 1191 /* FIXME: not supported yet */
diff --git a/drivers/gpu/drm/amd/display/dc/core/dc_link.c b/drivers/gpu/drm/amd/display/dc/core/dc_link.c
index 9c58670d5414..ca20b150afcc 100644
--- a/drivers/gpu/drm/amd/display/dc/core/dc_link.c
+++ b/drivers/gpu/drm/amd/display/dc/core/dc_link.c
@@ -2767,15 +2767,6 @@ void core_link_enable_stream(
2767 CONTROLLER_DP_TEST_PATTERN_VIDEOMODE, 2767 CONTROLLER_DP_TEST_PATTERN_VIDEOMODE,
2768 COLOR_DEPTH_UNDEFINED); 2768 COLOR_DEPTH_UNDEFINED);
2769 2769
2770 /* This second call is needed to reconfigure the DIG
2771 * as a workaround for the incorrect value being applied
2772 * from transmitter control.
2773 */
2774 if (!dc_is_virtual_signal(pipe_ctx->stream->signal))
2775 stream->link->link_enc->funcs->setup(
2776 stream->link->link_enc,
2777 pipe_ctx->stream->signal);
2778
2779#ifdef CONFIG_DRM_AMD_DC_DSC_SUPPORT 2770#ifdef CONFIG_DRM_AMD_DC_DSC_SUPPORT
2780 if (pipe_ctx->stream->timing.flags.DSC) { 2771 if (pipe_ctx->stream->timing.flags.DSC) {
2781 if (dc_is_dp_signal(pipe_ctx->stream->signal) || 2772 if (dc_is_dp_signal(pipe_ctx->stream->signal) ||
diff --git a/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c b/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c
index dfb208285a9c..6b2f2f1a1c9c 100644
--- a/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c
+++ b/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c
@@ -1107,6 +1107,11 @@ struct stream_encoder *dcn20_stream_encoder_create(
1107 if (!enc1) 1107 if (!enc1)
1108 return NULL; 1108 return NULL;
1109 1109
1110 if (ASICREV_IS_NAVI14_M(ctx->asic_id.hw_internal_rev)) {
1111 if (eng_id >= ENGINE_ID_DIGD)
1112 eng_id++;
1113 }
1114
1110 dcn20_stream_encoder_construct(enc1, ctx, ctx->dc_bios, eng_id, 1115 dcn20_stream_encoder_construct(enc1, ctx, ctx->dc_bios, eng_id,
1111 &stream_enc_regs[eng_id], 1116 &stream_enc_regs[eng_id],
1112 &se_shift, &se_mask); 1117 &se_shift, &se_mask);
diff --git a/drivers/gpu/drm/amd/powerplay/navi10_ppt.c b/drivers/gpu/drm/amd/powerplay/navi10_ppt.c
index 0b461404af6b..3ec5a10a7c4d 100644
--- a/drivers/gpu/drm/amd/powerplay/navi10_ppt.c
+++ b/drivers/gpu/drm/amd/powerplay/navi10_ppt.c
@@ -205,7 +205,7 @@ static struct smu_11_0_cmn2aisc_mapping navi10_workload_map[PP_SMC_POWER_PROFILE
205 WORKLOAD_MAP(PP_SMC_POWER_PROFILE_POWERSAVING, WORKLOAD_PPLIB_POWER_SAVING_BIT), 205 WORKLOAD_MAP(PP_SMC_POWER_PROFILE_POWERSAVING, WORKLOAD_PPLIB_POWER_SAVING_BIT),
206 WORKLOAD_MAP(PP_SMC_POWER_PROFILE_VIDEO, WORKLOAD_PPLIB_VIDEO_BIT), 206 WORKLOAD_MAP(PP_SMC_POWER_PROFILE_VIDEO, WORKLOAD_PPLIB_VIDEO_BIT),
207 WORKLOAD_MAP(PP_SMC_POWER_PROFILE_VR, WORKLOAD_PPLIB_VR_BIT), 207 WORKLOAD_MAP(PP_SMC_POWER_PROFILE_VR, WORKLOAD_PPLIB_VR_BIT),
208 WORKLOAD_MAP(PP_SMC_POWER_PROFILE_COMPUTE, WORKLOAD_PPLIB_CUSTOM_BIT), 208 WORKLOAD_MAP(PP_SMC_POWER_PROFILE_COMPUTE, WORKLOAD_PPLIB_COMPUTE_BIT),
209 WORKLOAD_MAP(PP_SMC_POWER_PROFILE_CUSTOM, WORKLOAD_PPLIB_CUSTOM_BIT), 209 WORKLOAD_MAP(PP_SMC_POWER_PROFILE_CUSTOM, WORKLOAD_PPLIB_CUSTOM_BIT),
210}; 210};
211 211
diff --git a/drivers/gpu/drm/amd/powerplay/vega20_ppt.c b/drivers/gpu/drm/amd/powerplay/vega20_ppt.c
index bbd8ebd58434..92c393f613d3 100644
--- a/drivers/gpu/drm/amd/powerplay/vega20_ppt.c
+++ b/drivers/gpu/drm/amd/powerplay/vega20_ppt.c
@@ -219,7 +219,7 @@ static struct smu_11_0_cmn2aisc_mapping vega20_workload_map[PP_SMC_POWER_PROFILE
219 WORKLOAD_MAP(PP_SMC_POWER_PROFILE_POWERSAVING, WORKLOAD_PPLIB_POWER_SAVING_BIT), 219 WORKLOAD_MAP(PP_SMC_POWER_PROFILE_POWERSAVING, WORKLOAD_PPLIB_POWER_SAVING_BIT),
220 WORKLOAD_MAP(PP_SMC_POWER_PROFILE_VIDEO, WORKLOAD_PPLIB_VIDEO_BIT), 220 WORKLOAD_MAP(PP_SMC_POWER_PROFILE_VIDEO, WORKLOAD_PPLIB_VIDEO_BIT),
221 WORKLOAD_MAP(PP_SMC_POWER_PROFILE_VR, WORKLOAD_PPLIB_VR_BIT), 221 WORKLOAD_MAP(PP_SMC_POWER_PROFILE_VR, WORKLOAD_PPLIB_VR_BIT),
222 WORKLOAD_MAP(PP_SMC_POWER_PROFILE_COMPUTE, WORKLOAD_PPLIB_CUSTOM_BIT), 222 WORKLOAD_MAP(PP_SMC_POWER_PROFILE_COMPUTE, WORKLOAD_PPLIB_COMPUTE_BIT),
223 WORKLOAD_MAP(PP_SMC_POWER_PROFILE_CUSTOM, WORKLOAD_PPLIB_CUSTOM_BIT), 223 WORKLOAD_MAP(PP_SMC_POWER_PROFILE_CUSTOM, WORKLOAD_PPLIB_CUSTOM_BIT),
224}; 224};
225 225
diff --git a/drivers/gpu/drm/radeon/si_dpm.c b/drivers/gpu/drm/radeon/si_dpm.c
index 460fd98e40a7..a0b382a637a6 100644
--- a/drivers/gpu/drm/radeon/si_dpm.c
+++ b/drivers/gpu/drm/radeon/si_dpm.c
@@ -1958,6 +1958,7 @@ static void si_initialize_powertune_defaults(struct radeon_device *rdev)
1958 case 0x682C: 1958 case 0x682C:
1959 si_pi->cac_weights = cac_weights_cape_verde_pro; 1959 si_pi->cac_weights = cac_weights_cape_verde_pro;
1960 si_pi->dte_data = dte_data_sun_xt; 1960 si_pi->dte_data = dte_data_sun_xt;
1961 update_dte_from_pl2 = true;
1961 break; 1962 break;
1962 case 0x6825: 1963 case 0x6825:
1963 case 0x6827: 1964 case 0x6827: