From patchwork Mon Nov 16 17:36:27 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 11909917 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 16187C71155 for ; Mon, 16 Nov 2020 17:37:31 +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 CED8624199 for ; Mon, 16 Nov 2020 17:37:30 +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="ut8jxO1l" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org CED8624199 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 DDE1D6E03B; Mon, 16 Nov 2020 17:37:27 +0000 (UTC) Received: from mail-wr1-x441.google.com (mail-wr1-x441.google.com [IPv6:2a00:1450:4864:20::441]) by gabe.freedesktop.org (Postfix) with ESMTPS id 791E06E060 for ; Mon, 16 Nov 2020 17:37:19 +0000 (UTC) Received: by mail-wr1-x441.google.com with SMTP id k2so19677910wrx.2 for ; Mon, 16 Nov 2020 09:37:19 -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=ut8jxO1lAmNq7OzJ9R4sz0vJdyrWQMXwL0AD6ih0EUtENjbT02f+txcqG8JOqBTl3G y8DyBeyPhhRECA9RCvjs4fvoaJ8rikWI8AKq0WhKNu4bFRC/xeyjdEMsORqjufwFFK82 O4ZF7LtxJ/AOhxvXXu0e4DCqSSxUbH13n4bil2XlmGi2/fGURIoBCpx4Wbfq0Xh04L3b A3xYKjycgkl/XqpmhTHokEo4RtdlampZs0ZzrbVb36g/PSvC5p57RNjdkbjU1+kVsSkY yhaEPK+mpcZO8E+qjDbR8BUK3bXeBNtVCXID4/wbENNRoQeZ+MLf06BPQ72PlLc8BSFg cQJQ== 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=evZZQ8DyNWk97awnZij82BYXTjSQgnRMF3thnGtz1TZqVgpw9nbrqxiIOU0/t/KGoj lB/YryZYME9AGmr49O1dq4E/tBDU8OP1rFMuz8sexxcRUAotDxvs6s3jbh5FGsXHxnB3 hMKTa1HwTRNW+t518QncEFHg9YyHsijNrPc8ozug1rS7KIn0YhsnNs1rlNTwx7M/QFtt WY0z6K0PrMwunsnXT1DXWHdH50ow65CMC+C+d997XViPn3NtQUXfAW5Q3n1jhSJDZlk5 Ty8t8hAF0sb0ncltJcomenLzLE+j4S4MIbemctiZXiiySb9xE7T8evaFOOY8uhfCxfwl oEng== X-Gm-Message-State: AOAM530SB4quHPnklftPSSI8ZPfD4ue0g0aD//TO1cJZFqFxDbMkuk4N QKnkTKO/SCQfFvgQIxqwuXJVqA== X-Google-Smtp-Source: ABdhPJx2zAlCsh+71uTEhUoKN+Lvzh21s/GlhOo5TSlZcYkH4N2jg/QIQ2KTKWXCwfHDyQEx5HqGaw== X-Received: by 2002:a5d:40cd:: with SMTP id b13mr20432633wrq.52.1605548238161; Mon, 16 Nov 2020 09:37:18 -0800 (PST) Received: from dell.default ([91.110.221.159]) by smtp.gmail.com with ESMTPSA id 30sm16942828wrd.88.2020.11.16.09.37.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Nov 2020 09:37:17 -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:36:27 +0000 Message-Id: <20201116173700.1830487-11-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, =?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__ */