> -----Original Message----- > From: amd-gfx [mailto:amd-gfx-bounces at lists.freedesktop.org] On Behalf > Of Rex Zhu > Sent: Monday, July 03, 2017 6:14 AM > To: amd-gfx at lists.freedesktop.org > Cc: Zhu, Rex > Subject: [PATCH 4/4] drm/amd/powerplay: add avfs check for old asics on Vi. > > Change-Id: I1737ba27ae2a8f5c579ccb541ced9cb979ffd1ff > Signed-off-by: Rex Zhu <Rex.Zhu at amd.com> Reviewed-by: Alex Deucher <alexander.deucher at amd.com> > --- > drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c | 9 +++++++++ > 1 file changed, 9 insertions(+) > > diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c > b/drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c > index e7ecbd1..8fe62aa 100644 > --- a/drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c > +++ b/drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c > @@ -4660,6 +4660,15 @@ static int smu7_set_power_profile_state(struct > pp_hwmgr *hwmgr, > > static int smu7_avfs_control(struct pp_hwmgr *hwmgr, bool enable) > { > + struct pp_smumgr *smumgr = (struct pp_smumgr *)(hwmgr- > >smumgr); > + struct smu7_smumgr *smu_data = (struct smu7_smumgr > *)(smumgr->backend); > + > + if (smu_data == NULL) > + return -EINVAL; > + > + if (smu_data->avfs.avfs_btc_status == AVFS_BTC_NOTSUPPORTED) > + return 0; > + > if (enable) { > if (!PHM_READ_VFPF_INDIRECT_FIELD(hwmgr->device, > CGS_IND_REG__SMC, FEATURE_STATUS, > AVS_ON)) > -- > 1.9.1 > > _______________________________________________ > amd-gfx mailing list > amd-gfx at lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/amd-gfx