[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CADnq5_OG8pDyYruc4VCpd_eG8MxZUDf+nPr4zTy+u-7-a5L6uw@mail.gmail.com>
Date: Mon, 27 Mar 2023 19:53:36 -0400
From: Alex Deucher <alexdeucher@...il.com>
To: Caio Novais <caionovais@....br>
Cc: amd-gfx@...ts.freedesktop.org, dri-devel@...ts.freedesktop.org,
linux-kernel@...r.kernel.org, Felipe Clark <felipe.clark@....com>,
Wenjing Liu <wenjing.liu@....com>,
Maíra Canal <mairacanal@...eup.net>,
Mario Limonciello <mario.limonciello@....com>,
Jun Lei <Jun.Lei@....com>, David Airlie <airlied@...il.com>,
Charlene Liu <Charlene.Liu@....com>,
Gabe Teeger <gabe.teeger@....com>,
Rodrigo Siqueira <Rodrigo.Siqueira@....com>,
Taimur Hassan <Syed.Hassan@....com>,
Aurabindo Pillai <aurabindo.pillai@....com>,
Alvin Lee <alvin.lee2@....com>,
George Shen <George.Shen@....com>,
Hamza Mahfooz <hamza.mahfooz@....com>,
Chaitanya Dhere <chaitanya.dhere@....com>,
Harry Wentland <harry.wentland@....com>,
Alan Liu <HaoPing.Liu@....com>,
Mukul Joshi <mukul.joshi@....com>,
André Almeida <andrealmeid@...lia.com>,
Jingwen Zhu <Jingwen.Zhu@....com>,
Guo Zhengkui <guozhengkui@...o.com>,
Leo Li <sunpeng.li@....com>, Melissa Wen <mwen@...lia.com>,
Le Ma <le.ma@....com>,
Jiapeng Chong <jiapeng.chong@...ux.alibaba.com>,
Martin Leung <Martin.Leung@....com>,
Ryan Lin <tsung-hua.lin@....com>,
Brian Chang <Brian.Chang@....com>,
Sung Joon Kim <sungjoon.kim@....com>,
Yifan Zhang <yifan1.zhang@....com>,
Jack Xiao <Jack.Xiao@....com>,
Dillon Varone <Dillon.Varone@....com>,
Tom Chung <chiahsuan.chung@....com>,
Wesley Chalmers <Wesley.Chalmers@....com>,
Qingqing Zhuo <qingqing.zhuo@....com>,
"Pan, Xinhui" <Xinhui.Pan@....com>, Zhan Liu <zhan.liu@....com>,
Roman Li <Roman.Li@....com>,
Christian König <christian.koenig@....com>,
Daniel Vetter <daniel@...ll.ch>, Wayne Lin <wayne.lin@....com>,
Alex Deucher <alexander.deucher@....com>,
Ethan Wellenreiter <Ethan.Wellenreiter@....com>,
Nicholas Kazlauskas <Nicholas.Kazlauskas@....com>,
Joshua Ashton <joshua@...ggi.es>,
Hawking Zhang <Hawking.Zhang@....com>
Subject: Re: [PATCH 12/12] drm/amd/display: Remove two unused variables
'result_write_min_hblank' and 'hblank_size'
On Mon, Mar 27, 2023 at 7:36 PM Caio Novais <caionovais@....br> wrote:
>
> Compiling AMD GPU drivers displays a warning:
>
> drivers/gpu/drm/amd/amdgpu/../display/dc/link/protocols/link_dp_capability.c: In function ‘dpcd_set_source_specific_data’:
> drivers/gpu/drm/amd/amdgpu/../display/dc/link/protocols/link_dp_capability.c:1290:32: warning: variable ‘result_write_min_hblank’ set but not used [-Wunused-but-set-variable]
>
> Get rid of it by removing the variable 'result_write_min_hblank' and 'hblank_size'.
>
> Signed-off-by: Caio Novais <caionovais@....br>
> ---
> .../drm/amd/display/dc/link/protocols/link_dp_capability.c | 7 -------
> 1 file changed, 7 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/display/dc/link/protocols/link_dp_capability.c b/drivers/gpu/drm/amd/display/dc/link/protocols/link_dp_capability.c
> index d4370856f164..7392fcf17653 100644
> --- a/drivers/gpu/drm/amd/display/dc/link/protocols/link_dp_capability.c
> +++ b/drivers/gpu/drm/amd/display/dc/link/protocols/link_dp_capability.c
> @@ -1287,7 +1287,6 @@ void dc_link_overwrite_extended_receiver_cap(
> void dpcd_set_source_specific_data(struct dc_link *link)
> {
> if (!link->dc->vendor_signature.is_valid) {
> - enum dc_status result_write_min_hblank = DC_NOT_SUPPORTED;
> struct dpcd_amd_signature amd_signature = {0};
> struct dpcd_amd_device_id amd_device_id = {0};
>
> @@ -1324,16 +1323,10 @@ void dpcd_set_source_specific_data(struct dc_link *link)
> if (link->ctx->dce_version >= DCN_VERSION_2_0 &&
> link->dc->caps.min_horizontal_blanking_period != 0) {
>
> - uint8_t hblank_size = (uint8_t)link->dc->caps.min_horizontal_blanking_period;
> -
> - result_write_min_hblank = core_link_write_dpcd(link,
> - DP_SOURCE_MINIMUM_HBLANK_SUPPORTED, (uint8_t *)(&hblank_size),
> - sizeof(hblank_size));
This writes to the monitor. We shouldn't remove this.
> }
> DC_TRACE_LEVEL_MESSAGE(DAL_TRACE_LEVEL_INFORMATION,
> WPP_BIT_FLAG_DC_DETECTION_DP_CAPS,
> "result=%u link_index=%u enum dce_version=%d DPCD=0x%04X min_hblank=%u branch_dev_id=0x%x branch_dev_name='%c%c%c%c%c%c'",
> - result_write_min_hblank,
You are dropping information from the debug logging. Maybe it would
be better to just flag this as maybe unused. Also, I'd suggest
rebasing on the latest amdgpu -next branch, as I think a lot of these
were already fixed last week or the week before.
Alex
> link->link_index,
> link->ctx->dce_version,
> DP_SOURCE_MINIMUM_HBLANK_SUPPORTED,
> --
> 2.40.0
>
Powered by blists - more mailing lists