From patchwork Wed Nov 11 18:35:43 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 324142 Delivered-To: patch@linaro.org Received: by 2002:a05:6e02:5ce:0:0:0:0 with SMTP id l14csp623163ils; Wed, 11 Nov 2020 10:36:24 -0800 (PST) X-Google-Smtp-Source: ABdhPJzgxkQmOzULxuBk97nSSMWa/evOSzqJzWYo0Z/Y/S2YNLxINARX8COj4qEzCAH68o7XomCg X-Received: by 2002:a17:90a:f298:: with SMTP id fs24mr5177743pjb.109.1605119784586; Wed, 11 Nov 2020 10:36:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605119784; cv=none; d=google.com; s=arc-20160816; b=sOZ4D8Q9RZxI+dLDG/yyKTwLGlGZkQDhb7FOUCJPZvgaXohlw2fz9j6WBXC4nge9k6 dPl/0P+ymTD2uNNeNIrariKhyto8doz6b82dXOGMxJAwQPWpBK02p+6GsEPyduG0ssaE 2/SWQMaTtUXwqOptV1FU7XzXHVhqITaUk4xetst8hy9YK8o71JYRXmkSnE8So59GoHYV WyxRqsMXoVCIeS1qLFw3CwrfH42uExV2O+snKQEgG7vM74bodgZQiPlABILzmdrfqGcu 1FBg4EbUN57kbTJucoSpRJT8VVN4DxMCsBCcc6+3VL46X2BoG2u3IlV0dOp1p0u4OWXD WP5A== 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=bW9LgFCTXbP8pwXueXfHQSHkVs6Ya0gS1GClpvt4D34=; b=se0xST19eT2gRTt5vyvXgHb1nV9zTDa3YSqeamH7h3iD8lxDr9FQQLNFHfZVoRHu6h IvsHmmj7QAPBLvwVpEyaOaQxL/BHQ66dWdDJSGW43LKBPkUPeZLaQkj0g0AoG3BGbqVk uE4xqivN0e//HdMQantVYCi+oRodSxpvylXI11TwdVcuIZq10/O+zo/paQmJar2AHIzu 2w3lcPTBF6xny+8XuB1u3C+TEtIAGKcpB0TsqpKds1So02P6ld3XFZElj3iuxkZte4UU WRWJ/aegFP8d7c7IOTvYswE6MKb1K6aVUG2pAetjOgtMI/WtNlk+dE9yk3AC2d/DdAf0 O4jQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=Yiw9rQWO; 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 21si1393606pgs.408.2020.11.11.10.36.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Nov 2020 10:36:24 -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=Yiw9rQWO; 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 1B5596E0CE; Wed, 11 Nov 2020 18:36:16 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-wm1-x344.google.com (mail-wm1-x344.google.com [IPv6:2a00:1450:4864:20::344]) by gabe.freedesktop.org (Postfix) with ESMTPS id 628426E0C9 for ; Wed, 11 Nov 2020 18:36:14 +0000 (UTC) Received: by mail-wm1-x344.google.com with SMTP id d142so3159147wmd.4 for ; Wed, 11 Nov 2020 10:36:14 -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=8BRcDWZ7aXWvQb2HLCmLDCFOcRFyEf3okEuPgH0Vsk4=; b=Yiw9rQWOdIRvZ8Ojv9Qwo3rXzk0WhXlopbtnHAiSY2MaaYuDQYxYpE9t8FlKVukaxa q0cACyMsBPucNhkk/GEIA2b6Duj4q39cgAJxoUb65GjThpVFcNxklrBO4xZjwpHpeP96 07geHWJWkpWuTn1P2bIjY9cRzMTBmbCVrAAE0+iEWadLcrbhNoQOb+mqB7O3KCLriMLp aEtoZDQS6ZpUg3TuPqxJKAFisYH4If35ZF7Te3f4uxc5x6CFZE6G/LNW+ViRlcvnCyvm bnZDjdb+DvKsZqfw3mBI1eDjxvYS1UY7+wqZ4p2zsM//XzdxkE1RIniuKmKKU4zRky6F n/Cw== 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=8BRcDWZ7aXWvQb2HLCmLDCFOcRFyEf3okEuPgH0Vsk4=; b=PMKhqpCHwyEIF5sxh4V5f6qh9+USS7P8uJmOd6g56iI1och1D8jRpnFxMWk/gT29B8 dTdoxfGYnILwRNFObks/p3nnMdXVnpWzahDi2P1oApni8jE1oK+3wNIgefkz+Sd3ey7u 1sHjWiFBZ2/5havjNDsXvT5sIhSNwxS/bQ5JjfC8PmA3ccX7lHTX0+tomvRB+M0YzN/L Zoyb8gkHWQz0/nwph6cecSbanK1h0jQ75zs290+odnLuP/ClSDcX4CCRBwbwuNBjjXCH MaNX9SYoUGQhPDRqeKl7BtMU8l4AK5IU2Fl3ap2mgFeBbQPnHuzs7C8lKDrFlMa4vMND Be1Q== X-Gm-Message-State: AOAM531+PzoCx6c8o0UFhooJkgOw6X5OPMBCcYXlA18F9VMuGQe4gKz1 z0szL9+VcU5/ladLIFAzOWMy4Q== X-Received: by 2002:a1c:4888:: with SMTP id v130mr5471096wma.84.1605119773011; Wed, 11 Nov 2020 10:36:13 -0800 (PST) Received: from dell.default ([91.110.221.159]) by smtp.gmail.com with ESMTPSA id k84sm3558311wmf.42.2020.11.11.10.36.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Nov 2020 10:36:12 -0800 (PST) From: Lee Jones To: lee.jones@linaro.org Subject: [PATCH 17/19] drm/radeon/si_dpm: Move 'vce_v1_0_enable_mgcg()'s prototype to shared header Date: Wed, 11 Nov 2020 18:35:43 +0000 Message-Id: <20201111183545.1756994-18-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/vce_v1_0.c:102:6: warning: no previous prototype for ‘vce_v1_0_enable_mgcg’ [-Wmissing-prototypes] 102 | void vce_v1_0_enable_mgcg(struct radeon_device *rdev, bool enable) | ^~~~~~~~~~~~~~~~~~~~ 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/si_dpm.c | 3 +-- drivers/gpu/drm/radeon/trinity_dpm.c | 2 +- drivers/gpu/drm/radeon/vce.h | 34 ++++++++++++++++++++++++++++ drivers/gpu/drm/radeon/vce_v1_0.c | 1 + 4 files changed, 37 insertions(+), 3 deletions(-) create mode 100644 drivers/gpu/drm/radeon/vce.h diff --git a/drivers/gpu/drm/radeon/si_dpm.c b/drivers/gpu/drm/radeon/si_dpm.c index b4581392fbce9..cd07b06301b44 100644 --- a/drivers/gpu/drm/radeon/si_dpm.c +++ b/drivers/gpu/drm/radeon/si_dpm.c @@ -35,6 +35,7 @@ #include "si_dpm.h" #include "si.h" #include "sid.h" +#include "vce.h" #define MC_CG_ARB_FREQ_F0 0x0a #define MC_CG_ARB_FREQ_F1 0x0b @@ -1721,8 +1722,6 @@ static const struct si_powertune_data powertune_data_hainan = true }; -extern void vce_v1_0_enable_mgcg(struct radeon_device *rdev, bool enable); - static int si_populate_voltage_value(struct radeon_device *rdev, const struct atom_voltage_table *table, u16 value, SISLANDS_SMC_VOLTAGE_VALUE *voltage); diff --git a/drivers/gpu/drm/radeon/trinity_dpm.c b/drivers/gpu/drm/radeon/trinity_dpm.c index e005c18aac00e..08ea1c864cb23 100644 --- a/drivers/gpu/drm/radeon/trinity_dpm.c +++ b/drivers/gpu/drm/radeon/trinity_dpm.c @@ -29,6 +29,7 @@ #include "radeon_asic.h" #include "trinity_dpm.h" #include "trinityd.h" +#include "vce.h" #define TRINITY_MAX_DEEPSLEEP_DIVIDER_ID 5 #define TRINITY_MINIMUM_ENGINE_CLOCK 800 @@ -293,7 +294,6 @@ static const u32 trinity_override_mgpg_sequences[] = 0x00000204, 0x00000000, }; -extern void vce_v1_0_enable_mgcg(struct radeon_device *rdev, bool enable); static void trinity_program_clk_gating_hw_sequence(struct radeon_device *rdev, const u32 *seq, u32 count); static void trinity_override_dynamic_mg_powergating(struct radeon_device *rdev); diff --git a/drivers/gpu/drm/radeon/vce.h b/drivers/gpu/drm/radeon/vce.h new file mode 100644 index 0000000000000..1eb4f5715202e --- /dev/null +++ b/drivers/gpu/drm/radeon/vce.h @@ -0,0 +1,34 @@ +/* vce.h -- Private header for radeon driver -*- linux-c -*- + * + * Copyright 2013 Advanced Micro Devices, Inc. + * All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sub license, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to + * the following conditions: + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL + * THE COPYRIGHT HOLDERS, AUTHORS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, + * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR + * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE + * USE OR OTHER DEALINGS IN THE SOFTWARE. + * + * The above copyright notice and this permission notice (including the + * next paragraph) shall be included in all copies or substantial portions + * of the Software. + */ + +#ifndef __VCE_H__ +#define __VCE_H__ + +struct radeon_device; + +void vce_v1_0_enable_mgcg(struct radeon_device *rdev, bool enable); + +#endif /* __VCE_H__ */ diff --git a/drivers/gpu/drm/radeon/vce_v1_0.c b/drivers/gpu/drm/radeon/vce_v1_0.c index bd75bbcf5bf63..70c5da2141d75 100644 --- a/drivers/gpu/drm/radeon/vce_v1_0.c +++ b/drivers/gpu/drm/radeon/vce_v1_0.c @@ -30,6 +30,7 @@ #include "radeon.h" #include "radeon_asic.h" #include "sid.h" +#include "vce.h" #define VCE_V1_0_FW_SIZE (256 * 1024) #define VCE_V1_0_STACK_SIZE (64 * 1024)