[PATCH] drm/amdgpu: Fix gfx10 kiq ring_lock warning on full reset

2024-07-22 Thread Jesse Zhang
d/0x60 [ 312.019280] ? __pfx_kthread+0x10/0x10 [ 312.019281] ret_from_fork_asm+0x1b/0x30 [ 312.019284] Signed-off-by: Vitaly Prosyak Signed-off-by: Jesse Zhang --- drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/

[PATCH 4/12 V2] drm/amdgpu: remove dead code in atom_get_src_int

2024-06-05 Thread Jesse Zhang
Since the range of align is 0~7, the expression is: align = (attr >> 3) & 7. In the case of ATOM_ARG_IMM, the code cannot reach the default case. So there is no need for "break". Signed-off-by: Jesse Zhang Suggested-by: Tim Huang --- drivers/gpu/drm/amd/amdgpu/atom.c

[PATCH 1/12 V2] drm/amd/pm: remove dead code in si_convert_power_level_to_smc

2024-06-05 Thread Jesse Zhang
Since gmc_pg is false, setting mcFlags with SISLANDS_SMC_MC_PG_EN cannot be reach. Signed-off-by: Jesse Zhang Suggested-by: Tim Huang --- drivers/gpu/drm/amd/pm/legacy-dpm/si_dpm.c | 4 1 file changed, 4 deletions(-) diff --git a/drivers/gpu/drm/amd/pm/legacy-dpm/si_dpm.c b/drivers

[PATCH 12/12] drm/amdgpu: remove dead code in si_program_aspm

2024-06-03 Thread Jesse Zhang
The variable disable_l1 is false and execution cannot reach the else branch. Signed-off-by: Jesse Zhang --- drivers/gpu/drm/amd/amdgpu/si.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/si.c b/drivers/gpu/drm/amd/amdgpu/si.c index 85235470e872..d80eec275090

[PATCH 11/12] drm/amdkfd: remove logically dead code

2024-06-03 Thread Jesse Zhang
idr_for_each_entry can ensure that mem is not empty during the loop. So don't need check mem again. Signed-off-by: Jesse Zhang --- drivers/gpu/drm/amd/amdkfd/kfd_chardev.c | 5 - 1 file changed, 5 deletions(-) diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_chardev.c b/drivers/gpu/drm/amd

[PATCH 10/12] drm/amdkfd: remove dead code in kq_initialize

2024-06-03 Thread Jesse Zhang
The queue type can only be KFD_QUEUE_TYPE_DIQ or KFD_QUEUE_TYPE_HIQ, and the default cannot be reached. Signed-off-by: Jesse Zhang --- drivers/gpu/drm/amd/amdkfd/kfd_kernel_queue.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_kernel_queue.c b/drivers/gpu

[PATCH 09/12] [PATCH 28/28] drm/amdgpu: remove dead code in cik_program_aspm

2024-06-03 Thread Jesse Zhang
Since disable_l1 is false, the else branch cannot be reached. Signed-off-by: Jesse Zhang --- drivers/gpu/drm/amd/amdgpu/cik.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/cik.c b/drivers/gpu/drm/amd/amdgpu/cik.c index 5428fd4071b8..0ad736e775db 100644

[PATCH 08/12] drm/amdgpu/pm: remove dead code in aldebaran_emit_clk_levels and arcturus_emit_clk_levels

2024-06-03 Thread Jesse Zhang
The value of type check at the start. The switch governing value type cannot reach the default case. Signed-off-by: Jesse Zhang --- drivers/gpu/drm/amd/pm/swsmu/smu11/arcturus_ppt.c | 2 -- drivers/gpu/drm/amd/pm/swsmu/smu13/aldebaran_ppt.c | 2 -- 2 files changed, 4 deletions(-) diff --git

[PATCH 07/12] drm/amdgpu: remove dead code in amdgpu_vpe_configure_dpm

2024-06-03 Thread Jesse Zhang
When switching on idx, the value of idx must be between 0 and 3. The switch governing value idx cannot reach the default case. Signed-off-by: Jesse Zhang --- drivers/gpu/drm/amd/amdgpu/amdgpu_vpe.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vpe.c b

[PATCH 06/12] drm/amd/pm: remove dead code in smu_get_power_limit

2024-06-03 Thread Jesse Zhang
At the start it checks limit_level. When switching on limit_level, the value of limit_level must be between -1 and 2. The switch governing value limit_level cannot reach the default case. Signed-off-by: Jesse Zhang --- drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c | 2 -- 1 file changed, 2

[PATCH 05/12] drm/amd/pm: remove dead code in navi10_emit_clk_levels and navi10_print_clk_levels

2024-06-03 Thread Jesse Zhang
Since the range of the varibable i is 0 - 3. So execution cannot reach this statement: default. Signed-off-by: Jesse Zhang --- drivers/gpu/drm/amd/pm/swsmu/smu11/navi10_ppt.c | 4 1 file changed, 4 deletions(-) diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu11/navi10_ppt.c b/drivers/gpu

[PATCH 04/12] drm/amdgpu: remove dead code in atom_get_src_int

2024-06-03 Thread Jesse Zhang
Since the range of align is 0~7, the expression is: align = (attr >> 3) & 7. In the case of ATOM_ARG_IMM, the code cannot reach the default case. So there is no need for "break". Signed-off-by: Jesse Zhang --- drivers/gpu/drm/amd/amdgpu/atom.c | 1 - 1 file changed, 1 del

[PATCH 03/12] drm/amdgpu: remove dead code in sdma_v6_0_load_microcode

2024-06-03 Thread Jesse Zhang
Remove legacy method to load firmware mode, since that code cannot be reach. Signed-off-by: Jesse Zhang --- drivers/gpu/drm/amd/amdgpu/sdma_v6_0.c | 39 -- 1 file changed, 39 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/sdma_v6_0.c b/drivers/gpu/drm/amd/amdgpu

[PATCH 02/12] drm/amdgpu: remove dead code in cik_program_aspm

2024-06-03 Thread Jesse Zhang
Since disable_clkreq is false, execution cannot reach this statement: clk_req_support = false. Signed-off-by: Jesse Zhang --- drivers/gpu/drm/amd/amdgpu/cik.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/cik.c b/drivers/gpu/drm/amd/amdgpu/cik.c index

[PATCH 01/12] drm/amd/pm: remove dead code in si_convert_power_level_to_smc

2024-06-03 Thread Jesse Zhang
Since gmc_pg is false, setting mcFlags with SISLANDS_SMC_MC_PG_EN cannot be reach. Signed-off-by: Jesse Zhang --- drivers/gpu/drm/amd/pm/legacy-dpm/si_dpm.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/gpu/drm/amd/pm/legacy-dpm/si_dpm.c b/drivers/gpu/drm/amd/pm/legacy-dpm

[PATCH 00/12] *** Remove dead code ***

2024-06-03 Thread Jesse Zhang
Jesse Zhang (12): drm/amd/pm: remove dead code in si_convert_power_level_to_smc drm/amdgpu: remove dead code in cik_program_aspm drm/amdgpu: remove dead code in sdma_v6_0_load_microcode drm/amdgpu: remove dead code in atom_get_src_int drm/amd/pm: remove dead code

[PATCH 7/8] drm/amdkfd: Comment out the unused variable use_static in pm_map_queues_v9

2024-05-30 Thread Jesse Zhang
To fix the warning about unused value, remove the use_static and use the parameter is_static directly. Signed-off-by: Jesse Zhang Suggested-by: Felix Kuehling --- drivers/gpu/drm/amd/amdkfd/kfd_packet_manager_v9.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers

[PATCH 2/8] drm/amdkfd: fix the kdf debugger issue

2024-05-30 Thread Jesse Zhang
The expression caps | HSA_CAP_TRAP_DEBUG_PRECISE_MEMORY_OPERATIONS_SUPPORTED and caps | HSA_CAP_TRAP_DEBUG_PRECISE_ALU_OPERATIONS_SUPPORTED are always 1/true regardless of the values of its operand. Fixes: 75de8428c3d632 ("drm/amdkfd: enable single alu ops for gfx12") Signed-off-by: J

[PATCH 8/8] drm/amdkfd: remove dead code in kfd_create_vcrat_image_gpu

2024-05-29 Thread Jesse Zhang
Since the value of avail_size is at least VCRAT_SIZE_FOR_GPU(16384), minus struct crat_header(40UL) and struct crat_subtype_compute(40UL) it cannot be less than 0. Signed-off-by: Jesse Zhang --- drivers/gpu/drm/amd/amdkfd/kfd_crat.c | 6 -- 1 file changed, 6 deletions(-) diff --git

[PATCH 7/8] drm/amdkfd: Comment out the unused variable use_static in pm_map_queues_v9

2024-05-29 Thread Jesse Zhang
To fix the warning about unused value, comment out the variable use_static. Signed-off-by: Jesse Zhang --- drivers/gpu/drm/amd/amdkfd/kfd_packet_manager_v9.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_packet_manager_v9.c b/drivers/gpu/drm

[PATCH 6/8] drm/amdkfd: remove dead code in the function svm_range_get_pte_flags

2024-05-29 Thread Jesse Zhang
The varible uncached set false, the condition uncached cannot be true. So remove the dead code, mapping flags will set the flag AMDGPU_VM_MTYPE_UC in else. Signed-off-by: Jesse Zhang --- drivers/gpu/drm/amd/amdkfd/kfd_svm.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git

[PATCH 6/8] drm/amdkfd: remove dead code in the function svm_range_get_pte_flags

2024-05-29 Thread Jesse Zhang
The varible uncached set false, the condition uncached cannot be true. So remove the dead code, mapping flags will set the flag AMDGPU_VM_MTYPE_UC in else. Signed-off-by: Jesse Zhang --- drivers/gpu/drm/amd/amdkfd/kfd_svm.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git

[PATCH 5/8] drm/amdkfd: fix the return for the function kfd_dbg_trap_set_flags

2024-05-29 Thread Jesse Zhang
If the rewind flag is set, it should return the final result of setting mes debug mode or refresh the run list. Signed-off-by: Jesse Zhang --- drivers/gpu/drm/amd/amdkfd/kfd_debug.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_debug.c b

[PATCH 4/8] amd/amdkfd:fix overflowed constant in the function svm_migrate_copy_to_ram

2024-05-29 Thread Jesse Zhang
If the svm migration copy memory gart fails or the dma mapping page fails for the first time. But the variable i is still 0, and executing i-- will overflow. Signed-off-by: Jesse Zhang --- drivers/gpu/drm/amd/amdkfd/kfd_migrate.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff

[PATCH 3/8] drm/amdkfd: fix overflow for the function criu_restore_bos

2024-05-29 Thread Jesse Zhang
When copying the information from the user fails, it will goto exit. But the variable i remains at 0, and do i-- will overflow. Signed-off-by: Jesse Zhang --- drivers/gpu/drm/amd/amdkfd/kfd_chardev.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd

[PATCH 2/8] drm/amdkfd: fix the kdf debugger issue

2024-05-29 Thread Jesse Zhang
the expression caps | HSA_CAP_TRAP_DEBUG_PRECISE_MEMORY_OPERATIONS_SUPPORTED is always 1/true regardless of the values of its operand. Signed-off-by: Jesse Zhang --- drivers/gpu/drm/amd/amdkfd/kfd_debug.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd

[PATCH 1/8] drm/amdgu: fix Unintentional integer overflow for mall size

2024-05-29 Thread Jesse Zhang
Potentially overflowing expression mall_size_per_umc * adev->gmc.num_umc with type unsigned int (32 bits, unsigned) is evaluated using 32-bit arithmetic,and then used in a context that expects an expression of type u64 (64 bits, unsigned). Signed-off-by: Jesse Zhang --- drivers/gpu/drm/

[PATCH V2] drm/amdgpu: fix dereference null return value for the function amdgpu_vm_pt_parent

2024-05-23 Thread Jesse Zhang
The pointer parent may be NULLed by the function amdgpu_vm_pt_parent. To make the code more robust, check the pointer parent. Signed-off-by: Jesse Zhang Suggested-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_vm_pt.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff

[PATCH V2] drm/amdgpu: fix dereference null return value for the function amdgpu_vm_pt_parent

2024-05-23 Thread Jesse Zhang
The pointer parent may be NULLed by the function amdgpu_vm_pt_parent. To make the code more robust, check the pointer parent. V2: When parent is NULL here we should probably call BUG() instead. (Christian) Signed-off-by: Jesse Zhang --- drivers/gpu/drm/amd/amdgpu/amdgpu_vm_pt.c | 8

[PATCH] drm/amdgpu: fix dereference null return value for the function amdgpu_vm_pt_parent

2024-05-23 Thread Jesse Zhang
The pointer parent may be NULLed by the function amdgpu_vm_pt_parent. To make the code more robust, check the pointer parent. Signed-off-by: Jesse Zhang --- drivers/gpu/drm/amd/amdgpu/amdgpu_vm_pt.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd

[PATCH 4/4 V2] drm/admgpu: fix dereferencing null pointer context

2024-05-21 Thread Jesse Zhang
When user space sets an invalid ta type, the pointer context will be empty. So it need to check the pointer context before using it Signed-off-by: Jesse Zhang Suggested-by: Tim Huang --- drivers/gpu/drm/amd/amdgpu/amdgpu_psp_ta.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff

[PATCH 3/4 V3] drm/amdgpu: fix invadate operation for pg_flags

2024-05-21 Thread Jesse Zhang
Since the type of pg_flags is u32, adev->pg_flags >> 16 >> 16 is 0 regardless of the values of its operands. So removing the operations upper_32_bits and lower_32_bits. Signed-off-by: Jesse Zhang Suggested-by: Tim Huang --- drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c | 4 ++--

[PATCH 2/4 V2] drm/amd/pm: fix unsigned value asic_type compared against

2024-05-21 Thread Jesse Zhang
Enum asic_type always greater than or equal CHIP_TAHITI. Signed-off-by: Jesse Zhang Suggested-by: Tim Huang --- drivers/gpu/drm/amd/pm/legacy-dpm/si_dpm.c | 8 ++-- 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/amd/pm/legacy-dpm/si_dpm.c b/drivers/gpu/drm

[PATCH 1/4 V2] drm/amdgpu: fix invadate operation for umsch

2024-05-21 Thread Jesse Zhang
Since the type of data_size is uint32_t, adev->umsch_mm.data_size - 1 >> 16 >> 16 is 0 regardless of the values of its operands So removing the operations upper_32_bits and lower_32_bits. Signed-off-by: Jesse Zhang Suggested-by: Tim Huang --- drivers/gpu/drm/amd/amdgpu/umsc

[PATCH 4/4] drm/admgpu: fix dereferencing null pointer context

2024-05-20 Thread Jesse Zhang
When user space sets an invalid ta type, the pointer context will be empty. So it need to check the pointer context before using it Signed-off-by: Jesse Zhang --- drivers/gpu/drm/amd/amdgpu/amdgpu_psp_ta.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd

[PATCH 3/4] drm/amdgpu: fix invadate operation for pg_flags

2024-05-20 Thread Jesse Zhang
adev->pg_flags >> 16 >> 16 is 0 regardless of the values of its operands. Signed-off-by: Jesse Zhang --- drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c b/drivers/gpu

[PATCH 2/4] drm/amd/pm: fix unsigned value asic_type compared against 0

2024-05-20 Thread Jesse Zhang
Enum asic_type always greater than or equal CHIP_TAHITI. Signed-off-by: Jesse Zhang --- drivers/gpu/drm/amd/pm/legacy-dpm/si_dpm.c | 4 1 file changed, 4 deletions(-) diff --git a/drivers/gpu/drm/amd/pm/legacy-dpm/si_dpm.c b/drivers/gpu/drm/amd/pm/legacy-dpm/si_dpm.c index f245fc0bc6d3

[PATCH 1/4] drm/amdgpu: fix invadate operation for umsch

2024-05-20 Thread Jesse Zhang
adev->umsch_mm.data_size - 1 >> 16 >> 16 is 0 regardless of the values of its operands Signed-off-by: Jesse Zhang --- drivers/gpu/drm/amd/amdgpu/umsch_mm_v4_0.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/umsch_mm_v4_0.c b/

[PATCH 2/2] drm/amd/pm: check specific index for aldebaran

2024-05-14 Thread Jesse Zhang
To avoid warning problems, drop index and use PPSMC_MSG_GfxDriverReset instead of index for aldebaran. Signed-off-by: Jesse Zhang Suggested-by: Lijo Lazar --- drivers/gpu/drm/amd/pm/swsmu/smu13/aldebaran_ppt.c | 13 +++-- 1 file changed, 7 insertions(+), 6 deletions(-) diff --git

[PATCH 1/2] drm/amd/pm: check specific index for smu13

2024-05-14 Thread Jesse Zhang
To avoid warning problems, drop index and use PPSMC_MSG_GfxDriverReset instead of index. Signed-off-by: Jesse Zhang Suggested-by: Lijo Lazar --- .../gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c | 15 +-- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/drivers/gpu

[PATCH 2/2 v2] drm/amd/pm: check specific index for aldebaran

2024-05-14 Thread Jesse Zhang
To avoid warning problems, drop index and use PPSMC_MSG_GfxDriverReset instead of index for aldebaran. Signed-off-by: Jesse Zhang Suggested-by: Lijo Lazar --- drivers/gpu/drm/amd/pm/swsmu/smu13/aldebaran_ppt.c | 13 +++-- 1 file changed, 7 insertions(+), 6 deletions(-) diff --git

[no subject]

2024-05-14 Thread Jesse Zhang
>From 3348a4bb465834b165de80dc42d11630ac5c6a83 Mon Sep 17 00:00:00 2001 From: Jesse Zhang Date: Tue, 14 May 2024 13:59:18 +0800 Subject: [PATCH 2/2 v2] drm/amd/pm: check specific index for aldebaran To avoid warning problems, drop index and use PPSMC_MSG_GfxDriverReset instead of in

[PATCH 1/2 v2] drm/amd/pm: check specific index for smu13

2024-05-14 Thread Jesse Zhang
To avoid warning problems, drop index and use PPSMC_MSG_GfxDriverReset instead of index for smu13. Signed-off-by: Jesse Zhang Suggested-by: Lijo Lazar --- .../gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c | 15 +-- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git

[PATCH 2/2] drm/amd/pm: check specific index for aldebaran

2024-05-14 Thread Jesse Zhang
To avoid warning problems, drop index and use PPSMC_MSG_GfxDriverReset instead of index for aldebaran. Signed-off-by: Jesse Zhang Suggested-by: Lijo Lazar --- drivers/gpu/drm/amd/pm/swsmu/smu13/aldebaran_ppt.c | 13 +++-- 1 file changed, 7 insertions(+), 6 deletions(-) diff --git

[PATCH 1/2] drm/amd/pm: check specific index for smu13

2024-05-14 Thread Jesse Zhang
To avoid warning problems, drop index and use PPSMC_MSG_GfxDriverReset instead of index for smu13. Signed-off-by: Jesse Zhang Suggested-by: Lijo Lazar --- .../gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c | 15 +-- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git

[PATCH 18/22 V3] drm/amd/pm: check negtive return for table entries

2024-05-13 Thread Jesse Zhang
Function hwmgr->hwmgr_func->get_num_of_pp_table_entries(hwmgr) returns a negative number Signed-off-by: Jesse Zhang Suggested-by: Tim Huang --- drivers/gpu/drm/amd/pm/powerplay/hwmgr/pp_psm.c | 13 - 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/d

[PATCH 18/22] drm/amd/pm: check negtive return for table entries

2024-05-13 Thread Jesse Zhang
Function hwmgr->hwmgr_func->get_num_of_pp_table_entries(hwmgr) returns a negative number Signed-off-by: Jesse Zhang Suggested-by: Tim Huang --- drivers/gpu/drm/amd/pm/powerplay/hwmgr/pp_psm.c | 11 ++- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/d

[PATCH 2/22 V2] drm/amdgpu: the warning dereferencing obj for nbio_v7_4

2024-05-13 Thread Jesse Zhang
if ras_manager obj null, don't print NBIO err data Signed-off-by: Jesse Zhang Suggested-by: Tim Huang --- drivers/gpu/drm/amd/amdgpu/nbio_v7_4.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/nbio_v7_4.c b/drivers/gpu/drm/amd/amdgpu/nbio_v7_4.c

[PATCH 19/22 V2] drm/amdgpu: Fix the warning division or modulo by zero for the variable num_xcc_per_xcp

2024-05-10 Thread Jesse Zhang
Checks the partition mode and returns an error for an invalid mode. Signed-off-by: Jesse Zhang Suggested-by: Lijo Lazar --- drivers/gpu/drm/amd/amdgpu/aqua_vanjaram.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/aqua_vanjaram.c b/drivers/gpu/drm/amd

[PATCH 09/22 V2] drm/amd/pm: check specific index for smu13

2024-05-10 Thread Jesse Zhang
Check for specific indexes that may be invalid values. Signed-off-by: Jesse Zhang Suggested-by: Tim Huang --- drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c b/drivers/gpu/drm/amd

[PATCH 22/22] drm/amdgpu: clear the warning unsigned compared against 0 for xcp_id

2024-05-09 Thread Jesse Zhang
This greater-than-or-equal-to-zero comparison of an unsigned value is always true. fpriv->xcp_id >= 0U Signed-off-by: Jesse Zhang --- drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c b/d

[PATCH 21/22] drm/amd/pm: fix get dpm level count for yello carp

2024-05-09 Thread Jesse Zhang
For invalid clk types, return -EINVAL to check the return. Signed-off-by: Jesse Zhang --- drivers/gpu/drm/amd/pm/swsmu/smu13/yellow_carp_ppt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu13/yellow_carp_ppt.c b/drivers/gpu/drm/amd/pm

[PATCH 20/22] drm/amd/pm: fix get dpm level count for smu13

2024-05-09 Thread Jesse Zhang
For invalid clk types, return -EINVAL to check the return. Signed-off-by: Jesse Zhang --- drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_5_ppt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_5_ppt.c b/drivers/gpu/drm/amd/pm/swsmu

[PATCH 19/22] drm/amdgpu: Fix the warning division or modulo by zero for the variable num_xcc_per_xcp

2024-05-09 Thread Jesse Zhang
Dividing expression num_xcc_per_xcp which may be zero has undefined behavior. Signed-off-by: Jesse Zhang --- drivers/gpu/drm/amd/amdgpu/aqua_vanjaram.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/aqua_vanjaram.c b/drivers/gpu/drm/amd/amdgpu/aqua_vanjaram.c

[PATCH 18/22] drm/amd/pm: check negtive return for table entries

2024-05-09 Thread Jesse Zhang
Function hwmgr->hwmgr_func->get_num_of_pp_table_entries(hwmgr) returns a negative number Signed-off-by: Jesse Zhang --- drivers/gpu/drm/amd/pm/powerplay/hwmgr/pp_psm.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/pp_ps

[PATCH 17/22] drm/amdgpu: fix the warning bad bit shift operation for aca_error_type type

2024-05-09 Thread Jesse Zhang
Filter invalid aca error types before performing a shift operation. Signed-off-by: Jesse Zhang --- drivers/gpu/drm/amd/amdgpu/amdgpu_aca.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_aca.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_aca.c index

[PATCH 16/22] drm/amd/pm: fix enum type compared against 0

2024-05-09 Thread Jesse Zhang
This less-than-zero comparison of an unsigned value is never true. type < 0U Signed-off-by: Jesse Zhang --- drivers/gpu/drm/amd/pm/swsmu/smu_cmn.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu_cmn.c b/drivers/gpu/drm/amd/pm/swsmu/smu_cm

[PATCH 12/22] drm/amd/pm: remove logically dead code

2024-05-09 Thread Jesse Zhang
Execution cannot reach this statement: case POWER_STATE_TYPE_BALAN. Signed-off-by: Jesse Zhang --- drivers/gpu/drm/amd/pm/legacy-dpm/legacy_dpm.c | 9 - 1 file changed, 9 deletions(-) diff --git a/drivers/gpu/drm/amd/pm/legacy-dpm/legacy_dpm.c b/drivers/gpu/drm/amd/pm/legacy-dpm

[PATCH 15/22] drm/amd/pm: fix enum feature compared against 0

2024-05-09 Thread Jesse Zhang
This less-than-zero comparison of an unsigned value is never true. feature < 0U Signed-off-by: Jesse Zhang --- drivers/gpu/drm/amd/pm/swsmu/smu_cmn.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu_cmn.c b/drivers/gpu/drm/amd/pm/sw

[PATCH 14/22] drm/amdgu: remove unused code

2024-05-09 Thread Jesse Zhang
The same code is executed when the condition err is true or false, because the code in the if-then branch and after the if statement is identical Signed-off-by: Jesse Zhang --- drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu

[PATCH 11/22] drm/amdgpu: remove structurally dead code for amd_gmc

2024-05-09 Thread Jesse Zhang
This code cannot be reached: return sysfs_emit(buf, "UNK) Signed-off-by: Jesse Zhang --- drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c index a5f970f

[PATCH 13/22] drm/amd/pm: remove logically dead code for renoir

2024-05-09 Thread Jesse Zhang
The switch governing value clk_type cannot be SMU_GFXCLK and SMU_SCLK. Signed-off-by: Jesse Zhang --- drivers/gpu/drm/amd/pm/swsmu/smu12/renoir_ppt.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu12/renoir_ppt.c b/drivers/gpu/drm/amd/pm/swsmu/smu12

[PATCH 10/22] drm/amdgpu: remove structurally dead code

2024-05-09 Thread Jesse Zhang
This code cannot be reached: return "UNKNOWN";. Signed-off-by: Jesse Zhang --- drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.h index 9a946f0e015c..109f471ff

[PATCH 08/22] drm/amd/pm: check the return of send smc msg for smu_v13

2024-05-09 Thread Jesse Zhang
Set smu work laod mask may fail, so check return. Signed-off-by: Jesse Zhang --- drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_7_ppt.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_7_ppt.c b/drivers/gpu/drm/amd/pm/swsmu/smu13

[PATCH 09/22] drm/amd/pm: check specific index for smu13

2024-05-09 Thread Jesse Zhang
Check for specific indexes that may be invalid values. Signed-off-by: Jesse Zhang --- drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c b/drivers/gpu/drm/amd/pm/swsmu/smu13

[PATCH 07/22] drm/amd/pm: check the return of send smc msg for navi10

2024-05-09 Thread Jesse Zhang
Set smu work laod mask may fail, so check return. Signed-off-by: Jesse Zhang --- drivers/gpu/drm/amd/pm/swsmu/smu11/navi10_ppt.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu11/navi10_ppt.c b/drivers/gpu/drm/amd/pm/swsmu/smu11

[PATCH 06/22] drm/amd/pm: check the return of send smc msg for sienna_cichild

2024-05-09 Thread Jesse Zhang
Set smu work laod mask may fail, so check return. Signed-off-by: Jesse Zhang --- drivers/gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.c b/drivers/gpu/drm/amd/pm/swsmu

[PATCH 05/22] drm/amd/pm: check specific index for aldebaran

2024-05-09 Thread Jesse Zhang
Check for specific indexes that may be invalid values. Signed-off-by: Jesse Zhang --- drivers/gpu/drm/amd/pm/swsmu/smu13/aldebaran_ppt.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu13/aldebaran_ppt.c b/drivers/gpu/drm/amd/pm/swsmu/smu13

[PATCH 03/22] drm/amdgpu: fix the waring dereferencing hive

2024-05-09 Thread Jesse Zhang
Check the amdgpu_hive_info *hive that maybe is NULL. Signed-off-by: Jesse Zhang --- drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c index 37820dd03cab..5a648a657dc6

[PATCH 04/22] drm/amd: fix the warning unchecking return vaule for sdma_v7

2024-05-09 Thread Jesse Zhang
check ring allocate success before emit preempt ib Signed-off-by: Jesse Zhang --- drivers/gpu/drm/amd/amdgpu/sdma_v7_0.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/sdma_v7_0.c b/drivers/gpu/drm/amd/amdgpu/sdma_v7_0.c index 0b5af1c50461

[PATCH 02/22] drm/amdgpu: the warning dereferencing obj for nbio_v7_4

2024-05-09 Thread Jesse Zhang
if ras_manager obj null, don't print NBIO err data Signed-off-by: Jesse Zhang --- drivers/gpu/drm/amd/amdgpu/nbio_v7_4.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/nbio_v7_4.c b/drivers/gpu/drm/amd/amdgpu/nbio_v7_4.c index fe18df10daaa

[PATCH 01/22] drm/amdgpu: fix dereference after null check

2024-05-09 Thread Jesse Zhang
check the pointer hive before use. Signed-off-by: Jesse Zhang --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c index 77f6fd50002a

[PATCH 2/2] drm/amd/pm: enable UMD Pstate profile level for renoir

2024-05-06 Thread Jesse Zhang
This patch enable UMD Pstates profile level for the renoir_set_performance_level interface. -profile_min_sclk -profile_min_fclk Signed-off-by: Jesse Zhang Suggested-by: Tim Huang --- .../gpu/drm/amd/pm/swsmu/smu12/renoir_ppt.c | 58 +++ 1 file changed, 48 insertions(+), 10

[PATCH 1/2] drm/amd/pm: revert the commit 576bffd10d01

2024-05-06 Thread Jesse Zhang
Revert this commit: 576bffd10d01 and will update new patch. Signed-off-by: Jesse Zhang --- .../gpu/drm/amd/pm/swsmu/smu12/renoir_ppt.c | 32 +++ 1 file changed, 5 insertions(+), 27 deletions(-) diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu12/renoir_ppt.c b/drivers/gpu/drm

[PATCH 1/2] drm/amd/pm: revert the commit 576bffd10d01

2024-05-06 Thread Jesse Zhang
This patch doesn't need and will update new patch. Signed-off-by: Jesse Zhang --- .../gpu/drm/amd/pm/swsmu/smu12/renoir_ppt.c | 32 +++ 1 file changed, 5 insertions(+), 27 deletions(-) diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu12/renoir_ppt.c b/drivers/gpu/drm/amd/pm

[PATCH] drm/amd/pm: fix the uninitialized scalar variable warning

2024-04-30 Thread Jesse Zhang
Fix warning for using uninitialized values sclk_mask, mclk_mask and soc_mask. v2:Set default variable to UMD PSTATE(Tim Huang) Signed-off-by: Jesse Zhang --- .../gpu/drm/amd/pm/swsmu/smu12/renoir_ppt.c | 32 --- 1 file changed, 27 insertions(+), 5 deletions(-) diff --git

[PATCH V2] drm/amd/pm: fix warning using uninitialized value of max_vid_step

2024-04-29 Thread Jesse Zhang
Check the return of pp_atomfwctrl_get_Voltage_table_v4 as it may fail to initialize max_vid_step V2: change the check condition (Tim Huang) Signed-off-by: Jesse Zhang --- drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega10_hwmgr.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git

[PATCH] drm/amd/pm: fix warning using uninitialized value of max_vid_step

2024-04-28 Thread Jesse Zhang
Check the return of pp_atomfwctrl_get_Voltage_table_v4 as it may fail to initialize max_vid_step Signed-off-by: Jesse Zhang --- drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega10_hwmgr.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/pm/powerplay/hwmgr

[PATCH 3/3 V2] drm/amd/pm: fix the uninitialized scalar variable warning

2024-04-28 Thread Jesse Zhang
Fix warning for using uninitialized values sclk_mask, mck_mask and soc_mask. v2: Init the variables in the renoir_get_profiling_clk_mask(Tim Huang) Signed-off-by: Jesse Zhang --- drivers/gpu/drm/amd/pm/swsmu/smu12/renoir_ppt.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/gpu

[PATCH 1/3 V2] drm/amd/pm: Fix negative array index read warning for pptable->DpmDescriptor

2024-04-28 Thread Jesse Zhang
Avoid using the negative values for clk_idex as an index into an array pptable->DpmDescriptor. V2: fix clk_index return check (Tim Huang) Signed-off-by: Jesse Zhang --- .../gpu/drm/amd/pm/swsmu/smu11/navi10_ppt.c | 27 ++- 1 file changed, 21 insertions(+), 6 deleti

[PATCH 2/2 V2] drm/amd/pm: fix uninitialized variable warning

2024-04-28 Thread Jesse Zhang
Check the return of function smum_send_msg_to_smc as it may fail to initialize the variable. Signed-off-by: Jesse Zhang --- .../drm/amd/pm/powerplay/hwmgr/smu10_hwmgr.c | 8 +-- .../drm/amd/pm/powerplay/hwmgr/smu7_hwmgr.c | 21 --- .../drm/amd/pm/powerplay/hwmgr

[PATCH 2/2] drm/amd/pm: fix uninitialized variable warning

2024-04-26 Thread Jesse Zhang
Check the return of function smum_send_msg_to_smc as it may fail to initialize the variable. Signed-off-by: Jesse Zhang --- .../drm/amd/pm/powerplay/hwmgr/smu10_hwmgr.c | 8 +-- .../drm/amd/pm/powerplay/hwmgr/smu7_hwmgr.c | 21 --- .../drm/amd/pm/powerplay/hwmgr

[PATCH 1/2] drm/amd/pm: fix the uninitialized scalar variable waring

2024-04-26 Thread Jesse Zhang
Initialize variable size before calling hwmgr->hwmgr_func->iread_sensor, such as smu7_read_sensor. Signed-off-by: Jesse Zhang --- drivers/gpu/drm/amd/pm/powerplay/amd_powerplay.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/amd/pm/powerplay/amd_powerplay.c b/drive

[PATCH 3/3] drm/amd/pm: fix the uninitialized scalar variable warning

2024-04-26 Thread Jesse Zhang
Fix warning for using uninitialized values ​​sclk_mask, mck_mask and soc_mask. Signed-off-by: Jesse Zhang --- drivers/gpu/drm/amd/pm/swsmu/smu12/renoir_ppt.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu12/renoir_ppt.c b/drivers

[PATCH 2/3] drm/amd/pm: fix the Out-of-bounds read warning

2024-04-26 Thread Jesse Zhang
using index i - 1U may beyond element index for mc_data[] when i = 0. Signed-off-by: Jesse Zhang --- drivers/gpu/drm/amd/pm/powerplay/hwmgr/ppatomctrl.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/ppatomctrl.c b/drivers/gpu

[PATCH 1/3] drm/amd/pm: Fix negative array index read warning for pptable->DpmDescriptor

2024-04-26 Thread Jesse Zhang
Avoid using the negative values for clk_idex as an index into an array pptable->DpmDescriptor. Signed-off-by: Jesse Zhang --- .../gpu/drm/amd/pm/swsmu/smu11/navi10_ppt.c | 25 +++ 1 file changed, 20 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/amd/pm/sw

[PATCH] drm/amdgpu: fix the warning about the expression (int)size - len

2024-04-25 Thread Jesse Zhang
Converting size from size_t to int may overflow. v2: keep reverse xmas tree order (Christian) Signed-off-by: Jesse Zhang --- drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c b

[PATCH V2] drm/amdgpu: fix the warning about the expression (int)size - len

2024-04-25 Thread Jesse Zhang
Converting size from size_t to int may overflow. v2: keep reverse xmas tree order (Christian) Signed-off-by: Jesse Zhang --- drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c b/drivers

[PATCH] drm/amdgpu: fix the warning about the expression (int)size - len

2024-04-25 Thread Jesse Zhang
Converting size from size_t to int may overflow. Signed-off-by: Jesse Zhang --- drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c index

[PATCH 4/4 V2] drm/amdgpu: Using uninitialized value *size when calling amdgpu_vce_cs_reloc

2024-04-24 Thread Jesse Zhang
Initialize the size before calling amdgpu_vce_cs_reloc, such as case 0x0301. V2: To really improve the handling we would actually need to have a separate value of 0x.(Christian) Signed-off-by: Jesse Zhang Suggested-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c

[PATCH 4/4 V2] drm/amdgpu: Using uninitialized value *size when calling amdgpu_vce_cs_reloc

2024-04-24 Thread Jesse Zhang
Initialize the size before calling amdgpu_vce_cs_reloc, such as case 0x0301. V2: To really improve the handling we would actually need to have a separate value of 0x.(Christian) Signed-off-by: Jesse Zhang --- drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c | 2 +- 1 file changed, 1

[PATCH] drm/amdgpu: fix some uninitialized variables

2024-04-23 Thread Jesse Zhang
Fix some variables not initialized before use. Scan them out using Synopsys tools. Signed-off-by: Jesse Zhang --- drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c | 5 + drivers/gpu/drm/amd/amdgpu/atom.c | 1 + drivers/gpu/drm/amd/amdgpu

[PATCH] drm/ttm: remove unused paramter

2024-03-25 Thread Jesse Zhang
remove the unsed the paramter in the function ttm_bo_bounce_temp_buffer and ttm_bo_add_move_fence. Signed-off-by: Jesse Zhang --- drivers/gpu/drm/ttm/ttm_bo.c | 10 -- 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/ttm/ttm_bo.c b/drivers/gpu/drm/ttm

[PATCH] drm/amdkfd: fix shift out of bounds about gpu debug

2024-02-29 Thread Jesse Zhang
/0x2d0 [ 388.152733] ? __pfx_worker_thread+0x10/0x10 [ 388.152734] kthread+0xfb/0x130 [ 388.152735] ? __pfx_kthread+0x10/0x10 [ 388.152736] ret_from_fork+0x3d/0x60 [ 388.152738] ? __pfx_kthread+0x10/0x10 [ 388.152739] ret_from_fork_asm+0x1b/0x30 [ 388.152742] Signed-off-by: Jesse Zhang

[PATCH V3] Revert "drm/amdgpu: remove vm sanity check from amdgpu_vm_make_compute" for Raven

2024-02-28 Thread Jesse . Zhang
D is clean through the function amdgpu_vm_pt_is_root_clean. So they have a conflict, and clinfo always failed. v1: - remove all the pte_supports_ats stuff from the amdgpu_vm code (Felix) Signed-off-by: Jesse Zhang --- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c| 23 -- drivers/gpu/drm/

[PATCH V3] Revert "drm/amdgpu: remove vm sanity check from amdgpu_vm_make_compute" for Raven

2024-02-28 Thread Jesse . Zhang
D is clean through the function amdgpu_vm_pt_is_root_clean. So they have a conflict, and clinfo always failed. v1: - remove all the pte_supports_ats stuff from the amdgpu_vm code (Felix) Signed-off-by: Jesse Zhang --- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c| 23 -- drivers/g

[PATCH] Revert "drm/amdgpu: remove vm sanity check from amdgpu_vm_make_compute" for Raven

2024-02-27 Thread Jesse . Zhang
e the root PD is clean through the function amdgpu_vm_pt_is_root_clean. So they have a conflict, and clinfo always failed. Signed-off-by: Jesse Zhang --- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 6 -- 1 file changed, 6 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c b/drive

[PATCH] drm/amdgpu: Fix NULL pointer issue

2023-10-26 Thread Jesse Zhang
/0x310 [ 2312.988278] __do_sys_finit_module+0xc0/0x130 [ 2312.988278] ? __do_sys_finit_module+0xc0/0x130 [ 2312.988278] __x64_sys_finit_module+0x1a/0x20 [ 2312.988278] do_syscall_64+0x3a/0x90 [ 2312.988278] entry_SYSCALL_64_after_hwframe+0x63/0xcd Signed-off-by: Jesse Zhang --- drivers/gpu/drm/amd/

[PATCH] drm/amdkfd: Fix shift out-of-bounds issue and remove unused code.

2023-10-18 Thread Jesse Zhang
[ 567.615323] exc_page_fault+0x81/0x1b0 [ 567.615328] asm_exc_page_fault+0x27/0x30 [ 567.615332] RIP: 0010:__get_user_8+0x1c/0x30 Suggested-by: Philip Yang Signed-off-by: Jesse Zhang --- drivers/gpu/drm/amd/amdkfd/kfd_svm.c | 62 +--- drivers/gpu/drm/amd/amdkfd

[PATCH] drm/amdkfd: Fix shift out-of-bounds issue

2023-10-18 Thread Jesse Zhang
[ 567.615323] exc_page_fault+0x81/0x1b0 [ 567.615328] asm_exc_page_fault+0x27/0x30 [ 567.615332] RIP: 0010:__get_user_8+0x1c/0x30 Signed-off-by: Jesse Zhang --- drivers/gpu/drm/amd/amdkfd/kfd_svm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdkfd

  1   2   >