[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CADnq5_NwQWjGvMVxqPG1LcJkCV1MMJt9d25sXFkFQ8zUDw0sng@mail.gmail.com>
Date: Mon, 18 Jul 2022 14:59:05 -0400
From: Alex Deucher <alexdeucher@...il.com>
To: Maíra Canal <mairacanal@...eup.net>
Cc: Harry Wentland <harry.wentland@....com>,
Leo Li <sunpeng.li@....com>,
Rodrigo Siqueira <Rodrigo.Siqueira@....com>,
Alex Deucher <alexander.deucher@....com>,
Christian Koenig <christian.koenig@....com>,
xinhui pan <Xinhui.Pan@....com>,
David Airlie <airlied@...ux.ie>,
Daniel Vetter <daniel@...ll.ch>,
Nicholas Kazlauskas <nicholas.kazlauskas@....com>,
Dmytro Laktyushkin <Dmytro.Laktyushkin@....com>,
Aurabindo Pillai <aurabindo.pillai@....com>,
Magali Lemes <magalilemes00@...il.com>,
Tales Lelo da Aparecida <tales.aparecida@...il.com>,
LKML <linux-kernel@...r.kernel.org>,
amd-gfx list <amd-gfx@...ts.freedesktop.org>,
Melissa Wen <mwen@...lia.com>,
Isabella Basso <isabbasso@...eup.net>, andrealmeid@...eup.net
Subject: Re: [PATCH 08/12] drm/amd/display: Remove unused variables from dcn10_stream_encoder
Applied. Thanks!
Alex
On Thu, Jul 14, 2022 at 12:46 PM Maíra Canal <mairacanal@...eup.net> wrote:
>
> The variable regval from the function enc1_update_generic_info_packet
> and the variables dynamic_range_rgb and dynamic_range_ycbcr from the
> function enc1_stream_encoder_dp_set_stream_attribute are not currently
> used.
>
> This was pointed by clang with the following warnings:
>
> drivers/gpu/drm/amd/amdgpu/../display/dc/dcn10/dcn10_stream_encoder.c:62:11:
> warning: variable 'regval' set but not used [-Wunused-but-set-variable]
> uint32_t regval;
> ^
> drivers/gpu/drm/amd/amdgpu/../display/dc/dcn10/dcn10_stream_encoder.c:262:10:
> warning: variable 'dynamic_range_rgb' set but not used [-Wunused-but-set-variable]
> uint8_t dynamic_range_rgb = 0; /*full range*/
> ^
> drivers/gpu/drm/amd/amdgpu/../display/dc/dcn10/dcn10_stream_encoder.c:263:10:
> warning: variable 'dynamic_range_ycbcr' set but not used [-Wunused-but-set-variable]
> uint8_t dynamic_range_ycbcr = 1; /*bt709*/
> ^
> 3 warnings generated.
>
> Signed-off-by: Maíra Canal <mairacanal@...eup.net>
> ---
> .../drm/amd/display/dc/dcn10/dcn10_stream_encoder.c | 10 ----------
> 1 file changed, 10 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_stream_encoder.c b/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_stream_encoder.c
> index c99c6fababa9..484e7cdf00b8 100644
> --- a/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_stream_encoder.c
> +++ b/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_stream_encoder.c
> @@ -59,7 +59,6 @@ void enc1_update_generic_info_packet(
> uint32_t packet_index,
> const struct dc_info_packet *info_packet)
> {
> - uint32_t regval;
> /* TODOFPGA Figure out a proper number for max_retries polling for lock
> * use 50 for now.
> */
> @@ -88,7 +87,6 @@ void enc1_update_generic_info_packet(
> REG_UPDATE(AFMT_VBI_PACKET_CONTROL, AFMT_GENERIC_CONFLICT_CLR, 1);
>
> /* choose which generic packet to use */
> - regval = REG_READ(AFMT_VBI_PACKET_CONTROL);
> REG_UPDATE(AFMT_VBI_PACKET_CONTROL,
> AFMT_GENERIC_INDEX, packet_index);
>
> @@ -259,8 +257,6 @@ void enc1_stream_encoder_dp_set_stream_attribute(
> uint32_t h_back_porch;
> uint8_t synchronous_clock = 0; /* asynchronous mode */
> uint8_t colorimetry_bpc;
> - uint8_t dynamic_range_rgb = 0; /*full range*/
> - uint8_t dynamic_range_ycbcr = 1; /*bt709*/
> uint8_t dp_pixel_encoding = 0;
> uint8_t dp_component_depth = 0;
>
> @@ -372,18 +368,15 @@ void enc1_stream_encoder_dp_set_stream_attribute(
> switch (output_color_space) {
> case COLOR_SPACE_SRGB:
> misc1 = misc1 & ~0x80; /* bit7 = 0*/
> - dynamic_range_rgb = 0; /*full range*/
> break;
> case COLOR_SPACE_SRGB_LIMITED:
> misc0 = misc0 | 0x8; /* bit3=1 */
> misc1 = misc1 & ~0x80; /* bit7 = 0*/
> - dynamic_range_rgb = 1; /*limited range*/
> break;
> case COLOR_SPACE_YCBCR601:
> case COLOR_SPACE_YCBCR601_LIMITED:
> misc0 = misc0 | 0x8; /* bit3=1, bit4=0 */
> misc1 = misc1 & ~0x80; /* bit7 = 0*/
> - dynamic_range_ycbcr = 0; /*bt601*/
> if (hw_crtc_timing.pixel_encoding == PIXEL_ENCODING_YCBCR422)
> misc0 = misc0 | 0x2; /* bit2=0, bit1=1 */
> else if (hw_crtc_timing.pixel_encoding == PIXEL_ENCODING_YCBCR444)
> @@ -393,15 +386,12 @@ void enc1_stream_encoder_dp_set_stream_attribute(
> case COLOR_SPACE_YCBCR709_LIMITED:
> misc0 = misc0 | 0x18; /* bit3=1, bit4=1 */
> misc1 = misc1 & ~0x80; /* bit7 = 0*/
> - dynamic_range_ycbcr = 1; /*bt709*/
> if (hw_crtc_timing.pixel_encoding == PIXEL_ENCODING_YCBCR422)
> misc0 = misc0 | 0x2; /* bit2=0, bit1=1 */
> else if (hw_crtc_timing.pixel_encoding == PIXEL_ENCODING_YCBCR444)
> misc0 = misc0 | 0x4; /* bit2=1, bit1=0 */
> break;
> case COLOR_SPACE_2020_RGB_LIMITEDRANGE:
> - dynamic_range_rgb = 1; /*limited range*/
> - break;
> case COLOR_SPACE_2020_RGB_FULLRANGE:
> case COLOR_SPACE_2020_YCBCR:
> case COLOR_SPACE_XR_RGB:
> --
> 2.36.1
>
Powered by blists - more mailing lists