[PATCH 4/4] drm/amd/pm: add Raven2 watermak WmType setting
Alex Deucher
alexdeucher at gmail.com
Tue Sep 15 18:37:19 UTC 2020
On Mon, Sep 7, 2020 at 5:02 AM Evan Quan <evan.quan at amd.com> wrote:
>
> Which tells it's a nomral pstate change or memory retraining.
Same typos as patch 3. With those fixed:
Acked-by: Alex Deucher <alexander.deucher at amd.com>
>
> Change-Id: If55d6c3f1dfc28005c6d767154664feddcda6f5b
> Signed-off-by: Evan Quan <evan.quan at amd.com>
> Tested-by: Changfeng Zhu <Changfeng.Zhu at amd.com>
> ---
> drivers/gpu/drm/amd/pm/inc/smu10_driver_if.h | 3 ++-
> drivers/gpu/drm/amd/pm/powerplay/hwmgr/smu10_hwmgr.c | 11 +++++++++++
> 2 files changed, 13 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/pm/inc/smu10_driver_if.h b/drivers/gpu/drm/amd/pm/inc/smu10_driver_if.h
> index dea8fe93da63..c498158771cc 100644
> --- a/drivers/gpu/drm/amd/pm/inc/smu10_driver_if.h
> +++ b/drivers/gpu/drm/amd/pm/inc/smu10_driver_if.h
> @@ -54,7 +54,8 @@ typedef struct {
> uint16_t MaxMclk;
>
> uint8_t WmSetting;
> - uint8_t Padding[3];
> + uint8_t WmType;
> + uint8_t Padding[2];
> } WatermarkRowGeneric_t;
>
> #define NUM_WM_RANGES 4
> diff --git a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/smu10_hwmgr.c b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/smu10_hwmgr.c
> index 9ee8cf8267c8..88792dba1759 100644
> --- a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/smu10_hwmgr.c
> +++ b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/smu10_hwmgr.c
> @@ -1181,8 +1181,19 @@ static int smu10_set_watermarks_for_clocks_ranges(struct pp_hwmgr *hwmgr,
> struct smu10_hwmgr *data = hwmgr->backend;
> struct dm_pp_wm_sets_with_clock_ranges_soc15 *wm_with_clock_ranges = clock_ranges;
> Watermarks_t *table = &(data->water_marks_table);
> + struct amdgpu_device *adev = hwmgr->adev;
> + int i;
>
> smu_set_watermarks_for_clocks_ranges(table,wm_with_clock_ranges);
> +
> + if (adev->apu_flags & AMD_APU_IS_RAVEN2) {
> + for (i = 0; i < NUM_WM_RANGES; i++)
> + table->WatermarkRow[WM_DCFCLK][i].WmType = (uint8_t)0;
> +
> + for (i = 0; i < NUM_WM_RANGES; i++)
> + table->WatermarkRow[WM_SOCCLK][i].WmType = (uint8_t)0;
> + }
> +
> smum_smc_table_manager(hwmgr, (uint8_t *)table, (uint16_t)SMU10_WMTABLE, false);
> data->water_marks_exist = true;
> return 0;
> --
> 2.28.0
>
> _______________________________________________
> amd-gfx mailing list
> amd-gfx at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx
More information about the amd-gfx
mailing list