From patchwork Wed Nov 11 18:35:41 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 324139 Delivered-To: patch@linaro.org Received: by 2002:a05:6e02:5ce:0:0:0:0 with SMTP id l14csp623116ils; Wed, 11 Nov 2020 10:36:20 -0800 (PST) X-Google-Smtp-Source: ABdhPJygAyDez3DjA3Fj6+mdmJupjKiyYtZ+ossfiNwzltdrolvf2Y3ztM0MG/SFjLnL715i+HyN X-Received: by 2002:a17:902:868e:b029:d7:eb0d:79e8 with SMTP id g14-20020a170902868eb02900d7eb0d79e8mr11722523plo.12.1605119780423; Wed, 11 Nov 2020 10:36:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605119780; cv=none; d=google.com; s=arc-20160816; b=yo2mIh2j04Wk2xmNih/Smk4UoySfKQUO47CxjmbgMASvfZYh+L7QFfRj9V0jqMxzvs FjCOc4PiJ8MuKc48rra02zlFQ7UN6MLalji0bENK8tbBTdL4J7GmBjjsF7BOkLS0DODX sI8cYfuLs/ZyCtClasnFgCFphXpyE828IJU5KVhfdwR6mRs+pv35t7lUvT0vFFoP+Bxd 93GBOGg2+Is42y2lD49hEuOKQ7iAZtu9E4FXZ1MMnbkZLTeAG/Za4wDvUGFJjB0Xejcg oPARDtsFN81Yq/+3/y8y8Id81ndDDjrlJBF4TnDoJ4wToBcg5zCwKXp7zCDQhnW8NkAa H5tw== 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=YBs+AACilcP2mQd2Rz3KCgj56wU8fFFo4g7NQr2E9R0b0Vjmc4qh787lPIaNrbllS2 FNqdQhuSs2wLWncYmyQhSxaM+XzK1Ogmcd7KtGIGr3TWJdikMF69/CEwK+hV/+SRaQMV diwdANG4rzIy5MIu3szK0i1gjT1TUPt+i2N4VHdSWqMjHxN5St2BUMAzX9yKEcJU4dk1 oU0Ie6IsfvQARe96qPEEpnkWUst0j2tuXwg4KksPemUUOps/RFRz1PjNea39zlqKZ/Bu NrUUrbxba1+Q5h2nOjXk/a/QCpXfHLu+kSB6ZC3zC8ZIv7GatBEvgyyP810UmD6SUelE BlOA== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b="ZppS/pPT"; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 2610:10:20:722:a800:ff:fe36:1795 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. [2610:10:20:722:a800:ff:fe36:1795]) by mx.google.com with ESMTPS id s23si2279126pgv.106.2020.11.11.10.36.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Nov 2020 10:36:20 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 2610:10:20:722:a800:ff:fe36:1795 as permitted sender) client-ip=2610:10:20:722:a800:ff:fe36:1795; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b="ZppS/pPT"; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 2610:10:20:722:a800:ff:fe36:1795 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 D39756E0C4; Wed, 11 Nov 2020 18:36:14 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-wm1-x342.google.com (mail-wm1-x342.google.com [IPv6:2a00:1450:4864:20::342]) by gabe.freedesktop.org (Postfix) with ESMTPS id 9ACCD6E0C5 for ; Wed, 11 Nov 2020 18:36:11 +0000 (UTC) Received: by mail-wm1-x342.google.com with SMTP id s13so3242008wmh.4 for ; Wed, 11 Nov 2020 10:36:11 -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=ZppS/pPTRTgdttLh54xP750Kj6wz+Skcp0gIoIgehdUbqo2zKnEjGa/yiqC1zsRVT1 RojNDkdIIOVwEH/cxzrfw4IzVBy+MNQX717cjqzVcQD/DhZ7iqciX6SM6vWljUD9C7vy INmw17RivPboOAMS7Evvldk4WAubEVgS4S/nkTyULsmgnbzDLjGxfJfy+SxvxwbIOBkd Z8BJJPyj9Xo5ParXgCKw1BIgyM1MPmCqIDQXge0PR3SNWPVIVb1bugXxBYfp9WDf+xld Hhidwk+ywKJksPFcW9w+HUDn2U5kjpbYCXXweJoLxXkIhKaCfiQqoIVuzgh6iYP2RRo0 amRQ== 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=VjT9fFFLYHANnmSefs7exBD6zgM8HckUR+P4Y0PNQGY8U5XCYgb42P0A0p1yBDRGgR puMCo/jaY0zUyp1ZGP0XRkq5w4xgDFlXgY7qOF3v5NXLK2cejcXDevQzGd5jjtkEPN+d DYIKBJdSgrLAvGxUv2kdXDa45Ygi1mqasiwgqUqjf7kjqKrn7HcdPNmFhH7XdTBMrlLN qCh5sYM68/2yFfP30s2U+8+sI/hWWFvSpp1YDGthJBwgnUU44rGrk1TejAz+z2wnqWsJ 8fmvl3SuJlqFLTGaEalfpBT4iHY+UFUNfgJXWJjxXtY9sGEM9XS4mYN65uikkYbI/9e9 Mi5g== X-Gm-Message-State: AOAM530G3I66AVYHWfkDX29/hNxyPZYYs05Pj9uTZtgEm1VWo+TayKXm LwcmLLOvMwUzo1ZAOInGzFli/CrZFHksUrGa X-Received: by 2002:a1c:b0c4:: with SMTP id z187mr2725638wme.113.1605119770340; Wed, 11 Nov 2020 10:36:10 -0800 (PST) Received: from dell.default ([91.110.221.159]) by smtp.gmail.com with ESMTPSA id k84sm3558311wmf.42.2020.11.11.10.36.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Nov 2020 10:36:09 -0800 (PST) From: Lee Jones To: lee.jones@linaro.org Subject: [PATCH 15/19] drm/radeon/ci_dpm: Move 'si_*()'s prototypes to shared header Date: Wed, 11 Nov 2020 18:35:41 +0000 Message-Id: <20201111183545.1756994-16-lee.jones@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201111183545.1756994-1-lee.jones@linaro.org> References: <20201111183545.1756994-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