From patchwork Wed Nov 11 18:35:32 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 324130 Delivered-To: patch@linaro.org Received: by 2002:a05:6e02:5ce:0:0:0:0 with SMTP id l14csp622923ils; Wed, 11 Nov 2020 10:36:05 -0800 (PST) X-Google-Smtp-Source: ABdhPJwnidyjO25pBOqGPn+AU8uFVBqKVxslcPkUzdr0SOuoooGw+q+XpaMiSyxUXr1pc/S8+ZqM X-Received: by 2002:a17:902:bb8c:b029:d2:2503:e458 with SMTP id m12-20020a170902bb8cb02900d22503e458mr22449371pls.18.1605119765265; Wed, 11 Nov 2020 10:36:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605119765; cv=none; d=google.com; s=arc-20160816; b=dIqKYIHy0awpSKag5iLyNiFYPl9GG7qKAA5S5dy2Yv/RdpbE26g7xTkmQuOWkG2vSA iXhlyiwwFtim71hlc1Ri+M4EbTi9C80QrvFO9xSq+5l4Pt1qJN56Ep1fVC4Gk7Hw3jNR NMsNlbcpIZUl1evxGu4VjZOzbUFdHUwDbt6IuzPvRrtIW12uYH+si4OEDfMC60h3bVUA qLNNgvjBIluc85axhUpFcj7bzRXA/3Sj5vwOarX0GAR9wMUSJ0vhc9Gx7qHQk/uhnI/d lDomvj3eZlqlblmd/Tqhl01Il1accjSuHBOBT+mTIjqFadLMYdfAzgV0N63EpTIZBc1p fPaQ== 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=mIeWLNh2IX5ysZD4sqvO/6pVIch8k6wLe37soAx/Fdk=; b=hnob6hJ44kGW1PAHackW0sy7SPPooWvM18a/jbYGGJoMcgcV6K7ysPD9+u28DjOdpd rmq2Q7+FtSVyNXpyaL9uuMGjfcjG7ePWRsY+1qdZpOu78Yfsh3h+cky31vJMNCPkFRsk 8N8wsASaZElwxwjw0sdmyVpueRTKRKAqOoXDImXE+U0tfUuO+JAf8bj5Ze9X9cfwFFtL T+ypZYq1WnHbH4oX1vljJqSM/4Rv+ttlOZ0nLCqe/xWdtgQM2TCjJTLy3Pap0OQAEm+v Bx7RDvJqrwgNyCfvwL06+v1VFUQQz2+8uL1gw+FaoUuEF/iE7Eiv2XBun8VKLBoYlv54 itIA== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=lmJGhgGz; 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 c8si2560641pjv.172.2020.11.11.10.36.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Nov 2020 10:36:05 -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=lmJGhgGz; 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 E42EF6E0B7; Wed, 11 Nov 2020 18:36:02 +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 AA31A6E0B7 for ; Wed, 11 Nov 2020 18:35:59 +0000 (UTC) Received: by mail-wr1-x442.google.com with SMTP id c17so3464531wrc.11 for ; Wed, 11 Nov 2020 10:35:59 -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=e5cdr3xq36okPI4QzX5zrw2cP/RfIKuDYtKma5kBVEI=; b=lmJGhgGzkUlMORHmRw0waBQnbWjKPoD+noPk/XBK4aL+OSKBkstdqDh4ByHmbSo2ar 60EdFYIXNiwFZcEg+M+bBI6h8SPfZwfp5cq/oKW/QyJpd1H6hhyVpUmWXEyuKB4w8fOL NhnB6u+8hDqSoTzKfRyXWmbL2jZ0vUDmDXgkUVsK95jmI6I9WDj/6+ebn4LGDrcpq7jE NvQxmIzA/j9gtNRSfiSHk0pg3J1HKpppJB/mLj2mYZngu1IKoP5kkOxoFx/dtMPGVOJ0 COWd4EM3HSU+y2K2q4qOZkVUKW+XXuMrGVyFYFvW1WfOWpZN09IcPnmOaFi0c1l+2Av0 etSA== 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=e5cdr3xq36okPI4QzX5zrw2cP/RfIKuDYtKma5kBVEI=; b=lVFsLEopfF8dHspVEMCT8PAvVCEYwwp1wLMkgAyD2kmC74KKHtcyyPOfvMiGetG9Fb 3SsPfI54hLAXXtX0PvkD+wAGzuLs2PqnIN57haRlO+BsxFo+jdm/PWq8SbcfsEqaNb5W HE5XZdVRHAmrMTKuv3ShFcilwN7/OdYD/B/ZPvD7APiWDoHIExEZGy7uLwq+96B1bzh8 qR/TMUcb2oxshBr0bqmmkIwIKk/MqFghWRmKIP5i9iD6W9YHOVLnPHRgFGOLlMD8riOt jdJJbBFIoGhA9GuLqKVoSpGwz8ZNKgTWl6njzJZGp4QXadZCqAOVUDxdkogC/HPPxUit DJZg== X-Gm-Message-State: AOAM530hnVHHB/bzVnsg2fZ8fzVyiE6p4D+3ApWDKHFrkfUoRA8y0sLV adlqRsZCPHXjushmTSFi3IrYFuj10EwZopx4 X-Received: by 2002:a5d:4802:: with SMTP id l2mr18034885wrq.424.1605119758267; Wed, 11 Nov 2020 10:35:58 -0800 (PST) Received: from dell.default ([91.110.221.159]) by smtp.gmail.com with ESMTPSA id k84sm3558311wmf.42.2020.11.11.10.35.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Nov 2020 10:35:57 -0800 (PST) From: Lee Jones To: lee.jones@linaro.org Subject: [PATCH 06/19] drm/radeon/ci_dpm: Move 'ci_*()'s prototypes to shared header Date: Wed, 11 Nov 2020 18:35:32 +0000 Message-Id: <20201111183545.1756994-7-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/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 377c3f0c9d316..af08d6f1be53e 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__ */