Re: [PATCH 1/2] drm/amd/display: Fix null check for pipe_ctx->plane_state in dcn20_program_pipe

2024-11-14 Thread Chung, ChiaHsuan (Tom)
Reviewed-by: Tom Chung On 11/5/2024 10:01 PM, Zicheng Qu wrote: This commit addresses a null pointer dereference issue in dcn20_program_pipe(). Previously, commit 8e4ed3cf1642 ("drm/amd/display: Add null check for pipe_ctx->plane_state in dcn20_program_pipe") partially fixed the null pointer de

Re: [PATCH 2/2] drm/amd/display: Fix null check for pipe_ctx->plane_state in hwss_setup_dpp

2024-11-14 Thread Chung, ChiaHsuan (Tom)
Reviewed-by: Tom Chung On 11/5/2024 10:01 PM, Zicheng Qu wrote: This commit addresses a null pointer dereference issue in hwss_setup_dpp(). The issue could occur when pipe_ctx->plane_state is null. The fix adds a check to ensure `pipe_ctx->plane_state` is not null before accessing. This prevent

Re: [PATCH] drm/amd/display: Fix kdoc entry for 'tps' in dc_process_dmub_dpia_set_tps_notification

2024-09-17 Thread Chung, ChiaHsuan (Tom)
Reviewed-by: Tom Chung On 9/17/2024 9:13 PM, Srinivasan Shanmugam wrote: Correct the parameter descriptor for the function `dc_process_dmub_dpia_set_tps_notification` to match the actual parameters used. Fixes the below with gcc W=1: drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc.c:5768: war

Re: [PATCH] drm/amd/display: Add kdoc entry for 'program_isharp_1dlut' in 'dpp401_dscl_program_isharp'

2024-09-04 Thread Chung, ChiaHsuan (Tom)
Reviewed-by: Tom Chung On 9/4/2024 3:43 PM, Srinivasan Shanmugam wrote: Added a descriptor for the 'program_isharp_1dlut' parameter, which is a flag used to determine whether to program the isharp 1D LUT. Fixes the below with gcc W=1: drivers/gpu/drm/amd/amdgpu/../display/dc/dpp/dcn401/dcn401_

Re: [PATCH v2] drm/amd/display: Add missing kdoc entry for 'bs_coeffs_updated' in dpp401_dscl_program_isharp

2024-08-31 Thread Chung, ChiaHsuan (Tom)
Reviewed-by: Tom Chung On 8/29/2024 9:17 PM, Srinivasan Shanmugam wrote: This commit addresses a missing kdoc for the 'bs_coeffs_updated' parameter in the 'dpp401_dscl_program_isharp' function. The 'bs_coeffs_updated' is a flag indicating whether the Blur and Scale Coefficients have been update

Re: [PATCH] drm/amd/display: Add missing kdoc entry for 'bs_coeffs_updated' in dpp401_dscl_program_isharp

2024-08-28 Thread Chung, ChiaHsuan (Tom)
On 8/28/2024 7:25 PM, Srinivasan Shanmugam wrote: Fixes the below with gcc W=1: drivers/gpu/drm/amd/amdgpu/../display/dc/dpp/dcn401/dcn401_dpp_dscl.c:961: warning: Function parameter or struct member 'bs_coeffs_updated' not described in 'dpp401_dscl_program_isharp' Cc: Tom Chung Cc: Rodrigo S

Re: [PATCH] drm/amd/display: Align hwss_wait_for_all_blank_complete descriptor with implementation

2024-08-12 Thread Chung, ChiaHsuan (Tom)
Reviewed-by: Tom Chung On 8/12/2024 6:40 PM, Srinivasan Shanmugam wrote: The descriptor for `hwss_wait_for_all_blank_complete` was previously misaligned with the actual implementation. This commit refines the descriptor to reflect the implementation of `hwss_wait_for_all_blank_complete` Fixes

Re: [PATCH v2 1/2] drm/amd/display: Add null check for 'afb' in amdgpu_dm_update_cursor (v2)

2024-08-07 Thread Chung, ChiaHsuan (Tom)
Reviewed-by: Tom Chung On 8/7/2024 9:20 AM, Srinivasan Shanmugam wrote: This commit adds a null check for the 'afb' variable in the amdgpu_dm_update_cursor function. Previously, 'afb' was assumed to be null at line 8388, but was used later in the code without a null check. This could potentiall

Re: [PATCH v2 2/2] drm/amd/display: Add null check for 'afb' in amdgpu_dm_plane_handle_cursor_update (v2)

2024-08-07 Thread Chung, ChiaHsuan (Tom)
Reviewed-by: Tom Chung On 8/7/2024 9:20 AM, Srinivasan Shanmugam wrote: This commit adds a null check for the 'afb' variable in the amdgpu_dm_plane_handle_cursor_update function. Previously, 'afb' was assumed to be null, but was used later in the code without a null check. This could potentiall

Re: [PATCH 3/3] drm/amd/display: Add NULL check for function pointer in dcn401_set_output_transfer_func

2024-07-31 Thread Chung, ChiaHsuan (Tom)
Reviewed-by: Tom Chung On 7/31/2024 3:57 PM, Srinivasan Shanmugam wrote: This commit adds a null check for the set_output_gamma function pointer in the dcn401_set_output_transfer_func function. Previously, set_output_gamma was being checked for null, but then it was being dereferenced without a

Re: [PATCH 2/3] drm/amd/display: Add NULL check for function pointer in dcn32_set_output_transfer_func

2024-07-31 Thread Chung, ChiaHsuan (Tom)
Reviewed-by: Tom Chung On 7/31/2024 3:57 PM, Srinivasan Shanmugam wrote: This commit adds a null check for the set_output_gamma function pointer in the dcn32_set_output_transfer_func function. Previously, set_output_gamma was being checked for null, but then it was being dereferenced without an

Re: [PATCH 1/3] drm/amd/display: Add NULL check for function pointer in dcn20_set_output_transfer_func

2024-07-31 Thread Chung, ChiaHsuan (Tom)
Reviewed-by: Tom Chung On 7/31/2024 3:57 PM, Srinivasan Shanmugam wrote: This commit adds a null check for the set_output_gamma function pointer in the dcn20_set_output_transfer_func function. Previously, set_output_gamma was being checked for null at line 1030, but then it was being dereferenc

Re: [PATCH] drm/amd/display: Align 'dpp401_dscl_program_isharp' with actual function parameters

2024-07-30 Thread Chung, ChiaHsuan (Tom)
Reviewed-by: Tom Chung On 7/30/2024 12:11 PM, Srinivasan Shanmugam wrote: This commit corrects the function comment for 'dpp401_dscl_program_isharp' in 'dcn401_dpp_dscl.c'. The comment previously included a description for a non-existent parameter 'bs_coeffs_updated'. This parameter descriptio

Re: [PATCH] drm/amd/display: Handle null 'stream_status' in 'planes_changed_for_existing_stream'

2024-07-29 Thread Chung, ChiaHsuan (Tom)
Reviewed-by: Tom Chung On 7/26/2024 10:03 PM, Srinivasan Shanmugam wrote: This commit adds a null check for 'stream_status' in the function 'planes_changed_for_existing_stream'. Previously, the code assumed 'stream_status' could be null, but did not handle the case where it was actually null. T

Re: [PATCH] drm/amd/display: Add null check for pipe_ctx->plane_state in dcn20_program_pipe

2024-07-26 Thread Chung, ChiaHsuan (Tom)
Reviewed-by: Tom Chung On 7/25/2024 10:54 AM, Srinivasan Shanmugam wrote: This commit addresses a null pointer dereference issue in the `dcn20_program_pipe` function. The issue could occur when `pipe_ctx->plane_state` is null. The fix adds a check to ensure `pipe_ctx->plane_state` is not null

Re: [PATCH] drm/amd/display: Add null check for top_pipe_to_program in commit_planes_for_stream

2024-07-26 Thread Chung, ChiaHsuan (Tom)
Reviewed-by: Tom Chung On 7/25/2024 10:54 AM, Srinivasan Shanmugam wrote: This commit addresses a null pointer dereference issue in the `commit_planes_for_stream` function at line 4140. The issue could occur when `top_pipe_to_program` is null. The fix adds a check to ensure `top_pipe_to_progra

Re: [PATCH v2] drm/amd/display: Add null check for set_output_gamma in dcn30_set_output_transfer_func

2024-07-22 Thread Chung, ChiaHsuan (Tom)
Reviewed-by: Tom Chung On 7/22/2024 7:48 PM, Srinivasan Shanmugam wrote: This commit adds a null check for the set_output_gamma function pointer in the dcn30_set_output_transfer_func function. Previously, set_output_gamma was being checked for nullity at line 386, but then it was being derefer

Re: [PATCH] drm/amd/display: Add null check for set_output_gamma in dcn30_set_output_transfer_func

2024-07-21 Thread Chung, ChiaHsuan (Tom)
On 7/21/2024 2:22 PM, Srinivasan Shanmugam wrote: This commit adds a null check for the set_output_gamma function pointer in the dcn30_set_output_transfer_func function. Previously, set_output_gamma was being checked for nullity at line 386, but then it was being dereferenced without any nulli

Re: [PATCH 2/2] drm/amd/display: Add null check for head_pipe in dcn32_acquire_idle_pipe_for_head_pipe_in_layer

2024-07-21 Thread Chung, ChiaHsuan (Tom)
Reviewed-by: Tom Chung On 7/22/2024 9:46 AM, Srinivasan Shanmugam wrote: This commit addresses a potential null pointer dereference issue in the `dcn32_acquire_idle_pipe_for_head_pipe_in_layer` function. The issue could occur when `head_pipe` is null. The fix adds a check to ensure `head_pipe`

Re: [PATCH 1/2] drm/amd/display: Add null check for head_pipe in dcn201_acquire_free_pipe_for_layer

2024-07-21 Thread Chung, ChiaHsuan (Tom)
Reviewed-by: Tom Chung On 7/22/2024 9:46 AM, Srinivasan Shanmugam wrote: This commit addresses a potential null pointer dereference issue in the `dcn201_acquire_free_pipe_for_layer` function. The issue could occur when `head_pipe` is null. The fix adds a check to ensure `head_pipe` is not null

Re: [PATCH] drm/amd/display: Fix index out of bounds in DCN30 color transformation

2024-07-21 Thread Chung, ChiaHsuan (Tom)
Reviewed-by: Tom Chung On 7/21/2024 2:22 PM, Srinivasan Shanmugam wrote: This commit addresses a potential index out of bounds issue in the `cm3_helper_translate_curve_to_hw_format` function in the DCN30 color management module. The issue could occur when the index 'i' exceeds the number of tra

Re: [PATCH] drm/amd/display: Fix index out of bounds in DCN30 degamma hardware format translation

2024-07-21 Thread Chung, ChiaHsuan (Tom)
Reviewed-by: Tom Chung On 7/21/2024 2:22 PM, Srinivasan Shanmugam wrote: This commit addresses a potential index out of bounds issue in the `cm3_helper_translate_curve_to_degamma_hw_format` function in the DCN30 color management module. The issue could occur when the index 'i' exceeds the num

Re: [PATCH] drm/amd/display: Fix index out of bounds in degamma hardware format translation

2024-07-21 Thread Chung, ChiaHsuan (Tom)
Reviewed-by: Tom Chung On 7/21/2024 2:22 PM, Srinivasan Shanmugam wrote: Fixes index out of bounds issue in `cm_helper_translate_curve_to_degamma_hw_format` function. The issue could occur when the index 'i' exceeds the number of transfer function points (TRANSFER_FUNC_POINTS). The fix adds a

Re: [PATCH] drm/amd/display: Implement bounds check for stream encoder creation in DCN401

2024-07-21 Thread Chung, ChiaHsuan (Tom)
Reviewed-by: Tom Chung On 7/20/2024 12:12 AM, Srinivasan Shanmugam wrote: 'stream_enc_regs' array is an array of dcn10_stream_enc_registers structures. The array is initialized with four elements, corresponding to the four calls to stream_enc_regs() in the array initializer. This means that val

Re: [PATCH] drm/amd/display: Add 'pstate_keepout' kdoc entry in 'optc1_program_timing'

2024-07-18 Thread Chung, ChiaHsuan (Tom)
Reviewed-by: Tom Chung On 7/18/2024 12:03 PM, Srinivasan Shanmugam wrote: Fixes the below with gcc W=1: Function parameter or struct member 'pstate_keepout' not described in 'optc1_program_timing' Cc: Tom Chung Cc: Rodrigo Siqueira Cc: Roman Li Cc: Alex Hung Cc: Aurabindo Pillai Cc: Harr

Re: [PATCH] drm/amdgpu/display: Update kdoc for 'optc35_set_odm_combine'

2024-05-16 Thread Chung, ChiaHsuan (Tom)
Reviewed-by: Tom Chung On 5/15/2024 11:23 PM, Srinivasan Shanmugam wrote: The parameters segment_width and last_segment_width are used to control the configuration of the Output Plane Processor (OPP), specifically the width of each segment that the display is divided into and the width of the l

Re: [PATCH] drm/amd/display: Drop pixel_clock_mhz

2024-05-14 Thread Chung, ChiaHsuan (Tom)
This patch looks good to me. Reviewed-by: Tom Chung On 5/9/2024 9:55 AM, Mario Limonciello wrote: The pixel_clock_mhz property is populated in amdgpu_dm when Freesync is setup, but it is not used anywhere in amdgpu_dm. Remove the dead code. Cc:chiahsuan.ch...@amd.com Signed-off-by: Mario Limo

Re: [PATCH] drm/amd/display: Address kdoc for 'Enable CRTC' in optc401_enable_crtc

2024-04-22 Thread Chung, ChiaHsuan (Tom)
Reviewed-by: Tom Chung On 4/23/2024 9:59 AM, Srinivasan Shanmugam wrote: This commit fixes the kdoc for 'Enable CRTC' in `optc401_enable_crtc` function. Fixes the below with gcc W=1: drivers/gpu/drm/amd/amdgpu/../display/dc/optc/dcn401/dcn401_optc.c:177: warning: This comment starts with '/**

Re: [PATCH] drm/amd/display: Add missing parameter desc in dc_commit_streams

2024-04-03 Thread Chung, ChiaHsuan (Tom)
Reviewed-by: Tom Chung On 4/1/2024 9:50 PM, Srinivasan Shanmugam wrote: This commit removes the lines that describe the 'streams' and 'stream_count' parameters and adds a line to describe the 'params' parameter, which was missing from the original comment block. Fixes the below with gcc W=1: d

Re: [PATCH] drm/amd/display: Fix potential index out of bounds in color transformation function

2024-03-10 Thread Chung, ChiaHsuan (Tom)
Reviewed-by: Tom Chung On 2/28/2024 5:17 PM, Srinivasan Shanmugam wrote: Fixes index out of bounds issue in the color transformation function. The issue could occur when the index 'i' exceeds the number of transfer function points (TRANSFER_FUNC_POINTS). The fix adds a check to ensure 'i' is w

Re: [PATCH v2] drm/amd/display: Fix potential null pointer dereference in dc_dmub_srv

2024-02-20 Thread Chung, ChiaHsuan (Tom)
Reviewed-by: Tom Chung On 2/20/2024 5:06 PM, Srinivasan Shanmugam wrote: Fixes potential null pointer dereference warnings in the dc_dmub_srv_cmd_list_queue_execute() and dc_dmub_srv_is_hw_pwr_up() functions. In both functions, the 'dc_dmub_srv' variable was being dereferenced before it was ch

Re: [PATCH] drm/amd/display: Add 'replay' NULL check in 'edp_set_replay_allow_active()'

2024-02-16 Thread Chung, ChiaHsuan (Tom)
Reviewed-by: Tom Chung On 2/15/2024 9:31 PM, Srinivasan Shanmugam wrote: In the first if statement, we're checking if 'replay' is NULL. But in the second if statement, we're not checking if 'replay' is NULL again before calling replay->funcs->replay_set_power_opt(). if (replay == NULL && force

Re: [PATCH] drm/amd/display: Fix buffer overflow in 'get_host_router_total_dp_tunnel_bw()'

2024-01-30 Thread Chung, ChiaHsuan (Tom)
It looks good to me. Reviewed-by: Tom Chung On 1/30/2024 5:49 PM, SHANMUGAM, SRINIVASAN wrote: [AMD Official Use Only - General] *From:* SHANMUGAM, SRINIVASAN *Sent:* Tuesday, January 30, 2024 3:18 PM *To:* Siqueira, Rodrigo ; Pillai, Aurabindo *Cc:* Cyr

Re: [PATCH] drm/amd/display: Address kdoc for eDP Panel Replay feature in 'amdgpu_dm_crtc_set_panel_sr_feature()'

2024-01-22 Thread Chung, ChiaHsuan (Tom)
Reviewed-by: Tom Chung On 1/22/2024 12:14 PM, Srinivasan Shanmugam wrote: Fixes the below: drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_crtc.c:100: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst * The DRM vb