lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CADnq5_MYHR256zeDaGpbs9=ax9LqmThWeZ0Ld4_YUfNeDMwuqw@mail.gmail.com>
Date:   Mon, 18 Jul 2022 15:00:34 -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 09/12] drm/amd/display: Remove unused MaxUsedBW variable

Applied.  Thanks!

Alex

On Thu, Jul 14, 2022 at 12:46 PM Maíra Canal <mairacanal@...eup.net> wrote:
>
> Remove the variable MaxUsedBW from the function
> DISPCLKDPPCLKDCFCLKDeepSleepPrefetchParametersWatermarksAndPerformanceCalculation.
> As a side-effect, the variables MaxPerPlaneVActiveWRBandwidth and
> WRBandwidth are also removed.
>
> This was pointed by clang with the following warning:
>
> drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dcn30/display_mode_vba_30.c:3043:10:
> warning: variable 'MaxUsedBW' set but not used [-Wunused-but-set-variable]
>                 double MaxUsedBW = 0;
>                        ^
> 1 warning generated.
>
> Signed-off-by: Maíra Canal <mairacanal@...eup.net>
> ---
>  .../dc/dml/dcn30/display_mode_vba_30.c        | 28 -------------------
>  1 file changed, 28 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/display/dc/dml/dcn30/display_mode_vba_30.c b/drivers/gpu/drm/amd/display/dc/dml/dcn30/display_mode_vba_30.c
> index 842eb94ebe04..876b321b30ca 100644
> --- a/drivers/gpu/drm/amd/display/dc/dml/dcn30/display_mode_vba_30.c
> +++ b/drivers/gpu/drm/amd/display/dc/dml/dcn30/display_mode_vba_30.c
> @@ -3037,40 +3037,12 @@ static void DISPCLKDPPCLKDCFCLKDeepSleepPrefetchParametersWatermarksAndPerforman
>
>         {
>                 //Maximum Bandwidth Used
> -               double TotalWRBandwidth = 0;
> -               double MaxPerPlaneVActiveWRBandwidth = 0;
> -               double WRBandwidth = 0;
> -               double MaxUsedBW = 0;
> -               for (k = 0; k < v->NumberOfActivePlanes; ++k) {
> -                       if (v->WritebackEnable[k] == true
> -                                       && v->WritebackPixelFormat[k] == dm_444_32) {
> -                               WRBandwidth = v->WritebackDestinationWidth[k] * v->WritebackDestinationHeight[k]
> -                                               / (v->HTotal[k] * v->WritebackSourceHeight[k] / v->PixelClock[k]) * 4;
> -                       } else if (v->WritebackEnable[k] == true) {
> -                               WRBandwidth = v->WritebackDestinationWidth[k] * v->WritebackDestinationHeight[k]
> -                                               / (v->HTotal[k] * v->WritebackSourceHeight[k] / v->PixelClock[k]) * 8;
> -                       }
> -                       TotalWRBandwidth = TotalWRBandwidth + WRBandwidth;
> -                       MaxPerPlaneVActiveWRBandwidth = dml_max(MaxPerPlaneVActiveWRBandwidth, WRBandwidth);
> -               }
> -
>                 v->TotalDataReadBandwidth = 0;
>                 for (k = 0; k < v->NumberOfActivePlanes; ++k) {
>                         v->TotalDataReadBandwidth = v->TotalDataReadBandwidth
>                                         + v->ReadBandwidthPlaneLuma[k]
>                                         + v->ReadBandwidthPlaneChroma[k];
>                 }
> -
> -               {
> -                       double MaxPerPlaneVActiveRDBandwidth = 0;
> -                       for (k = 0; k < v->NumberOfActivePlanes; ++k) {
> -                               MaxPerPlaneVActiveRDBandwidth = dml_max(MaxPerPlaneVActiveRDBandwidth,
> -                                               v->ReadBandwidthPlaneLuma[k] + v->ReadBandwidthPlaneChroma[k]);
> -
> -                       }
> -               }
> -
> -               MaxUsedBW = MaxTotalRDBandwidth + TotalWRBandwidth;
>         }
>
>         // VStartup Margin
> --
> 2.36.1
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ