[PATCH] drm/amd/display: Add null pointer check for get_first_active_display()

2025-05-25 Thread Wentao Liang
pointer check for get_first_active_display() and return MOD_HDCP_STATUS_DISPLAY_NOT_FOUND if the function return null. Fixes: 2deade5ede56 ("drm/amd/display: Remove hdcp display state with mst fix") Cc: sta...@vger.kernel.org # v5.8 Signed-off-by: Wentao Liang --- drivers/gpu/drm/amd/displ

[PATCH] drm: radeon: ci_dpm: Add error handling in ci_enable_vce_dpm()

2025-05-18 Thread Wentao Liang
: cc8dbbb4f62a ("drm/radeon: add dpm support for CI dGPUs (v2)") Cc: sta...@vger.kernel.org # v3.12 Signed-off-by: Wentao Liang --- drivers/gpu/drm/radeon/ci_dpm.c | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/radeon/ci_dpm.c b/drivers/gpu/drm/radeo

[PATCH] drm: radeon: ci_dpm: Add error handling for ci_send_msg_to_smc_with_parameter()

2025-05-15 Thread Wentao Liang
ci_send_msg_to_smc_with_parameter(), return -EINVAL if the sending fails. Fixes: cc8dbbb4f62a ("drm/radeon: add dpm support for CI dGPUs (v2)") Cc: sta...@vger.kernel.org # v3.12 Signed-off-by: Wentao Liang --- drivers/gpu/drm/radeon/ci_dpm.c | 13 ++--- 1 file changed, 10 insertions(+), 3 deletion

[PATCH v2] drm/amdgpu: Remove redundant return value checks for amdgpu_ras_error_data_init

2025-04-29 Thread Wentao Liang
this change keeps the usage consistent within amdgpu_ras_do_page_retirement(), which also does not check the return value. Fixes: 5b1270beb380 ("drm/amdgpu: add ras_err_info to identify RAS error source") Cc: sta...@vger.kernel.org # 6.7+ Signed-off-by: Wentao Liang --- v2: Add a mi

[PATCH RESEND] drm/amdgpu: Remove redundant return value checks for amdgpu_ras_error_data_init

2025-04-22 Thread Wentao Liang
this change keeps the usage consistent with amdgpu_ras_do_page_retirement(), which also does not check the return value. Fixes: 5b1270beb380 ("drm/amdgpu: add ras_err_info to identify RAS error source") Cc: sta...@vger.kernel.org # 6.7+ Signed-off-by: Wentao Liang --- drivers/gpu

[PATCH RESEND] habanalabs: Add error handling for hl_mmu_get_hop_pte_phys_addr()

2025-04-21 Thread Wentao Liang
function to fix this issue. Fixes: 8aa1e1e60553 ("habanalabs: add gaudi2 MMU support") Cc: sta...@vger.kernel.org # v6.0+ Signed-off-by: Wentao Liang --- drivers/accel/habanalabs/common/mmu/mmu_v2_hr.c | 5 + 1 file changed, 5 insertions(+) diff --git a/drivers/accel/habanalabs/

[PATCH RESEND] drm/amd/display: Add dp_decide_lane_settings() to ensure compatibility

2025-04-21 Thread Wentao Liang
. Add dp_decide_lane_settings() to enable adaptive lane configuration. Fixes: 630168a97314 ("drm/amd/display: move dp link training logic to link_dp_training") Cc: sta...@vger.kernel.org # 6.3+ Signed-off-by: Wentao Liang --- .../amd/display/dc/link/protocols/link_dp_training_128b_132b.c

[PATCH] drm/amd/pm/powerplay/smumgr/vegam_smumgr: Fix error handling in vegam_populate_smc_boot_level()

2025-04-15 Thread Wentao Liang
v5.6+ Signed-off-by: Wentao Liang --- .../drm/amd/pm/powerplay/smumgr/vegam_smumgr.c| 15 ++- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/amd/pm/powerplay/smumgr/vegam_smumgr.c b/drivers/gpu/drm/amd/pm/powerplay/smumgr/vegam_smumgr.c index 34c9f5

[PATCH v2] drm/amd/pm/powerplay/smumgr/fiji_smumgr: Add error check in fiji_populate_smc_boot_level()

2025-04-15 Thread Wentao Liang
rplay/smumgr/fiji_smumgr: Remove unused variable 'result'") Cc: sta...@vger.kernel.org # v5.11+ Signed-off-by: Wentao Liang --- v2: Fix error code. .../drm/amd/pm/powerplay/smumgr/fiji_smumgr.c | 23 ++- 1 file changed, 17 insertions(+), 6 deletions(-) diff --g

[PATCH RESEND] habanalabs: Add error handling for hl_mmu_get_hop_pte_phys_addr()

2025-04-14 Thread Wentao Liang
function to fix this issue. Fixes: 8aa1e1e60553 ("habanalabs: add gaudi2 MMU support") Cc: sta...@vger.kernel.org # v6.0+ Signed-off-by: Wentao Liang --- drivers/accel/habanalabs/common/mmu/mmu_v2_hr.c | 5 + 1 file changed, 5 insertions(+) diff --git a/drivers/accel/habanalabs/

[PATCH RESEND] drm/amd/pm/powerplay/smumgr/fiji_smumgr: Fix wrong return value of fiji_populate_smc_boot_level()

2025-04-13 Thread Wentao Liang
implementation can be found in tonga_populate_smc_boot_level(). Fixes: dcaf3483ae46 ("drm/amd/pm/powerplay/smumgr/fiji_smumgr: Remove unused variable 'result'") Signed-off-by: Wentao Liang --- .../drm/amd/pm/powerplay/smumgr/fiji_smumgr.c | 23 +-- 1 file changed,

[PATCH v3] drm/amd/display: Add error check for avi and vendor infoframe setup function

2025-04-13 Thread Wentao Liang
. Signed-off-by: Wentao Liang --- v3: Fix error-logging function error v2: Fix code diff error drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 13 +++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm

[PATCH v2] drm/amd/display: Add error check for avi and vendor infoframe setup function

2025-04-09 Thread Wentao Liang
. Signed-off-by: Wentao Liang --- v2: Fix code diff error drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 13 +++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c

[PATCH] drm/amd/display: Add error check for avi and vendor infoframe setup function

2025-04-07 Thread Wentao Liang
. Signed-off-by: Wentao Liang --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c index 0396429a64be..d6feafb8fa3d 100644

[PATCH] drm/amd/display: Add dp_decide_lane_settings() to ensure compatibility

2025-04-04 Thread Wentao Liang
. Add dp_decide_lane_settings() to enable adaptive lane configuration. Fixes: 630168a97314 ("drm/amd/display: move dp link training logic to link_dp_training") Cc: sta...@vger.kernel.org # 6.3+ Signed-off-by: Wentao Liang --- .../amd/display/dc/link/protocols/link_dp_training_128b_132b.c

[PATCH] drm/amd/pm/powerplay/smumgr/fiji_smumgr: Fix wrong return value of fiji_populate_smc_boot_level()

2025-04-03 Thread Wentao Liang
implementation can be found in tonga_populate_smc_boot_level(). Fixes: dcaf3483ae46 ("drm/amd/pm/powerplay/smumgr/fiji_smumgr: Remove unused variable 'result'") Signed-off-by: Wentao Liang --- .../drm/amd/pm/powerplay/smumgr/fiji_smumgr.c | 23 +-- 1 file changed,

[PATCH] habanalabs: Add error handling for hl_mmu_get_hop_pte_phys_addr()

2025-04-01 Thread Wentao Liang
function to fix this issue. Fixes: 8aa1e1e60553 ("habanalabs: add gaudi2 MMU support") Cc: sta...@vger.kernel.org # v6.0+ Signed-off-by: Wentao Liang --- drivers/accel/habanalabs/common/mmu/mmu_v2_hr.c | 5 + 1 file changed, 5 insertions(+) diff --git a/drivers/accel/habanalabs/

[PATCH] drm/amdgpu/gfx12: correct cleanup of 'me' field with gfx_v12_0_me_fini()

2025-03-11 Thread Wentao Liang
. Fixes: 52cb80c12e8a ("drm/amdgpu: Add gfx v12_0 ip block support (v6)") Cc: sta...@vger.kernel.org # 6.11+ Signed-off-by: Wentao Liang --- drivers/gpu/drm/amd/amdgpu/gfx_v12_0.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v12_0.c

[PATCH v2] drm/amdgpu: handle amdgpu_cgs_create_device() errors in amd_powerplay_create()

2025-03-07 Thread Wentao Liang
Add error handling to propagate amdgpu_cgs_create_device() failures to the caller. When amdgpu_cgs_create_device() fails, release hwmgr and return -ENOMEM to prevent null pointer dereference. [v1]->[v2]: Change error code from -EINVAL to -ENOMEM. Free hwmgr. Signed-off-by: Wentao Li

[PATCH] drm/exynos/vidi: Remove redundant error handling in vidi_get_modes()

2025-03-05 Thread Wentao Liang
 drm_edid_connector_update() function with a NULL drm_edid as an argument. This ensures that operations such as connector settings are performed in its callee function,  _drm_edid_connector_property_update. To maintain the integrity of the operation, redundant error handling needs to be removed. Signed-off-by: Wentao

[PATCH] drm/tegra: Handle EDID allocation failures in tegra_output_connector_get_modes()

2025-03-05 Thread Wentao Liang
implementation can be found in `vidi_get_modes()`, where the return values are carefully validated, and the function returns 0 upon failure. Fixes: 98365ca74cbf ("drm/tegra: convert to struct drm_edid") Cc: sta...@vger.kernel.org # 6.12+ Signed-off-by: Wentao Liang --- drivers/gpu/drm/tegra/ou

[PATCH] drm/amdgpu: handle amdgpu_cgs_create_device() errors in amd_powerplay_create()

2025-03-03 Thread Wentao Liang
Add error handling to propagate amdgpu_cgs_create_device() failures to the caller. When amdgpu_cgs_create_device() fails, immediately return -EINVAL to stop further processing and prevent null pointer dereference. Signed-off-by: Wentao Liang --- drivers/gpu/drm/amd/pm/powerplay/amd_powerplay.c

[PATCH] drm/radeon: Add error handlings for r420 CP errata initialization

2025-02-19 Thread Wentao Liang
: 62cdc0c20663 ("drm/radeon/kms: Workaround RV410/R420 CP errata (V3)") Cc: sta...@vger.kernel.org # 2.6.33+ Signed-off-by: Wentao Liang --- drivers/gpu/drm/radeon/r420.c | 15 +++ 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/radeon/r420.c b/d

[PATCH] drm/radeon: Add error handlings for r420 cp errata initiation

2025-02-19 Thread Wentao Liang
: 62cdc0c20663 ("drm/radeon/kms: Workaround RV410/R420 CP errata (V3)") Cc: sta...@vger.kernel.org # 2.6.33+ Signed-off-by: Wentao Liang --- drivers/gpu/drm/radeon/r420.c | 15 +++ 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/radeon/r420.c b/drive

[PATCH] drm/i915: Check drm_syncobj_fence_get return value in eb_fences_add

2025-02-11 Thread Wentao Liang
returns an error if it is NULL, preventing the NULL pointer dereference. Fixes: 544460c33821 ("drm/i915: Multi-BB execbuf") Cc: sta...@vger.kernel.org # 5.16+ Signed-off-by: Wentao Liang --- drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c | 6 ++ 1 file changed, 6 insertions(+) di

[PATCH] drm/amdgpu: Remove redundant return value checks for amdgpu_ras_error_data_init

2025-02-11 Thread Wentao Liang
this change keeps the usage consistent with amdgpu_ras_do_page_retirement(), which also does not check the return value. Fixes: 5b1270beb380 ("drm/amdgpu: add ras_err_info to identify RAS error source") Cc: sta...@vger.kernel.org # 6.7+ Signed-off-by: Wentao Liang --- drivers/gpu