From: Jani Nikula <jani.nikula@intel.com>
To: Linus Torvalds <torvalds@linux-foundation.org>,
linux-kernel@vger.kernel.org
Cc: jani.nikula@intel.com, Masahiro Yamada <masahiroy@kernel.org>,
David Airlie <airlied@gmail.com>, Daniel Vetter <daniel@ffwll.ch>,
linux-kbuild@vger.kernel.org, dri-devel@lists.freedesktop.org,
intel-xe@lists.freedesktop.org, intel-gfx@lists.freedesktop.org
Subject: [PATCH 5/5] drm: add config option for extra build-time checks
Date: Tue, 1 Apr 2025 15:18:30 +0300 [thread overview]
Message-ID: <20250401121830.21696-6-jani.nikula@intel.com> (raw)
In-Reply-To: <20250401121830.21696-1-jani.nikula@intel.com>
The DRM subsystem contains additional build-time checks, primarily aimed
at DRM developers and CI systems. The checks may be overzealous. They
may slow down or fail the build altogether. They may create excessive
dependency files in the build tree. They should not be enabled for
regular builds, and certainly not forced on unsuspecting developers
running an allyesconfig or allmodconfig build.
Add config DRM_DISABLE_EXTRA_BUILD_CHECKS, enabled by default as well as
by allyesconfig/allmodconfig, hiding the extra checks from anyone but
people who intentionally opt-in for the checks.
For example, to enable header tests:
$ scripts/config --disable CONFIG_DRM_DISABLE_EXTRA_BUILD_CHECKS --enable CONFIG_DRM_HEADER_TEST
$ make olddefconfig
Reported-by: Linus Torvalds <torvalds@linux-foundation.org>
Closes: https://lore.kernel.org/r/CAHk-=wjcdfrDTjzm6J6T-3fxtVyBG7a_0BXc2=mgOuM6KPFnCg@mail.gmail.com
Fixes: 62ae45687e43 ("drm: ensure drm headers are self-contained and pass kernel-doc")
Cc: Masahiro Yamada <masahiroy@kernel.org>
Cc: David Airlie <airlied@gmail.com>
Cc: Daniel Vetter <daniel@ffwll.ch>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
---
Cc: linux-kbuild@vger.kernel.org
Cc: dri-devel@lists.freedesktop.org
Cc: intel-xe@lists.freedesktop.org
Cc: intel-gfx@lists.freedesktop.org
---
drivers/gpu/drm/Kconfig | 21 +++++++++++++++++++--
1 file changed, 19 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/Kconfig b/drivers/gpu/drm/Kconfig
index 2cba2b6ebe1c..5a3fce9ef998 100644
--- a/drivers/gpu/drm/Kconfig
+++ b/drivers/gpu/drm/Kconfig
@@ -489,9 +489,26 @@ config DRM_PRIVACY_SCREEN
bool
default n
+# Reversed option to disable on allyesconfig/allmodconfig builds
+config DRM_DISABLE_EXTRA_BUILD_CHECKS
+ bool "Disable DRM subsystem extra build-time checks"
+ default y
+ help
+ The DRM subsystem contains additional build-time checks, primarily
+ aimed at DRM developers and CI systems. The checks may be
+ overzealous. They may slow down or fail the build altogether. They may
+ create excessive dependency files in the tree. They should not be
+ enabled for regular builds, and thus they are disabled by default.
+
+# Proxy config to allow simple "depends on DRM_EXTRA_BUILD_CHECKS"
+config DRM_EXTRA_BUILD_CHECKS
+ bool
+ depends on DRM && EXPERT && DRM_DISABLE_EXTRA_BUILD_CHECKS=n
+ default !DRM_DISABLE_EXTRA_BUILD_CHECKS
+
config DRM_WERROR
bool "Compile the drm subsystem with warnings as errors"
- depends on DRM && EXPERT
+ depends on DRM_EXTRA_BUILD_CHECKS
depends on !WERROR
default n
help
@@ -505,7 +522,7 @@ config DRM_WERROR
config DRM_HEADER_TEST
bool "Ensure DRM headers are self-contained and pass kernel-doc"
- depends on DRM && EXPERT && BROKEN
+ depends on DRM_EXTRA_BUILD_CHECKS
default n
help
Ensure the DRM subsystem headers both under drivers/gpu/drm and
--
2.39.5
next prev parent reply other threads:[~2025-04-01 12:19 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-01 12:18 [PATCH 0/5] hdrtest: hide the disgusting turds Jani Nikula
2025-04-01 12:18 ` [PATCH 1/5] drm: place header test files in .hdrtest subdirectories Jani Nikula
2025-04-01 12:18 ` [PATCH 2/5] drm/xe: " Jani Nikula
2025-04-01 12:18 ` [PATCH 3/5] drm/i915: " Jani Nikula
2025-04-01 12:18 ` [PATCH 4/5] kbuild: hdrtest: " Jani Nikula
2025-04-01 17:49 ` Masahiro Yamada
2025-04-01 12:18 ` Jani Nikula [this message]
2025-04-01 12:59 ` ✗ Fi.CI.BUILD: failure for hdrtest: hide the disgusting turds Patchwork
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250401121830.21696-6-jani.nikula@intel.com \
--to=jani.nikula@intel.com \
--cc=airlied@gmail.com \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=intel-gfx@lists.freedesktop.org \
--cc=intel-xe@lists.freedesktop.org \
--cc=linux-kbuild@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=masahiroy@kernel.org \
--cc=torvalds@linux-foundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox