From patchwork Mon Nov 16 17:36:54 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 324477 Delivered-To: patch@linaro.org Received: by 2002:a05:6e02:5ce:0:0:0:0 with SMTP id l14csp3503979ils; Mon, 16 Nov 2020 09:38:38 -0800 (PST) X-Google-Smtp-Source: ABdhPJz5tQfWbiOMFTZ/uOqy+0V4hd07d7uPnnQb+o3qOZOb7ac6n4uUuU5jSr8GztaQsycU9Peg X-Received: by 2002:a17:902:7006:b029:d8:cbea:d3ba with SMTP id y6-20020a1709027006b02900d8cbead3bamr13523996plk.73.1605548317989; Mon, 16 Nov 2020 09:38:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605548317; cv=none; d=google.com; s=arc-20160816; b=vHi/qudzENSRWl0svS9KmTWRxmSdH5OO+P3uRsg5BuOnWRUHux7ulfWGQPhNjE224A FW1cNr3I8hEibL0mDGwneAk4Cn0AiUoN7iWa7JyTP0k9Qfmck7Y3Hli9fODMxdnu1TEw TJgTmzqKvT8cexFd8yeUYS/SdCwqVUXOYpXlwK+PWOul88PdEp5hKQ/rXwpkhJWJi8q4 18NsXDNdB3ga5Uut5k2jFuMF9ctiHvam4dxjUVxcz8FiXzjpzmQ+WeZK7+NtKGrCT0DK ZTpJiDXlBgsHjXeLbg6CfYKyVitNP34ytVcDC3Sc4wm+uSAKg/GBW7PwLwRJMCGQyimI z91g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:cc:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:mime-version:references:in-reply-to:message-id:date :subject:to:from:dkim-signature:delivered-to; bh=FlGyPK/omy08C+vopOIyne38wzKtrtfUFZQ3b0fA9FQ=; b=YluEswOT/vw5ZTwoqJ+JLeLbPOg7h7rvE38R8F4Hk5MLk0FZsr7HjiWyxfWLZ8A2G9 nRuoUz1o8x5L4HYZtBkFV/+BIRQzOauwLbFBVw1mvbw0C7L6qM+Mub9Kyd4PrUFNACzZ 4pnUwEYsP9ENqxBN1FpVTW8qaKiLIw4ZV7cbdk8B1441yECzbndH7rNiKCFCOqrb0H4m 7nenp++YOmAg1s22JJElYZOSDPfDFkI6XEz4PvcFalWITjBM9ZwBZViEA11aVtC9uzaI /0AaRB86mfOHdQSeYDQdOWnpQwPxT+hvM1dQTgpyxMcNHNLJ6UjgKXTpNmBolg5gbhZ+ B/xw== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=PD4ZgQMZ; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from gabe.freedesktop.org (gabe.freedesktop.org. [131.252.210.177]) by mx.google.com with ESMTPS id e4si15864069pln.141.2020.11.16.09.38.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Nov 2020 09:38:37 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) client-ip=131.252.210.177; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=PD4ZgQMZ; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 1112B6E08E; Mon, 16 Nov 2020 17:38:30 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-wr1-x443.google.com (mail-wr1-x443.google.com [IPv6:2a00:1450:4864:20::443]) by gabe.freedesktop.org (Postfix) with ESMTPS id C2D176E9ED for ; Mon, 16 Nov 2020 17:37:55 +0000 (UTC) Received: by mail-wr1-x443.google.com with SMTP id p1so19601642wrf.12 for ; Mon, 16 Nov 2020 09:37:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=wcR9SHA/hLxAo0DjnBJYKl1ZjLgHXt+Q6E2OPcU6TRk=; b=PD4ZgQMZc0zjxIrjINFoGLWFLiD9nsqe4m09WvxLwc4lK/OJwqcl5NM9CfB8miTxhp Ma93beNUf5CGer5yi6sN7aNsLZu1pCUWwPYqHrTOqtltVJK83S07N/Fvy8cKqs6Gcfx5 c6bIztFZ+QB2VhosEON3sfBHv3qhI9uuGnATdpU6Kl/EM2ygpRSqP4897TFPba5AKPcj V3jxwH4MpFQ8oIxWWM1toY80XO3Pe3eg05EXLZwswlr16Q1UFVnIX62o7aru7zSO+mD2 sCXBU6nZp6xSyAagvnTd8yKWIPJZzi0EW//O9VhlehDylZjokCG2Hsas/zDUJN1nh8SB ekDg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=wcR9SHA/hLxAo0DjnBJYKl1ZjLgHXt+Q6E2OPcU6TRk=; b=hUFl5pojgv6Z4SBMRN267gRswszxqanvl8G+mOOmfPEEfKx5o7Q9zLIak6nqxM/Ov2 Xtjyxzzqib3y+dFM/ID+PMfIhL3tUGUzUHwAGT5vzd6dW/9vJn+Yu11xmNpX6K5OcXaK Bu49rLD483zwDVbq3zHU2ujKnRhPNm4ZAKZm2py0qRBXxo8HTegsq1mWaZNuvRJByA1W Q4VcKVBRCB8ay2Prdar7giuP995VQCQvTD9RgVxZMxcjsYFB1RaeE6p5Xufw5yiEEI9M +Q/jc5NxPFfcal1R/wD0nuRgYS50ecj9qDu56Q70ohQ/OeRBiy3zIqavT/t5TeUmndz8 d5fw== X-Gm-Message-State: AOAM530yzvzYi3n+2RJP8xzb81lQ2mK4De99uCyBc503//KKxLF83q50 hT5pPdaSXiF9+3gszOiLszMLXA== X-Received: by 2002:adf:b74d:: with SMTP id n13mr3638294wre.101.1605548274459; Mon, 16 Nov 2020 09:37:54 -0800 (PST) Received: from dell.default ([91.110.221.159]) by smtp.gmail.com with ESMTPSA id 30sm16942828wrd.88.2020.11.16.09.37.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Nov 2020 09:37:53 -0800 (PST) From: Lee Jones To: lee.jones@linaro.org Subject: [PATCH 37/43] drm/radeon/ci_dpm: Move 'si_*()'s prototypes to shared header Date: Mon, 16 Nov 2020 17:36:54 +0000 Message-Id: <20201116173700.1830487-38-lee.jones@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201116173700.1830487-1-lee.jones@linaro.org> References: <20201116173700.1830487-1-lee.jones@linaro.org> MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: David Airlie , linux-kernel@vger.kernel.org, amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, Alex Deucher , =?utf-8?q?Christian_K=C3=B6?= =?utf-8?q?nig?= Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/radeon/si_dpm.c:3802:4: warning: no previous prototype for ‘si_get_ddr3_mclk_frequency_ratio’ [-Wmissing-prototypes] 3802 | u8 si_get_ddr3_mclk_frequency_ratio(u32 memory_clock) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/radeon/si_dpm.c:3815:4: warning: no previous prototype for ‘si_get_mclk_frequency_ratio’ [-Wmissing-prototypes] 3815 | u8 si_get_mclk_frequency_ratio(u32 memory_clock, bool strobe_mode) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/radeon/si_dpm.c:3897:6: warning: no previous prototype for ‘si_trim_voltage_table_to_fit_state_table’ [-Wmissing-prototypes] 3897 | void si_trim_voltage_table_to_fit_state_table(struct radeon_device *rdev, | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones --- drivers/gpu/drm/radeon/ci_dpm.c | 6 +----- drivers/gpu/drm/radeon/si_dpm.h | 5 +++++ 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/radeon/ci_dpm.c b/drivers/gpu/drm/radeon/ci_dpm.c index a9fc0a552736c..0dfb0ed9af89d 100644 --- a/drivers/gpu/drm/radeon/ci_dpm.c +++ b/drivers/gpu/drm/radeon/ci_dpm.c @@ -33,6 +33,7 @@ #include "radeon.h" #include "radeon_asic.h" #include "radeon_ucode.h" +#include "si_dpm.h" #define MC_CG_ARB_FREQ_F0 0x0a #define MC_CG_ARB_FREQ_F1 0x0b @@ -153,11 +154,6 @@ static const struct ci_pt_config_reg didt_config_ci[] = extern u8 rv770_get_memory_module_index(struct radeon_device *rdev); extern int ni_copy_and_switch_arb_sets(struct radeon_device *rdev, u32 arb_freq_src, u32 arb_freq_dest); -extern u8 si_get_ddr3_mclk_frequency_ratio(u32 memory_clock); -extern u8 si_get_mclk_frequency_ratio(u32 memory_clock, bool strobe_mode); -extern void si_trim_voltage_table_to_fit_state_table(struct radeon_device *rdev, - u32 max_voltage_steps, - struct atom_voltage_table *voltage_table); static int ci_get_std_voltage_value_sidd(struct radeon_device *rdev, struct atom_voltage_table_entry *voltage_table, u16 *std_voltage_hi_sidd, u16 *std_voltage_lo_sidd); diff --git a/drivers/gpu/drm/radeon/si_dpm.h b/drivers/gpu/drm/radeon/si_dpm.h index 1032a68be792b..aa857906ef93d 100644 --- a/drivers/gpu/drm/radeon/si_dpm.h +++ b/drivers/gpu/drm/radeon/si_dpm.h @@ -234,5 +234,10 @@ struct si_power_info { #define SISLANDS_CGULVPARAMETER_DFLT 0x00040035 #define SISLANDS_CGULVCONTROL_DFLT 0x1f007550 +u8 si_get_ddr3_mclk_frequency_ratio(u32 memory_clock); +u8 si_get_mclk_frequency_ratio(u32 memory_clock, bool strobe_mode); +void si_trim_voltage_table_to_fit_state_table(struct radeon_device *rdev, + u32 max_voltage_steps, + struct atom_voltage_table *voltage_table); #endif