From patchwork Sun Sep 25 08:19:05 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Baoyou Xie X-Patchwork-Id: 76965 Delivered-To: patch@linaro.org Received: by 10.140.106.72 with SMTP id d66csp637518qgf; Sun, 25 Sep 2016 01:20:13 -0700 (PDT) X-Received: by 10.66.80.73 with SMTP id p9mr24836316pax.115.1474791613384; Sun, 25 Sep 2016 01:20:13 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id tf1si18263290pab.230.2016.09.25.01.20.13; Sun, 25 Sep 2016 01:20:13 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S941090AbcIYIUL (ORCPT + 27 others); Sun, 25 Sep 2016 04:20:11 -0400 Received: from mail-pa0-f46.google.com ([209.85.220.46]:35052 "EHLO mail-pa0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S941018AbcIYIUB (ORCPT ); Sun, 25 Sep 2016 04:20:01 -0400 Received: by mail-pa0-f46.google.com with SMTP id oz2so52945419pac.2 for ; Sun, 25 Sep 2016 01:20:01 -0700 (PDT) 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; bh=Br+cNDbOz+cjYG2KyOO9QySvoa9BqtFEdnQXs7ea4Qc=; b=GyHDazM3EkwO2QLxi9+TTch3yG7p+OOsXGVGUHxgqvMspNJidFtTsVc+U7AK1YqpyV 73LdfNXx7bQsy3IKl2uqdVV1p9Zt+fH7qexGqomeDsMYXYd0UCw2mE56sdDgRSmdvdez dyHZNiH+Poey8sRHoNkW9IyOCVGum/EguVCCc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=Br+cNDbOz+cjYG2KyOO9QySvoa9BqtFEdnQXs7ea4Qc=; b=drKV4aUQCMf80AY28b+kcbV7UroQp61xqFZKwbBIVCqjipBGJbsYIBlNWDlMtTAEu2 FKEhkZ9FOr/ajtJEFWa7K+oolG7mSv+/sM/XCvyUWS/7eo+PTHWuagyJTcYBhcZyyn+x w8aoUmrTAPp2qFxeeI6YNUGyRPPhx5oM91VbaDB25EHtqqJcmTkIb3RknT4GB9SCe644 3bZDiAaIHBHz/xCXZXloUJw51xtpSlyMGjDJzDqdblDZ7I+Egrweqc2fZ57aELmWjl0P 9jNj84Dan0MOYHgRrrDuW08UpF4gxf/R/h8njXEjbOUW50eG/JAUkZbtgdNycoKtP/Ut Oxmw== X-Gm-Message-State: AE9vXwOCGVhrp3WRZZ9/HS49B+3y2xh8qDJDLBGXxK0c/tRkWCdRJJ5bzfLZYGza+lznNQRw X-Received: by 10.66.254.170 with SMTP id aj10mr28187049pad.124.1474791600753; Sun, 25 Sep 2016 01:20:00 -0700 (PDT) Received: from localhost.localdomain ([104.237.91.164]) by smtp.gmail.com with ESMTPSA id p128sm22539932pfg.38.2016.09.25.01.19.53 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 25 Sep 2016 01:20:00 -0700 (PDT) From: Baoyou Xie To: alexander.deucher@amd.com, Rex.Zhu@amd.com, JinHuiEric.Huang@amd.com, funfunctor@folklore1984.net, arindam.nath@amd.com, vitaly.prosyak@amd.com, eric.yang2@amd.com, michel.daenzer@amd.com, nils.wallmenius@gmail.com, ray.huang@amd.com, Qingqing.Wang@amd.com, sfr@canb.auug.org.au, Flora.Cui@amd.com, Young.Yang@amd.com, dan.carpenter@oracle.com, Monk.Liu@amd.com Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, arnd@arndb.de, baoyou.xie@linaro.org, xie.baoyou@zte.com.cn, han.fei@zte.com.cn, tang.qiang007@zte.com.cn Subject: [PATCH 3/4] drm/amd/powerplay: add function declarations Date: Sun, 25 Sep 2016 16:19:05 +0800 Message-Id: <1474791546-2022-3-git-send-email-baoyou.xie@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1474791546-2022-1-git-send-email-baoyou.xie@linaro.org> References: <1474791546-2022-1-git-send-email-baoyou.xie@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org We get 6 warnings when building kernel with W=1: drivers/gpu/drm/amd/amdgpu/../powerplay/hwmgr/tonga_hwmgr.c:177:5: warning: no previous prototype for 'tonga_notify_smc_display_change' [-Wmissing-prototypes] drivers/gpu/drm/amd/amdgpu/../powerplay/hwmgr/tonga_hwmgr.c:3238:5: warning: no previous prototype for 'tonga_get_mc_microcode_version' [-Wmissing-prototypes] drivers/gpu/drm/amd/amdgpu/../powerplay/hwmgr/tonga_hwmgr.c:3252:5: warning: no previous prototype for 'tonga_initializa_dynamic_state_adjustment_rule_settings' [-Wmissing-prototypes] drivers/gpu/drm/amd/amdgpu/../powerplay/hwmgr/tonga_hwmgr.c:5855:5: warning: no previous prototype for 'tonga_notify_smc_display_config_after_ps_adjustment' [-Wmissing-prototypes] drivers/gpu/drm/amd/amdgpu/../powerplay/hwmgr/fiji_hwmgr.c:5594:5: warning: no previous prototype for 'fiji_hwmgr_init' [-Wmissing-prototypes] drivers/gpu/drm/amd/amdgpu/../powerplay/eventmgr/eventtasks.c:322:5: warning: no previous prototype for 'pem_task_enable_clock_power_gating' [-Wmissing-prototypes] In fact, these functions are undeclared in any files. So this patch declares them in drivers/gpu/drm/amd/powerplay/hwmgr/tonga_hwmgr.h, drivers/gpu/drm/amd/powerplay/hwmgr/fiji_hwmgr.h, drivers/gpu/drm/amd/powerplay/eventmgr/eventtasks.h. Signed-off-by: Baoyou Xie --- drivers/gpu/drm/amd/powerplay/eventmgr/eventtasks.h | 2 ++ drivers/gpu/drm/amd/powerplay/hwmgr/fiji_hwmgr.h | 1 + drivers/gpu/drm/amd/powerplay/hwmgr/tonga_hwmgr.h | 6 ++++++ 3 files changed, 9 insertions(+) -- 2.7.4 diff --git a/drivers/gpu/drm/amd/powerplay/eventmgr/eventtasks.h b/drivers/gpu/drm/amd/powerplay/eventmgr/eventtasks.h index 6c6297e..7e6fb48 100644 --- a/drivers/gpu/drm/amd/powerplay/eventmgr/eventtasks.h +++ b/drivers/gpu/drm/amd/powerplay/eventmgr/eventtasks.h @@ -58,6 +58,8 @@ int pem_task_un_block_hw_access(struct pp_eventmgr *eventmgr, struct pem_event_d int pem_task_reset_display_phys_access(struct pp_eventmgr *eventmgr, struct pem_event_data *event_data); int pem_task_set_cpu_power_state(struct pp_eventmgr *eventmgr, struct pem_event_data *event_data); int pem_task_notify_smc_display_config_after_power_state_adjustment(struct pp_eventmgr *eventmgr, struct pem_event_data *event_data); +int pem_task_enable_clock_power_gating(struct pp_eventmgr *eventmgr, + struct pem_event_data *event_data); /*powersaving*/ int pem_task_set_power_source(struct pp_eventmgr *eventmgr, struct pem_event_data *event_data); diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/fiji_hwmgr.h b/drivers/gpu/drm/amd/powerplay/hwmgr/fiji_hwmgr.h index bf67c2a..c37f9e8 100644 --- a/drivers/gpu/drm/amd/powerplay/hwmgr/fiji_hwmgr.h +++ b/drivers/gpu/drm/amd/powerplay/hwmgr/fiji_hwmgr.h @@ -346,5 +346,6 @@ int fiji_update_uvd_dpm(struct pp_hwmgr *hwmgr, bool bgate); int fiji_update_samu_dpm(struct pp_hwmgr *hwmgr, bool bgate); int fiji_update_acp_dpm(struct pp_hwmgr *hwmgr, bool bgate); int fiji_enable_disable_vce_dpm(struct pp_hwmgr *hwmgr, bool enable); +int fiji_hwmgr_init(struct pp_hwmgr *hwmgr); #endif /* _FIJI_HWMGR_H_ */ diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/tonga_hwmgr.h b/drivers/gpu/drm/amd/powerplay/hwmgr/tonga_hwmgr.h index 3a91fc2..be5e10a 100644 --- a/drivers/gpu/drm/amd/powerplay/hwmgr/tonga_hwmgr.h +++ b/drivers/gpu/drm/amd/powerplay/hwmgr/tonga_hwmgr.h @@ -398,4 +398,10 @@ int tonga_enable_disable_uvd_dpm(struct pp_hwmgr *hwmgr, bool enable); int tonga_enable_disable_vce_dpm(struct pp_hwmgr *hwmgr, bool enable); uint32_t tonga_get_xclk(struct pp_hwmgr *hwmgr); +int +tonga_initializa_dynamic_state_adjustment_rule_settings(struct pp_hwmgr *hwmgr); +int tonga_get_mc_microcode_version(struct pp_hwmgr *hwmgr); +int tonga_notify_smc_display_config_after_ps_adjustment(struct pp_hwmgr *hwmgr); +int tonga_notify_smc_display_change(struct pp_hwmgr *hwmgr, bool has_display); + #endif