From: Jani Nikula <jani.nikula@linux.intel.com>
To: Linus Torvalds <torvalds@linux-foundation.org>,
Dave Airlie <airlied@gmail.com>
Cc: simona.vetter@ffwll.ch,
dri-devel <dri-devel@lists.freedesktop.org>,
LKML <linux-kernel@vger.kernel.org>
Subject: Re: [git pull] drm for 6.15-rc1
Date: Mon, 31 Mar 2025 13:17:28 +0300 [thread overview]
Message-ID: <87h6394i87.fsf@intel.com> (raw)
In-Reply-To: <CAHk-=wjcdfrDTjzm6J6T-3fxtVyBG7a_0BXc2=mgOuM6KPFnCg@mail.gmail.com>
On Fri, 28 Mar 2025, Linus Torvalds <torvalds@linux-foundation.org> wrote:
> If you want to do that hdrtest thing, do it as part of your *own*
> checks. Don't make everybody else see that disgusting thing and have
> those turds in their trees.
>
> I'll just disable it by marking it BROKEN for now. You guys can figure
> out what you want to do, but no, forcing others to see those things is
> not the answer.
Fair. I hear you.
> I would suggest you *not* make this part of the Kconfig setup and
> normal build at all, but be something where *you* can run it as part
> of your tests (ie do it as a "make drm-hdrtest" kind of thing, not as
> part of regular builds).
I would very much prefer for this to be part of the build, just hidden
behind Kconfig. We're doing build-time checks, and kbuild gives us all
the machinery to make it happen. Without the dependency tracking you'd
have to check everything every time, and that's just going to mean
people won't run it.
I suggest a Kconfig knob to truly make this opt-in, only for developers
who actually want it. Not enabled by allmodconfig or allyesconfig or
even allnoconfig. Only if you manually enable it. And yes, that's how it
should've been from the start. My bad.
Below's a patch to make it happen. We'll probably want to add more
checks like this in the future. We want to catch a whole bunch of build
issues up front. We want to be clean of e.g. W=1 and kernel-doc issues
pre-merge instead of doing extra rounds of fixes afterwards.
BR,
Jani.
From 8c709510caab4b4ad6aa73cbcd972f32b58cad8d Mon Sep 17 00:00:00 2001
From: Jani Nikula <jani.nikula@intel.com>
Date: Mon, 31 Mar 2025 12:25:45 +0300
Subject: [PATCH] drm: add config option for extra build-time checks
Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo
Cc: Jani Nikula <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")
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
---
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
--
Jani Nikula, Intel
next prev parent reply other threads:[~2025-03-31 10:17 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-28 2:53 [git pull] drm for 6.15-rc1 Dave Airlie
2025-03-29 0:47 ` Linus Torvalds
2025-03-31 10:17 ` Jani Nikula [this message]
2025-03-31 11:03 ` Simona Vetter
2025-03-31 13:31 ` Jason Gunthorpe
2025-04-01 12:21 ` Jani Nikula
2025-04-01 16:12 ` Linus Torvalds
2025-04-01 18:46 ` Masahiro Yamada
2025-04-01 19:14 ` Jason Gunthorpe
2025-04-01 19:36 ` Masahiro Yamada
2025-04-01 19:42 ` Jani Nikula
2025-04-01 19:46 ` Jason Gunthorpe
2025-04-02 12:56 ` Jani Nikula
2025-04-02 13:03 ` Jason Gunthorpe
2025-04-02 13:53 ` Jani Nikula
2025-04-02 14:41 ` Simona Vetter
2025-04-02 16:34 ` Jason Gunthorpe
2025-04-01 19:28 ` Jani Nikula
2025-03-31 15:42 ` Linus Torvalds
2025-04-01 12:34 ` Jani Nikula
2025-03-29 1:01 ` pr-tracker-bot
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=87h6394i87.fsf@intel.com \
--to=jani.nikula@linux.intel.com \
--cc=airlied@gmail.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=linux-kernel@vger.kernel.org \
--cc=simona.vetter@ffwll.ch \
--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