From patchwork Tue Jun 14 15:57:26 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Randy Dunlap X-Patchwork-Id: 12881277 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 39542C43334 for ; Tue, 14 Jun 2022 15:57:38 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 797E510E16E; Tue, 14 Jun 2022 15:57:37 +0000 (UTC) Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by gabe.freedesktop.org (Postfix) with ESMTPS id 4B71610E16E; Tue, 14 Jun 2022 15:57:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Content-Transfer-Encoding:Content-Type: MIME-Version:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:Content-ID: Content-Description:In-Reply-To:References; bh=4oU1oWX+jsx2yVECU+J4GzVeqRTUpkYpEcI7jpWRWSM=; b=CAmCZeyvgMGohCYzJwQaBxGpJd 1mwP0O6OvQMDswAeSdBetEw2wv0TWulwLfmXx2GeKTQHpka4Xf2lynQ8X4DTb9tKpk2Rq2EIo+v2e ZCBDp/Ueqn81IltWc2k3mokZCZTnqq9uqCH6qkeRJTVdu0b6n2bY8HON7ojtwEJNwjGhmfxJdZGsc Q8Q9A7kWcjEZRNI48iINeE1aETeexeOgRNyiFLyq8nUf5r71khTVkR+YHt2lEdDPrIlFVcmrOx/F5 g8OQBRBTmMmamhOjuYzSFuX0je+E2NT4bELtXrhg4vKVdCzVX6gWuB3wdvQIDwTKqLKymHW+miu+b +zkPudbg==; Received: from [2601:1c0:6280:3f0::aa0b] (helo=casper.infradead.org) by casper.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1o18v6-000IW5-Do; Tue, 14 Jun 2022 15:57:32 +0000 From: Randy Dunlap To: dri-devel@lists.freedesktop.org Subject: [PATCH] drm/amd/display: add stub for crtc_debugfs_init() Date: Tue, 14 Jun 2022 08:57:26 -0700 Message-Id: <20220614155726.26211-1-rdunlap@infradead.org> X-Mailer: git-send-email 2.35.3 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: Randy Dunlap , "Pan, Xinhui" , patches@lists.linux.dev, amd-gfx@lists.freedesktop.org, Wayne Lin , Alex Deucher , =?utf-8?q?Christian_K=C3=B6nig?= Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Fix build error when CONFIG_DEBUG_FS is not enabled by adding a stub function for crtc_debugfs_init(). Eliminates this build error: ../drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c: In function ‘amdgpu_dm_crtc_late_register’: ../drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:6599:2: error: implicit declaration of function ‘crtc_debugfs_init’; did you mean ‘amdgpu_debugfs_init’? [-Werror=implicit-function-declaration] crtc_debugfs_init(crtc); ^~~~~~~~~~~~~~~~~ amdgpu_debugfs_init Fixes: 86bc22191892 ("drm/amd/display: Support crc on specific region") Signed-off-by: Randy Dunlap Cc: Wayne Lin Cc: Alex Deucher Cc: Christian König Cc: "Pan, Xinhui" Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 2 -- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.h | 6 ++++++ 2 files changed, 6 insertions(+), 2 deletions(-) --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c @@ -57,9 +57,7 @@ #include "amdgpu_dm_irq.h" #include "dm_helpers.h" #include "amdgpu_dm_mst_types.h" -#if defined(CONFIG_DEBUG_FS) #include "amdgpu_dm_debugfs.h" -#endif #include "amdgpu_dm_psr.h" #include "ivsrcid/ivsrcid_vislands30.h" --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.h +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.h @@ -31,6 +31,12 @@ void connector_debugfs_init(struct amdgpu_dm_connector *connector); void dtn_debugfs_init(struct amdgpu_device *adev); + +#ifdef CONFIG_DEBUG_FS void crtc_debugfs_init(struct drm_crtc *crtc); +#else +static inline void crtc_debugfs_init(struct drm_crtc *crtc) +{} +#endif #endif