Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp3654252imw; Mon, 18 Jul 2022 12:02:40 -0700 (PDT) X-Google-Smtp-Source: AGRyM1u9dhDnL/u/T0U2c+WR/fxsKM/eEdjlb1RsxUBBYOlWBYCRIRGOiBxOmnsE5pD8W/FTPgeO X-Received: by 2002:a05:6870:958e:b0:102:43f:d728 with SMTP id k14-20020a056870958e00b00102043fd728mr17947180oao.219.1658170959882; Mon, 18 Jul 2022 12:02:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658170959; cv=none; d=google.com; s=arc-20160816; b=DgeM7WWH//AiAWcApGic/XNTevZiH6WQ6f/xBngaxk6nm+XPYWcD1NCEzbYKhuvkAs W6nD5v9XWQgTBLJG4fw5EBBFCmYrBkthwaySVEJUPr6IWXkSBHGZz+icYhmaA9bNyX49 0ms26XJpaf6eTTxp3+0P/Uz+QshFj28Qod2zUlYr+zhZZ2uTpuYgT1kdVzfyO5i6NcTf jljuEQ7/S38166H4l4a1jdhbzJqb2073a4OFgvrGH8nLLN+XLe8SGzqGsLObhwhN5PI9 edPXSCL6NgFC3DF1yuvzxA4WvEhdDYkmurwpE7okjxr1eNpGtAlF2E2MJM0ZFyItHAbU 54Wg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=VQyoH7Iz8mEpqAOd0ZONZyEq4M37QPm603w2BBFwKM8=; b=p5AckhkynQHXhJfykhOg+D0jm4+w5yH5o1xMQEfMzqvjTpn1x/l4Asmw4dCoCRSAVZ B/6qJyKSAK/UiR12+99r9z9dy/CeSzUgA1ZJyUsYUnqwk0VtmvK3n1zGeEYWVuq+xrMA WXZc7Ijy1fg622YVah8vaCIutW0TfQv1Mdykt+d5WMW0V5+aA16raU3GE3ioql5pifoO GWw2uyWMf/G1UIZgSNLHiEhvS8PVFhiXdV3cAqZsr0CpWH6RiOnDFKpzBTOLm1CUMV3e qWKwK55EBIod1ZAZDZeyW0MD5zXsthCrK9SIzupeR2MuRv+akLXbgmOLtikbNC2xWDfr J/yw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b="Z79+e/QK"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id t9-20020a4ac889000000b00435798ff30bsi9805183ooq.46.2022.07.18.12.02.07; Mon, 18 Jul 2022 12:02:39 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b="Z79+e/QK"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234028AbiGRTAt (ORCPT + 99 others); Mon, 18 Jul 2022 15:00:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54736 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233758AbiGRTAs (ORCPT ); Mon, 18 Jul 2022 15:00:48 -0400 Received: from mail-ej1-x62a.google.com (mail-ej1-x62a.google.com [IPv6:2a00:1450:4864:20::62a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 12D722B274 for ; Mon, 18 Jul 2022 12:00:47 -0700 (PDT) Received: by mail-ej1-x62a.google.com with SMTP id os14so23045943ejb.4 for ; Mon, 18 Jul 2022 12:00:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=VQyoH7Iz8mEpqAOd0ZONZyEq4M37QPm603w2BBFwKM8=; b=Z79+e/QKWsVqEovUmcQ2HznGd9tPqIiEP5LgIpEpC7EHyvSgvZ6t5FZRTRMhZHZLGN M9+guF5Kv6dOe9rhbQGBtAPC63QjnJON4DrsYkf13p8b2jizjEhg9uNHyiz5gCpGKUJU amsxg0l8FbxjkVnVVT11Bq0lf//qNSZnSSWN8xuyppw3PXiO+g58dAUHMz2tgOpHpsAE lKbypVyE16N+UPos58AN9XJk/jLsIjMbkPaW4ry1F/rciHBVI9ssjViIobffSlbWiB9s XX1KUi6qymYRQLLM/93caMa381BoDz/bJVbGqz988oAVh8T+meqjiOu53xMkXQY6j/Pz N1wA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=VQyoH7Iz8mEpqAOd0ZONZyEq4M37QPm603w2BBFwKM8=; b=q2YR/x1QykiFgodMTe/i/f8+zRoAadYn75qZ+NAV46foTIIIAcaDpvaR//1VRB8k+c r3OViJDrqHeGO1Z5NWSDajCoMh5kjBcI+LmZ0y25zIDvUcDl3bg+s0RsKdZi/mDQoiVO UFlskVrKDMiigK5P0pSWp+AMlo8MpMIaHwkOth/hyhRRpwKBKhfUI+MWCEplftDfizR8 ZFbRi9Poc3r9QGpVKQq2eN/+5lGWvn9ijkFsHGFXgSYhJvqm/CDi1EiK+ZeX2vSHxtK6 q8FDHI9maM0Nnu7h8AyQ9eqgwDl+HxQ+oo5Vj4XmkzTmAEC+HCcJ4eL3/GU7QknPC1Az uVxg== X-Gm-Message-State: AJIora9gTvmZPUKTwPJ6QkevIaUH4aAZnp/gNwwHG1f88+C4+7eoF3WV qDGCcGmoUeIkCaaiPHFfalXDwr6WrP+fAkBt48U= X-Received: by 2002:a17:907:2702:b0:72b:307b:98e6 with SMTP id w2-20020a170907270200b0072b307b98e6mr27482559ejk.658.1658170845590; Mon, 18 Jul 2022 12:00:45 -0700 (PDT) MIME-Version: 1.0 References: <20220714164507.561751-1-mairacanal@riseup.net> <20220714164507.561751-9-mairacanal@riseup.net> In-Reply-To: <20220714164507.561751-9-mairacanal@riseup.net> From: Alex Deucher Date: Mon, 18 Jul 2022 15:00:34 -0400 Message-ID: Subject: Re: [PATCH 09/12] drm/amd/display: Remove unused MaxUsedBW variable To: =?UTF-8?B?TWHDrXJhIENhbmFs?= Cc: Harry Wentland , Leo Li , Rodrigo Siqueira , Alex Deucher , Christian Koenig , xinhui pan , David Airlie , Daniel Vetter , Nicholas Kazlauskas , Dmytro Laktyushkin , Aurabindo Pillai , Magali Lemes , Tales Lelo da Aparecida , LKML , amd-gfx list , Melissa Wen , Isabella Basso , andrealmeid@riseup.net Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Applied. Thanks! Alex On Thu, Jul 14, 2022 at 12:46 PM Ma=C3=ADra Canal w= rote: > > Remove the variable MaxUsedBW from the function > DISPCLKDPPCLKDCFCLKDeepSleepPrefetchParametersWatermarksAndPerformanceCal= culation. > 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 =3D 0; > ^ > 1 warning generated. > > Signed-off-by: Ma=C3=ADra Canal > --- > .../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 DISPCLKDPPCLKDCFCLKDeepSleepPrefetchP= arametersWatermarksAndPerforman > > { > //Maximum Bandwidth Used > - double TotalWRBandwidth =3D 0; > - double MaxPerPlaneVActiveWRBandwidth =3D 0; > - double WRBandwidth =3D 0; > - double MaxUsedBW =3D 0; > - for (k =3D 0; k < v->NumberOfActivePlanes; ++k) { > - if (v->WritebackEnable[k] =3D=3D true > - && v->WritebackPixelFormat[k] =3D= =3D dm_444_32) { > - WRBandwidth =3D v->WritebackDestinationWi= dth[k] * v->WritebackDestinationHeight[k] > - / (v->HTotal[k] * v->Writ= ebackSourceHeight[k] / v->PixelClock[k]) * 4; > - } else if (v->WritebackEnable[k] =3D=3D true) { > - WRBandwidth =3D v->WritebackDestinationWi= dth[k] * v->WritebackDestinationHeight[k] > - / (v->HTotal[k] * v->Writ= ebackSourceHeight[k] / v->PixelClock[k]) * 8; > - } > - TotalWRBandwidth =3D TotalWRBandwidth + WRBandwid= th; > - MaxPerPlaneVActiveWRBandwidth =3D dml_max(MaxPerP= laneVActiveWRBandwidth, WRBandwidth); > - } > - > v->TotalDataReadBandwidth =3D 0; > for (k =3D 0; k < v->NumberOfActivePlanes; ++k) { > v->TotalDataReadBandwidth =3D v->TotalDataReadBan= dwidth > + v->ReadBandwidthPlaneLuma[k] > + v->ReadBandwidthPlaneChroma[k]; > } > - > - { > - double MaxPerPlaneVActiveRDBandwidth =3D 0; > - for (k =3D 0; k < v->NumberOfActivePlanes; ++k) { > - MaxPerPlaneVActiveRDBandwidth =3D dml_max= (MaxPerPlaneVActiveRDBandwidth, > - v->ReadBandwidthPlaneLuma= [k] + v->ReadBandwidthPlaneChroma[k]); > - > - } > - } > - > - MaxUsedBW =3D MaxTotalRDBandwidth + TotalWRBandwidth; > } > > // VStartup Margin > -- > 2.36.1 >