Merge branch 'drm-next-5.1' of git://people.freedesktop.org/~agd5f/linux into drm...
authorDave Airlie <airlied@redhat.com>
Thu, 14 Mar 2019 02:14:40 +0000 (12:14 +1000)
committerDave Airlie <airlied@redhat.com>
Thu, 14 Mar 2019 02:15:02 +0000 (12:15 +1000)
- 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
drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c
drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c
drivers/gpu/drm/amd/powerplay/hwmgr/vega20_processpptables.c

index 5533f6e4f4a48be84351c2429b8202862f827988..d0309e8c9d12cdafa95d2a23e84018f4bb6b8035 100644 (file)
@@ -220,6 +220,7 @@ static const struct soc15_reg_golden golden_settings_gc_9_1_rv2[] =
 
 static const struct soc15_reg_golden golden_settings_gc_9_x_common[] =
 {
+       SOC15_REG_GOLDEN_VALUE(GC, 0, mmCP_SD_CNTL, 0xffffffff, 0x000001ff),
        SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_CAM_INDEX, 0xffffffff, 0x00000000),
        SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_CAM_DATA, 0xffffffff, 0x2544c382)
 };
index 48187acac59e7bf1181565e852584fe856f26efc..83d3d935f3acc899cf682d7e4fa616094e746a58 100644 (file)
@@ -3491,14 +3491,14 @@ static int smu7_get_gpu_power(struct pp_hwmgr *hwmgr, u32 *query)
 
        smum_send_msg_to_smc(hwmgr, PPSMC_MSG_PmStatusLogStart);
        cgs_write_ind_register(hwmgr->device, CGS_IND_REG__SMC,
-                                                       ixSMU_PM_STATUS_94, 0);
+                                                       ixSMU_PM_STATUS_95, 0);
 
        for (i = 0; i < 10; i++) {
-               mdelay(1);
+               mdelay(500);
                smum_send_msg_to_smc(hwmgr, PPSMC_MSG_PmStatusLogSample);
                tmp = cgs_read_ind_register(hwmgr->device,
                                                CGS_IND_REG__SMC,
-                                               ixSMU_PM_STATUS_94);
+                                               ixSMU_PM_STATUS_95);
                if (tmp != 0)
                        break;
        }
index 97f8a1a970c37e124c8e5b07727f7ce6e32e8849..7a7f15d0c53afaacb70df7df97fa983e4ad35715 100644 (file)
@@ -32,6 +32,8 @@
 #include "cgs_common.h"
 #include "vega20_pptable.h"
 
+#define VEGA20_FAN_TARGET_TEMPERATURE_OVERRIDE 105
+
 static void set_hw_cap(struct pp_hwmgr *hwmgr, bool enable,
                enum phm_platform_caps cap)
 {
@@ -798,6 +800,17 @@ static int append_vbios_pptable(struct pp_hwmgr *hwmgr, PPTable_t *ppsmc_pptable
        return 0;
 }
 
+static int override_powerplay_table_fantargettemperature(struct pp_hwmgr *hwmgr)
+{
+       struct phm_ppt_v3_information *pptable_information =
+               (struct phm_ppt_v3_information *)hwmgr->pptable;
+       PPTable_t *ppsmc_pptable = (PPTable_t *)(pptable_information->smc_pptable);
+
+       ppsmc_pptable->FanTargetTemperature = VEGA20_FAN_TARGET_TEMPERATURE_OVERRIDE;
+
+       return 0;
+}
+
 #define VEGA20_ENGINECLOCK_HARDMAX 198000
 static int init_powerplay_table_information(
                struct pp_hwmgr *hwmgr,
@@ -887,6 +900,10 @@ static int init_powerplay_table_information(
 
 
        result = append_vbios_pptable(hwmgr, (pptable_information->smc_pptable));
+       if (result)
+               return result;
+
+       result = override_powerplay_table_fantargettemperature(hwmgr);
 
        return result;
 }