Re: [PATCH v9 3/4] drm/amdgpu: add debugfs support for VM pagetable per client

2025-07-03 Thread Khatri, Sunil
On 7/3/2025 1:30 PM, Christian König wrote: On 01.07.25 18:49, Sunil Khatri wrote: Add a debugfs file under the client directory which shares the root page table base address of the VM. This address could be used to dump the pagetable for debug memory issues. Signed-off-by: Sunil Khatri ---

Re: [PATCH v8 1/4] drm: move drm based debugfs funcs to drm_debugfs.c

2025-07-01 Thread Khatri, Sunil
On 7/1/2025 8:50 PM, Jeff Hugo wrote: On 7/1/2025 7:02 AM, Khatri, Sunil wrote: [AMD Official Use Only - AMD Internal Distribution Only] I cannot review this message with this restriction.  In my opinion, your email client is not properly configured for interfacing with the community

RE: [PATCH v8 1/4] drm: move drm based debugfs funcs to drm_debugfs.c

2025-07-01 Thread Khatri, Sunil
...@kernel.org; d...@kernel.org; linux-ker...@vger.kernel.org; Oded Gabbay ; Khatri, Sunil Subject: [PATCH v8 1/4] drm: move drm based debugfs funcs to drm_debugfs.c Requirement is to create per client-id based directories to hold key debugging information and for that access to root debugfs

Re: [PATCH v7 1/5] drm: move the debugfs accel driver code to drm layer

2025-07-01 Thread Khatri, Sunil
On 6/30/2025 8:49 PM, Jeff Hugo wrote: On 6/30/2025 8:36 AM, Sunil Khatri wrote: I don't see a cover letter on list. Surely there should be one? Yes there is one with the first version of patches. Looks like you didn't send this to the Accel maintainer. Did you forget to run the get_mainta

Re: [PATCH v7 1/5] drm: move the debugfs accel driver code to drm layer

2025-07-01 Thread Khatri, Sunil
On 7/1/2025 12:04 AM, Christian König wrote: On 30.06.25 16:36, Sunil Khatri wrote: Move the debugfs accel driver code to the drm layer and it is an intermediate step to move all debugfs related handling into drm_debugfs.c Signed-off-by: Sunil Khatri Reviewed-by: Christian König --- driv

Re: [PATCH v6 2/5] drm: move debugfs functionality from drm_drv.c to drm_debugfs.c

2025-06-30 Thread Khatri, Sunil
On 6/30/2025 5:11 PM, Christian König wrote: On 27.06.25 11:49, Sunil Khatri wrote: move the debugfs functions from drm_drv.c to drm_debugfs.c move this root node to the debugfs for easily handling of future requirements to add more information in the root directory and one of which is plann

Re: [PATCH v5 4/5] drm/amdgpu: add debugfs support for VM pagetable per client

2025-06-26 Thread Khatri, Sunil
On 6/26/2025 5:48 PM, Christian König wrote: On 24.06.25 13:34, Sunil Khatri wrote: Each drm node is associated with a unique client-id. Create a directory for each drm-file in the dri root directory. This directory is unique to hold information related to a client id which is unique in the sy

Re: [PATCH v5 3/5] drm: add debugfs support on per client-id basis

2025-06-26 Thread Khatri, Sunil
On 6/26/2025 5:34 PM, Christian König wrote: On 24.06.25 13:34, Sunil Khatri wrote: add support to add a directory for each client-id with root at the dri level. Since the clients are unique and not just related to one single drm device, so it makes more sense to add all the client based nodes

Re: [PATCH v5 1/5] drm: move the debugfs accel driver code to drm layer

2025-06-26 Thread Khatri, Sunil
On 6/26/2025 5:26 PM, Christian König wrote: On 24.06.25 13:34, Sunil Khatri wrote: move the debugfs accel driver code to the drm layer. This is first inline change to move the debugfs related changes for drm to drm_debugfs.c Maybe write something like this: Noted Regards Sunil "And int

Re: [PATCH v5 3/5] drm: add debugfs support on per client-id basis

2025-06-26 Thread Khatri, Sunil
On 6/26/2025 7:07 PM, Tvrtko Ursulin wrote: On 24/06/2025 12:34, Sunil Khatri wrote: add support to add a directory for each client-id with root at the dri level. Since the clients are unique and not just related to one single drm device, so it makes more sense to add all the client based nod

Re: [PATCH v5 2/5] drm: move debugfs functionality from drm_drv.c to drm_debugfs.c

2025-06-26 Thread Khatri, Sunil
On 6/26/2025 5:28 PM, Christian König wrote: On 24.06.25 13:34, Sunil Khatri wrote: move the debugfs functions from drm_drv.c to drm_debugfs.c move this root node to the debugfs for easily handling of future requirements to add more information in the root directory and one of which is plann

Re: [PATCH v1 0/2] debugfs support for pt base for each vm

2025-06-23 Thread Khatri, Sunil
On 6/20/2025 6:10 PM, Tvrtko Ursulin wrote: On 13/06/2025 08:15, Sunil Khatri wrote: root@amd-X570-AORUS-ELITE:~# cat /sys/kernel/debug/dri/0/clients   command  tgid dev master a   uid magic name client-id    systemd-logind  1056   0   y    y 0 0 5 Xwayla

Re: [PATCH v4 2/4] drm: add debugfs support on per client-id basis

2025-06-23 Thread Khatri, Sunil
On 6/23/2025 2:58 PM, Tvrtko Ursulin wrote: On 18/06/2025 14:47, Sunil Khatri wrote: add support to add a directory for each client-id with root at the dri level. Since the clients are unique and not just related to one single drm device, so it makes more sense to add all the client based no

Re: [PATCH v4 1/4] drm: move debugfs functionality from drm_drv.c to drm_debugfs.c

2025-06-19 Thread Khatri, Sunil
On 6/19/2025 10:37 AM, Khatri, Sunil wrote: On 6/18/2025 7:38 PM, Christian König wrote: On 6/18/25 15:47, Sunil Khatri wrote: move the functions from drm_drv.c which uses the static drm_debugfs_root as parent node in the debugfs by drm. move this root node to the debugfs for easily

Re: [PATCH v4 1/4] drm: move debugfs functionality from drm_drv.c to drm_debugfs.c

2025-06-18 Thread Khatri, Sunil
On 6/18/2025 7:38 PM, Christian König wrote: On 6/18/25 15:47, Sunil Khatri wrote: move the functions from drm_drv.c which uses the static drm_debugfs_root as parent node in the debugfs by drm. move this root node to the debugfs for easily handling of future requirements to add more informati

Re: [PATCH v2 2/2] drm: add debugfs support on per client-id basis

2025-06-16 Thread Khatri, Sunil
On 6/16/2025 6:26 PM, Christian König wrote: On 6/16/25 14:25, Khatri, Sunil wrote: On 6/16/2025 5:41 PM, Christian König wrote: On 6/16/25 12:05, Sunil Khatri wrote: add support to add a directory for each client-id with root at the dri level. Since the clients are unique and not just

Re: [PATCH v2 2/2] drm: add debugfs support on per client-id basis

2025-06-16 Thread Khatri, Sunil
On 6/16/2025 5:41 PM, Christian König wrote: On 6/16/25 12:05, Sunil Khatri wrote: add support to add a directory for each client-id with root at the dri level. Since the clients are unique and not just related to one single drm device, so it makes more sense to add all the client based nodes

Re: [PATCH v1 0/2] debugfs support for pt base for each vm

2025-06-13 Thread Khatri, Sunil
On 6/13/2025 2:30 PM, Christian König wrote: On 6/13/25 09:15, Sunil Khatri wrote: root@amd-X570-AORUS-ELITE:~# cat /sys/kernel/debug/dri/0/clients command tgid dev master a uid magic name client-id syst

RE: [PATCH] Revert "drm/amdgpu: promote the implicit sync to the dependent read fences"

2025-05-27 Thread Khatri, Sunil
[AMD Official Use Only - AMD Internal Distribution Only] -Original Message- From: Koenig, Christian Sent: Tuesday, May 27, 2025 2:32 PM To: Khatri, Sunil ; amd-gfx@lists.freedesktop.org; Deucher, Alexander Subject: Re: [PATCH] Revert "drm/amdgpu: promote the implicit sync t

RE: [PATCH] drm/amdgpu: fix use-after-unlock in eviction fence destroy

2025-05-15 Thread Khatri, Sunil
[AMD Official Use Only - AMD Internal Distribution Only] Reviewed-by: Sunil Khatri -Original Message- From: Koenig, Christian Sent: Thursday, May 15, 2025 2:30 PM To: Yadav, Arvind ; Deucher, Alexander ; Khatri, Sunil Cc: amd-gfx@lists.freedesktop.org Subject: Re: [PATCH] drm/amdgpu

RE: [PATCH v2] drm/amdgpu: Fix NULL dereference in amdgpu_userq_restore_worker

2025-05-08 Thread Khatri, Sunil
[AMD Official Use Only - AMD Internal Distribution Only] Reviewed-by: Sunil Khatri -Original Message- From: Yadav, Arvind Sent: Thursday, May 8, 2025 11:06 AM To: Koenig, Christian ; Deucher, Alexander ; Khatri, Sunil Cc: amd-gfx@lists.freedesktop.org; Yadav, Arvind ; Koenig

RE: [PATCH] drm/amdgpu: Fix amdgpu_userq_wait_ioctl() warn missing error code 'r'

2025-05-07 Thread Khatri, Sunil
[AMD Official Use Only - AMD Internal Distribution Only] Reviewed-by: Sunil Khatri -Original Message- From: Yadav, Arvind Sent: Thursday, May 8, 2025 11:50 AM To: Koenig, Christian ; Deucher, Alexander ; Khatri, Sunil ; Paneer Selvam, Arunpravin ; dan.carpen...@linaro.org Cc: amd-gfx

RE: [PATCH v2] drm/amdgpu: fix the indentation

2025-05-07 Thread Khatri, Sunil
[AMD Official Use Only - AMD Internal Distribution Only] @Yadav, Arvind<mailto:arvind.ya...@amd.com> -Original Message- From: Sunil Khatri Sent: Wednesday, May 7, 2025 3:00 PM To: amd-gfx@lists.freedesktop.org; Deucher, Alexander ; Koenig, Christian Cc: Dan Carpenter ;

RE: [PATCH v4 2/2] drm/amdgpu: only keep most recent fence for each context

2025-05-02 Thread Khatri, Sunil
, Arvind ; Deucher, Alexander ; Khatri, Sunil ; Paneer Selvam, Arunpravin Cc: amd-gfx@lists.freedesktop.org Subject: Re: [PATCH v4 2/2] drm/amdgpu: only keep most recent fence for each context On 4/30/25 18:05, Arvind Yadav wrote: > Mesa passes shared bo, fence syncobj to userq_ioctl. > The

RE: [PATCH v4 1/2] dma-fence: Add helper to sort and deduplicate dma_fence arrays

2025-05-02 Thread Khatri, Sunil
[AMD Official Use Only - AMD Internal Distribution Only] Reviewed-by: Sunil Khatri -Original Message- From: Koenig, Christian Sent: Friday, May 2, 2025 1:25 PM To: Yadav, Arvind ; Deucher, Alexander ; Khatri, Sunil ; Paneer Selvam, Arunpravin Cc: amd-gfx@lists.freedesktop.org

Re: [PATCH V8 1/5] drm: add drm_file_err function to add process info

2025-04-28 Thread Khatri, Sunil
On 4/22/2025 2:33 PM, Christian König wrote: Am 17.04.25 um 18:10 schrieb Sunil Khatri: Add a drm helper function which appends the process information for the drm_file over drm_err formatted output. v5: change to macro from function (Christian Koenig) add helper functions for lock/unloc

Re: [PATCH 1/8] drm/amdgpu: add UAPI to create user queue gangs

2025-04-28 Thread Khatri, Sunil
Small edit, Series is Acked-by: Sunil Khatri On 4/28/2025 3:32 PM, Khatri, Sunil wrote: LGTM functionally, Acked-by: Sunil Khatri But i would like @christian to look once as he is one of the original author of gang submission. Regards, Sunil khatri On 4/26/2025 12:11 AM, Alex Deucher

Re: [PATCH 1/8] drm/amdgpu: add UAPI to create user queue gangs

2025-04-28 Thread Khatri, Sunil
LGTM functionally, Acked-by: Sunil Khatri But i would like @christian to look once as he is one of the original author of gang submission. Regards, Sunil khatri On 4/26/2025 12:11 AM, Alex Deucher wrote: Queues in a gang will schedule together. Signed-off-by: Alex Deucher --- include/ua

Re: [PATCH 1/9] drm/amdgpu/mes: remove more unused functions

2025-04-28 Thread Khatri, Sunil
Series Reviewed-by: Sunil Khatri Apart from a minor comment in patch no 6 if applicable,  rest of the series LGTM. On 4/26/2025 12:08 AM, Alex Deucher wrote: These were leftover from mes bring up and are unused. Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/amdgpu_mes.c | 62

Re: [PATCH 6/9] drm/amdgpu/userq: add force completion helpers

2025-04-28 Thread Khatri, Sunil
On 4/26/2025 12:08 AM, Alex Deucher wrote: Add support for forcing completion of userq fences. This is needed for userq resets and asic resets so that we can set the error on the fence and force completion. Signed-off-by: Alex Deucher --- .../gpu/drm/amd/amdgpu/amdgpu_userq_fence.c | 42 +

RE: [PATCH v2] drm/amdgpu: only keep most recent fence for each context

2025-04-23 Thread Khatri, Sunil
[AMD Official Use Only - AMD Internal Distribution Only] You need to split this in a dma_buf patch and amd userq patch separately. Regards Sunil Khatri -Original Message- From: Yadav, Arvind Sent: Wednesday, April 23, 2025 4:18 PM To: Koenig, Christian ; Deucher, Alexander ; Khatri

Re: [PATCH v2] drm/amdgpu: remove DRM_AMDGPU_NAVI3X_USERQ config for UQ

2025-04-23 Thread Khatri, Sunil
LGTM, Reviewed-by: Sunil Khatri I think you should also get an acknowledgement from Alex too before pushing to ASDN. Regards Sunil khatri On 4/23/2025 3:03 PM, Arvind Yadav wrote: DRM_AMDGPU_NAVI3X_USERQ config support is not required for usermode queue. v2: rebase. Cc: Alex Deucher Cc:

Re: [PATCH V8 2/5] drm/amdgpu: add drm_file reference in userq_mgr

2025-04-22 Thread Khatri, Sunil
On 4/22/2025 2:07 PM, Christian König wrote: Am 17.04.25 um 18:10 schrieb Sunil Khatri: drm_file will be used in usermode queues code to enable better process information in logging and hence add drm_file part of the userq_mgr struct. update the drm_file pointer in userq_mgr for each amdgpu_d

RE: [PATCH v1] drm/amdgpu: update fence ptr with context:seqno

2025-04-21 Thread Khatri, Sunil
[AMD Official Use Only - AMD Internal Distribution Only] -Original Message- From: Sunil Khatri Sent: Monday, April 21, 2025 5:51 PM To: Deucher, Alexander ; Koenig, Christian Cc: amd-gfx@lists.freedesktop.org; Khatri, Sunil ; Tvrtko Ursulin Subject: [PATCH v1] drm/amdgpu: update

Re: [PATCH 1/2] drm/ttm: fix the warning for hit_low and evict_low

2025-04-18 Thread Khatri, Sunil
On 4/17/2025 5:01 PM, Tvrtko Ursulin wrote: On 17/04/2025 10:34, Sunil Khatri wrote: fix the below warning messages: ttm/ttm_bo.c:1098: warning: Function parameter or struct member 'hit_low' not described in 'ttm_bo_swapout_walk' ttm/ttm_bo.c:1098: warning: Function parameter or struct membe

RE: [PATCH v6 1/5] drm: add macro drm_file_err to print process info

2025-04-17 Thread Khatri, Sunil
[AMD Official Use Only - AMD Internal Distribution Only] -Original Message- From: Jani Nikula Sent: Thursday, April 17, 2025 5:00 PM To: Koenig, Christian ; Khatri, Sunil ; dri-de...@lists.freedesktop.org; amd-gfx@lists.freedesktop.org Cc: Deucher, Alexander ; Tvrtko Ursulin ; Pelloux

Re: [PATCH V6 3/5] drm/amdgpu: use drm_file_err in fence timeouts

2025-04-17 Thread Khatri, Sunil
On 4/17/2025 7:11 PM, Tvrtko Ursulin wrote: On 17/04/2025 13:31, Sunil Khatri wrote: use drm_file_err instead of DRM_ERROR which adds process and pid information in the userqueue error logging. Sample log: [   42.444297] [drm:amdgpu_userqueue_wait_for_signal [amdgpu]] *ERROR* Timed out wait

Re: [PATCH V6 1/5] drm: add drm_file_err function to add process info

2025-04-17 Thread Khatri, Sunil
For rest of the patches which are part of the amdgpu tree will push incorporating changes as shared by @Tvrtko Ursulin once drm change is merged. Thanks a lot all for the reviews. Regards Sunil Khatri On 4/17/2025 6:01 PM, Sunil Khatri wrote: Add a drm helper function which append the proc

Re: [PATCH V6 1/5] drm: add drm_file_err function to add process info

2025-04-17 Thread Khatri, Sunil
On 4/17/2025 7:04 PM, Tvrtko Ursulin wrote: On 17/04/2025 13:31, Sunil Khatri wrote: Add a drm helper function which append the process information for appends Noted the drm_file over drm_err formated output. formatted 'Noted v5: change to macro from function (Christian Koenig)   

Re: [PATCH] drm/schedular: fix the warning in drm_sched_job_done

2025-04-17 Thread Khatri, Sunil
On 4/17/2025 3:01 PM, Tvrtko Ursulin wrote: [Added Philipp and Danilo to cc.] On 17/04/2025 10:25, Sunil Khatri wrote: Fix the below warning. scheduler/sched_main.c:397: warning: Function parameter or struct member 'result' not described in 'drm_sched_job_done' Signed-off-by: Sunil Khatri

Re: [PATCH v1] drm/sched: fix the warning in drm_sched_job_done

2025-04-17 Thread Khatri, Sunil
On 4/17/2025 3:51 PM, Tvrtko Ursulin wrote: On 17/04/2025 11:01, Sunil Khatri wrote: Fix the below warning. scheduler/sched_main.c:397: warning: Function parameter or struct member 'result' not described in 'drm_sched_job_done' Reviewed-by: Tvrtko Ursulin Signed-off-by: Sunil Khatri ---

Re: [PATCH v4 1/5] drm: add macro drm_file_err to print process info

2025-04-17 Thread Khatri, Sunil
On 4/16/2025 7:55 PM, Jani Nikula wrote: On Wed, 16 Apr 2025, Sunil Khatri wrote: Add a drm helper macro which append the process information for the drm_file over drm_err. Signed-off-by: Sunil Khatri --- include/drm/drm_file.h | 41 + 1 file changed,

Re: [PATCH v4 1/5] drm: add macro drm_file_err to print process info

2025-04-16 Thread Khatri, Sunil
On 4/16/2025 7:55 PM, Jani Nikula wrote: On Wed, 16 Apr 2025, Sunil Khatri wrote: Add a drm helper macro which append the process information for the drm_file over drm_err. Signed-off-by: Sunil Khatri --- include/drm/drm_file.h | 41 + 1 file changed,

Re: [PATCH v3 3/4] drm/amdgpu: use drm_file_err in logging to also dump process information

2025-04-16 Thread Khatri, Sunil
On 4/16/2025 5:37 PM, Pierre-Eric Pelloux-Prayer wrote: Hi, Le 16/04/2025 à 12:01, Khatri, Sunil a écrit : On 4/16/2025 12:56 PM, Tvrtko Ursulin wrote: On 15/04/2025 19:43, Sunil Khatri wrote: add process and pid information in the userqueue error logging to make it more useful in

Re: [PATCH v3 3/4] drm/amdgpu: use drm_file_err in logging to also dump process information

2025-04-16 Thread Khatri, Sunil
On 4/16/2025 12:56 PM, Tvrtko Ursulin wrote: On 15/04/2025 19:43, Sunil Khatri wrote: add process and pid information in the userqueue error logging to make it more useful in resolving the error by logs. Sample log: [   42.444297] [drm:amdgpu_userqueue_wait_for_signal [amdgpu]] *ERROR* Time

Re: [PATCH v3 2/4] drm/amdgpu: add drm_file reference in userq_mgr

2025-04-16 Thread Khatri, Sunil
On 4/16/2025 12:59 PM, Tvrtko Ursulin wrote: On 15/04/2025 19:43, Sunil Khatri wrote: drm_file will be used in usermode queues code to enable better process information in logging and hence add drm_file part of the userq_mgr struct. update the drm_file pointer in userq_mgr for each amdgpu_dr

Re: [PATCH v3 1/4] drm: add function drm_file_err to print proc information too

2025-04-16 Thread Khatri, Sunil
On 4/16/2025 12:37 PM, Tvrtko Ursulin wrote: On 15/04/2025 19:43, Sunil Khatri wrote: Add a drm helper function which get the process information for the drm_file and append the process information using the existing drm_err. Signed-off-by: Sunil Khatri ---   include/drm/drm_file.h | 40 +++

Re: [PATCH v3 4/4] drm/amdgpu: change DRM_ERROR to drm_file_err in amdgpu_userqueue.c

2025-04-16 Thread Khatri, Sunil
On 4/16/2025 12:48 PM, Tvrtko Ursulin wrote: On 15/04/2025 19:43, Sunil Khatri wrote: change the DRM_ERROR to drm_file_err which gives the drm device information too which is useful in case of multiple GPU's and also add process information. Signed-off-by: Sunil Khatri ---   drivers/gpu/drm

Re: [PATCH] drm/amdgpu/userq: rework driver parameter

2025-04-15 Thread Khatri, Sunil
Functionally code looks good to me for the intended purposes Reviewed-by: Sunil Khatri On 4/14/2025 11:52 PM, Alex Deucher wrote: Replace disable_kq parameter with user_queue parameter. The parameter has the following logic: -1 = auto (ASIC specific default) 0 = user queues disabled 1 =

Re: [PATCH 3/4] drm/sdma6: properly reference trap interrupts for userqs

2025-04-15 Thread Khatri, Sunil
On 4/14/2025 9:02 PM, Alex Deucher wrote: On Mon, Apr 14, 2025 at 5:59 AM Khatri, Sunil wrote: Same explanation as patch 1 of the series here too. Do we want to depend on the disable_kq flag solely to enable/disable sdma trap. IIUC, we dont want to do it in case of kernel queues at all and

Re: [PATCH v2 1/4] drm: function to get process name and pid

2025-04-15 Thread Khatri, Sunil
On 4/15/2025 5:10 PM, Tvrtko Ursulin wrote: On 15/04/2025 12:25, Sunil Khatri wrote: Add helper function which get the process information for the drm_file and updates the user provided character buffer with the information of process name and pid as a string. Signed-off-by: Sunil Khatri --

Re: [PATCH V3 4/4] drm/amdgpu/userq: integrate with enforce isolation

2025-04-15 Thread Khatri, Sunil
On 4/15/2025 12:50 AM, Alex Deucher wrote: Enforce isolation serializes access to the GFX IP. User queues are isolated in the MES scheduler, but we still need to serialize between kernel queues and user queues. For enforce isolation, group KGD user queues with KFD user queues. v2: split out v

Re: [PATCH v1 1/3] drm: function to get process name and pid

2025-04-15 Thread Khatri, Sunil
On 4/15/2025 2:14 PM, Tvrtko Ursulin wrote: On 14/04/2025 18:58, Christian König wrote: Adding Pierre-eric and Tvrtko as well. Thanks! Am 11.04.25 um 15:04 schrieb Sunil Khatri: Add helper function which get the process information for the drm_file and updates the user provided character

Re: [PATCH 3/4] drm/amdgpu: rename enforce isolation variables

2025-04-14 Thread Khatri, Sunil
Acked-by: Sunil Khatri On 4/14/2025 10:42 PM, Alex Deucher wrote: Since they will be used for both KFD and KGD user queues, rename them from kfd to userq. No intended functional change. Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 2 +- drivers/gpu/drm/amd/

Re: [PATCH 4/4] drm/amdgpu/userq: integrate with enforce isolation

2025-04-14 Thread Khatri, Sunil
If i am not wrong @arvind  is already having the patch to remove this config. Should we use the function pointer check as being used in EOP and SDMA functions ? Regards Sunil Khatri On 4/14/2025 10:42 PM, Alex Deucher wrote: Enforce isolation serializes access to the GFX IP. User queues are

Re: [PATCH 1/4] drm/amdgpu/gfx11: properly reference EOP interrupts for userqs

2025-04-14 Thread Khatri, Sunil
Series is Reviewed-by: Sunil Khatri On 4/13/2025 9:36 PM, Alex Deucher wrote: Regardless of whether we disable kernel queues, we need to take an extra reference to the pipe interrupts for user queues to make sure they stay enabled in case we disable them for kernel queues. Signed-off-by: Alex

Re: [PATCH 4/4] drm/sdma7: properly reference trap interrupts for userqs

2025-04-14 Thread Khatri, Sunil
Reviewed-by: Sunil Khatri On 4/13/2025 9:36 PM, Alex Deucher wrote: We need to take a reference to the interrupts to make sure they stay enabled even if the kernel queues have disabled them. Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/sdma_v7_0.c | 31

Re: [PATCH 1/4] drm/amdgpu/gfx11: properly reference EOP interrupts for userqs

2025-04-14 Thread Khatri, Sunil
On 4/14/2025 10:54 PM, Alex Deucher wrote: On Mon, Apr 14, 2025 at 1:17 PM Khatri, Sunil wrote: On 4/14/2025 8:59 PM, Alex Deucher wrote: On Mon, Apr 14, 2025 at 5:44 AM Khatri, Sunil wrote: This is how i see the future of this code and we can do based on it now itself. disable_kq = 0, Use

Re: [PATCH 1/4] drm/amdgpu/gfx11: properly reference EOP interrupts for userqs

2025-04-14 Thread Khatri, Sunil
On 4/14/2025 8:59 PM, Alex Deucher wrote: On Mon, Apr 14, 2025 at 5:44 AM Khatri, Sunil wrote: This is how i see the future of this code and we can do based on it now itself. disable_kq = 0, Use kernel queues. disable_kq = 1, Use User queues. disable_kq = 0 means allow kernel queues and user

Re: [PATCH 3/4] drm/sdma6: properly reference trap interrupts for userqs

2025-04-14 Thread Khatri, Sunil
Same explanation as patch 1 of the series here too. Do we want to depend on the disable_kq flag solely to enable/disable sdma trap. IIUC, we dont want to do it in case of kernel queues at all and only needed when using userqueue and that is taken care by using the flag disable_kq. Regards Suni

Re: [PATCH 1/4] drm/amdgpu/gfx11: properly reference EOP interrupts for userqs

2025-04-14 Thread Khatri, Sunil
it based on the fw version. so this will be an additional loop and get/put when kernel queues are being used. Regards Sunil Khatri On 4/14/2025 3:12 PM, Khatri, Sunil wrote: This is how i see the future of this code and we can do based on it now itself. disable_kq = 0, Use kernel queues. disable

Re: [PATCH 1/4] drm/amdgpu/gfx11: properly reference EOP interrupts for userqs

2025-04-14 Thread Khatri, Sunil
This is how i see the future of this code and we can do based on it now itself. disable_kq = 0, Use kernel queues. disable_kq = 1, Use User queues. In case of kernel queues we should not be even calling gfx_v11_0_set_userq_eop_interrupts at all. Instead its better if we add a this check "if (a

Re: [PATCH] drm/amdgpu/userq: move runpm handling into core userq code

2025-04-14 Thread Khatri, Sunil
On 4/13/2025 11:54 PM, Alex Deucher wrote: Pull it out of the MES code and into the generic code. It's not MES specific and needs to be applied to all user queues regardless of the backend. Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/amdgpu_userqueue.c | 13 + driv

Re: [PATCH v1 1/3] drm: function to get process name and pid

2025-04-13 Thread Khatri, Sunil
Ping? On 4/11/2025 6:34 PM, Sunil Khatri wrote: Add helper function which get the process information for the drm_file and updates the user provided character buffer with the information of process name and pid as a string. Signed-off-by: Sunil Khatri --- drivers/gpu/drm/drm_file.c | 30

Re: [PATCH 10/10] drm/amdgpu/userq: integrate with enforce isolation

2025-04-13 Thread Khatri, Sunil
Acked-by: Sunil Khatri On 4/12/2025 12:18 AM, Alex Deucher wrote: Enforce isolation serializes access to the GFX IP. User queues are isolated in the MES scheduler, but we still need to serialize between kernel queues and user queues. For enforce isolation, group KGD user queues with KFD user q

Re: [PATCH V2 09/10] drm/amdgpu/userq: add helpers to start/stop scheduling

2025-04-13 Thread Khatri, Sunil
Reviewed-by: Sunil Khatri On 4/12/2025 12:18 AM, Alex Deucher wrote: This will be used to stop/start user queue scheduling for example when switching between kernel and user queues when enforce isolation is enabled. v2: use idx Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/amd

Re: [PATCH 08/10] drm/amdgpu/userq: track the xcp_id associated with the queue

2025-04-13 Thread Khatri, Sunil
Reviewed-by: Sunil Khatri On 4/12/2025 12:18 AM, Alex Deucher wrote: Track this to align with KFD for enforce isolation handling. Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/amdgpu_userqueue.h | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/amd/amdgpu/amd

Re: [PATCH 04/13] drm/amdgpu/mes12: add conversion for priority levels

2025-04-11 Thread Khatri, Sunil
Same comment here as MES11 that once we have confirmation we might plan to use same function for all. Reviewed-by: Sunil Khatri On 4/11/2025 12:23 AM, Alex Deucher wrote: Convert driver priority levels to MES11 priority levels. At the moment they are the same, but they may not always be. Sign

Re: [PATCH 8/9] drm/amdgpu/userq: add helpers to start/stop scheduling

2025-04-11 Thread Khatri, Sunil
On 4/11/2025 10:22 PM, Alex Deucher wrote: On Fri, Apr 11, 2025 at 12:17 PM Khatri, Sunil wrote: On 4/11/2025 7:42 PM, Alex Deucher wrote: This will be used to stop/start user queue scheduling for example when switching between kernel and user queues when enforce isolation is enabled

Re: [PATCH 11/13] drm/amdgpu/gfx12: add support for TMZ queues to mqd_init

2025-04-11 Thread Khatri, Sunil
Reviewed-by: Sunil Khatri On 4/11/2025 12:24 AM, Alex Deucher wrote: Set up TMZ for queues. Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/gfx_v12_0.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v12_0.c b/drivers/gpu/drm/amd/amdgpu/gf

Re: [PATCH 09/13] drm/amdgpu: add tmz queue parameter to mqd props

2025-04-11 Thread Khatri, Sunil
Reviewed-by: Sunil Khatri On 4/11/2025 12:23 AM, Alex Deucher wrote: Use this to track the whether we want TMZ for queues. Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/amdgpu.h | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu.h b/drivers/

Re: [PATCH 13/13] drm/amdgpu/userq: enable support for secure queues

2025-04-11 Thread Khatri, Sunil
Reviewed-by: Sunil Khatri On 4/11/2025 12:24 AM, Alex Deucher wrote: Enable users to create secure GFX/compute queues. Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/amdgpu_userqueue.c | 11 ++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/d

Re: [PATCH 9/9] drm/amdgpu/userq: integrate with enforce isolation

2025-04-11 Thread Khatri, Sunil
Are we replacing the kfx user queue with KGD userqueue names here? Also this looks like KFD user queue and KGD userqueue are both treated at par ? Looks good in general if the above understanding is correct. Some one with better understanding of isolation should review. Acked-by: Sunil Khatri

Re: [PATCH 12/13] drm/amdgpu/userq/mes: pass the secure flag to mqd init

2025-04-11 Thread Khatri, Sunil
Reviewed-by: Sunil Khatri On 4/11/2025 12:24 AM, Alex Deucher wrote: So that we initialize the MQD as a secure queue. Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/mes_userqueue.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/mes_userqueue.

Re: [PATCH 10/13] drm/amdgpu/gfx11: add support for TMZ queues to mqd_init

2025-04-11 Thread Khatri, Sunil
Reviewed-by: Sunil Khatri On 4/11/2025 12:23 AM, Alex Deucher wrote: Set up TMZ for queues. Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c b/drivers/gpu/drm/amd/amdgpu/gf

Re: [PATCH 08/13] drm/amdgpu/userq: add UAPI for setting up secure queues

2025-04-11 Thread Khatri, Sunil
Reviewed-by: Sunil Khatri On 4/11/2025 12:23 AM, Alex Deucher wrote: If the queues needs to access TMZ surfaces, it must be set up as secure. Signed-off-by: Alex Deucher --- include/uapi/drm/amdgpu_drm.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/uapi/drm/amdgpu_drm.h b/

Re: [PATCH 07/13] drm/amdgpu/userq: enable support for queue priorities

2025-04-11 Thread Khatri, Sunil
A small comment otherwise it looks great. Reviewed-by: Sunil Khatri On 4/11/2025 12:23 AM, Alex Deucher wrote: Enable users to create queues at different priority levels. The highest level is restricted to drm master. Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/amdgpu_userque

Re: [PATCH 06/13] drm/amdgpu/userq/mes: handle user queue priority

2025-04-11 Thread Khatri, Sunil
Reviewed-by: Sunil Khatri On 4/11/2025 12:23 AM, Alex Deucher wrote: Handle the queue priority set by the user. Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/mes_userqueue.c | 17 - 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/a

Re: [PATCH 05/13] drm/amdgpu/user: add priorty to user queue structure

2025-04-11 Thread Khatri, Sunil
Reviewed-by: Sunil Khatri On 4/11/2025 12:23 AM, Alex Deucher wrote: So we can track this when we create user queues. Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/amdgpu_userqueue.h | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_userqueu

Re: [PATCH 03/13] drm/amdgpu/mes11: add conversion for priority levels

2025-04-11 Thread Khatri, Sunil
Do you expect priority level in MES11 12 and probably 13 too ? If they are same then we should be using the same conversion function for all versions of MES. For now its fine. Reviewed-by: Sunil Khatri On 4/11/2025 12:23 AM, Alex Deucher wrote: Convert driver priority levels to MES11 priority

Re: [PATCH 01/13] drm/amdgpu: convert userq UAPI _pad to flags

2025-04-11 Thread Khatri, Sunil
Reviewed-by: Sunil Khatri On 4/11/2025 12:23 AM, Alex Deucher wrote: Reuse the _pad field for flags. Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/amdgpu_userqueue.c | 4 ++-- include/uapi/drm/amdgpu_drm.h | 5 - 2 files changed, 6 insertions(+), 3 deletio

Re: [PATCH 02/13] drm/amdgpu/userq: add UAPI for setting queue priority

2025-04-11 Thread Khatri, Sunil
Reviewed-by: Sunil Khatri On 4/11/2025 12:23 AM, Alex Deucher wrote: Allow the user to set a queue priority levels: 0 - normal low - most apps (maps to MES AMD_PRIORITY_LEVEL_NORMAL) 1 - low - background jobs (maps to MES AMD_PRIORITY_LEVEL_LOW) 2 - normal high - apps that need relative high (m

Re: [PATCH] drm/amdgpu/userq/mes: remove unused header

2025-04-11 Thread Khatri, Sunil
Reviewed-by: Sunil Khatri On 4/10/2025 11:48 PM, Alex Deucher wrote: This is unused so remove it. Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/mes_userqueue.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/mes_userqueue.c b/drivers/gpu/drm/amd/

Re: [PATCH] drm/amdgpu: fix no_user_submission check for SDMA

2025-04-11 Thread Khatri, Sunil
Reviewed-by: Sunil Khatri On 4/11/2025 6:20 PM, Alex Deucher wrote: Copy paste typo. Use the flag from the sdma structure. Fixes: 4310acd4464b ("drm/amdgpu: add ring flag for no user submissions") Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 2 +- 1 file chang

Re: [PATCH 8/9] drm/amdgpu/userq: add helpers to start/stop scheduling

2025-04-11 Thread Khatri, Sunil
On 4/11/2025 7:42 PM, Alex Deucher wrote: This will be used to stop/start user queue scheduling for example when switching between kernel and user queues when enforce isolation is enabled. Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/amdgpu.h | 1 + drivers/gpu/drm

Re: [PATCH 7/9] drm/amdgpu: don't swallow errors in amdgpu_userqueue_resume_all()

2025-04-11 Thread Khatri, Sunil
Reviewed-by: Sunil Khatri On 4/11/2025 7:42 PM, Alex Deucher wrote: since we loop through the queues |= the errors. Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/amdgpu_userqueue.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/a

Re: [PATCH 6/9] drm/amdgpu/userq: handle system suspend and resume

2025-04-11 Thread Khatri, Sunil
Reviewed-by: Sunil Khatri On 4/11/2025 7:42 PM, Alex Deucher wrote: Unmap user queues on suspend and map them on resume. Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 14 +- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/

Re: [PATCH 5/9] drm/amdgpu/userq: add suspend and resume helpers

2025-04-11 Thread Khatri, Sunil
Reviewed-by: Sunil Khatri On 4/11/2025 7:42 PM, Alex Deucher wrote: Add helpers to unmap and map user queues on suspend and resume. Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/amdgpu_userqueue.c | 39 +++ drivers/gpu/drm/amd/amdgpu/amdgpu_userqueue.h | 3 ++

Re: [PATCH V2 4/9] drm/amdgpu/userq: properly clean up userq fence driver on failure

2025-04-11 Thread Khatri, Sunil
LGTM, thanks Alex Reviewed-by: Sunil Khatri On 4/11/2025 7:42 PM, Alex Deucher wrote: If userq creation fails, we need to properly unwind and free the user queue fence driver. v2: free idr as well (Sunil) Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/amdgpu_userqueue.c | 4 +++

Re: [PATCH v1 3/3] drm/amdgpu: update the error logging for more information

2025-04-11 Thread Khatri, Sunil
On 4/11/2025 7:54 PM, Alex Deucher wrote: On Fri, Apr 11, 2025 at 9:05 AM Sunil Khatri wrote: add process and pid information in the userqueue error logging to make it more useful in resolving the error by logs. Sample log: [ 42.444297] [drm:amdgpu_userqueue_wait_for_signal [amdgpu]] *ERRO

Re: [PATCH 3/9] drm/amdgpu/userq: move some code around

2025-04-11 Thread Khatri, Sunil
Reviewed-by: Sunil Khatri On 4/10/2025 11:41 PM, Alex Deucher wrote: Move some userq fence handling code into amdgpu_userq_fence.c. This matches the other code in that file. Signed-off-by: Alex Deucher --- .../gpu/drm/amd/amdgpu/amdgpu_userq_fence.c | 26 +++ .../gpu/drm/

Re: [PATCH 2/9] drm/amdgpu/userq: rework front end call sequence

2025-04-11 Thread Khatri, Sunil
Reviewed-by: Sunil Khatri On 4/10/2025 11:41 PM, Alex Deucher wrote: Split out the queue map from the mqd create call and split out the queue unmap from the mqd destroy call. This splits the queue setup and teardown with the actual enablement in the firmware. Signed-off-by: Alex Deucher ---

Re: [PATCH 1/9] drm/amdgpu/userq: rename suspend/resume callbacks

2025-04-11 Thread Khatri, Sunil
Reviewed-by: Sunil Khatri On 4/10/2025 11:41 PM, Alex Deucher wrote: Rename to map and umap to better align with what is happening at the firmware level and remove the extra level of indirection in the MES userq code. Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/amdgpu_userque

RE: [PATCH] drm: function to get process name and pid

2025-04-11 Thread Khatri, Sunil
[AMD Official Use Only - AMD Internal Distribution Only] Sure, I will send the patch for the user too. Regards Sunil Khatri -Original Message- From: Koenig, Christian Sent: Friday, April 11, 2025 5:40 PM To: Khatri, Sunil ; dri-de...@lists.freedesktop.org; amd-gfx

Re: [PATCH 4/9] drm/amdgpu/userq: properly clean up userq fence driver on failure

2025-04-11 Thread Khatri, Sunil
On 4/10/2025 11:41 PM, Alex Deucher wrote: If userq creation fails, we need to properly unwind and free the user queue fence driver. Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/amdgpu_userqueue.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/gpu/drm/amd/amdg

Re: [PATCH 2/2 v2] drm/amdgpu: Add fw minimum version check for usermode queue

2025-04-10 Thread Khatri, Sunil
, 2025 12:54 AM *To:* Yadav, Arvind ; Koenig, Christian ; Deucher, Alexander ; Khatri, Sunil ; Sharma, Shashank *Cc:* amd-gfx@lists.freedesktop.org *Subject:* Re: [PATCH 2/2 v2] drm/amdgpu: Add fw minimum version check for usermode queue Alex, This is v2 of 2/2 patch. Please review this

Re: [PATCH 2/2] drm/amdgpu: Add fw minimum version check for usermode queue

2025-04-10 Thread Khatri, Sunil
Apart from minor comment LGTM.  Also lets wait for Alex to review the series. Reviewed-by: Sunil Khatri On 4/10/2025 4:59 PM, Arvind Yadav wrote: This patch is load usermode queue based on FW support for gfx12. CP Ucode FW Vesion: [PFP = 2840, ME = 2780, MEC = 2600, MES = 123] Cc: Alex Deuche

Re: [PATCH 1/2] drm/amdgpu: Add fw minimum version check for usermode queue

2025-04-10 Thread Khatri, Sunil
Apart from a minor alignment issue LGTM. Reviewed-by: Sunil Khatri On 4/10/2025 4:59 PM, Arvind Yadav wrote: This patch is load usermode queue based on FW support for gfx11. CP Ucode FW version: [PFP = 2530, ME = 2390, MEC = 2600, MES = 120] Cc: Alex Deucher Cc: Christian Koenig Cc: Shashank

RE: [PATCH v1] drm/amdgpu: no need to set queue_active in mes_userq_resume

2025-04-07 Thread Khatri, Sunil
: Tuesday, April 8, 2025 7:24 AM To: Khatri, Sunil ; Khatri, Sunil ; amd-gfx@lists.freedesktop.org Cc: Deucher, Alexander ; Koenig, Christian Subject: RE: [PATCH v1] drm/amdgpu: no need to set queue_active in mes_userq_resume [AMD Official Use Only - AMD Internal Distribution Only] I had a similar

Re: [PATCH 1/5] drm/amdgpu/gfx9: dump full CP packet header FIFOs

2025-04-07 Thread Khatri, Sunil
Thanks for the insight Alex. Series Reviewed-by: Sunil Khatri On 4/7/2025 7:15 PM, Alex Deucher wrote: On Mon, Apr 7, 2025 at 9:27 AM Khatri, Sunil wrote: On 4/7/2025 6:26 PM, Alex Deucher wrote: On Mon, Apr 7, 2025 at 6:14 AM Khatri, Sunil wrote: On 3/25/2025 1:18 AM, Alex Deucher

  1   2   3   >