Re: [PATCH v3 2/2] drm/amdkfd: get doorbell's absolute offset based on the db size

2023-10-04 Thread Yadav, Arvind
On 10/4/2023 10:29 PM, Felix Kuehling wrote: On 2023-10-04 12:16, Arvind Yadav wrote: This patch is to align the absolute doorbell offset based on the doorbell's size. So that doorbell offset will be aligned for both 32 bit and 64 bit. v2: - Addressed the review comment from Felix. v3: -

Re: [PATCH 1/1] drm/amdkfd: Fix unaligned doorbell absolute offset for gfx8

2023-09-27 Thread Yadav, Arvind
Adding felix.kuehl...@amd.com for review. Thanks ~Arvind On 9/27/2023 9:46 PM, Arvind Yadav wrote: This patch is to adjust the absolute doorbell offset against the doorbell id considering the doorbell size of 32/64 bit. Cc: Christian Koenig Cc: Alex Deucher Signed-off-by: Shashank Sharma

Re: [PATCH 0/1] drm/amdkfd: Fix unaligned doorbell absolute offset for gfx8

2023-09-27 Thread Yadav, Arvind
Adding felix.kuehl...@amd.com for review. Thanks ~Arvind On 9/27/2023 9:46 PM, Arvind Yadav wrote: On older chips, the absolute doorbell offset within the doorbell page is based on the queue ID. KFD is using queue ID and doorbell size to get an absolute doorbell offset in userspace. This

Re: [PATCH v3 0/7] GPU workload hints for better performance

2023-08-28 Thread Yadav, Arvind
On 8/28/2023 9:13 PM, Helen Mae Koike Fornazier wrote: On Monday, August 28, 2023 09:26 -03, Arvind Yadav wrote: AMDGPU SOCs supports dynamic workload based power profiles, which can provide fine-tuned performance for a particular type of workload. This patch series adds an interface to

Re: [PATCH v2 3/7] drm/amdgpu: Add new function to put GPU power profile

2023-08-25 Thread Yadav, Arvind
On 8/22/2023 6:16 PM, Lazar, Lijo wrote: On 8/22/2023 5:41 PM, Yadav, Arvind wrote: Hi Lijo, The *_set function will set the GPU power profile and the *_put function will  schedule the smu_delayed_work task after 100ms delay. This smu_delayed_work task will clear a GPU power profile

Re: [PATCH v2 4/7] drm/amdgpu: Add suspend function to clear the GPU power profile.

2023-08-22 Thread Yadav, Arvind
On 8/22/2023 6:24 PM, Lazar, Lijo wrote: On 8/22/2023 5:52 PM, Yadav, Arvind wrote: On 8/22/2023 12:01 PM, Lazar, Lijo wrote: On 8/21/2023 12:17 PM, Arvind Yadav wrote: This patch adds a suspend function that will clear the GPU power profile before going into suspend state. v2: - Add

Re: [PATCH v2 2/7] drm/amdgpu: Add new function to set GPU power profile

2023-08-22 Thread Yadav, Arvind
On 8/22/2023 11:55 AM, Lazar, Lijo wrote: On 8/21/2023 12:17 PM, Arvind Yadav wrote: This patch adds a function which will change the GPU power profile based on a submitted job. This can optimize the power performance when the workload is on. v2: - Splitting workload_profile_set and

Re: [PATCH v2 4/7] drm/amdgpu: Add suspend function to clear the GPU power profile.

2023-08-22 Thread Yadav, Arvind
On 8/22/2023 12:01 PM, Lazar, Lijo wrote: On 8/21/2023 12:17 PM, Arvind Yadav wrote: This patch adds a suspend function that will clear the GPU power profile before going into suspend state. v2: - Add the new suspend function based on review comment. Cc: Shashank Sharma Cc: Christian

Re: [PATCH v2 3/7] drm/amdgpu: Add new function to put GPU power profile

2023-08-22 Thread Yadav, Arvind
Hi Lijo, The *_set function will set the GPU power profile and the *_put function will  schedule the smu_delayed_work task after 100ms delay. This smu_delayed_work task will clear a GPU power profile if any new jobs are not scheduled within 100 ms. But if any new job  comes within 100ms then

Re: [PATCH v2 2/7] drm/amdgpu: Add new function to set GPU power profile

2023-08-22 Thread Yadav, Arvind
On 8/21/2023 11:40 PM, Alex Deucher wrote: On Mon, Aug 21, 2023 at 1:54 PM Yadav, Arvind wrote: On 8/21/2023 9:52 PM, Alex Deucher wrote: On Mon, Aug 21, 2023 at 2:55 AM Arvind Yadav wrote: This patch adds a function which will change the GPU power profile based on a submitted job

Re: [PATCH v2 2/7] drm/amdgpu: Add new function to set GPU power profile

2023-08-21 Thread Yadav, Arvind
On 8/21/2023 11:36 PM, Alex Deucher wrote: On Mon, Aug 21, 2023 at 2:55 AM Arvind Yadav wrote: This patch adds a function which will change the GPU power profile based on a submitted job. This can optimize the power performance when the workload is on. v2: - Splitting workload_profile_set

Re: [PATCH v2 2/7] drm/amdgpu: Add new function to set GPU power profile

2023-08-21 Thread Yadav, Arvind
On 8/21/2023 9:52 PM, Alex Deucher wrote: On Mon, Aug 21, 2023 at 2:55 AM Arvind Yadav wrote: This patch adds a function which will change the GPU power profile based on a submitted job. This can optimize the power performance when the workload is on. v2: - Splitting workload_profile_set

Re: [PATCH v2 3/7] drm/amdgpu: Add new function to put GPU power profile

2023-08-21 Thread Yadav, Arvind
On 8/21/2023 7:09 PM, Shashank Sharma wrote: On 21/08/2023 08:47, Arvind Yadav wrote: This patch adds a function which will clear the GPU power profile after job finished. This is how it works: - schedular will set the GPU power profile based on ring_type. - Schedular will clear the GPU

Re: [PATCH v2 1/7] drm/amdgpu: Added init/fini functions for workload

2023-08-21 Thread Yadav, Arvind
On 8/21/2023 7:24 PM, Shashank Sharma wrote: On 21/08/2023 15:35, Yadav, Arvind wrote: On 8/21/2023 6:36 PM, Shashank Sharma wrote: Hey Arvind, On 21/08/2023 08:47, Arvind Yadav wrote: The'struct amdgpu_smu_workload' initialization/cleanup functions is added by this patch. v2

Re: [PATCH v2 5/7] drm/amdgpu: Switch on/off GPU workload profile

2023-08-21 Thread Yadav, Arvind
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 Cc: Christian Koenig Cc: Alex Deucher

Re: [PATCH v2 4/7] drm/amdgpu: Add suspend function to clear the GPU power profile.

2023-08-21 Thread Yadav, Arvind
On 8/21/2023 7:13 PM, Shashank Sharma wrote: On 21/08/2023 08:47, Arvind Yadav wrote: This patch adds a suspend function that will clear the GPU power profile before going into suspend state. v2: - Add the new suspend function based on review comment. Cc: Shashank Sharma Cc: Christian

Re: [PATCH v2 1/7] drm/amdgpu: Added init/fini functions for workload

2023-08-21 Thread Yadav, Arvind
On 8/21/2023 6:36 PM, Shashank Sharma wrote: Hey Arvind, On 21/08/2023 08:47, Arvind Yadav wrote: The'struct amdgpu_smu_workload' initialization/cleanup functions is added by this patch. v2: - Splitting big patch into separate patches. - Added new fini function. Cc: Shashank Sharma Cc:

Re: [PATCH 1/3] drm/amdgpu: Add new api to switch on/off power profile mode

2023-08-17 Thread Yadav, Arvind
On 8/14/2023 8:28 PM, Shashank Sharma wrote: Hey Arvind, On 14/08/2023 09:34, Arvind Yadav wrote: This patch adds a function which will allow to change the GPU power profile based on a submitted job. This can optimize the power performance when the workload is on. Cc: Shashank Sharma Cc:

Re: [PATCH 3/3] Revert "drm/amd/amdgpu: switch on/off vcn power profile mode"

2023-08-17 Thread Yadav, Arvind
On 8/14/2023 9:35 PM, Shashank Sharma wrote: Ah, Thanks for pointing that out Alex. @Arvind, please refer to the patch (https://patchwork.freedesktop.org/patch/504854/?series=109060=4) in previous series of SMU workload hints with UAPI (here:

Re: [PATCH 1/3] drm/amdgpu: Add new api to switch on/off power profile mode

2023-08-17 Thread Yadav, Arvind
On 8/14/2023 8:03 PM, Alex Deucher wrote: On Mon, Aug 14, 2023 at 3:35 AM Arvind Yadav wrote: This patch adds a function which will allow to change the GPU power profile based on a submitted job. This can optimize the power performance when the workload is on. A few minor comments inline

Re: [PATCH 1/3] drm/amdgpu: Add new api to switch on/off power profile mode

2023-08-14 Thread Yadav, Arvind
On 8/14/2023 5:35 PM, Christian König wrote: Am 14.08.23 um 09:34 schrieb Arvind Yadav: This patch adds a function which will allow to change the GPU power profile based on a submitted job. This can optimize the power performance when the workload is on. Cc: Shashank Sharma Cc: Christian

Re: [PATCH v3] drm/sched: Fix kernel NULL pointer dereference error

2022-10-18 Thread Yadav, Arvind
On 10/17/2022 8:20 PM, Christian König wrote: Am 17.10.22 um 16:30 schrieb Arvind Yadav: -This is purely a timing issue. Here, sometimes Job free is happening before the job is done. To fix this issue moving 'dma_fence_cb' callback from job(struct drm_sched_job) to scheduler fence (struct

Re: [PATCH v2] drm/sched: Fix kernel NULL pointer dereference error

2022-10-13 Thread Yadav, Arvind
On 10/12/2022 7:05 PM, Christian König wrote: That essentially looks like the right approach, but I would go a few steps further. I think we should add a drm_sched_fence_set_parent() function to sched_fence.c and move a good part of the handling into that C file. Just a simple signal

Re: [PATCH] drm/sched: Fix kernel NULL pointer dereference error

2022-09-30 Thread Yadav, Arvind
On 9/30/2022 4:56 PM, Christian König wrote: Am 30.09.22 um 10:48 schrieb Arvind Yadav: BUG: kernel NULL pointer dereference, address: 0088   #PF: supervisor read access in kernel mode   #PF: error_code(0x) - not-present page   PGD 0 P4D 0   Oops: [#1] PREEMPT SMP NOPTI  

Re: [PATCH 3/3] dma-buf: Check status of enable-signaling bit on debug

2022-09-30 Thread Yadav, Arvind
On 9/30/2022 12:02 AM, Christian König wrote: Am 29.09.22 um 20:30 schrieb Yadav, Arvind: On 9/29/2022 11:48 PM, Christian König wrote: Am 27.09.22 um 19:24 schrieb Arvind Yadav: Fence signaling must be enabled to make sure that the dma_fence_is_signaled_locked() function ever returns true

Re: [PATCH 3/3] dma-buf: Check status of enable-signaling bit on debug

2022-09-29 Thread Yadav, Arvind
On 9/29/2022 11:48 PM, Christian König wrote: Am 27.09.22 um 19:24 schrieb Arvind Yadav: Fence signaling must be enabled to make sure that the dma_fence_is_signaled_locked() function ever returns true. Since drivers and implementations sometimes mess this up, this ensures correct behaviour

Re: [PATCH v4 0/6] dma-buf: Check status of enable-signaling bit on debug

2022-09-15 Thread Yadav, Arvind
On 9/15/2022 5:37 PM, Christian König wrote: Is that sufficient to allow running a desktop on amdgpu with the extra check enabled? If yes that would be quite a milestone. Yes, It is running on amdgpu with extra config enabled. What's left is checking the userspace IGT tests. Especially the

Re: [PATCH v3 5/6] drm/sched: Use parent fence instead of finished

2022-09-09 Thread Yadav, Arvind
On 9/9/2022 11:02 PM, Andrey Grodzovsky wrote: What exactly is the scenario which this patch fixes in more detail please  ? GPU reset issue started after adding [PATCH 6/6]. Root cause -> In drm_sched_get_cleanup_job(), We use the finished fence status bit to check the job status

Re: [PATCH v2 2/4] dma-buf: enable signaling for the stub fence on debug

2022-09-09 Thread Yadav, Arvind
On 9/6/2022 12:39 PM, Christian König wrote: Am 05.09.22 um 18:35 schrieb Arvind Yadav: Here's on debug enabling software signaling for the stub fence which is always signaled. This fence should enable software signaling otherwise the AMD GPU scheduler will cause a GPU reset due to a GPU

Re: [PATCH 2/4] drm/sched: Add callback and enable signaling on debug

2022-09-05 Thread Yadav, Arvind
On 9/5/2022 7:16 PM, Yadav, Arvind wrote: On 9/5/2022 4:55 PM, Christian König wrote: Am 05.09.22 um 12:56 schrieb Arvind Yadav: Here's on debug adding an enable_signaling callback for finished fences and enabling software signaling for finished fence. Signed-off-by: Arvind Yadav

Re: [PATCH 3/4] dma-buf: Add callback and enable signaling on debug

2022-09-05 Thread Yadav, Arvind
On 9/5/2022 4:56 PM, Christian König wrote: Am 05.09.22 um 12:56 schrieb Arvind Yadav: Here's on debug adding an enable_signaling callback for the stub fences and enabling software signaling for the stub fence which is always signaled. This fence should enable software signaling otherwise

Re: [PATCH 2/4] drm/sched: Add callback and enable signaling on debug

2022-09-05 Thread Yadav, Arvind
On 9/5/2022 4:55 PM, Christian König wrote: Am 05.09.22 um 12:56 schrieb Arvind Yadav: Here's on debug adding an enable_signaling callback for finished fences and enabling software signaling for finished fence. Signed-off-by: Arvind Yadav ---   drivers/gpu/drm/scheduler/sched_fence.c | 12

Re: [PATCH 1/4] dma-buf: Check status of enable-signaling bit on debug

2022-09-05 Thread Yadav, Arvind
On 9/5/2022 4:51 PM, Christian König wrote: Am 05.09.22 um 12:56 schrieb Arvind Yadav: The core DMA-buf framework needs to enable signaling before the fence is signaled. The core DMA-buf framework can forget to enable signaling before the fence is signaled. To avoid this scenario on the debug