[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CADnq5_MbawfSJBQ5xurAcUfu8mxN32aUBNqv=295wgaadxKk9Q@mail.gmail.com>
Date: Tue, 21 Jul 2020 13:12:17 -0400
From: Alex Deucher <alexdeucher@...il.com>
To: Qiu Wenbo <qiuwenbo@...tium.com.cn>
Cc: Evan Quan <evan.quan@....com>,
amd-gfx list <amd-gfx@...ts.freedesktop.org>,
"David (ChunMing) Zhou" <David1.Zhou@....com>,
Chen Wandun <chenwandun@...wei.com>,
David Airlie <airlied@...ux.ie>,
YueHaibing <yuehaibing@...wei.com>,
LKML <linux-kernel@...r.kernel.org>,
Maling list - DRI developers
<dri-devel@...ts.freedesktop.org>,
Eric Huang <JinHuiEric.Huang@....com>,
Daniel Vetter <daniel@...ll.ch>,
Alex Deucher <alexander.deucher@....com>,
yu kuai <yukuai3@...wei.com>,
Christian König <christian.koenig@....com>
Subject: Re: [PATCH] drm/amd/powerplay: fix a crash when overclocking Vega M
Applied. Thanks!
Alex
On Fri, Jul 17, 2020 at 8:23 AM Qiu Wenbo <qiuwenbo@...tium.com.cn> wrote:
>
> Avoid kernel crash when vddci_control is SMU7_VOLTAGE_CONTROL_NONE and
> vddci_voltage_table is empty. It has been tested on Intel Hades Canyon
> (i7-8809G).
>
> Bug: https://bugzilla.kernel.org/show_bug.cgi?id=208489
> Fixes: ac7822b0026f ("drm/amd/powerplay: add smumgr support for VEGAM (v2)")
> Signed-off-by: Qiu Wenbo <qiuwenbo@...tium.com.cn>
> ---
> drivers/gpu/drm/amd/powerplay/smumgr/vegam_smumgr.c | 10 ++++++----
> 1 file changed, 6 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/powerplay/smumgr/vegam_smumgr.c b/drivers/gpu/drm/amd/powerplay/smumgr/vegam_smumgr.c
> index 3da71a088b92..0ecc18b55ffb 100644
> --- a/drivers/gpu/drm/amd/powerplay/smumgr/vegam_smumgr.c
> +++ b/drivers/gpu/drm/amd/powerplay/smumgr/vegam_smumgr.c
> @@ -644,9 +644,6 @@ static int vegam_get_dependency_volt_by_clk(struct pp_hwmgr *hwmgr,
>
> /* sclk is bigger than max sclk in the dependence table */
> *voltage |= (dep_table->entries[i - 1].vddc * VOLTAGE_SCALE) << VDDC_SHIFT;
> - vddci = phm_find_closest_vddci(&(data->vddci_voltage_table),
> - (dep_table->entries[i - 1].vddc -
> - (uint16_t)VDDC_VDDCI_DELTA));
>
> if (SMU7_VOLTAGE_CONTROL_NONE == data->vddci_control)
> *voltage |= (data->vbios_boot_state.vddci_bootup_value *
> @@ -654,8 +651,13 @@ static int vegam_get_dependency_volt_by_clk(struct pp_hwmgr *hwmgr,
> else if (dep_table->entries[i - 1].vddci)
> *voltage |= (dep_table->entries[i - 1].vddci *
> VOLTAGE_SCALE) << VDDC_SHIFT;
> - else
> + else {
> + vddci = phm_find_closest_vddci(&(data->vddci_voltage_table),
> + (dep_table->entries[i - 1].vddc -
> + (uint16_t)VDDC_VDDCI_DELTA));
> +
> *voltage |= (vddci * VOLTAGE_SCALE) << VDDCI_SHIFT;
> + }
>
> if (SMU7_VOLTAGE_CONTROL_NONE == data->mvdd_control)
> *mvdd = data->vbios_boot_state.mvdd_bootup_value * VOLTAGE_SCALE;
> --
> 2.27.0
>
> _______________________________________________
> amd-gfx mailing list
> amd-gfx@...ts.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Powered by blists - more mailing lists