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: 11898257 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 26542C4742C for ; Wed, 11 Nov 2020 18:36:20 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id A54B0205CB for ; Wed, 11 Nov 2020 18:36:19 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="ZppS/pPT" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A54B0205CB Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.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) 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-Google-Smtp-Source: ABdhPJwRT4ieJ2l8ug/xaqNwACgL0ytg+jIjEVoXnmY/kQp/b2J6n2NQ7oxNVQnCZou2JirHx9ehsw== 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=B6nig?= 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