From patchwork Mon Nov 16 17:36:45 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 324467 Delivered-To: patch@linaro.org Received: by 2002:a05:6e02:5ce:0:0:0:0 with SMTP id l14csp3503679ils; Mon, 16 Nov 2020 09:38:13 -0800 (PST) X-Google-Smtp-Source: ABdhPJzGyd3VhmGO/k3N9vKGes1luODNabVaij26e+K0M9UZkLjzpxO5L5n/MpIYd8dpeB3yLLYC X-Received: by 2002:a62:2b88:0:b029:163:c6fb:f2a with SMTP id r130-20020a622b880000b0290163c6fb0f2amr14590558pfr.7.1605548293299; Mon, 16 Nov 2020 09:38:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605548293; cv=none; d=google.com; s=arc-20160816; b=hdf5YGih6K6mOAiw+MmTKBLTQ+2bgU5YQtd4MQ0dtpyjBATx6ZSK83s0XMwefHtuTf GJqQrcgNEj5QeTEaA49Z1x1etehF8yXd7A7sGMxORAGxvdriHoEMjIiWX8exrRZlg6Yz 7ccIbJ1V0v5Oyw9lUwvfv2/DyYJahAu8TAN/0bNDq9tI8mg+uLw9Nzyk1p3mf09od6ni le2MEu+B1bzaKdzsAgFkQGZi/kTjY7fdi7EB9Ia+QhSNbx6Yhzsf55uBgeePHf7He0+w PCNbD70WQcBlv+OJE0neLbq+yEMrViIoSLGX27mZLtNYdgkuAgu5SrKUwipR3n5Gvo5d FVpg== 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=EcIyQNQGWZpssn92QRUwuCVsqxG97cEylRMeWxJB5FA=; b=qRQX+6cMcNmR/jkKl2ecZBZriaPtqNQYw8ktBBYsgJ3aSOXFk5i6z+wv/pnNxXppvH rx4vMsZoiqH1eo0GBWxjnd/xj//aqcFHefNq+1RWsx7m/d8pZCxzmqv6nB1PSQ1bFOsT Xf3pzbwWPO7GuOMj4mbMf19/qmLtDYn/zP3RJlYXnw+nFdamfYys5exR7aVzagWcXqbu 2n0IMAJyfEM5XMYvqYxIyEJByjLnADCffZ7lQC6qhP0E0uUrGCAYza1vIvO8AQh+vqnm gt2+Ol6w3Bc9dwqorwqZEIybPZvgaGUzrnOzqJLpcRf5ADsqEfNoxDS0Xp0hibfmRpa1 /ldg== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=cWujCKLB; 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 q13si20070pjp.54.2020.11.16.09.38.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Nov 2020 09:38:13 -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=cWujCKLB; 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 6A3F36E071; Mon, 16 Nov 2020 17:37:54 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-wr1-x442.google.com (mail-wr1-x442.google.com [IPv6:2a00:1450:4864:20::442]) by gabe.freedesktop.org (Postfix) with ESMTPS id 665096E04A for ; Mon, 16 Nov 2020 17:37:44 +0000 (UTC) Received: by mail-wr1-x442.google.com with SMTP id m6so2457320wrg.7 for ; Mon, 16 Nov 2020 09:37:44 -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=6Szxzlxe07MDq6GBf9WMTaGmfQZg98jXh/8U8Q7NRl8=; b=cWujCKLBBVgUQyRuw5USqQWff0TcZh9I2YvP7MjQJxWb76ShqJ+IIoOaTqiIifIUew 3dmTGfDKzlLil/pvr+g3YM2kyz7IPMyOlgZ3Hpuz8UQNNQSKtZmQRyxRawukvN3mzNnW go0QG1im5Pw9V1O65u+trn3gHzHTCbxX4uMLMVodj64bU+Bq3St5yZIvclTzBB+BR3xr pFPv+kFHHilL6Y6XXtL71jf+P4dcGPbkpHMp0wJzQt85DUSg8Q4bo523tThzUHDK2UCT J4w2a3gB2yNwrmIx0rCsCSDi4Pg6d0LUMsRtAq3Tv1Nnzj9Satc3yADiahzAj1Ix67ZK fy3A== 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=6Szxzlxe07MDq6GBf9WMTaGmfQZg98jXh/8U8Q7NRl8=; b=Joxsv+d/WF/pb8/yOeNYui3JeZgTHf8Du8HWVEmnzmrxOpqyPQIratGt5sMcGfCIFx t7qQoYBxFR4US7jCITGuZ2LFzJa3UF38OmcgrW0j9VePaElY74rE1TNao95IkQtE4tGD tiSMwGuFolyMSmEy+zcOXUrArggtOWiYQMNgnhP0Zsqi1+3GBDFpY3/QZTtNbQqZdy8a 5TaB4WhQ79+Nkdo8uzvJ+dvNMRstrzMNc2RC6up3JOeV74vWZS2FR0mr1UmCXxkQXouF 27Hd+DuOsrynWzV1FGm+2lNhvAgCnmts//jUR7oSKqoK4jht3X9JHsRc7tHXxyrLaSGw Z1MQ== X-Gm-Message-State: AOAM533Fn0E4Ib5pID1U84MkH+DU8pU3mzLG1vikX0LVbzrxYgflV0mz 0OnucYYLH4sXFrd6NX0hKTgrQw== X-Received: by 2002:adf:d18a:: with SMTP id v10mr20186934wrc.325.1605548263095; Mon, 16 Nov 2020 09:37:43 -0800 (PST) Received: from dell.default ([91.110.221.159]) by smtp.gmail.com with ESMTPSA id 30sm16942828wrd.88.2020.11.16.09.37.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Nov 2020 09:37:42 -0800 (PST) From: Lee Jones To: lee.jones@linaro.org Subject: [PATCH 28/43] drm/radeon/ci_dpm: Move 'ci_*()'s prototypes to shared header Date: Mon, 16 Nov 2020 17:36:45 +0000 Message-Id: <20201116173700.1830487-29-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/cik.c:1868:5: warning: no previous prototype for ‘ci_mc_load_microcode’ [-Wmissing-prototypes] 1868 | int ci_mc_load_microcode(struct radeon_device *rdev) | ^~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/radeon/cik.c:5847:6: warning: no previous prototype for ‘cik_enter_rlc_safe_mode’ [-Wmissing-prototypes] 5847 | void cik_enter_rlc_safe_mode(struct radeon_device *rdev) | ^~~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/radeon/cik.c:5868:6: warning: no previous prototype for ‘cik_exit_rlc_safe_mode’ [-Wmissing-prototypes] 5868 | void cik_exit_rlc_safe_mode(struct radeon_device *rdev) | ^~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/radeon/cik.c:6286:6: warning: no previous prototype for ‘cik_update_cg’ [-Wmissing-prototypes] 6286 | void cik_update_cg(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 | 7 +------ drivers/gpu/drm/radeon/cik.c | 1 + drivers/gpu/drm/radeon/cik.h | 33 +++++++++++++++++++++++++++++++++ 3 files changed, 35 insertions(+), 6 deletions(-) create mode 100644 drivers/gpu/drm/radeon/cik.h diff --git a/drivers/gpu/drm/radeon/ci_dpm.c b/drivers/gpu/drm/radeon/ci_dpm.c index 8324aca5fd006..a9fc0a552736c 100644 --- a/drivers/gpu/drm/radeon/ci_dpm.c +++ b/drivers/gpu/drm/radeon/ci_dpm.c @@ -27,6 +27,7 @@ #include "atom.h" #include "ci_dpm.h" +#include "cik.h" #include "cikd.h" #include "r600_dpm.h" #include "radeon.h" @@ -157,12 +158,6 @@ 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); -extern void cik_enter_rlc_safe_mode(struct radeon_device *rdev); -extern void cik_exit_rlc_safe_mode(struct radeon_device *rdev); -extern int ci_mc_load_microcode(struct radeon_device *rdev); -extern void cik_update_cg(struct radeon_device *rdev, - u32 block, bool enable); - 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/cik.c b/drivers/gpu/drm/radeon/cik.c index 980b50d046cbc..ae020ad7b3185 100644 --- a/drivers/gpu/drm/radeon/cik.c +++ b/drivers/gpu/drm/radeon/cik.c @@ -32,6 +32,7 @@ #include "atom.h" #include "evergreen.h" #include "cik_blit_shaders.h" +#include "cik.h" #include "cikd.h" #include "clearstate_ci.h" #include "r600.h" diff --git a/drivers/gpu/drm/radeon/cik.h b/drivers/gpu/drm/radeon/cik.h new file mode 100644 index 0000000000000..297b3c1ff804f --- /dev/null +++ b/drivers/gpu/drm/radeon/cik.h @@ -0,0 +1,33 @@ +/* cik.h -- Private header for radeon driver -*- linux-c -*- + * Copyright 2012 Advanced Micro Devices, Inc. + * + * 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, sublicense, + * 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 above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * 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 NONINFRINGEMENT. IN NO EVENT SHALL + * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) 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. + */ + +#ifndef __CIK_H__ +#define __CIK_H__ + +struct radeon_device; + +void cik_enter_rlc_safe_mode(struct radeon_device *rdev); +void cik_exit_rlc_safe_mode(struct radeon_device *rdev); +int ci_mc_load_microcode(struct radeon_device *rdev); +void cik_update_cg(struct radeon_device *rdev, u32 block, bool enable); + +#endif /* __CIK_H__ */