Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp739506imw; Thu, 14 Jul 2022 09:58:47 -0700 (PDT) X-Google-Smtp-Source: AGRyM1vmCVihc5Wj7mosz+uXHqntc9PEa16sw5fkKH4NK+eMB46Du8KhkrXIUB2ANkBttPjtVEYA X-Received: by 2002:a17:907:6d99:b0:72e:e7b4:e9cc with SMTP id sb25-20020a1709076d9900b0072ee7b4e9ccmr1596281ejc.315.1657817927291; Thu, 14 Jul 2022 09:58:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657817927; cv=none; d=google.com; s=arc-20160816; b=mM702CtcDL2Y/eh5LQwOr/cr8TGUMACO/M0qpXrg07Yc3d7gyE47hZcva+K5DxNcXZ RkY2C7SJq9Q1ic1U7EN51XY+SWuIUf8ndRT9WRnlXRLMXbQDNhmRNZUktM6hmFQjE6fG 12wMcTXFg9JsgX3E2JSZnibbannglwzlfqK5k6Di/hhEqhyqYzl9CJGQNLM+WxRdIvgT Ayvnd6Bql3D+imq2BfxN4WxQLFU4wHfm+9QqpeZK5e6ZGFHtKCKw+Dr1+YB1TNJS4nqh iTKP97d1RJFe7KYEITXUv2ZRjCaDLFehtYjc7XyOSAnBUUHTn32wqhRt3Gj1IEg6FwhZ xJQw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=48bx04dL4ERZj8BqGFESa5iKSnWSCwEgjpbtDMw4CnM=; b=oCGcWxm/GALz4SeQgizfMp+AIGpDSIWC7vMUfdj1cEJM/BCu4pOZ3jAniHrNJG6gUc 30IwjZekTV3e07pOAYo5c0uGa5tVi50ACapuhlXqSE1iCDmRsKB6sgd4KxMFl1if+d77 wXOn6Zh5XHg8NXqgmElBrnsT5Hdg23Jsl2q3fLUShVGt5lgV0tSLjkvNeUlK7t4kN0CW fN8DYN3+rRrqi4qpbl4UAS52yl2rhR5m6+xpIkZSexhVpIJmuBo1PzJXE7tt3kOrGKmQ CZqu4iDzglHyOFtssCEW4fs0sJeQtCGjRyXiM0OocZxt+ZFD1+bjpV79EmN8SBCzh2+c MGxw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@riseup.net header.s=squak header.b=FbfidNUv; 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=NONE dis=NONE) header.from=riseup.net Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id qw22-20020a1709066a1600b00722e89d8994si1771280ejc.430.2022.07.14.09.58.22; Thu, 14 Jul 2022 09:58:47 -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=@riseup.net header.s=squak header.b=FbfidNUv; 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=NONE dis=NONE) header.from=riseup.net Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240475AbiGNQts (ORCPT + 99 others); Thu, 14 Jul 2022 12:49:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41420 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240626AbiGNQtS (ORCPT ); Thu, 14 Jul 2022 12:49:18 -0400 Received: from mx0.riseup.net (mx0.riseup.net [198.252.153.6]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D6BA07098A for ; Thu, 14 Jul 2022 09:46:39 -0700 (PDT) Received: from fews1.riseup.net (fews1-pn.riseup.net [10.0.1.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "mail.riseup.net", Issuer "R3" (not verified)) by mx0.riseup.net (Postfix) with ESMTPS id 4LkL3q0V6Yz9snB; Thu, 14 Jul 2022 16:46:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=riseup.net; s=squak; t=1657817191; bh=XV9tkKItKKrKdxeOCrOFU/aMW2lffXNMCCQLXD35gdE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=FbfidNUvZjLDgWLPCM0leY/i4NLdBJrPJoPqoddJhnntfTDYAGYWCIkJ8OifHGSx5 Y07G8uogypDYBwjUHE1X1YNJ/Hq6yNHD1+kNuEgcMGDJMC3iLr8Kii+3MHyaT1uY4w Vj0tdSehypuqwjzdHREubfLkstDtZTnsNZ1ntgKE= X-Riseup-User-ID: 4406E95CF501A8ACD5FACC26F496C7F7E4FA70E08EF19107281E6C1AE30978AD Received: from [127.0.0.1] (localhost [127.0.0.1]) by fews1.riseup.net (Postfix) with ESMTPSA id 4LkL3j1v9fz5vW1; Thu, 14 Jul 2022 16:46:24 +0000 (UTC) From: =?UTF-8?q?Ma=C3=ADra=20Canal?= To: Harry Wentland , Leo Li , Rodrigo Siqueira , Alex Deucher , christian.koenig@amd.com, Xinhui.Pan@amd.com, David Airlie , Daniel Vetter , Nicholas Kazlauskas , Dmytro Laktyushkin , Aurabindo Pillai Cc: amd-gfx@lists.freedesktop.org, linux-kernel@vger.kernel.org, mwen@igalia.com, andrealmeid@riseup.net, Isabella Basso , magalilemes00@gmail.com, tales.aparecida@gmail.com, =?UTF-8?q?Ma=C3=ADra=20Canal?= Subject: [PATCH 09/12] drm/amd/display: Remove unused MaxUsedBW variable Date: Thu, 14 Jul 2022 13:45:04 -0300 Message-Id: <20220714164507.561751-9-mairacanal@riseup.net> In-Reply-To: <20220714164507.561751-1-mairacanal@riseup.net> References: <20220714164507.561751-1-mairacanal@riseup.net> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,SPF_HELO_PASS, SPF_PASS,T_SCC_BODY_TEXT_LINE 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 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 --- .../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