[PATCH] drm/amd/display: avoid amdgpu_crtc dereference before crtc check

2023-11-22 Thread Alexey Kodanev
has a valid pointer. Detected using the static analysis tool - Svace. Signed-off-by: Alexey Kodanev --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_plane.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_plane.c b/dri

[PATCH] drm/amd/display: drop unnecessary NULL check in dce60_should_enable_fbc()

2023-01-12 Thread Alexey Kodanev
pipe_ctx pointer cannot be NULL when getting the address of an element of the pipe_ctx array. Detected using the static analysis tool - Svace. Signed-off-by: Alexey Kodanev --- drivers/gpu/drm/amd/display/dc/dce60/dce60_hw_sequencer.c | 3 --- 1 file changed, 3 deletions(-) diff --git a

[PATCH] drm/amd/display: drop unnecessary NULL checks in debugfs

2022-12-27 Thread Alexey Kodanev
pipe_ctx pointer cannot be NULL when getting the address of an element of the pipe_ctx array. Moreover, the MAX_PIPES is defined as 6, so pipe_ctx is not NULL after the loop either. Detected using the static analysis tool - Svace. Signed-off-by: Alexey Kodanev --- .../amd/display/amdgpu_dm

[PATCH 2/2] drm/amd/pm: smu7_hwmgr: fix potential off-by-one overflow in 'performance_levels'

2022-10-04 Thread Alexey Kodanev
is tool - Svace. Fixes: 599a7e9fe1b6 ("drm/amd/powerplay: implement smu7 hwmgr to manager asics with smu ip version 7.") Signed-off-by: Alexey Kodanev --- drivers/gpu/drm/amd/pm/powerplay/hwmgr/smu7_hwmgr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gp

[PATCH 1/2] drm/amd/pm: vega10_hwmgr: fix potential off-by-one overflow in 'performance_levels'

2022-10-04 Thread Alexey Kodanev
alysis tool - Svace. Fixes: f83a9991648b ("drm/amd/powerplay: add Vega10 powerplay support (v5)") Signed-off-by: Alexey Kodanev --- drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega10_hwmgr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/pm/powerplay/

[PATCH] drm/radeon: fix potential buffer overflow in ni_set_mc_special_registers()

2022-06-06 Thread Alexey Kodanev
last' can be equal to SMC_NISLANDS_MC_REGISTER_ARRAY_SIZE and it seems it can be a valid value. Detected using the static analysis tool - Svace. Fixes: 69e0b57a91ad ("drm/radeon/kms: add dpm support for cayman (v5)") Signed-off-by: Alexey Kodanev --- drivers/gpu/drm/radeon/ni_dpm.