Skip to content

Commit 0f1d37e

Browse files
committed
Merge branch 'drm-next-5.1' of git://people.freedesktop.org/~agd5f/linux into drm-next
- Update golden regs for gfx9 - Powerplay fixes Signed-off-by: Dave Airlie <airlied@redhat.com> From: Alex Deucher <alexdeucher@gmail.com> Link: https://patchwork.freedesktop.org/patch/msgid/20190313194249.3346-1-alexander.deucher@amd.com
2 parents ad7ad48 + f7b1844 commit 0f1d37e

File tree

3 files changed

+21
-3
lines changed

3 files changed

+21
-3
lines changed

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -220,6 +220,7 @@ static const struct soc15_reg_golden golden_settings_gc_9_1_rv2[] =
220220

221221
static const struct soc15_reg_golden golden_settings_gc_9_x_common[] =
222222
{
223+
SOC15_REG_GOLDEN_VALUE(GC, 0, mmCP_SD_CNTL, 0xffffffff, 0x000001ff),
223224
SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_CAM_INDEX, 0xffffffff, 0x00000000),
224225
SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_CAM_DATA, 0xffffffff, 0x2544c382)
225226
};

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3491,14 +3491,14 @@ static int smu7_get_gpu_power(struct pp_hwmgr *hwmgr, u32 *query)
34913491

34923492
smum_send_msg_to_smc(hwmgr, PPSMC_MSG_PmStatusLogStart);
34933493
cgs_write_ind_register(hwmgr->device, CGS_IND_REG__SMC,
3494-
ixSMU_PM_STATUS_94, 0);
3494+
ixSMU_PM_STATUS_95, 0);
34953495

34963496
for (i = 0; i < 10; i++) {
3497-
mdelay(1);
3497+
mdelay(500);
34983498
smum_send_msg_to_smc(hwmgr, PPSMC_MSG_PmStatusLogSample);
34993499
tmp = cgs_read_ind_register(hwmgr->device,
35003500
CGS_IND_REG__SMC,
3501-
ixSMU_PM_STATUS_94);
3501+
ixSMU_PM_STATUS_95);
35023502
if (tmp != 0)
35033503
break;
35043504
}

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

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@
3232
#include "cgs_common.h"
3333
#include "vega20_pptable.h"
3434

35+
#define VEGA20_FAN_TARGET_TEMPERATURE_OVERRIDE 105
36+
3537
static void set_hw_cap(struct pp_hwmgr *hwmgr, bool enable,
3638
enum phm_platform_caps cap)
3739
{
@@ -798,6 +800,17 @@ static int append_vbios_pptable(struct pp_hwmgr *hwmgr, PPTable_t *ppsmc_pptable
798800
return 0;
799801
}
800802

803+
static int override_powerplay_table_fantargettemperature(struct pp_hwmgr *hwmgr)
804+
{
805+
struct phm_ppt_v3_information *pptable_information =
806+
(struct phm_ppt_v3_information *)hwmgr->pptable;
807+
PPTable_t *ppsmc_pptable = (PPTable_t *)(pptable_information->smc_pptable);
808+
809+
ppsmc_pptable->FanTargetTemperature = VEGA20_FAN_TARGET_TEMPERATURE_OVERRIDE;
810+
811+
return 0;
812+
}
813+
801814
#define VEGA20_ENGINECLOCK_HARDMAX 198000
802815
static int init_powerplay_table_information(
803816
struct pp_hwmgr *hwmgr,
@@ -887,6 +900,10 @@ static int init_powerplay_table_information(
887900

888901

889902
result = append_vbios_pptable(hwmgr, (pptable_information->smc_pptable));
903+
if (result)
904+
return result;
905+
906+
result = override_powerplay_table_fantargettemperature(hwmgr);
890907

891908
return result;
892909
}

0 commit comments

Comments
 (0)