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: 11909963 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.5 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 B6BE4C61DD8 for ; Mon, 16 Nov 2020 17:38:12 +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 6764E20B80 for ; Mon, 16 Nov 2020 17:38:12 +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="cWujCKLB" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6764E20B80 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 6A3F36E071; Mon, 16 Nov 2020 17:37:54 +0000 (UTC) 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-Google-Smtp-Source: ABdhPJzXAtRq0zYeFBAml96Y8txKNsywwbSbgqgvHTz9nvFtZZ6Pi2JjMDBvw0Vqc9nVgFu7JzCDgQ== 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=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/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__ */