mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Shashank Sharma <shashank.sharma@amd.com>
To: Alex Deucher <alexdeucher@gmail.com>,
	Arvind Yadav <Arvind.Yadav@amd.com>
Cc: Christian.Koenig@amd.com, alexander.deucher@amd.com,
	Xinhui.Pan@amd.com, airlied@gmail.com, daniel@ffwll.ch,
	amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 3/3] Revert "drm/amd/amdgpu: switch on/off vcn power profile mode"
Date: Mon, 14 Aug 2023 18:05:49 +0200	[thread overview]
Message-ID: <4013bb32-0ab9-4dbe-7043-011051fee969@amd.com> (raw)
In-Reply-To: <CADnq5_M3_N-rXTcvsQ76QGo1bjBc92SPPHfwFayNbroq-Ph_iw@mail.gmail.com>

Ah, Thanks for pointing that out Alex.

@Arvind, please refer to the patch 
(https://patchwork.freedesktop.org/patch/504854/?series=109060&rev=4) in 
previous series of SMU workload hints with UAPI (here: 
https://patchwork.freedesktop.org/series/109060/)

Regards

Shashank

On 14/08/2023 17:20, Alex Deucher wrote:
> KFD also changes the profile when queues are active.  Please make sure
> that is properly taken into account as well.
>
> Alex
>
> On Mon, Aug 14, 2023 at 3:36 AM Arvind Yadav <Arvind.Yadav@amd.com> wrote:
>> This reverts commit 5ce71f59bb9bd3d8a09b96afdbc92975cb6dc303.
>>
>> Reason for revert: New amdgpu_smu* api is added to switch
>> on/off profile mode. These new api will allow to change the
>> GPU power profile based on a submitted job.
>>
>> Cc: Shashank Sharma <shashank.sharma@amd.com>
>> Cc: Christian Koenig <christian.koenig@amd.com>
>> Cc: Alex Deucher <alexander.deucher@amd.com>
>> Signed-off-by: Arvind Yadav <Arvind.Yadav@amd.com>
>> ---
>>   drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c | 14 ++------------
>>   1 file changed, 2 insertions(+), 12 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c
>> index 2d94f1b63bd6..70777fcfa626 100644
>> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c
>> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c
>> @@ -363,7 +363,6 @@ static void amdgpu_vcn_idle_work_handler(struct work_struct *work)
>>                  container_of(work, struct amdgpu_device, vcn.idle_work.work);
>>          unsigned int fences = 0, fence[AMDGPU_MAX_VCN_INSTANCES] = {0};
>>          unsigned int i, j;
>> -       int r = 0;
>>
>>          for (j = 0; j < adev->vcn.num_vcn_inst; ++j) {
>>                  if (adev->vcn.harvest_config & (1 << j))
>> @@ -392,10 +391,6 @@ static void amdgpu_vcn_idle_work_handler(struct work_struct *work)
>>          if (!fences && !atomic_read(&adev->vcn.total_submission_cnt)) {
>>                  amdgpu_device_ip_set_powergating_state(adev, AMD_IP_BLOCK_TYPE_VCN,
>>                         AMD_PG_STATE_GATE);
>> -               r = amdgpu_dpm_switch_power_profile(adev, PP_SMC_POWER_PROFILE_VIDEO,
>> -                               false);
>> -               if (r)
>> -                       dev_warn(adev->dev, "(%d) failed to disable video power profile mode\n", r);
>>          } else {
>>                  schedule_delayed_work(&adev->vcn.idle_work, VCN_IDLE_TIMEOUT);
>>          }
>> @@ -404,16 +399,11 @@ static void amdgpu_vcn_idle_work_handler(struct work_struct *work)
>>   void amdgpu_vcn_ring_begin_use(struct amdgpu_ring *ring)
>>   {
>>          struct amdgpu_device *adev = ring->adev;
>> -       int r = 0;
>>
>>          atomic_inc(&adev->vcn.total_submission_cnt);
>>
>> -       if (!cancel_delayed_work_sync(&adev->vcn.idle_work)) {
>> -               r = amdgpu_dpm_switch_power_profile(adev, PP_SMC_POWER_PROFILE_VIDEO,
>> -                               true);
>> -               if (r)
>> -                       dev_warn(adev->dev, "(%d) failed to switch to video power profile mode\n", r);
>> -       }
>> +       if (!cancel_delayed_work_sync(&adev->vcn.idle_work))
>> +               amdgpu_gfx_off_ctrl(adev, false);
>>
>>          mutex_lock(&adev->vcn.vcn_pg_lock);
>>          amdgpu_device_ip_set_powergating_state(adev, AMD_IP_BLOCK_TYPE_VCN,
>> --
>> 2.34.1
>>

  reply	other threads:[~2023-08-14 16:07 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-14  7:34 [PATCH 0/3] GPU workload hints for better performance Arvind Yadav
2023-08-14  7:34 ` [PATCH 1/3] drm/amdgpu: Add new api to switch on/off power profile mode Arvind Yadav
2023-08-14 12:05   ` Christian König
2023-08-14 12:52     ` Yadav, Arvind
2023-08-14 14:33   ` Alex Deucher
2023-08-17  7:51     ` Yadav, Arvind
2023-08-14 14:58   ` Shashank Sharma
2023-08-17  7:58     ` Yadav, Arvind
2023-08-14  7:34 ` [PATCH 2/3] drm/amdgpu: Switch on/off GPU workload profile Arvind Yadav
2023-08-14  7:34 ` [PATCH 3/3] Revert "drm/amd/amdgpu: switch on/off vcn power profile mode" Arvind Yadav
2023-08-14 15:20   ` Alex Deucher
2023-08-14 16:05     ` Shashank Sharma [this message]
2023-08-17  7:55       ` Yadav, Arvind

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4013bb32-0ab9-4dbe-7043-011051fee969@amd.com \
    --to=shashank.sharma@amd.com \
    --cc=Arvind.Yadav@amd.com \
    --cc=Christian.Koenig@amd.com \
    --cc=Xinhui.Pan@amd.com \
    --cc=airlied@gmail.com \
    --cc=alexander.deucher@amd.com \
    --cc=alexdeucher@gmail.com \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®