[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <bf49713a-15ec-b986-40f5-34de87123f6f@amd.com>
Date: Mon, 21 Aug 2023 19:23:23 +0530
From: "Yadav, Arvind" <arvyadav@....com>
To: Shashank Sharma <shashank.sharma@....com>,
Arvind Yadav <Arvind.Yadav@....com>, Christian.Koenig@....com,
alexander.deucher@....com, Xinhui.Pan@....com, airlied@...il.com,
daniel@...ll.ch, Felix.Kuehling@....com,
amd-gfx@...ts.freedesktop.org
Cc: dri-devel@...ts.freedesktop.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 5/7] drm/amdgpu: Switch on/off GPU workload profile
On 8/21/2023 7:16 PM, Shashank Sharma wrote:
>
> On 21/08/2023 08:47, Arvind Yadav wrote:
>> This patch is to switch the GPU workload profile based
>> on the submitted job. The workload profile is reset to
>> default when the job is done.
>>
>> Cc: Shashank Sharma <shashank.sharma@....com>
>> Cc: Christian Koenig <christian.koenig@....com>
>> Cc: Alex Deucher <alexander.deucher@....com>
>> Signed-off-by: Arvind Yadav <Arvind.Yadav@....com>
>> ---
>> drivers/gpu/drm/amd/amdgpu/amdgpu_job.c | 5 +++++
>> 1 file changed, 5 insertions(+)
>>
>> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_job.c
>> b/drivers/gpu/drm/amd/amdgpu/amdgpu_job.c
>> index c3d9d75143f4..c2b0fda6ba26 100644
>> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_job.c
>> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_job.c
>> @@ -176,6 +176,9 @@ void amdgpu_job_free_resources(struct amdgpu_job
>> *job)
>> static void amdgpu_job_free_cb(struct drm_sched_job *s_job)
>> {
>> struct amdgpu_job *job = to_amdgpu_job(s_job);
>> + struct amdgpu_ring *ring = to_amdgpu_ring(s_job->sched);
>> +
>> + amdgpu_workload_profile_put(ring->adev, ring->funcs->type);
>> drm_sched_job_cleanup(s_job);
>> @@ -295,6 +298,8 @@ static struct dma_fence *amdgpu_job_run(struct
>> drm_sched_job *sched_job)
>> DRM_ERROR("Error scheduling IBs (%d)\n", r);
>> }
>> + amdgpu_workload_profile_set(adev, ring->funcs->type);
>> +
>> job->job_run_counter++;
>> amdgpu_job_free_resources(job);
>
> Instead of calling switch on/off in title, may we call it set/reset
> GPU workload profile ?
>
> With that minor nitpick handled, please feel free to use:
>
Noted.
Thank You
~Arvind
> Reviewed-by: Shashank Sharma <shashank.sharma@....com>
>
> - Shashank
>
Powered by blists - more mailing lists