From patchwork Mon Nov 16 17:29: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: 324424 Delivered-To: patch@linaro.org Received: by 2002:a05:6e02:5ce:0:0:0:0 with SMTP id l14csp3498089ils; Mon, 16 Nov 2020 09:30:37 -0800 (PST) X-Google-Smtp-Source: ABdhPJxjhfrTwhi0Db4eeRipRMQvS1f8lZnjiXX4Ck2K+gdHovieCiI8WhQ4lpMCxVlIdnVJoZb+ X-Received: by 2002:a62:fc4b:0:b029:18a:aa9d:10cf with SMTP id e72-20020a62fc4b0000b029018aaa9d10cfmr14811627pfh.28.1605547837047; Mon, 16 Nov 2020 09:30:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605547837; cv=none; d=google.com; s=arc-20160816; b=cQQOIylIJ4enxlwyuxyVNqPrjjBIc9MFdUqlyL+m0K/hgRJbD/CjJHypQe71KzFBE7 PNYmxsUUt/RXblrv1ljm2BJY05u31gcIjJHbzMhoQ2uT69rO5x8tuVzO7LCu+FiOhghY +q+wz7XMV05hwLeL6ujOxjYKiO/ZdPRpS9h/tkB1DDqLYJk0M2Wz+MoPWvp9w3tJ6NtS M7qAoaAi0mWwRITpTChaQGHhtTxC4vkETJC76THvObuodaDYM2i8doW8APxQG+a+6nSp 6ptyb/xJTuxnFQpQHz9LdE8SEMW4UO18N6kDoTiSjejXoDQlUFiK6RvdaMLSCYsmcf5z 2Qlg== 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=xz/bv94RuQHC2TaZmj3Eh/R2FLAjIz/K+zHq/XIaatU=; b=juwbI09wTQZN7akcS/uJDW589E4r8Y4kZ+90a6egHNoGwD+iDlR/bg6xIX/io2YhPE DlL4Jyicka3wq18bLCBp72KQVSZsSF9nxGyBT8i5/xDGO9MdwF2m0TTlBxZmH4qzSAtn xBOFyQwmQW5zhear0OpWx9JNkprvbxizQI3zxCv5cVY9FmSqmvk6Q/6K4EkI7ubOCcHJ 4mDpX9IWFu09Sc0SMhvBzfNPm6RQjHr1Vr2auSy3gQ6/R4z6iToN4YHSux9yb/NpRtfT iV2VDvELafCDxV3SVs+xiRQVqFz+g7oWctCc2b0B0uCpHHhGV3ckBf+X+3J25uYuQU3B Jrig== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=pUTGCNk+; 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 i6si17073914pfe.267.2020.11.16.09.30.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Nov 2020 09:30:37 -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=pUTGCNk+; 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 1CEE66E030; Mon, 16 Nov 2020 17:30:35 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-wr1-x444.google.com (mail-wr1-x444.google.com [IPv6:2a00:1450:4864:20::444]) by gabe.freedesktop.org (Postfix) with ESMTPS id 1EF9889FEC for ; Mon, 16 Nov 2020 17:30:26 +0000 (UTC) Received: by mail-wr1-x444.google.com with SMTP id k2so19653090wrx.2 for ; Mon, 16 Nov 2020 09:30:26 -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=ZUOfHDa8VKjKfvaDOIZ0lG7+TRmewMW6pKq0nq4Yf40=; b=pUTGCNk+rZ3EaEHQY0/fTUeBO/p7mPxy9f4Bm8jCokpnyeV70DPnNhqKVsLCFt63Qm ACU7LOG3ZuIAbTDTAEgErIsdo3n5mMa1TPDxJYMJ0F6LOxLMP08OOvHhECSqSYdR9Q16 7wp/V6BWIfRWem/StkKdn86uo4VJzwwIF3+AY2zACSZecet+5atiCVlsYMeVayfSUwHW YaNFxHSJEsauHgPIhSH/lL8FkB7WTsnOzqFEpStfgZzP3Ux7Awcx6tvKgWEnqfSOsRt8 LMFGwwktx8/PZXj+AMwtyJWkVXLnsNO+ceVQlcHaii3g4UytHY9EYm/iog5OX/ir7/Fs JQDw== 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=ZUOfHDa8VKjKfvaDOIZ0lG7+TRmewMW6pKq0nq4Yf40=; b=baqPuRtcc+isZ15ytRFAzX1+xaasFCl7Omf2DkEjeo88TiD0Uv71dRivvQ6GK81fdd jMwfm1OJrrcFvBt2k/fH+FAe407h6ro4Z98JG2NdsbEA9KHFPNI136vwQawA1G2MkKUX nR8GWNdSO2YR9L8hatCayLCrnSq/xri36vw3uEBGgBVv117vL3eaa0gAK4OhUzURbBBo SptEcydd+tD8MzZVu6Ja3RXwELmQJDpFKwET8OaW+FLgsYOI1orXC+JZNYf35LztD1hS y6jbMC0QrkWRXhJLwi/2lVNpLeG4zg0wq1kYbYDAfb7M6qyEwqBuIN2fVuOu2npYhpZN DbeQ== X-Gm-Message-State: AOAM532JDvGw0Mtmmwrovvz/cmPymJv38fbM1LZhCZ63PNJTaN8Ia3aT ccwOInNSHJ72X7StAuJc2WIl6g== X-Received: by 2002:a5d:4588:: with SMTP id p8mr20546018wrq.224.1605547822432; Mon, 16 Nov 2020 09:30:22 -0800 (PST) Received: from dell.default ([91.110.221.159]) by smtp.gmail.com with ESMTPSA id f23sm20054854wmb.43.2020.11.16.09.30.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Nov 2020 09:30:21 -0800 (PST) From: Lee Jones To: lee.jones@linaro.org Subject: [PATCH 10/43] drm/radeon/radeon_pm: Move 'radeon_pm_acpi_event_handler' prototype into shared header Date: Mon, 16 Nov 2020 17:29:32 +0000 Message-Id: <20201116173005.1825880-11-lee.jones@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201116173005.1825880-1-lee.jones@linaro.org> References: <20201116173005.1825880-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, =?utf-8?q?Christian_K=C3=B6nig?= , linaro-mm-sig@lists.linaro.org, dri-devel@lists.freedesktop.org, Alex Deucher , linux-media@vger.kernel.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/radeon/radeon_pm.c:74:6: warning: no previous prototype for ‘radeon_pm_acpi_event_handler’ [-Wmissing-prototypes] 74 | void radeon_pm_acpi_event_handler(struct radeon_device *rdev) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: Sumit Semwal Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Cc: linux-media@vger.kernel.org Cc: linaro-mm-sig@lists.linaro.org Signed-off-by: Lee Jones --- drivers/gpu/drm/radeon/radeon_acpi.c | 3 +-- drivers/gpu/drm/radeon/radeon_pm.c | 1 + drivers/gpu/drm/radeon/radeon_pm.h | 33 ++++++++++++++++++++++++++++ 3 files changed, 35 insertions(+), 2 deletions(-) create mode 100644 drivers/gpu/drm/radeon/radeon_pm.h diff --git a/drivers/gpu/drm/radeon/radeon_acpi.c b/drivers/gpu/drm/radeon/radeon_acpi.c index 6cf1645e7a1a8..1baef7b493def 100644 --- a/drivers/gpu/drm/radeon/radeon_acpi.c +++ b/drivers/gpu/drm/radeon/radeon_acpi.c @@ -36,6 +36,7 @@ #include "atom.h" #include "radeon.h" #include "radeon_acpi.h" +#include "radeon_pm.h" #if defined(CONFIG_VGA_SWITCHEROO) bool radeon_atpx_dgpu_req_power_for_displays(void); @@ -45,8 +46,6 @@ static inline bool radeon_atpx_dgpu_req_power_for_displays(void) { return false; #define ACPI_AC_CLASS "ac_adapter" -extern void radeon_pm_acpi_event_handler(struct radeon_device *rdev); - struct atif_verify_interface { u16 size; /* structure size in bytes (includes size field) */ u16 version; /* version */ diff --git a/drivers/gpu/drm/radeon/radeon_pm.c b/drivers/gpu/drm/radeon/radeon_pm.c index 65d172b13e065..1995dad59dd09 100644 --- a/drivers/gpu/drm/radeon/radeon_pm.c +++ b/drivers/gpu/drm/radeon/radeon_pm.c @@ -33,6 +33,7 @@ #include "avivod.h" #include "r600_dpm.h" #include "radeon.h" +#include "radeon_pm.h" #define RADEON_IDLE_LOOP_MS 100 #define RADEON_RECLOCK_DELAY_MS 200 diff --git a/drivers/gpu/drm/radeon/radeon_pm.h b/drivers/gpu/drm/radeon/radeon_pm.h new file mode 100644 index 0000000000000..5ef147785e815 --- /dev/null +++ b/drivers/gpu/drm/radeon/radeon_pm.h @@ -0,0 +1,33 @@ +/* radeon_pm.h -- Private header for radeon driver -*- linux-c -*- + * + * Copyright 1999 Precision Insight, Inc., Cedar Park, Texas. + * Copyright 2000 VA Linux Systems, Inc., Fremont, California. + * 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, 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 (including the next + * paragraph) 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 + * PRECISION INSIGHT 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. + * + */ + +#ifndef __RADEON_PM_H__ +#define __RADEON_PM_H__ + +void radeon_pm_acpi_event_handler(struct radeon_device *rdev); + +#endif /* __RADEON_PM_H__ */