Received: by 2002:a05:7412:31a9:b0:e2:908c:2ebd with SMTP id et41csp3716875rdb; Wed, 13 Sep 2023 23:43:18 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFOn1u6QcrXJHefIkfZoqKXCPRljE4mzNdDIgmMVxmbiHTJdEToA/2lRA5sw8lS3BEsm2MU X-Received: by 2002:a05:6a20:1588:b0:105:6d0e:c046 with SMTP id h8-20020a056a20158800b001056d0ec046mr5473716pzj.26.1694673797720; Wed, 13 Sep 2023 23:43:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694673797; cv=none; d=google.com; s=arc-20160816; b=CbfMmHGKCp6DAmmdvh9q57dvKl3SauqTD5Isurn8E95/fDeFHwzLgsyqNK3+uSc0vW miozuVM71Iv0Df/MckXhmUcBqwNpSxoWnbnZthk6uKxIpu9Ne+iU4Lr8XadCsNe2JTlr OLnrPgI+sDLwC50pfXkTDH3Zn5q94ulNbd9R3/g5DSvumllNMpb5VDqv5L6MSO5QYRdT GjhLVto2KEWL1mueLSREK+UtVV5bBuqPMH7zV70T8D4QWNSRLuoeW/UA4TSG+drcbPXn t9op+UTOv6ahwUXoLhPCM0C1PLeWJ51pxCvADtopNyxWqvkI0Wl5YwPRIn8NqKw4csBP X3qg== 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 :message-id:date:subject:cc:to:from; bh=NZlwJRDOm0MnwqHXQ17Mff2NqhX0CrcK8isRejNoPw8=; fh=E1fo2IoakCsND4Z1T+2sQQRs8VNzX6aoehAGQmx3eks=; b=DPgrzO5rNKMAmnExu4LEk+39wAhqrWwe7qV/zeonL2kJuD0JX4f9QsQKME99UE34D1 s2n0nf4ykMljtFGVTmkRYNO1ZV1gj18Ws+93YdN7HEpRnIX7HvsxRIWC6uP/GhUJnz2g b/cC8covbyA5qNr7OjRUOJz9iQfXkLmROAFi6uU1fw94KVdYiq9A+/qU3UJhKO6YZZ76 8ppGh7pFGFa8sVvmxN6Bbp/zvECJyECCFzt00KoL4NWT0zWC7/CzAwnR7QDX+BIkmNeP 68E09LTTwPeXVFAkxh83LjGG6rxL9GhEo2Vo2sEaI3l1OHQi337Y+ajyBv9MK+/EnZer V3Mg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Return-Path: Received: from pete.vger.email (pete.vger.email. [2620:137:e000::3:6]) by mx.google.com with ESMTPS id b16-20020a170902d51000b001c35864fdbbsi1123127plg.406.2023.09.13.23.43.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Sep 2023 23:43:17 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) client-ip=2620:137:e000::3:6; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by pete.vger.email (Postfix) with ESMTP id 7E03682DF483; Wed, 13 Sep 2023 23:42:46 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235651AbjINGmo (ORCPT + 99 others); Thu, 14 Sep 2023 02:42:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43660 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235580AbjINGmn (ORCPT ); Thu, 14 Sep 2023 02:42:43 -0400 Received: from out30-131.freemail.mail.aliyun.com (out30-131.freemail.mail.aliyun.com [115.124.30.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 68C3E9E for ; Wed, 13 Sep 2023 23:42:39 -0700 (PDT) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R101e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018045168;MF=jiapeng.chong@linux.alibaba.com;NM=1;PH=DS;RN=13;SR=0;TI=SMTPD_---0Vs1G6jX_1694673747; Received: from localhost(mailfrom:jiapeng.chong@linux.alibaba.com fp:SMTPD_---0Vs1G6jX_1694673747) by smtp.aliyun-inc.com; Thu, 14 Sep 2023 14:42:36 +0800 From: Jiapeng Chong To: harry.wentland@amd.com Cc: sunpeng.li@amd.com, Rodrigo.Siqueira@amd.com, alexander.deucher@amd.com, christian.koenig@amd.com, Xinhui.Pan@amd.com, airlied@gmail.com, daniel@ffwll.ch, amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Jiapeng Chong , Abaci Robot Subject: [PATCH] alpha: clean up some inconsistent indenting Date: Thu, 14 Sep 2023 14:42:25 +0800 Message-Id: <20230914064225.122860-1-jiapeng.chong@linux.alibaba.com> X-Mailer: git-send-email 2.20.1.7.g153144c MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (pete.vger.email [0.0.0.0]); Wed, 13 Sep 2023 23:42:47 -0700 (PDT) X-Spam-Status: No, score=-0.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,UNPARSEABLE_RELAY autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on pete.vger.email No functional modification involved. drivers/gpu/drm/amd/amdgpu/../display/dc/clk_mgr/dcn32/dcn32_clk_mgr.c:491 dcn32_auto_dpm_test_log() warn: inconsistent indenting. Reported-by: Abaci Robot Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=6574 Signed-off-by: Jiapeng Chong --- .../display/dc/clk_mgr/dcn32/dcn32_clk_mgr.c | 72 +++++++++---------- 1 file changed, 34 insertions(+), 38 deletions(-) diff --git a/drivers/gpu/drm/amd/display/dc/clk_mgr/dcn32/dcn32_clk_mgr.c b/drivers/gpu/drm/amd/display/dc/clk_mgr/dcn32/dcn32_clk_mgr.c index 37ffa0050e60..e34b1d6dd964 100644 --- a/drivers/gpu/drm/amd/display/dc/clk_mgr/dcn32/dcn32_clk_mgr.c +++ b/drivers/gpu/drm/amd/display/dc/clk_mgr/dcn32/dcn32_clk_mgr.c @@ -460,25 +460,25 @@ static int dcn32_get_dispclk_from_dentist(struct clk_mgr *clk_mgr_base) static void dcn32_auto_dpm_test_log(struct dc_clocks *new_clocks, struct clk_mgr_internal *clk_mgr) { - unsigned int dispclk_khz_reg = REG_READ(CLK1_CLK0_CURRENT_CNT); // DISPCLK - unsigned int dppclk_khz_reg = REG_READ(CLK1_CLK1_CURRENT_CNT); // DPPCLK - unsigned int dprefclk_khz_reg = REG_READ(CLK1_CLK2_CURRENT_CNT); // DPREFCLK - unsigned int dcfclk_khz_reg = REG_READ(CLK1_CLK3_CURRENT_CNT); // DCFCLK - unsigned int dtbclk_khz_reg = REG_READ(CLK1_CLK4_CURRENT_CNT); // DTBCLK - unsigned int fclk_khz_reg = REG_READ(CLK4_CLK0_CURRENT_CNT); // FCLK - - // Overrides for these clocks in case there is no p_state change support - int dramclk_khz_override = new_clocks->dramclk_khz; - int fclk_khz_override = new_clocks->fclk_khz; - - int num_fclk_levels = clk_mgr->base.bw_params->clk_table.num_entries_per_clk.num_fclk_levels - 1; - - if (!new_clocks->p_state_change_support) { - dramclk_khz_override = clk_mgr->base.bw_params->max_memclk_mhz * 1000; - } - if (!new_clocks->fclk_p_state_change_support) { - fclk_khz_override = clk_mgr->base.bw_params->clk_table.entries[num_fclk_levels].fclk_mhz * 1000; - } + unsigned int dispclk_khz_reg = REG_READ(CLK1_CLK0_CURRENT_CNT); // DISPCLK + unsigned int dppclk_khz_reg = REG_READ(CLK1_CLK1_CURRENT_CNT); // DPPCLK + unsigned int dprefclk_khz_reg = REG_READ(CLK1_CLK2_CURRENT_CNT); // DPREFCLK + unsigned int dcfclk_khz_reg = REG_READ(CLK1_CLK3_CURRENT_CNT); // DCFCLK + unsigned int dtbclk_khz_reg = REG_READ(CLK1_CLK4_CURRENT_CNT); // DTBCLK + unsigned int fclk_khz_reg = REG_READ(CLK4_CLK0_CURRENT_CNT); // FCLK + + // Overrides for these clocks in case there is no p_state change support + int dramclk_khz_override = new_clocks->dramclk_khz; + int fclk_khz_override = new_clocks->fclk_khz; + + int num_fclk_levels = clk_mgr->base.bw_params->clk_table.num_entries_per_clk.num_fclk_levels - 1; + + if (!new_clocks->p_state_change_support) { + dramclk_khz_override = clk_mgr->base.bw_params->max_memclk_mhz * 1000; + } + if (!new_clocks->fclk_p_state_change_support) { + fclk_khz_override = clk_mgr->base.bw_params->clk_table.entries[num_fclk_levels].fclk_mhz * 1000; + } //////////////////////////////////////////////////////////////////////////// // IMPORTANT: When adding more clocks to these logs, do NOT put a newline @@ -488,26 +488,22 @@ static void dcn32_auto_dpm_test_log(struct dc_clocks *new_clocks, struct clk_mgr // // AutoDPMTest: clk1:%d - clk2:%d - clk3:%d - clk4:%d\n" //////////////////////////////////////////////////////////////////////////// - if (new_clocks && - new_clocks->dramclk_khz > 0 && - new_clocks->fclk_khz > 0 && - new_clocks->dcfclk_khz > 0 && - new_clocks->dppclk_khz > 0) { - + if (new_clocks && new_clocks->dramclk_khz > 0 && new_clocks->fclk_khz > 0 && + new_clocks->dcfclk_khz > 0 && new_clocks->dppclk_khz > 0) { DC_LOG_AUTO_DPM_TEST("AutoDPMTest: dramclk:%d - fclk:%d - " - "dcfclk:%d - dppclk:%d - dispclk_hw:%d - " - "dppclk_hw:%d - dprefclk_hw:%d - dcfclk_hw:%d - " - "dtbclk_hw:%d - fclk_hw:%d\n", - dramclk_khz_override, - fclk_khz_override, - new_clocks->dcfclk_khz, - new_clocks->dppclk_khz, - dispclk_khz_reg, - dppclk_khz_reg, - dprefclk_khz_reg, - dcfclk_khz_reg, - dtbclk_khz_reg, - fclk_khz_reg); + "dcfclk:%d - dppclk:%d - dispclk_hw:%d - " + "dppclk_hw:%d - dprefclk_hw:%d - dcfclk_hw:%d - " + "dtbclk_hw:%d - fclk_hw:%d\n", + dramclk_khz_override, + fclk_khz_override, + new_clocks->dcfclk_khz, + new_clocks->dppclk_khz, + dispclk_khz_reg, + dppclk_khz_reg, + dprefclk_khz_reg, + dcfclk_khz_reg, + dtbclk_khz_reg, + fclk_khz_reg); } } -- 2.20.1.7.g153144c