From patchwork Mon Nov 9 21:18:52 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 320992 Delivered-To: patch@linaro.org Received: by 2002:a17:906:d156:0:0:0:0 with SMTP id br22csp3000573ejb; Mon, 9 Nov 2020 13:19:47 -0800 (PST) X-Google-Smtp-Source: ABdhPJwxeh8/tPt8Ir9D+Mil1vof5uXJQBldEQU6QODqnIwQZM2yhvc1dbGPRy+plSbdjDruK5dj X-Received: by 2002:a17:90b:297:: with SMTP id az23mr1207811pjb.71.1604956786950; Mon, 09 Nov 2020 13:19:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1604956786; cv=none; d=google.com; s=arc-20160816; b=Fz9y6QTmp+QqtkHyYaQ1z/2Jt/g0kvjS5LdG37xK69pUn8FIU0NAhqGI4MbZfopNNw FWApNjZfOSDS3+jgVIwU0zVZoCxn+tuHJ7PmVcJtrcrrDWHWyKLm40E1RUKRxEVW3MhS jDoVM9mK0kZ9IDYOJ0HoW7S6CDqnczcEQpZWdLoKfrNiCuWAHqdCKNhx5fFFZHK+dfZV vj9UkchrI3JLD+QX+WsVJ8dAiXs6zMYwRSVDH6UUMnRjpI8wHRoNqP3kRF4kxd6qa9bs VE7HIaQ1bIhTM1tjtQLpEc4xfmBpA9xkIayUWhQqL5M9XMRKB3/fnIiF7UwsRuP6qmB4 hLcw== 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=Ehh86htoiN/rfaoDaK9mLqYGyiMtYzxRCUksCoO5P6Q=; b=uzwhyNHIf7o+fKs2zfU75nzJ1LcCoO2l+Qq5k9uPkrBaJL60Ys4MYu7wqozoBAN3CR fCBh4s/y/oJzYXhDI3xUh00XmQbZM9+3/DP0R9DhDQ0lzEN1+58fUd8yQD8dW+BHcETa Td9ko0IuwYtPE+caKm3b/4kLOsM0J4p5mWgX5zmvxnrQZzcF7kO+ju8buSxruGGPADrv adqnEqcQXv8Y84AYBIYM3SjOdKsYjYMO3pDT5ign32jAvgngUO+Ek1eJMvT6rzl/XdYh cf2p/xkrin1TJNoQK8XNW2JbZisBqiM0m6hudsy7YeDAuLBONygmbVGECKdnuYWqnVU2 6prQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b="ia6Ly/ND"; 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 l11si10169760pgf.540.2020.11.09.13.19.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 Nov 2020 13:19:46 -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="ia6Ly/ND"; 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 B060E8961E; Mon, 9 Nov 2020 21:19:45 +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 01097895F5 for ; Mon, 9 Nov 2020 21:19:42 +0000 (UTC) Received: by mail-wr1-x442.google.com with SMTP id w1so10399238wrm.4 for ; Mon, 09 Nov 2020 13:19:42 -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=KyuOZ6WFceJf3q5HhUHXf3izEYZKAnZdbW02BpgTuA4=; b=ia6Ly/NDi9+1f1MROT2EMD4YRQgmF6pBC/ImFkzNoFNFyXq1oRlxFh2uqMhXnE6lbQ 9XLcWdf7NjOGxRxtuv2UN22kTINyIyTfXWFGkK5Sm5i1RBc4bzAIHMXCd0J4sTI7vWJ+ ASGDsFl+nL2+zeJ8sPajMBI5ZgSuPpkBRgxhTJLf6f3M+0GfIyYKGUlgBFv7H3Ys8lqi NuQO4QbSbYtEIowXUA/uPVYkSvdwGoFjjw3IrR2Z57nIhvQjI6y41eAqmfnFG+dXAK4u 6zbri2xyInD457VBa3Kh8Izq/xDjxGZQw+Nb1wcYAJx7wPaRoICKqqQVzzRaI6qWz5q0 /qJw== 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=KyuOZ6WFceJf3q5HhUHXf3izEYZKAnZdbW02BpgTuA4=; b=XDVQa8EsYTlOubSdVUHiV8tppFkbrotFCOR+2HocWQES+6TYbPG2R3AGKo5MeIrtsy CqcxmrDG8h/cdto6VDZjI+BRDGn//y5mtWtSiNFVad0dAVQ6ewJif6vUINV79iAHHXUA Zx5bnefmOCj+M5fYVxFJUNFRvb6WjcOP05L2Je9I9QsVIn9f9UCcLeDQc5hBvMqOANHW OC3OqKfP6GzEoR+zToO8a5bcmtXXwGHX6hWj9kjUgxyjoRaOMArq2hu7FCESnN+N+XKu ofQdBwfHoJawLQGfePIevlXgUV//+0vtVaRsWKbWgteRZPwXHpOf0YspabsVVr72COBN 5T+w== X-Gm-Message-State: AOAM530GwZrgAGjxkGsSDZpvh4/zfyynT8pCJ70Ktlc2xBUba0cE/TiE CKOuQ2smc2VnWaKEKucXhw9tRA== X-Received: by 2002:adf:b78b:: with SMTP id s11mr12746859wre.42.1604956781612; Mon, 09 Nov 2020 13:19:41 -0800 (PST) Received: from dell.default ([91.110.221.139]) by smtp.gmail.com with ESMTPSA id 71sm15170630wrm.20.2020.11.09.13.19.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 Nov 2020 13:19:41 -0800 (PST) From: Lee Jones To: lee.jones@linaro.org Subject: [PATCH 17/20] drm/radeon/evergreend: Move 'evergreen_*' and 'sumo_*' prototypes out to shared location Date: Mon, 9 Nov 2020 21:18:52 +0000 Message-Id: <20201109211855.3340030-18-lee.jones@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201109211855.3340030-1-lee.jones@linaro.org> References: <20201109211855.3340030-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/evergreen.c:1281:6: warning: no previous prototype for ‘evergreen_fix_pci_max_read_req_size’ [-Wmissing-prototypes] 1281 | void evergreen_fix_pci_max_read_req_size(struct radeon_device *rdev) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/radeon/evergreen.c:2664:6: warning: no previous prototype for ‘evergreen_mc_stop’ [-Wmissing-prototypes] 2664 | void evergreen_mc_stop(struct radeon_device *rdev, struct evergreen_mc_save *save) | ^~~~~~~~~~~~~~~~~ drivers/gpu/drm/radeon/evergreen.c:2762:6: warning: no previous prototype for ‘evergreen_mc_resume’ [-Wmissing-prototypes] 2762 | void evergreen_mc_resume(struct radeon_device *rdev, struct evergreen_mc_save *save) | ^~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/radeon/evergreen.c:2850:6: warning: no previous prototype for ‘evergreen_mc_program’ [-Wmissing-prototypes] 2850 | void evergreen_mc_program(struct radeon_device *rdev) | ^~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/radeon/evergreen.c:3710:5: warning: no previous prototype for ‘evergreen_mc_init’ [-Wmissing-prototypes] 3710 | int evergreen_mc_init(struct radeon_device *rdev) | ^~~~~~~~~~~~~~~~~ drivers/gpu/drm/radeon/evergreen.c:3769:6: warning: no previous prototype for ‘evergreen_print_gpu_status_regs’ [-Wmissing-prototypes] 3769 | void evergreen_print_gpu_status_regs(struct radeon_device *rdev) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/radeon/evergreen.c:3797:6: warning: no previous prototype for ‘evergreen_is_display_hung’ [-Wmissing-prototypes] 3797 | bool evergreen_is_display_hung(struct radeon_device *rdev) | ^~~~~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/radeon/evergreen.c:4009:6: warning: no previous prototype for ‘evergreen_gpu_pci_config_reset’ [-Wmissing-prototypes] 4009 | void evergreen_gpu_pci_config_reset(struct radeon_device *rdev) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/radeon/evergreen.c:4110:6: warning: no previous prototype for ‘sumo_rlc_fini’ [-Wmissing-prototypes] 4110 | void sumo_rlc_fini(struct radeon_device *rdev) | ^~~~~~~~~~~~~ drivers/gpu/drm/radeon/evergreen.c:4153:5: warning: no previous prototype for ‘sumo_rlc_init’ [-Wmissing-prototypes] 4153 | int sumo_rlc_init(struct radeon_device *rdev) | ^~~~~~~~~~~~~ drivers/gpu/drm/radeon/evergreen.c:4381:5: warning: no previous prototype for ‘evergreen_rlc_resume’ [-Wmissing-prototypes] 4381 | int evergreen_rlc_resume(struct radeon_device *rdev) | ^~~~~~~~~~~~~ drivers/gpu/drm/radeon/evergreen.c:4670:6: warning: no previous prototype for ‘evergreen_irq_suspend’ [-Wmissing-prototypes] 4670 | void evergreen_irq_suspend(struct radeon_device *rdev) | ^~~~~~~~~~~~~~~~~~~~~ NB: Lots more of these - snipped for brevity 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/ni.c | 16 ---------------- drivers/gpu/drm/radeon/radeon.h | 23 +++++++++++++++++++++++ drivers/gpu/drm/radeon/si.c | 6 ------ 3 files changed, 23 insertions(+), 22 deletions(-) diff --git a/drivers/gpu/drm/radeon/ni.c b/drivers/gpu/drm/radeon/ni.c index 02feb0801fd30..91bba473f2703 100644 --- a/drivers/gpu/drm/radeon/ni.c +++ b/drivers/gpu/drm/radeon/ni.c @@ -38,7 +38,6 @@ #include "radeon_asic.h" #include "radeon_audio.h" #include "radeon_ucode.h" - /* * Indirect registers accessor */ @@ -190,21 +189,6 @@ static const u32 tn_rlc_save_restore_register_list[] = 0x802c, }; -extern bool evergreen_is_display_hung(struct radeon_device *rdev); -extern void evergreen_print_gpu_status_regs(struct radeon_device *rdev); -extern void evergreen_mc_stop(struct radeon_device *rdev, struct evergreen_mc_save *save); -extern void evergreen_mc_resume(struct radeon_device *rdev, struct evergreen_mc_save *save); -extern int evergreen_mc_wait_for_idle(struct radeon_device *rdev); -extern void evergreen_mc_program(struct radeon_device *rdev); -extern void evergreen_irq_suspend(struct radeon_device *rdev); -extern int evergreen_mc_init(struct radeon_device *rdev); -extern void evergreen_fix_pci_max_read_req_size(struct radeon_device *rdev); -extern void evergreen_pcie_gen2_enable(struct radeon_device *rdev); -extern void evergreen_program_aspm(struct radeon_device *rdev); -extern void sumo_rlc_fini(struct radeon_device *rdev); -extern int sumo_rlc_init(struct radeon_device *rdev); -extern void evergreen_gpu_pci_config_reset(struct radeon_device *rdev); - /* Firmware Names */ MODULE_FIRMWARE("radeon/BARTS_pfp.bin"); MODULE_FIRMWARE("radeon/BARTS_me.bin"); diff --git a/drivers/gpu/drm/radeon/radeon.h b/drivers/gpu/drm/radeon/radeon.h index 1cbbaff7cede2..3e53a9493ae92 100644 --- a/drivers/gpu/drm/radeon/radeon.h +++ b/drivers/gpu/drm/radeon/radeon.h @@ -2951,6 +2951,29 @@ extern u32 r6xx_remap_render_backend(struct radeon_device *rdev, extern int ni_init_microcode(struct radeon_device *rdev); extern int ni_mc_load_microcode(struct radeon_device *rdev); +/* + * evergreen functions used by ni.c and si.c + */ + +struct evergreen_mc_save; + +bool evergreen_is_display_hung(struct radeon_device *rdev); +void evergreen_print_gpu_status_regs(struct radeon_device *rdev); +void evergreen_mc_stop(struct radeon_device *rdev, struct evergreen_mc_save *save); +void evergreen_mc_resume(struct radeon_device *rdev, struct evergreen_mc_save *save); +int evergreen_mc_wait_for_idle(struct radeon_device *rdev); +void evergreen_mc_program(struct radeon_device *rdev); +void evergreen_irq_suspend(struct radeon_device *rdev); +int evergreen_mc_init(struct radeon_device *rdev); +void evergreen_fix_pci_max_read_req_size(struct radeon_device *rdev); +void evergreen_pcie_gen2_enable(struct radeon_device *rdev); +void evergreen_program_aspm(struct radeon_device *rdev); +void sumo_rlc_fini(struct radeon_device *rdev); +int sumo_rlc_init(struct radeon_device *rdev); +void evergreen_gpu_pci_config_reset(struct radeon_device *rdev); +u32 evergreen_get_number_of_dram_channels(struct radeon_device *rdev); +void evergreen_print_gpu_status_regs(struct radeon_device *rdev); + /* radeon_acpi.c */ #if defined(CONFIG_ACPI) extern int radeon_acpi_init(struct radeon_device *rdev); diff --git a/drivers/gpu/drm/radeon/si.c b/drivers/gpu/drm/radeon/si.c index 93dcab548a835..8b80884990aee 100644 --- a/drivers/gpu/drm/radeon/si.c +++ b/drivers/gpu/drm/radeon/si.c @@ -129,12 +129,6 @@ extern void sumo_rlc_fini(struct radeon_device *rdev); extern int sumo_rlc_init(struct radeon_device *rdev); extern int r600_ih_ring_alloc(struct radeon_device *rdev); extern void r600_ih_ring_fini(struct radeon_device *rdev); -extern void evergreen_fix_pci_max_read_req_size(struct radeon_device *rdev); -extern void evergreen_mc_stop(struct radeon_device *rdev, struct evergreen_mc_save *save); -extern void evergreen_mc_resume(struct radeon_device *rdev, struct evergreen_mc_save *save); -extern u32 evergreen_get_number_of_dram_channels(struct radeon_device *rdev); -extern void evergreen_print_gpu_status_regs(struct radeon_device *rdev); -extern bool evergreen_is_display_hung(struct radeon_device *rdev); static void si_enable_gui_idle_interrupt(struct radeon_device *rdev, bool enable); static void si_init_pg(struct radeon_device *rdev);