Re: [PATCH v4 05/15] drm/amdgpu: validate hw_fini before function call

2024-10-17 Thread Khatri, Sunil
On 10/17/2024 5:22 PM, Christian König wrote: Am 17.10.24 um 12:06 schrieb Sunil Khatri: Before making a function call to hw_fini, validate the function pointer like we do in sw_init. Signed-off-by: Sunil Khatri ---   drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 33 ++   1

Re: [PATCH v4 06/15] drm/amdgpu: validate suspend before function call

2024-10-17 Thread Khatri, Sunil
On 10/17/2024 5:24 PM, Christian König wrote: Am 17.10.24 um 12:06 schrieb Sunil Khatri: Before making a function call to suspend, validate the function pointer like we do in sw_init. Same comment as on patch #5, please add an amdgpu_ip_block_suspend() function and just call it multiple tim

Re: [PATCH v4 07/15] drm/amdgpu: validate resume before function call

2024-10-17 Thread Khatri, Sunil
On 10/17/2024 5:25 PM, Christian König wrote: Same comment as patch #5, please add an amdgpu_ip_block_resume() function. Sure Regards, Christian. Am 17.10.24 um 12:06 schrieb Sunil Khatri: Before making a function call to resume, validate the function pointer like we do in sw_init. Signed

Re: [PATCH v4 11/15] drm/amdgpu: clean the dummy hw_fini functions

2024-10-17 Thread Khatri, Sunil
On 10/17/2024 5:28 PM, Christian König wrote: Am 17.10.24 um 12:06 schrieb Sunil Khatri: Remove the dummy hw_fini functions for all ip blocks. As discussed on the call hw_init() and hw_fini() are the only two functions I consider mandatory. So please drop this patch here and as a follow u

Re: [PATCH v4 14/15] drm/amdgpu: clean unused functions of amd_ip_funcs

2024-10-17 Thread Khatri, Sunil
On 10/17/2024 5:48 PM, Christian König wrote: Am 17.10.24 um 12:06 schrieb Sunil Khatri: Remove the unused and commented out code for vcn/uvd IP's. Also remove the functions which are set to NULL as these are global structures and all members are set to 0 or NULL during initialization. Pleas

Re: [PATCH v4 00/15] validate/clean the functions of ip funcs

2024-10-17 Thread Khatri, Sunil
On 10/17/2024 5:53 PM, Christian König wrote: Patches #1-#4, #8-#10,#13 are Reviewed-by: Christian König Since those patches should be independent maybe push them to amd-staging-drm-next before continuing working on the set. Sure if the order isnt needed i will push those out of what you

Re: [PATCH v1 06/13] drm/amdgpu: validate suspend before function call

2024-10-10 Thread Khatri, Sunil
On 10/10/2024 2:15 PM, Lazar, Lijo wrote: On 10/10/2024 2:05 PM, Khatri, Sunil wrote: On 10/10/2024 1:42 PM, Lazar, Lijo wrote: On 10/10/2024 1:13 PM, Christian König wrote: Am 09.10.24 um 16:24 schrieb Sunil Khatri: Before making a function call to suspend, validate the function pointer

Re: [PATCH v1 06/13] drm/amdgpu: validate suspend before function call

2024-10-10 Thread Khatri, Sunil
On 10/10/2024 1:13 PM, Christian König wrote: Am 09.10.24 um 16:24 schrieb Sunil Khatri: Before making a function call to suspend, validate the function pointer like we do in sw_init. Signed-off-by: Sunil Khatri ---   drivers/gpu/drm/amd/amdgpu/aldebaran.c  | 15 ++--   drivers/gp

Re: [PATCH v1 06/13] drm/amdgpu: validate suspend before function call

2024-10-10 Thread Khatri, Sunil
On 10/10/2024 1:37 PM, Khatri, Sunil wrote: On 10/10/2024 1:13 PM, Christian König wrote: Am 09.10.24 um 16:24 schrieb Sunil Khatri: Before making a function call to suspend, validate the function pointer like we do in sw_init. Signed-off-by: Sunil Khatri ---   drivers/gpu/drm/amd/amdgpu

Re: [PATCH v1 06/13] drm/amdgpu: validate suspend before function call

2024-10-10 Thread Khatri, Sunil
On 10/10/2024 1:42 PM, Lazar, Lijo wrote: On 10/10/2024 1:13 PM, Christian König wrote: Am 09.10.24 um 16:24 schrieb Sunil Khatri: Before making a function call to suspend, validate the function pointer like we do in sw_init. Signed-off-by: Sunil Khatri ---   drivers/gpu/drm/amd/amdgpu/al

Re: [PATCH v1] drm/amdgpu: Clean up duplicate ip_block object

2024-10-07 Thread Khatri, Sunil
Yes Already Pushed. Thanks for the review. On 10/8/2024 11:47 AM, Christian König wrote: Am 03.10.24 um 15:49 schrieb Sunil Khatri: remove the duplicate ip_block object in the isp_hw_init function. Signed-off-by: Sunil Khatri You probably already pushed this, but Reviewed-by: Christian Kön

Re: [PATCH 28/32] drm/amdgpu: print_ip_state for each vcn instance

2024-10-22 Thread Khatri, Sunil
Reviewed-by: Sunil Khatri > On 10/17/2024 6:50 PM, boyuan.zh...@amd.com wrote: From: Boyuan Zhang Perform print_ip_state only for the instance of the current vcn IP block, instead of perform it for all vcn instances. Signed-off-by: Boyuan Zhang --- drivers/

Re: [PATCH 29/32] drm/amdgpu: dump_ip_state for each vcn instance

2024-10-22 Thread Khatri, Sunil
Reviewed-by: Sunil Khatri > On 10/17/2024 6:50 PM, boyuan.zh...@amd.com wrote: From: Boyuan Zhang Perform dump_ip_state only for the instance of the current vcn IP block, instead of perform it for all vcn instances. Signed-off-by: Boyuan Zhang --- drivers/g

Re: [PATCH 29/32] drm/amdgpu: dump_ip_state for each vcn instance

2024-10-22 Thread Khatri, Sunil
and #29 and let the review process complete. I need to change them according to new design and validate too. Ignore the review on these two patches till then :) Regards Sunil Khatri On 10/22/2024 2:29 PM, Khatri, Sunil wrote: [AMD Official Use Only - AMD Internal Distribution Only

Re: [PATCH 08/32] drm/amdgpu: pass ip_block in set_clockgating_state

2024-10-22 Thread Khatri, Sunil
On 10/17/2024 6:50 PM, boyuan.zh...@amd.com wrote: From: Boyuan Zhang Pass ip_block instead of adev in set_clockgating_state() and is_idle() callback functions. Modify set_clockgating_state() and is_idle() ip functions for all correspoding ip blocks. Signed-off-by: Boyuan Zhang --- driver

RE: [PATCH 29/32] drm/amdgpu: dump_ip_state for each vcn instance

2024-10-22 Thread Khatri, Sunil
[AMD Official Use Only - AMD Internal Distribution Only] Validate the ip dump date first for vcn before committing. I reviewed based on the code changes as it looks fine. From: amd-gfx On Behalf Of Khatri, Sunil Sent: Tuesday, October 22, 2024 2:27 PM To: Zhang, Boyuan ; amd-gfx

Re: [PATCH 07/32] drm/amdgpu: pass ip_block in set_powergating_state

2024-10-22 Thread Khatri, Sunil
On 10/17/2024 6:50 PM, boyuan.zh...@amd.com wrote: From: Boyuan Zhang Pass ip_block instead of adev in set_powergating_state callback function. Modify set_powergating_state ip functions for all correspoding ip blocks. v2: fix a ip block index error. Signed-off-by: Boyuan Zhang Suggested-by

Re: [PATCH 23/29] drm/amdgpu: hw_init for each vcn instance

2024-10-29 Thread Khatri, Sunil
Acked-by: Sunil Khatri On 10/25/2024 8:05 AM, boyuan.zh...@amd.com wrote: From: Boyuan Zhang Pass instance parameter to amdgpu_vcn_hw_init(), and perform hw init ONLY for the given vcn instance, instead of for all vcn instances. Modify each vcn generation accordingly. Signed-off-by: Boyuan Z

Re: [PATCH v1 1/9] drm/amdgpu: update vcn_v1 devcoredump on per instance basis

2024-11-03 Thread Khatri, Sunil
On 10/31/2024 3:16 PM, Christian König wrote: Am 29.10.24 um 14:50 schrieb Sunil Khatri: vcn code is restructured for per instance basis. Each vcn instance is represented by an ip_block and hence a need to update the dump and print functions for each instance as an IP. Existing way was to captu

Re: [PATCH v1 9/9] drm/amdgpu: remove unused ip_dump from vcn device

2024-11-03 Thread Khatri, Sunil
On 10/31/2024 3:23 PM, Christian König wrote: Am 29.10.24 um 14:50 schrieb Sunil Khatri: ip_dump pointer for the vcn has now moved to the per instance ip_block hence clean the old pointer from the vcn device. Signed-off-by: Sunil Khatri Reviewed-by: Christian König for the entire series.

Re: [PATCH] drm/amdgpu: fix double free vcn ip_dump

2024-11-10 Thread Khatri, Sunil
This isnt needed any more as the issue is introduced with per ip changes in VCN. Changes to accomodate per ip changes for ip dump is already reviewed and in progress to be merged. With that each IP of VCN have it own memory which is freed only once. We dont need this change anymore as we need

Re: [PATCH 21/29] drm/amdgpu: sw_init for each vcn instance

2024-10-25 Thread Khatri, Sunil
On 10/25/2024 8:05 AM, boyuan.zh...@amd.com wrote: From: Boyuan Zhang Pass instance parameter to amdgpu_vcn_sw_init(), and perform sw init ONLY for the given vcn instance, instead of for all vcn instances. Modify each vcn generation accordingly. Signed-off-by: Boyuan Zhang --- drivers/gpu/

Re: [PATCH 22/29] drm/amdgpu: sw_fini for each vcn instance

2024-10-25 Thread Khatri, Sunil
Looks fine to me as the changes are done to accomodate per instance ip block only Acked-by: Sunil Khatri > On 10/25/2024 8:05 AM, boyuan.zh...@amd.com wrote: From: Boyuan Zhang Pass instance parameter to amdgpu_vcn_sw_fini(), and perform sw fini ONLY for the g

Re: [PATCH 20/29] drm/amdgpu: early_init for each vcn instance

2024-10-25 Thread Khatri, Sunil
Acked-by: Sunil Khatri > On 10/25/2024 8:05 AM, boyuan.zh...@amd.com wrote: From: Boyuan Zhang Pass instance parameter to amdgpu_vcn_early_init(), and perform early init ONLY for the given vcn instance, instead of for all vcn instances. Modify each vcn generati

Re: [PATCH v1 1/5] drm/amdgpu: update the handle ptr in early_init

2024-09-27 Thread Khatri, Sunil
On 9/27/2024 5:51 PM, Christian König wrote: Am 27.09.24 um 11:57 schrieb Sunil Khatri: update the handle ptr to amdgpu_ip_block ptr for all functions pointers on early_init. Signed-off-by: Sunil Khatri ---   drivers/gpu/drm/amd/amdgpu/amdgpu_acp.c   | 2 +-   drivers/gpu/drm/amd/amdg

Re: [PATCH v1 1/5] drm/amdgpu: update the handle ptr in early_init

2024-09-27 Thread Khatri, Sunil
On 9/27/2024 7:26 PM, Khatri, Sunil wrote: On 9/27/2024 5:51 PM, Christian König wrote: Am 27.09.24 um 11:57 schrieb Sunil Khatri: update the handle ptr to amdgpu_ip_block ptr for all functions pointers on early_init. Signed-off-by: Sunil Khatri ---   drivers/gpu/drm/amd/amdgpu

Re: [PATCH v1 1/2] drm/amdgpu: fix the variable name in comments

2024-11-21 Thread Khatri, Sunil
On 11/22/2024 1:20 PM, Christian König wrote: Am 21.11.24 um 18:37 schrieb Sunil Khatri: Fix the variable name in comments to clean up the warning in amdgpu_bo_create_isp_user. warning: Function parameter or struct member 'dbuf' not described in 'amdgpu_bo_create_isp_user' warning: Excess fu

Re: [PATCH] drm/amdgpu/gmc7: fix wait_for_idle callers

2024-11-20 Thread Khatri, Sunil
Reviewed-by: Sunil Khatri On 11/20/2024 2:45 PM, Michel Dänzer wrote: On 2024-11-19 20:23, Alex Deucher wrote: The wait_for_idle signature was changed, but the callers were not. Reported-by: Michel Dänzer Fixes: 82ae6619a450 ("drm/amdgpu: update the handle ptr in wait_for_idle") Signed-off-b

RE: [PATCH] drm/amd/amdgpu: Add missing kdoc 'inst' parameter in 'amdgpu_device_ip_set_powergating_state'

2024-11-13 Thread Khatri, Sunil
[AMD Official Use Only - AMD Internal Distribution Only] Same here too. Sync the code you will see the changes merged already. Regards Sunil khatri -Original Message- From: amd-gfx On Behalf Of SHANMUGAM, SRINIVASAN Sent: Thursday, November 14, 2024 12:04 PM To: Koenig, Christian ; Deu

RE: [PATCH] drm/amd/amdgpu: Add missing kdoc 'gpu_addr' parameter in amdgpu_seq64_alloc()

2024-11-13 Thread Khatri, Sunil
[AMD Official Use Only - AMD Internal Distribution Only] Its already merged yesterday. -Original Message- From: amd-gfx On Behalf Of SHANMUGAM, SRINIVASAN Sent: Thursday, November 14, 2024 12:03 PM To: Koenig, Christian ; Deucher, Alexander Cc: amd-gfx@lists.freedesktop.org Subject: R

Re: [PATCH 08/11] drm/amdgpu/gfx12: add support for disable_kq

2025-03-15 Thread Khatri, Sunil
Reviewed-by: Sunil Khatri On 3/13/2025 8:11 PM, Alex Deucher wrote: Plumb in support for disabling kernel queues. v2: use ring counts per Felix' suggestion v3: fix stream fault handler, enable EOP interrupts v4: fix MEC interrupt offset (Sunil) Signed-off-by: Alex Deucher --- drivers/gpu/d

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

2025-04-06 Thread Khatri, Sunil
Ping On 4/2/2025 5:46 PM, Sunil Khatri wrote: In mes_userq_resume calls mes_userq_map which set the queue_active state to true if it succeed and from the resume we dont need to explicitly set the queue state. Signed-off-by: Sunil Khatri --- drivers/gpu/drm/amd/amdgpu/mes_userqueue.c | 1 -

Re: [PATCH v2] drm/amdgpu: make mes_userq_unmap as int from void

2025-04-06 Thread Khatri, Sunil
Ping ? On 4/2/2025 5:41 PM, Sunil Khatri wrote: mes_userq_unmap could fail due to MES fw unable to unmap the queue and the return value needs is not to be ignored and handled on first step itself. Also queue->queue_active set to false in this function but only when the queue is removed successf

RE: [PATCH 1/3] drm/amdgpu/gfx: make amdgpu_gfx_me_queue_to_bit() static

2025-03-26 Thread Khatri, Sunil
: Deucher, Alexander ; Khatri, Sunil Cc: amd-gfx@lists.freedesktop.org Subject: Re: [PATCH 1/3] drm/amdgpu/gfx: make amdgpu_gfx_me_queue_to_bit() static + Sunil to review this series On Mon, Mar 24, 2025 at 3:4 PM Alex Deucher wrote: > > ping on this series? > > On Thu, Mar 20, 202

RE: [PATCH 1/2] drm/amdgpu/gfx11: fix num_mec

2025-03-26 Thread Khatri, Sunil
[AMD Official Use Only - AMD Internal Distribution Only] Gfx11 now we have same values, hence we don't need to differentiate between two sets , only one set is needed like below. As below case IP_VERSION(11, 0, 0): case IP_VERSION(11, 0, 2): case IP_VERSION(11, 0, 3): cas

RE: [PATCH 1/2] drm/amdgpu/gfx11: fix num_mec

2025-03-26 Thread Khatri, Sunil
[AMD Official Use Only - AMD Internal Distribution Only] Sounds good. Series is reviewed then. Reviewed-by: Sunil Khatri Regards Sunil khatri -Original Message- From: Alex Deucher Sent: Wednesday, March 26, 2025 9:23 PM To: Khatri, Sunil Cc: Deucher, Alexander ; amd-gfx

Re: [PATCH 1/2] drm/amdgpu/gfx11: clean up and consolidate sw_init

2025-03-26 Thread Khatri, Sunil
Both patches looks good. Reviewed-by: Sunil Khatri Regards Sunil khatri On 3/26/2025 9:54 PM, Alex Deucher wrote: With the ME details fixed, we can now consolidate this state. Also split out the userq setup into a separate switch statement so that we can set them per IP version when the firmw

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 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 03/11] drm/amdgpu/gfx: add generic handling for disable_kq

2025-03-14 Thread Khatri, Sunil
Reviewed-by: Sunil Khatri On 3/13/2025 8:11 PM, Alex Deucher wrote: Add proper checks for disable_kq functionality in gfx helper functions. Add special logic for families that require the clear state setup. v2: use ring count as per Felix suggestion v3: fix num_gfx_rings handling in amdgpu_gf

Re: [PATCH 07/11] drm/amdgpu/gfx11: add support for disable_kq

2025-03-14 Thread Khatri, Sunil
Reviewed-by: Sunil Khatri On 3/13/2025 8:11 PM, Alex Deucher wrote: Plumb in support for disabling kernel queues in GFX11. We have to bring up a GFX queue briefly in order to initialize the clear state. After that we can disable it. v2: use ring counts per Felix' suggestion v3: fix stream fa

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

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

2025-04-07 Thread Khatri, Sunil
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 wrote: ping on this series? Alex On Thu, Mar 20, 2025 at 12:57 PM Alex Deucher wrote: In dev core dump, dump the full header fifo for each queue. Each FIFO has 8

Re: [PATCH 1/2] drm/amdgpu: add UAPI to query if user queues are supported

2025-04-07 Thread Khatri, Sunil
Reviewed-by: Sunil Khatri On 3/25/2025 2:03 AM, Alex Deucher wrote: Add an INFO query to check if user queues are supported. v2: switch to a mask of IPs (Marek) v3: move to drm_amdgpu_info_device (Marek) Cc:marek.ol...@amd.com Cc:prike.li...@amd.com Cc:sunil.kha...@amd.com Cc:yogesh.mohanmari

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] 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 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 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 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 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 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 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 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 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 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] 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] 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 1/5] drm/amdgpu/gfx9: dump full CP packet header FIFOs

2025-04-07 Thread Khatri, Sunil
On 3/25/2025 1:18 AM, Alex Deucher wrote: ping on this series? Alex On Thu, Mar 20, 2025 at 12:57 PM Alex Deucher wrote: In dev core dump, dump the full header fifo for each queue. Each FIFO has 8 entries. Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 62 +

Re: [PATCH 2/2] drm/amdgpu: bump version for user queue IP support query

2025-04-07 Thread Khatri, Sunil
Reviewed-by: Sunil Khatri On 3/25/2025 2:03 AM, Alex Deucher wrote: Add the user queue IP support query to the drm_amdgpu_info_device query. Cc: marek.ol...@amd.com Cc: prike.li...@amd.com Cc: sunil.kha...@amd.com Cc: yogesh.mohanmarimu...@amd.com Signed-off-by: Alex Deucher --- drivers/gpu

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

<    1   2   3   >