Re: [PATCH 2/3] drm/sched: Add a test for prealloced fence slots

2025-05-16 Thread Yadav, Arvind
On 5/15/2025 8:30 PM, Christian König wrote: Just to exercise the functionality. Signed-off-by: Christian König --- drivers/gpu/drm/scheduler/tests/tests_basic.c | 59 ++- 1 file changed, 58 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/scheduler/tests/tests_ba

Re: [PATCH v9 10/10] drm/amdgpu: update trace format to match gpu_scheduler_trace

2025-04-24 Thread Yadav, Arvind
Reviewed-by: Arvind Yadav On 4/24/2025 2:08 PM, Pierre-Eric Pelloux-Prayer wrote: Log fences using the same format for coherency. Signed-off-by: Pierre-Eric Pelloux-Prayer Reviewed-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_trace.h | 22 ++ 1 file change

Re: [PATCH v9 08/10] drm: get rid of drm_sched_job::id

2025-04-24 Thread Yadav, Arvind
Reviewed-by: Arvind Yadav On 4/24/2025 2:08 PM, Pierre-Eric Pelloux-Prayer wrote: Its only purpose was for trace events, but jobs can already be uniquely identified using their fence. The downside of using the fence is that it's only available after 'drm_sched_job_arm' was called which is true

Re: [PATCH v2 2/2] drm/amdgpu: Clean up error handling in amdgpu_userq_fence_driver_alloc()

2025-04-13 Thread Yadav, Arvind
Reviewed-by:Arvind Yadav On 4/12/2025 8:09 PM, Dan Carpenter wrote: 1) Checkpatch complains if we print an error message for kzalloc() failure. The kzalloc() failure already has it's own error messages built in. Also this allocation is small enough that it is guaranteed to succeed

Re: [PATCH v2 1/2] drm/amdgpu: Fix double free in amdgpu_userq_fence_driver_alloc()

2025-04-13 Thread Yadav, Arvind
Reviewed-by:Reviewed-by:Arvind Yadav On 4/12/2025 8:09 PM, Dan Carpenter wrote: The goto frees "fence_drv" so this is a double free bug. There is no need to call amdgpu_seq64_free(adev, fence_drv->va) since the seq64 allocation failed so change the goto to goto free_fence_drv. Also propagate

Re: [PATCH next] drm/amdgpu: Fix double free in amdgpu_userq_fence_driver_alloc()

2025-04-10 Thread Yadav, Arvind
Please change this also instead of 'goto free_fence_drv' just return err.     fence_drv = kzalloc(sizeof(*fence_drv), GFP_KERNEL);     if (!fence_drv) {     DRM_ERROR("Failed to allocate memory for fence driver\n");     r = -ENOMEM;     goto free_fence_

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: - Add

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 Si

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 patch

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 set/

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 if

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 workloa

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 Koen

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 t

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: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. This

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 an

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 and

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 Powe

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

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 Signe

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 Koen

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: Chr

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: Ch

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&rev=4) in previous series of SMU workload hints with UAPI (here: https://patchwork.freedesktop.org/series/109

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 bel

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 Koe

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 drm_

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 functi

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 whe

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 dma_fence

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 sch

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

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 th

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