[PATCH v2 1/2] drm/amdgpu: Update the variable name to dma_buf

2024-11-22 Thread Sunil Khatri
x27; warning: Excess function parameter 'dma_buf' description in 'amdgpu_bo_create_isp_user' Signed-off-by: Sunil Khatri --- drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgp

[PATCH v2 2/2] drm/amdgpu: add "restore" missing variable comment

2024-11-22 Thread Sunil Khatri
ber 'restore' not described in 'sdma_v4_4_2_inst_start' Signed-off-by: Sunil Khatri --- drivers/gpu/drm/amd/amdgpu/sdma_v4_4_2.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/sdma_v4_4_2.c b/drivers/gpu/drm/amd/amdgpu/sdma_v4_4_2.c index e7046

[PATCH v1 5/8] drm/amdgpu: Fix comment for vcn_v4_0_5_set_powergating_state

2024-11-21 Thread Sunil Khatri
ameter 'handle' description in 'vcn_v4_0_5_set_powergating_state' Signed-off-by: Sunil Khatri --- drivers/gpu/drm/amd/amdgpu/vcn_v4_0_5.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/vcn_v4_0_5.c b/drivers/gpu/drm/amd/amdgpu/vcn_v4_0

[PATCH v1 6/8] drm/amdgpu: Fix comment for vcn_v5_0_0_set_powergating_state

2024-11-21 Thread Sunil Khatri
ameter 'handle' description in 'vcn_v5_0_0_set_powergating_state' Signed-off-by: Sunil Khatri --- drivers/gpu/drm/amd/amdgpu/vcn_v5_0_0.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/vcn_v5_0_0.c b/drivers/gpu/drm/amd/amdgpu/vcn_v5_0

[PATCH v1 4/8] drm/amdgpu: Fix comment for vcn_v4_0_5_set_clockgating_state

2024-11-21 Thread Sunil Khatri
parameter 'handle' description in 'vcn_v4_0_5_set_clockgating_state' Signed-off-by: Sunil Khatri --- drivers/gpu/drm/amd/amdgpu/vcn_v4_0_5.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/vcn_v4_0_5.c b/drivers/gpu/drm/amd/am

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

2024-11-21 Thread 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 function parameter 'dma_buf' description in 'amdgpu_bo_cre

[PATCH v1 2/2] drm/amdgpu: add "restore" missing variable comment

2024-11-21 Thread Sunil Khatri
ber 'restore' not described in 'sdma_v4_4_2_inst_start' Signed-off-by: Sunil Khatri --- drivers/gpu/drm/amd/amdgpu/sdma_v4_4_2.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/sdma_v4_4_2.c b/drivers/gpu/drm/amd/amdgpu/sdma_v4_4_2.c index e7046

[PATCH v1 1/8] drm/amdgpu: Fix comment for vcn_v4_0_set_clockgating_state

2024-11-21 Thread Sunil Khatri
ameter 'handle' description in 'vcn_v4_0_set_clockgating_state' Signed-off-by: Sunil Khatri --- drivers/gpu/drm/amd/amdgpu/vcn_v4_0.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/vcn_v4_0.c b/drivers/gpu/drm/amd/amdgpu/vcn_v4_0.c index 2

[PATCH v1 7/8] drm/amdgpu: Fix comment for vcn_v4_0_set_powergating_state

2024-11-21 Thread Sunil Khatri
ameter 'handle' description in 'vcn_v4_0_set_powergating_state' Signed-off-by: Sunil Khatri --- drivers/gpu/drm/amd/amdgpu/vcn_v4_0.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/vcn_v4_0.c b/drivers/gpu/drm/amd/amdgpu/vcn_v4_0.c index c

[PATCH v1 0/8] Fix comments warnings for vcn clock/power gating

2024-11-21 Thread Sunil Khatri
*** BLURB HERE *** Sunil Khatri (8): drm/amdgpu: Fix comment for vcn_v4_0_set_clockgating_state drm/amdgpu: Fix comment for vcn_v5_0_0_set_clockgating_state drm/amdgpu: Fix comment for vcn_v4_0_3_set_powergating_state drm/amdgpu: Fix comment for vcn_v4_0_5_set_clockgating_state drm

[PATCH v1 8/8] drm/amdgpu: Fix comment for vcn_v4_0_3_set_clockgating_state

2024-11-21 Thread Sunil Khatri
ameter 'handle' description in 'vcn_v4_0_3_set_clockgating_state' Signed-off-by: Sunil Khatri --- drivers/gpu/drm/amd/amdgpu/vcn_v4_0_3.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/vcn_v4_0_3.c b/drivers/gpu/drm/amd/amdgpu/vcn_v4_0

[PATCH v1 3/8] drm/amdgpu: Fix comment for vcn_v4_0_3_set_powergating_state

2024-11-21 Thread Sunil Khatri
ameter 'handle' description in 'vcn_v4_0_3_set_powergating_state' Signed-off-by: Sunil Khatri --- drivers/gpu/drm/amd/amdgpu/vcn_v4_0_3.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/vcn_v4_0_3.c b/drivers/gpu/drm/amd/amdgpu/vcn_v4_0

[PATCH v1 2/8] drm/amdgpu: Fix comment for vcn_v5_0_0_set_clockgating_state

2024-11-21 Thread Sunil Khatri
ameter 'handle' description in 'vcn_v5_0_0_set_clockgating_state' Signed-off-by: Sunil Khatri --- drivers/gpu/drm/amd/amdgpu/vcn_v5_0_0.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/vcn_v5_0_0.c b/drivers/gpu/drm/amd/amdgpu/vcn_v5_0

[PATCH v1 2/2] drm/amdgpu: add the argument description for gpu_addr

2024-11-13 Thread Sunil Khatri
seq64_alloc Cc: Arunpravin Paneer Selvam Signed-off-by: Sunil Khatri --- drivers/gpu/drm/amd/amdgpu/amdgpu_seq64.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_seq64.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_seq64.c index 0defad71044c..d392cb0cbf61 100644 --- a/driv

[PATCH v3 2/2] drm/amdgpu: add the argument description for gpu_addr

2024-11-13 Thread Sunil Khatri
n Paneer Selvam Signed-off-by: Sunil Khatri --- drivers/gpu/drm/amd/amdgpu/amdgpu_seq64.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_seq64.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_seq64.c index 0defad71044c..898d215a8d99 100644 --- a/drivers/gpu/drm/amd/amdgpu

[PATCH v3 1/2] drm/amdgpu: add the argument description for inst

2024-11-13 Thread Sunil Khatri
wergating_state' Cc: Boyuan Zhang Signed-off-by: Sunil Khatri --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c index bb530dd2b3e3..b3ca911e55d6 100644 -

[PATCH v2 1/2] drm/amdgpu: add the argument description for inst

2024-11-13 Thread Sunil Khatri
wergating_state' Cc: Boyuan Zhang Signed-off-by: Sunil Khatri --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c index bb530dd2b3e3..b3ca911e55d6 100644 -

[PATCH v2 2/2] drm/amdgpu: add the argument description for gpu_addr

2024-11-13 Thread Sunil Khatri
seq64_alloc Cc: Arunpravin Paneer Selvam Signed-off-by: Sunil Khatri --- drivers/gpu/drm/amd/amdgpu/amdgpu_seq64.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_seq64.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_seq64.c index 0defad71044c..898d215a8d99 100644 --- a/driv

[PATCH v1 1/2] drm/amdgpu: add the argument description for inst

2024-11-13 Thread Sunil Khatri
wergating_state' Cc: Boyuan Zhang Signed-off-by: Sunil Khatri --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c index bb530dd2b3e3..b3ca911e55d6 100644 -

[PATCH v1 6/9] drm/amdgpu: update vcn_v4.0.5 devcoredump on per instance basis

2024-10-29 Thread 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. Signed-off-by: Sunil Khatri --- drivers/gpu/drm/amd/amdgpu/vcn_v4_0_5.c | 80 - 1 file

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

2024-10-29 Thread Sunil Khatri
independent one and its memory is independent and handled within the ip_block now. Signed-off-by: Sunil Khatri --- drivers/gpu/drm/amd/amdgpu/amdgpu.h | 2 + drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c | 77 +-- 2 files changed, 39 insertions(+), 40 deletions(-) diff --git a

[PATCH v1 8/9] drm/amdgpu: update vcn_v5.0 devcoredump on per instance basis

2024-10-29 Thread 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. Signed-off-by: Sunil Khatri --- drivers/gpu/drm/amd/amdgpu/vcn_v5_0_0.c | 77 - 1 file

[PATCH v1 2/9] drm/amdgpu: update vcn_v2.0 devcoredump on per instance basis

2024-10-29 Thread 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. Signed-off-by: Sunil Khatri --- drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c | 77 +-- 1 file

[PATCH v1 5/9] drm/amdgpu: update vcn_v4.0.3 devcoredump on per instance basis

2024-10-29 Thread 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. Signed-off-by: Sunil Khatri --- drivers/gpu/drm/amd/amdgpu/vcn_v4_0_3.c | 80 - 1 file

[PATCH v1 3/9] drm/amdgpu: update vcn_v2.5 devcoredump on per instance basis

2024-10-29 Thread 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. Signed-off-by: Sunil Khatri --- drivers/gpu/drm/amd/amdgpu/vcn_v2_5.c | 77 +-- 1 file

[PATCH v1 0/9] update devcoredump for new VCN instance design

2024-10-29 Thread Sunil Khatri
Sunil Khatri (9): drm/amdgpu: update vcn_v1 devcoredump on per instance basis drm/amdgpu: update vcn_v2.0 devcoredump on per instance basis drm/amdgpu: update vcn_v2.5 devcoredump on per instance basis drm/amdgpu: update vcn_v3.0 devcoredump on per instance basis drm/amdgpu: update

[PATCH v1 7/9] drm/amdgpu: update vcn_v4 devcoredump on per instance basis

2024-10-29 Thread 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. Signed-off-by: Sunil Khatri --- drivers/gpu/drm/amd/amdgpu/vcn_v4_0.c | 80 +-- 1 file

[PATCH v1 4/9] drm/amdgpu: update vcn_v3.0 devcoredump on per instance basis

2024-10-29 Thread 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. Signed-off-by: Sunil Khatri --- drivers/gpu/drm/amd/amdgpu/vcn_v3_0.c | 75 +-- 1 file

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

2024-10-29 Thread 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 --- drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.h | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.h b

[PATCH v7 05/10] drm/amdgpu: clean the dummy resume functions

2024-10-21 Thread Sunil Khatri
Remove the dummy resume functions for all ip blocks. Signed-off-by: Sunil Khatri --- drivers/gpu/drm/amd/amdgpu/amdgpu_isp.c | 6 -- 1 file changed, 6 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_isp.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_isp.c index 9b98b40ac4db

[PATCH v7 00/10] validate/clean the functions of ip funcs

2024-10-21 Thread Sunil Khatri
get_clocking_state and hw_init validation. Sunil Khatri (10): drm/amdgpu: validate hw_fini before function call drm/amdgpu: validate suspend before function call drm/amdgpu: validate resume before function call drm/amdgpu: validate wait_for_idle before function call drm/amdgpu: clean the

[PATCH v7 03/10] drm/amdgpu: validate resume before function call

2024-10-21 Thread Sunil Khatri
Before making a function call to resume, validate the function pointer like we do in sw_init. Use the helper function amdgpu_ip_block_resume where same checks and calls are repeated. Signed-off-by: Sunil Khatri --- drivers/gpu/drm/amd/amdgpu/aldebaran.c | 13 ++--- drivers/gpu/drm/amd

[PATCH v7 06/10] drm/amdgpu: clean the dummy suspend functions

2024-10-21 Thread Sunil Khatri
Remove the dummy suspend functions for all ip blocks. Signed-off-by: Sunil Khatri --- drivers/gpu/drm/amd/amdgpu/amdgpu_isp.c | 6 -- drivers/gpu/drm/amd/amdgpu/amdgpu_vkms.c | 3 ++- drivers/gpu/drm/amd/amdgpu/cik.c | 6 -- drivers/gpu/drm/amd/amdgpu/si.c | 6

[PATCH v7 02/10] drm/amdgpu: validate suspend before function call

2024-10-21 Thread Sunil Khatri
Before making a function call to suspend, validate the function pointer like we do in sw_init. Use the helper function amdgpu_ip_block_suspend where same checks and calls are repeated. Signed-off-by: Sunil Khatri --- drivers/gpu/drm/amd/amdgpu/aldebaran.c | 11 ++- drivers/gpu/drm/amd

[PATCH v7 09/10] drm/amdgpu: Clean the functions pointer set as NULL

2024-10-21 Thread Sunil Khatri
We dont need to set the functions to NULL which arent needed as global structure members are by default set to zero or NULL for pointers. Cc: Leo Liu Signed-off-by: Sunil Khatri --- drivers/gpu/drm/amd/amdgpu/amdgpu_acp.c | 4 drivers/gpu/drm/amd/amdgpu/amdgpu_isp.c

[PATCH v7 08/10] drm/amdgpu: clean the dummy soft_reset functions

2024-10-21 Thread Sunil Khatri
Remove the dummy soft_reset functions for all ip blocks. Signed-off-by: Sunil Khatri --- drivers/gpu/drm/amd/amdgpu/amdgpu_acp.c | 6 -- drivers/gpu/drm/amd/amdgpu/amdgpu_isp.c | 6 -- drivers/gpu/drm/amd/amdgpu/amdgpu_vkms.c | 6 -- drivers/gpu/drm/amd

[PATCH v7 10/10] drm/amdgpu: clean unused functions of uvd/vcn/vce

2024-10-21 Thread Sunil Khatri
Some of the functions pointers of amdgpu_ip_funcs are not used and are left commented out. Hence this cleans those up which arent used. Cc: Leo Liu Signed-off-by: Sunil Khatri --- drivers/gpu/drm/amd/amdgpu/uvd_v7_0.c | 274 -- drivers/gpu/drm/amd/amdgpu/vce_v4_0.c

[PATCH v7 07/10] drm/amdgpu: clean the dummy wait_for_idle functions

2024-10-21 Thread Sunil Khatri
Remove the dummy wait_for_idle functions for all ip blocks. Signed-off-by: Sunil Khatri --- drivers/gpu/drm/amd/amdgpu/amdgpu_acp.c | 6 -- drivers/gpu/drm/amd/amdgpu/amdgpu_isp.c | 6 -- drivers/gpu/drm/amd/amdgpu/amdgpu_vkms.c | 6 -- drivers/gpu/drm/amd

[PATCH v7 04/10] drm/amdgpu: validate wait_for_idle before function call

2024-10-21 Thread Sunil Khatri
Before making a function call to wait_for_idle, validate the function pointer like we do in sw_init. Signed-off-by: Sunil Khatri --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c

[PATCH v7 01/10] drm/amdgpu: validate hw_fini before function call

2024-10-21 Thread 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 | 38 +- 1 file changed, 22 insertions(+), 16 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu

[PATCH v6 05/12] drm/amdgpu: validate resume before function call

2024-10-18 Thread Sunil Khatri
Before making a function call to resume, validate the function pointer like we do in sw_init. Use the helper function amdgpu_ip_block_resume where same checks and calls are repeated. Signed-off-by: Sunil Khatri --- drivers/gpu/drm/amd/amdgpu/aldebaran.c | 13 ++--- drivers/gpu/drm/amd

[PATCH v6 11/12] drm/amdgpu: Clean the functions pointer set as NULL

2024-10-18 Thread Sunil Khatri
We dont need to set the functions to NULL which arent needed as global structure members are by default set to zero or NULL for pointers. Cc: Leo Liu Signed-off-by: Sunil Khatri --- drivers/gpu/drm/amd/amdgpu/amdgpu_acp.c | 4 drivers/gpu/drm/amd/amdgpu/amdgpu_isp.c

[PATCH v6 01/12] drm/amdgpu: validate hw_fini before function call

2024-10-18 Thread 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 | 38 +- 1 file changed, 22 insertions(+), 16 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu

[PATCH v6 06/12] drm/amdgpu: validate wait_for_idle before function call

2024-10-18 Thread Sunil Khatri
Before making a function call to wait_for_idle, validate the function pointer like we do in sw_init. Signed-off-by: Sunil Khatri --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c

[PATCH v6 02/12] drm/amdgpu: return error if phase2 suspend fails

2024-10-18 Thread Sunil Khatri
In function amdgpu_device_ip_suspend_phase2 if suspend call fails for an IP then abort there and return error to caller. A failed functionality of IP is critical and we should not proceed. Signed-off-by: Sunil Khatri --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 1 + 1 file changed, 1

[PATCH v6 03/12] drm/amdgpu: return error on suspend failure

2024-10-18 Thread Sunil Khatri
In function amdgpu_reset_xgmi_reset_on_init_suspend if suspend call fails for an IP then abort there and return error to caller. A failed functionality of IP is critical and we should not proceed. Signed-off-by: Sunil Khatri --- drivers/gpu/drm/amd/amdgpu/amdgpu_reset.c | 1 + 1 file changed

[PATCH v6 09/12] drm/amdgpu: clean the dummy wait_for_idle functions

2024-10-18 Thread Sunil Khatri
Remove the dummy wait_for_idle functions for all ip blocks. Signed-off-by: Sunil Khatri --- drivers/gpu/drm/amd/amdgpu/amdgpu_acp.c | 6 -- drivers/gpu/drm/amd/amdgpu/amdgpu_isp.c | 6 -- drivers/gpu/drm/amd/amdgpu/amdgpu_vkms.c | 6 -- drivers/gpu/drm/amd

[PATCH v6 10/12] drm/amdgpu: clean the dummy soft_reset functions

2024-10-18 Thread Sunil Khatri
Remove the dummy soft_reset functions for all ip blocks. Signed-off-by: Sunil Khatri --- drivers/gpu/drm/amd/amdgpu/amdgpu_acp.c | 6 -- drivers/gpu/drm/amd/amdgpu/amdgpu_isp.c | 6 -- drivers/gpu/drm/amd/amdgpu/amdgpu_vkms.c | 6 -- drivers/gpu/drm/amd

[PATCH v6 12/12] drm/amdgpu: clean unused functions of uvd/vcn/vce

2024-10-18 Thread Sunil Khatri
Some of the functions pointers of amdgpu_ip_funcs are not used and are left commented out. Hence this cleans those up which arent used. Cc: Leo Liu Signed-off-by: Sunil Khatri --- drivers/gpu/drm/amd/amdgpu/uvd_v7_0.c | 274 -- drivers/gpu/drm/amd/amdgpu/vce_v4_0.c

[PATCH v6 08/12] drm/amdgpu: clean the dummy suspend functions

2024-10-18 Thread Sunil Khatri
Remove the dummy suspend functions for all ip blocks. Signed-off-by: Sunil Khatri --- drivers/gpu/drm/amd/amdgpu/amdgpu_isp.c | 6 -- drivers/gpu/drm/amd/amdgpu/amdgpu_vkms.c | 3 ++- drivers/gpu/drm/amd/amdgpu/cik.c | 6 -- drivers/gpu/drm/amd/amdgpu/si.c | 6

[PATCH v6 07/12] drm/amdgpu: clean the dummy resume functions

2024-10-18 Thread Sunil Khatri
Remove the dummy resume functions for all ip blocks. Signed-off-by: Sunil Khatri --- drivers/gpu/drm/amd/amdgpu/amdgpu_isp.c | 6 -- 1 file changed, 6 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_isp.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_isp.c index 9b98b40ac4db

[PATCH v6 00/12] validate/clean the functions of ip funcs

2024-10-18 Thread Sunil Khatri
/hw_fini functions are mandatory and raise error message if these functions are not defined. v3: Added 2 new patches to clean get_clocking_state and hw_init validation. Sunil Khatri (12): drm/amdgpu: validate hw_fini before function call drm/amdgpu: return error if phase2 suspend fails

[PATCH v6 04/12] drm/amdgpu: validate suspend before function call

2024-10-18 Thread Sunil Khatri
Before making a function call to suspend, validate the function pointer like we do in sw_init. Use the helper function amdgpu_ip_block_suspend where same checks and calls are repeated. Signed-off-by: Sunil Khatri --- drivers/gpu/drm/amd/amdgpu/aldebaran.c | 11 ++ drivers/gpu/drm/amd

[PATCH v5 01/12] drm/amdgpu: validate hw_fini before function call

2024-10-17 Thread 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 | 38 +- 1 file changed, 22 insertions(+), 16 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu

[PATCH v5 12/12] drm/amdgpu: clean unused functions of uvd/vcn/vce

2024-10-17 Thread Sunil Khatri
Some of the functions pointers of amdgpu_ip_funcs are not used and are left commented out. Hence this cleans those up which arent used. Cc: Leo Liu Signed-off-by: Sunil Khatri --- drivers/gpu/drm/amd/amdgpu/uvd_v7_0.c | 274 -- drivers/gpu/drm/amd/amdgpu/vce_v4_0.c

[PATCH v5 08/12] drm/amdgpu: clean the dummy suspend functions

2024-10-17 Thread Sunil Khatri
Remove the dummy suspend functions for all ip blocks. Signed-off-by: Sunil Khatri --- drivers/gpu/drm/amd/amdgpu/amdgpu_isp.c | 6 -- drivers/gpu/drm/amd/amdgpu/amdgpu_vkms.c | 3 ++- drivers/gpu/drm/amd/amdgpu/cik.c | 6 -- drivers/gpu/drm/amd/amdgpu/si.c | 6

[PATCH v5 00/12] validate/clean the functions of ip funcs

2024-10-17 Thread Sunil Khatri
. v3: Added 2 new patches to clean get_clocking_state and hw_init validation. Sunil Khatri (12): drm/amdgpu: validate hw_fini before function call drm/amdgpu: add helper function amdgpu_ip_block_suspend drm/amdgpu: validate suspend before function call drm/amdgpu: add helper function

[PATCH v5 03/12] drm/amdgpu: validate suspend before function call

2024-10-17 Thread 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 | 9 ++--- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 15 +++ drivers/gpu/drm/amd/amdgpu/amdgpu_reset.c

[PATCH v5 07/12] drm/amdgpu: clean the dummy resume functions

2024-10-17 Thread Sunil Khatri
Remove the dummy resume functions for all ip blocks. Signed-off-by: Sunil Khatri --- drivers/gpu/drm/amd/amdgpu/amdgpu_isp.c | 6 -- 1 file changed, 6 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_isp.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_isp.c index 9b98b40ac4db

[PATCH v5 09/12] drm/amdgpu: clean the dummy wait_for_idle functions

2024-10-17 Thread Sunil Khatri
Remove the dummy wait_for_idle functions for all ip blocks. Signed-off-by: Sunil Khatri --- drivers/gpu/drm/amd/amdgpu/amdgpu_acp.c | 6 -- drivers/gpu/drm/amd/amdgpu/amdgpu_isp.c | 6 -- drivers/gpu/drm/amd/amdgpu/amdgpu_vkms.c | 6 -- drivers/gpu/drm/amd

[PATCH v5 11/12] drm/amdgpu: Clean the functions pointer set as NULL

2024-10-17 Thread Sunil Khatri
We dont need to set the functions to NULL which arent needed as global structure members are by default set to zero or NULL for pointers. Cc: Leo Liu Signed-off-by: Sunil Khatri --- drivers/gpu/drm/amd/amdgpu/amdgpu_acp.c | 4 drivers/gpu/drm/amd/amdgpu/amdgpu_isp.c

[PATCH v5 05/12] drm/amdgpu: validate resume before function call

2024-10-17 Thread Sunil Khatri
Before making a function call to resume, validate the function pointer like we do in sw_init. Signed-off-by: Sunil Khatri --- drivers/gpu/drm/amd/amdgpu/aldebaran.c | 11 -- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 24 +++-- drivers/gpu/drm/amd/amdgpu

[PATCH v5 04/12] drm/amdgpu: add helper function amdgpu_ip_block_resume

2024-10-17 Thread Sunil Khatri
Use the helper function amdgpu_ip_block_resume where same checks and calls are repeated. Signed-off-by: Sunil Khatri --- drivers/gpu/drm/amd/amdgpu/amdgpu.h| 2 ++ drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 17 + 2 files changed, 19 insertions(+) diff --git a/drivers

[PATCH v5 06/12] drm/amdgpu: validate wait_for_idle before function call

2024-10-17 Thread Sunil Khatri
Before making a function call to wait_for_idle, validate the function pointer like we do in sw_init. Signed-off-by: Sunil Khatri --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c

[PATCH v5 10/12] drm/amdgpu: clean the dummy soft_reset functions

2024-10-17 Thread Sunil Khatri
Remove the dummy soft_reset functions for all ip blocks. Signed-off-by: Sunil Khatri --- drivers/gpu/drm/amd/amdgpu/amdgpu_acp.c | 6 -- drivers/gpu/drm/amd/amdgpu/amdgpu_isp.c | 6 -- drivers/gpu/drm/amd/amdgpu/amdgpu_vkms.c | 6 -- drivers/gpu/drm/amd

[PATCH v5 02/12] drm/amdgpu: add helper function amdgpu_ip_block_suspend

2024-10-17 Thread Sunil Khatri
Use the helper function amdgpu_ip_block_suspend where same checks and calls are repeated. Signed-off-by: Sunil Khatri --- drivers/gpu/drm/amd/amdgpu/amdgpu.h| 1 + drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 17 + 2 files changed, 18 insertions(+) diff --git a/drivers

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

2024-10-17 Thread 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 file changed, 22 insertions(+), 11 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu

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

2024-10-17 Thread Sunil Khatri
Before making a function call to resume, validate the function pointer like we do in sw_init. Signed-off-by: Sunil Khatri --- drivers/gpu/drm/amd/amdgpu/aldebaran.c | 23 ++ drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 47 - drivers/gpu/drm/amd/amdgpu

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

2024-10-17 Thread Sunil Khatri
v4: hw_init/hw_fini functions are mandatory and raise error message if these functions are not defined. v3: Added 2 new patches to clean get_clocking_state and hw_init validation. Sunil Khatri (15): drm/amdgpu: validate sw_init before function call drm/amdgpu: clean the dummy sw_init

[PATCH v4 04/15] drm/amdgpu: clean the dummy sw_fini functions

2024-10-17 Thread Sunil Khatri
Remove the dummy sw_fini functions for all ip blocks. Signed-off-by: Sunil Khatri --- drivers/gpu/drm/amd/amdgpu/amdgpu_isp.c | 6 -- drivers/gpu/drm/amd/amdgpu/cik.c| 6 -- drivers/gpu/drm/amd/amdgpu/nv.c | 6 -- drivers/gpu/drm/amd/amdgpu/si.c | 7

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

2024-10-17 Thread Sunil Khatri
Remove the dummy hw_fini functions for all ip blocks. Signed-off-by: Sunil Khatri --- drivers/gpu/drm/amd/amdgpu/amdgpu_vkms.c | 6 -- drivers/gpu/drm/amd/amdgpu/cik.c | 6 -- drivers/gpu/drm/amd/amdgpu/mes_v12_0.c | 11 +-- drivers/gpu/drm/amd/amdgpu/si.c

[PATCH v4 12/15] drm/amdgpu: clean the dummy wait_for_idle functions

2024-10-17 Thread Sunil Khatri
Remove the dummy wait_for_idle functions for all ip blocks. Signed-off-by: Sunil Khatri --- drivers/gpu/drm/amd/amdgpu/amdgpu_acp.c | 6 -- drivers/gpu/drm/amd/amdgpu/amdgpu_isp.c | 5 - drivers/gpu/drm/amd/amdgpu/amdgpu_vkms.c | 6 -- drivers/gpu/drm/amd

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

2024-10-17 Thread 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/gpu/drm/amd/amdgpu/amdgpu_device.c | 26 - drivers/gpu/drm/amd/amdgpu

[PATCH v4 15/15] drm/amdgpu: validate get_clockgating_state before use

2024-10-17 Thread Sunil Khatri
Validate the function pointer for get_clockgating_state before making a function call. Signed-off-by: Sunil Khatri --- drivers/gpu/drm/amd/amdgpu/nv.c| 9 ++--- drivers/gpu/drm/amd/amdgpu/soc21.c | 6 -- drivers/gpu/drm/amd/amdgpu/soc24.c | 6 -- 3 files changed, 14 insertions

[PATCH v4 02/15] drm/amdgpu: clean the dummy sw_init functions

2024-10-17 Thread Sunil Khatri
Remove the dummy sw_init functions for all IP blocks. Signed-off-by: Sunil Khatri --- drivers/gpu/drm/amd/amdgpu/amdgpu_isp.c | 6 -- drivers/gpu/drm/amd/amdgpu/cik.c| 6 -- drivers/gpu/drm/amd/amdgpu/si.c | 6 -- 3 files changed, 18 deletions(-) diff --git a

[PATCH v4 03/15] drm/amdgpu: validate sw_fini before function call

2024-10-17 Thread Sunil Khatri
Before making a function call to sw_fini, validate the function pointer like we do in sw_init. Signed-off-by: Sunil Khatri --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 13 +++-- 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c

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

2024-10-17 Thread 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. Signed-off-by: Sunil Khatri --- drivers/gpu/drm/amd/amdgpu/amdgpu_acp.c | 4 - dr

[PATCH v4 10/15] drm/amdgpu: clean the dummy suspend functions

2024-10-17 Thread Sunil Khatri
Remove the dummy suspend functions for all ip blocks. Signed-off-by: Sunil Khatri --- drivers/gpu/drm/amd/amdgpu/amdgpu_isp.c | 6 -- drivers/gpu/drm/amd/amdgpu/amdgpu_vkms.c | 3 ++- drivers/gpu/drm/amd/amdgpu/cik.c | 6 -- drivers/gpu/drm/amd/amdgpu/si.c | 6

[PATCH v4 01/15] drm/amdgpu: validate sw_init before function call

2024-10-17 Thread Sunil Khatri
Before making a function call to sw_init, validate the function pointer like we do in late_init. Signed-off-by: Sunil Khatri --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c

[PATCH v4 13/15] drm/amdgpu: clean the dummy soft_reset functions

2024-10-17 Thread Sunil Khatri
Remove the dummy soft_reset functions for all ip blocks. Signed-off-by: Sunil Khatri --- drivers/gpu/drm/amd/amdgpu/amdgpu_acp.c | 6 -- drivers/gpu/drm/amd/amdgpu/amdgpu_isp.c | 5 - drivers/gpu/drm/amd/amdgpu/amdgpu_vkms.c | 6 -- drivers/gpu/drm/amd

[PATCH v4 08/15] drm/amdgpu: validate wait_for_idle before function call

2024-10-17 Thread Sunil Khatri
Before making a function call to wait_for_idle, validate the function pointer like we do in sw_init. Signed-off-by: Sunil Khatri --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c

[PATCH v4 09/15] drm/amdgpu: clean the dummy resume functions

2024-10-17 Thread Sunil Khatri
Remove the dummy resume functions for all ip blocks. Signed-off-by: Sunil Khatri --- drivers/gpu/drm/amd/amdgpu/amdgpu_isp.c | 6 -- 1 file changed, 6 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_isp.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_isp.c index 9b98b40ac4db

[PATCH v3 09/16] drm/amdgpu: clean the dummy resume functions

2024-10-16 Thread Sunil Khatri
Remove the dummy resume functions for all ip blocks. Signed-off-by: Sunil Khatri --- drivers/gpu/drm/amd/amdgpu/amdgpu_isp.c | 6 -- 1 file changed, 6 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_isp.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_isp.c index 9b98b40ac4db

[PATCH v3 07/16] drm/amdgpu: validate resume before function call

2024-10-16 Thread Sunil Khatri
Before making a function call to resume, validate the function pointer like we do in sw_init. Signed-off-by: Sunil Khatri --- drivers/gpu/drm/amd/amdgpu/aldebaran.c | 23 ++ drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 47 - drivers/gpu/drm/amd/amdgpu

[PATCH v3 03/16] drm/amdgpu: validate sw_fini before function call

2024-10-16 Thread Sunil Khatri
Before making a function call to sw_fini, validate the function pointer like we do in sw_init. Signed-off-by: Sunil Khatri --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 13 +++-- 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c

[PATCH v3 14/16] drm/amdgpu: clean unused functions of amd_ip_funcs

2024-10-16 Thread 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. Signed-off-by: Sunil Khatri --- drivers/gpu/drm/amd/amdgpu/amdgpu_acp.c | 4 - dr

[PATCH v3 13/16] drm/amdgpu: clean the dummy soft_reset functions

2024-10-16 Thread Sunil Khatri
Remove the dummy soft_reset functions for all ip blocks. Signed-off-by: Sunil Khatri --- drivers/gpu/drm/amd/amdgpu/amdgpu_acp.c | 6 -- drivers/gpu/drm/amd/amdgpu/amdgpu_isp.c | 5 - drivers/gpu/drm/amd/amdgpu/amdgpu_vkms.c | 6 -- drivers/gpu/drm/amd

[PATCH v3 16/16] drm/amdgpu: validate hw_init function pointers

2024-10-16 Thread Sunil Khatri
Validate function pointer at all the places where hw_init is called to avoid a NULL dereference. Signed-off-by: Sunil Khatri --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 82 ++ 1 file changed, 51 insertions(+), 31 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu

[PATCH v3 06/16] drm/amdgpu: validate suspend before function call

2024-10-16 Thread 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/gpu/drm/amd/amdgpu/amdgpu_device.c | 26 - drivers/gpu/drm/amd/amdgpu

[PATCH v3 10/16] drm/amdgpu: clean the dummy suspend functions

2024-10-16 Thread Sunil Khatri
Remove the dummy suspend functions for all ip blocks. Signed-off-by: Sunil Khatri --- drivers/gpu/drm/amd/amdgpu/amdgpu_isp.c | 6 -- drivers/gpu/drm/amd/amdgpu/amdgpu_vkms.c | 3 ++- drivers/gpu/drm/amd/amdgpu/cik.c | 6 -- drivers/gpu/drm/amd/amdgpu/si.c | 6

[PATCH v3 01/16] drm/amdgpu: validate sw_init before function call

2024-10-16 Thread Sunil Khatri
Before making a function call to sw_init, validate the function pointer like we do in late_init. Signed-off-by: Sunil Khatri --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c

[PATCH v3 12/16] drm/amdgpu: clean the dummy wait_for_idle functions

2024-10-16 Thread Sunil Khatri
Remove the dummy wait_for_idle functions for all ip blocks. Signed-off-by: Sunil Khatri --- drivers/gpu/drm/amd/amdgpu/amdgpu_acp.c | 6 -- drivers/gpu/drm/amd/amdgpu/amdgpu_isp.c | 5 - drivers/gpu/drm/amd/amdgpu/amdgpu_vkms.c | 6 -- drivers/gpu/drm/amd

[PATCH v3 04/16] drm/amdgpu: clean the dummy sw_fini functions

2024-10-16 Thread Sunil Khatri
Remove the dummy sw_fini functions for all ip blocks. Signed-off-by: Sunil Khatri --- drivers/gpu/drm/amd/amdgpu/amdgpu_isp.c | 6 -- drivers/gpu/drm/amd/amdgpu/cik.c| 6 -- drivers/gpu/drm/amd/amdgpu/nv.c | 6 -- drivers/gpu/drm/amd/amdgpu/si.c | 7

[PATCH v3 00/16] clean unused functions of amd_ip_funcs

2024-10-16 Thread Sunil Khatri
v3: Added 2 new patches to clean get_clocking_state and hw_init validation. Sunil Khatri (16): drm/amdgpu: validate sw_init before function call drm/amdgpu: clean the dummy sw_init functions drm/amdgpu: validate sw_fini before function call drm/amdgpu: clean the dummy sw_fini

[PATCH v3 15/16] drm/amdgpu: validate get_clockgating_state before use

2024-10-16 Thread Sunil Khatri
Validate the function pointer for get_clockgating_state before making a function call. Signed-off-by: Sunil Khatri --- drivers/gpu/drm/amd/amdgpu/nv.c| 9 ++--- drivers/gpu/drm/amd/amdgpu/soc21.c | 6 -- drivers/gpu/drm/amd/amdgpu/soc24.c | 6 -- 3 files changed, 14 insertions

[PATCH v3 08/16] drm/amdgpu: validate wait_for_idle before function call

2024-10-16 Thread Sunil Khatri
Before making a function call to wait_for_idle, validate the function pointer like we do in sw_init. Signed-off-by: Sunil Khatri --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c

[PATCH v3 05/16] drm/amdgpu: validate hw_fini before function call

2024-10-16 Thread 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 | 26 +- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu

[PATCH v3 02/16] drm/amdgpu: clean the dummy sw_init functions

2024-10-16 Thread Sunil Khatri
Remove the dummy sw_init functions for all IP blocks. Signed-off-by: Sunil Khatri --- drivers/gpu/drm/amd/amdgpu/amdgpu_isp.c | 6 -- drivers/gpu/drm/amd/amdgpu/cik.c| 6 -- drivers/gpu/drm/amd/amdgpu/si.c | 6 -- 3 files changed, 18 deletions(-) diff --git a

[PATCH v3 11/16] drm/amdgpu: clean the dummy hw_fini functions

2024-10-16 Thread Sunil Khatri
Remove the dummy hw_fini functions for all ip blocks. Signed-off-by: Sunil Khatri --- drivers/gpu/drm/amd/amdgpu/amdgpu_vkms.c | 6 -- drivers/gpu/drm/amd/amdgpu/cik.c | 6 -- drivers/gpu/drm/amd/amdgpu/mes_v12_0.c | 11 +-- drivers/gpu/drm/amd/amdgpu/si.c

[PATCH v2 12/14] drm/amdgpu: clean the dummy wait_for_idle functions

2024-10-10 Thread Sunil Khatri
Remove the dummy wait_for_idle functions for all ip blocks. Signed-off-by: Sunil Khatri --- drivers/gpu/drm/amd/amdgpu/amdgpu_acp.c | 6 -- drivers/gpu/drm/amd/amdgpu/amdgpu_isp.c | 5 - drivers/gpu/drm/amd/amdgpu/amdgpu_vkms.c | 6 -- drivers/gpu/drm/amd

  1   2   3   4   5   >