From patchwork Tue Feb 13 13:48:05 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 13555127 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 72A48C48260 for ; Tue, 13 Feb 2024 13:48:31 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 3607910E53A; Tue, 13 Feb 2024 13:48:30 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.b="X2GzlSb8"; dkim-atps=neutral Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by gabe.freedesktop.org (Postfix) with ESMTPS id C4AF710E51B; Tue, 13 Feb 2024 13:48:25 +0000 (UTC) Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id 48837614A3; Tue, 13 Feb 2024 13:48:24 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4A354C433C7; Tue, 13 Feb 2024 13:48:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1707832103; bh=26cXrqFjrg0ao0r9xUFAr1Dg4GgkrO8FmiGX8abfNuM=; h=From:To:Cc:Subject:Date:From; b=X2GzlSb8rmaizrJ0LylQls2sNtypF+9i+aT25Vuuvh7WYZjxmctA3xM2UEvgXAHQ9 LkHZlxozy10NCqsfaltRaUMEVm1POUxpoifOXVzrPA/7gyXDeedg54An0zypsT5+Bm 5pL153obBaefWUE4e90RlGfLmnHfeYrp8lYPzkTZ+MQkti4KJPa6SEXkE2vy29EgEB ybIafh9Y/c0rAcuxQpDQ880xxUtDcVNVqnV34nzeQnDVi2C1vnRp07/VQKJO6SgBd1 mMfBjKc5K4eYKyYJPaorx6Ar5BXdJS9P2vSyOtN0fOwTUeorMq/U7/HBLji2sl0VHG CPPlBN4LzpySQ== From: Arnd Bergmann To: Lucas De Marchi , Oded Gabbay , =?utf-8?q?Thomas_Hellstr=C3=B6m?= Cc: Arnd Bergmann , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Daniel Vetter , Rodrigo Vivi , Matt Roper , Matthew Brost , Riana Tauro , Daniele Ceraolo Spurio , intel-xe@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: [PATCH] drm/xe: skip building debugfs code for CONFIG_DEBUG_FS=n Date: Tue, 13 Feb 2024 14:48:05 +0100 Message-Id: <20240213134817.3347574-1-arnd@kernel.org> X-Mailer: git-send-email 2.39.2 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: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" From: Arnd Bergmann Some of the debugfs functions are stubbed out in these configurations, so trying to build the .c file with the definition fails: In file included from include/uapi/linux/posix_types.h:5, from drivers/gpu/drm/i915/display/intel_pipe_crc.c:27: drivers/gpu/drm/i915/display/intel_pipe_crc.c: At top level: include/linux/stddef.h:8:16: error: expected identifier or '(' before 'void' 8 | #define NULL ((void *)0) | ^~~~ drivers/gpu/drm/i915/display/intel_pipe_crc.c:549:20: note: in expansion of macro 'intel_crtc_get_crc_sources' 549 | const char *const *intel_crtc_get_crc_sources(struct drm_crtc *crtc, | ^~~~~~~~~~~~~~~~~~~~~~~~~~ Stop trying to build them by making the Makefile entries conditional, same as for the i915 driver. Signed-off-by: Arnd Bergmann --- drivers/gpu/drm/xe/Makefile | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/xe/Makefile b/drivers/gpu/drm/xe/Makefile index efcf0ab7a1a6..7c10ffdb7809 100644 --- a/drivers/gpu/drm/xe/Makefile +++ b/drivers/gpu/drm/xe/Makefile @@ -213,8 +213,6 @@ xe-$(CONFIG_DRM_XE_DISPLAY) += \ i915-display/intel_ddi.o \ i915-display/intel_ddi_buf_trans.o \ i915-display/intel_display.o \ - i915-display/intel_display_debugfs.o \ - i915-display/intel_display_debugfs_params.o \ i915-display/intel_display_device.o \ i915-display/intel_display_driver.o \ i915-display/intel_display_irq.o \ @@ -258,7 +256,6 @@ xe-$(CONFIG_DRM_XE_DISPLAY) += \ i915-display/intel_modeset_setup.o \ i915-display/intel_modeset_verify.o \ i915-display/intel_panel.o \ - i915-display/intel_pipe_crc.o \ i915-display/intel_pmdemand.o \ i915-display/intel_pps.o \ i915-display/intel_psr.o \ @@ -275,6 +272,13 @@ xe-$(CONFIG_DRM_XE_DISPLAY) += \ i915-display/skl_universal_plane.o \ i915-display/skl_watermark.o +ifdef CONFIG_DEBUG_FS +xe-$(CONFIG_DRM_XE_DISPLAY) += \ + i915-display/intel_display_debugfs.o \ + i915-display/intel_display_debugfs_params.o \ + i915-display/intel_pipe_crc.o +endif + ifeq ($(CONFIG_ACPI),y) xe-$(CONFIG_DRM_XE_DISPLAY) += \ i915-display/intel_acpi.o \