[PATCH] drm/amd/pm: allow the user to force BACO on smu v13.0.0/7
Alex Deucher
alexdeucher at gmail.com
Wed Aug 16 20:41:27 UTC 2023
On Tue, Aug 15, 2023 at 9:02 PM Feng, Kenneth <Kenneth.Feng at amd.com> wrote:
>
> [AMD Official Use Only - General]
>
> Hi Alex,
> Right, just BAMACO has its advantage for the fast resume.
> Maybe later we can further identify which sku needs to save more power vs faster resume time.
> For example, mobile device can by default use BACO and desktop/workstation device can by default use BAMACO.
Well, we don't really take advantage of it at the moment. We need to
add a check in amdgpu_device_evict_resources() and if BAMACO is
selected, we can skip evicting resources from vram. Otherwise we
evict everything which pretty much nullifies the latency advantage of
BAMACO. So unless we fix that, we should default to BACO to save the
extra power.
Alex
> Thanks.
>
>
> -----Original Message-----
> From: Alex Deucher <alexdeucher at gmail.com>
> Sent: Wednesday, August 16, 2023 12:56 AM
> To: Feng, Kenneth <Kenneth.Feng at amd.com>
> Cc: amd-gfx at lists.freedesktop.org
> Subject: Re: [PATCH] drm/amd/pm: allow the user to force BACO on smu v13.0.0/7
>
> Caution: This message originated from an External Source. Use proper caution when opening attachments, clicking links, or responding.
>
>
> On Tue, Aug 15, 2023 at 5:05 AM Kenneth Feng <kenneth.feng at amd.com> wrote:
> >
> > allow the user to force BACO on smu v13.0.0/7
> >
> > Signed-off-by: Kenneth Feng <kenneth.feng at amd.com>
>
> Acked-by: Alex Deucher <alexander.deucher at amd.com> Would it be better to default to BACO? It would save more power at the expense of resume latency.
>
> Alex
>
>
> > ---
> > drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0.c | 2 +-
> > drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_0_ppt.c | 3 ++-
> > drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_7_ppt.c | 3 ++-
> > 3 files changed, 5 insertions(+), 3 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0.c
> > b/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0.c
> > index 895cda8e6934..52e9c7611013 100644
> > --- a/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0.c
> > +++ b/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0.c
> > @@ -2263,7 +2263,7 @@ int smu_v13_0_baco_set_state(struct smu_context *smu,
> > if (state == SMU_BACO_STATE_ENTER) {
> > ret = smu_cmn_send_smc_msg_with_param(smu,
> > SMU_MSG_EnterBaco,
> > - smu_baco->maco_support ?
> > + (smu_baco->maco_support && amdgpu_runtime_pm != 1) ?
> > BACO_SEQ_BAMACO : BACO_SEQ_BACO,
> > NULL);
> > } else {
> > diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_0_ppt.c
> > b/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_0_ppt.c
> > index a5857acee641..12ccc12657d7 100644
> > --- a/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_0_ppt.c
> > +++ b/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_0_ppt.c
> > @@ -2211,7 +2211,8 @@ static int smu_v13_0_0_baco_enter(struct
> > smu_context *smu)
> >
> > if (adev->in_runpm && smu_cmn_is_audio_func_enabled(adev))
> > return smu_v13_0_baco_set_armd3_sequence(smu,
> > - smu_baco->maco_support ? BACO_SEQ_BAMACO : BACO_SEQ_BACO);
> > + (smu_baco->maco_support && amdgpu_runtime_pm != 1) ?
> > + BACO_SEQ_BAMACO :
> > + BACO_SEQ_BACO);
> > else
> > return smu_v13_0_baco_enter(smu); } diff --git
> > a/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_7_ppt.c
> > b/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_7_ppt.c
> > index 93b3e8fa8238..f0bcc7995983 100644
> > --- a/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_7_ppt.c
> > +++ b/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_7_ppt.c
> > @@ -2139,7 +2139,8 @@ static int smu_v13_0_7_baco_enter(struct
> > smu_context *smu)
> >
> > if (adev->in_runpm && smu_cmn_is_audio_func_enabled(adev))
> > return smu_v13_0_baco_set_armd3_sequence(smu,
> > - smu_baco->maco_support ? BACO_SEQ_BAMACO : BACO_SEQ_BACO);
> > + (smu_baco->maco_support && amdgpu_runtime_pm != 1) ?
> > + BACO_SEQ_BAMACO :
> > + BACO_SEQ_BACO);
> > else
> > return smu_v13_0_baco_enter(smu); }
> > --
> > 2.34.1
> >
More information about the amd-gfx
mailing list