Skip to content

Commit f824c1b

Browse files
committed
Merge tag 'drm-fixes-5.4-2019-11-20' of git://people.freedesktop.org/~agd5f/linux into drm-fixes
drm-fixes-5.4-2019-11-20: amdgpu: - Remove experimental flag for navi14 - Fix confusing power message failures on older VI parts - Hang fix for gfxoff when using the read register interface - Two stability regression fixes for Raven Signed-off-by: Dave Airlie <[email protected]> From: Alex Deucher <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2 parents af42d34 + a0184d7 commit f824c1b

File tree

7 files changed

+42
-14
lines changed

7 files changed

+42
-14
lines changed

drivers/gpu/drm/amd/amdgpu/amdgpu_display.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -511,7 +511,7 @@ uint32_t amdgpu_display_supported_domains(struct amdgpu_device *adev,
511511
* Also, don't allow GTT domain if the BO doens't have USWC falg set.
512512
*/
513513
if (adev->asic_type >= CHIP_CARRIZO &&
514-
adev->asic_type <= CHIP_RAVEN &&
514+
adev->asic_type < CHIP_RAVEN &&
515515
(adev->flags & AMD_IS_APU) &&
516516
(bo_flags & AMDGPU_GEM_CREATE_CPU_GTT_USWC) &&
517517
amdgpu_bo_support_uswc(bo_flags) &&

drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1013,10 +1013,10 @@ static const struct pci_device_id pciidlist[] = {
10131013
{0x1002, 0x731B, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_NAVI10},
10141014
{0x1002, 0x731F, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_NAVI10},
10151015
/* Navi14 */
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},
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},
1016+
{0x1002, 0x7340, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_NAVI14},
1017+
{0x1002, 0x7341, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_NAVI14},
1018+
{0x1002, 0x7347, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_NAVI14},
1019+
{0x1002, 0x734F, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_NAVI14},
10201020

10211021
/* Renoir */
10221022
{0x1002, 0x1636, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RENOIR|AMD_IS_APU|AMD_EXP_HW_SUPPORT},

drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -649,15 +649,19 @@ static int amdgpu_info_ioctl(struct drm_device *dev, void *data, struct drm_file
649649
return -ENOMEM;
650650
alloc_size = info->read_mmr_reg.count * sizeof(*regs);
651651

652-
for (i = 0; i < info->read_mmr_reg.count; i++)
652+
amdgpu_gfx_off_ctrl(adev, false);
653+
for (i = 0; i < info->read_mmr_reg.count; i++) {
653654
if (amdgpu_asic_read_register(adev, se_num, sh_num,
654655
info->read_mmr_reg.dword_offset + i,
655656
&regs[i])) {
656657
DRM_DEBUG_KMS("unallowed offset %#x\n",
657658
info->read_mmr_reg.dword_offset + i);
658659
kfree(regs);
660+
amdgpu_gfx_off_ctrl(adev, true);
659661
return -EFAULT;
660662
}
663+
}
664+
amdgpu_gfx_off_ctrl(adev, true);
661665
n = copy_to_user(out, regs, min(size, alloc_size));
662666
kfree(regs);
663667
return n ? -EFAULT : 0;

drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1038,8 +1038,13 @@ static void gfx_v9_0_check_if_need_gfxoff(struct amdgpu_device *adev)
10381038
case CHIP_VEGA20:
10391039
break;
10401040
case CHIP_RAVEN:
1041-
if (!(adev->rev_id >= 0x8 || adev->pdev->device == 0x15d8)
1042-
&&((adev->gfx.rlc_fw_version != 106 &&
1041+
/* Disable GFXOFF on original raven. There are combinations
1042+
* of sbios and platforms that are not stable.
1043+
*/
1044+
if (!(adev->rev_id >= 0x8 || adev->pdev->device == 0x15d8))
1045+
adev->pm.pp_feature &= ~PP_GFXOFF_MASK;
1046+
else if (!(adev->rev_id >= 0x8 || adev->pdev->device == 0x15d8)
1047+
&&((adev->gfx.rlc_fw_version != 106 &&
10431048
adev->gfx.rlc_fw_version < 531) ||
10441049
(adev->gfx.rlc_fw_version == 53815) ||
10451050
(adev->gfx.rlc_feature_version < 1) ||

drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -688,7 +688,7 @@ static int amdgpu_dm_init(struct amdgpu_device *adev)
688688
*/
689689
if (adev->flags & AMD_IS_APU &&
690690
adev->asic_type >= CHIP_CARRIZO &&
691-
adev->asic_type <= CHIP_RAVEN)
691+
adev->asic_type < CHIP_RAVEN)
692692
init_data.flags.gpu_vm_support = true;
693693

694694
if (amdgpu_dc_feature_mask & DC_FBC_MASK)

drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3478,18 +3478,31 @@ static int smu7_get_pp_table_entry(struct pp_hwmgr *hwmgr,
34783478

34793479
static int smu7_get_gpu_power(struct pp_hwmgr *hwmgr, u32 *query)
34803480
{
3481+
struct amdgpu_device *adev = hwmgr->adev;
34813482
int i;
34823483
u32 tmp = 0;
34833484

34843485
if (!query)
34853486
return -EINVAL;
34863487

3487-
smum_send_msg_to_smc_with_parameter(hwmgr, PPSMC_MSG_GetCurrPkgPwr, 0);
3488-
tmp = cgs_read_register(hwmgr->device, mmSMC_MSG_ARG_0);
3489-
*query = tmp;
3488+
/*
3489+
* PPSMC_MSG_GetCurrPkgPwr is not supported on:
3490+
* - Hawaii
3491+
* - Bonaire
3492+
* - Fiji
3493+
* - Tonga
3494+
*/
3495+
if ((adev->asic_type != CHIP_HAWAII) &&
3496+
(adev->asic_type != CHIP_BONAIRE) &&
3497+
(adev->asic_type != CHIP_FIJI) &&
3498+
(adev->asic_type != CHIP_TONGA)) {
3499+
smum_send_msg_to_smc_with_parameter(hwmgr, PPSMC_MSG_GetCurrPkgPwr, 0);
3500+
tmp = cgs_read_register(hwmgr->device, mmSMC_MSG_ARG_0);
3501+
*query = tmp;
34903502

3491-
if (tmp != 0)
3492-
return 0;
3503+
if (tmp != 0)
3504+
return 0;
3505+
}
34933506

34943507
smum_send_msg_to_smc(hwmgr, PPSMC_MSG_PmStatusLogStart);
34953508
cgs_write_ind_register(hwmgr->device, CGS_IND_REG__SMC,

drivers/gpu/drm/amd/powerplay/navi10_ppt.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -759,6 +759,12 @@ static int navi10_force_clk_levels(struct smu_context *smu,
759759
case SMU_UCLK:
760760
case SMU_DCEFCLK:
761761
case SMU_FCLK:
762+
/* There is only 2 levels for fine grained DPM */
763+
if (navi10_is_support_fine_grained_dpm(smu, clk_type)) {
764+
soft_max_level = (soft_max_level >= 1 ? 1 : 0);
765+
soft_min_level = (soft_min_level >= 1 ? 1 : 0);
766+
}
767+
762768
ret = smu_get_dpm_freq_by_index(smu, clk_type, soft_min_level, &min_freq);
763769
if (ret)
764770
return size;

0 commit comments

Comments
 (0)