Message ID | CAPM=9tyx=edsZ3ajuAUAv4vjfa=WNEzobqAsYbBTjCfLbuEeFQ@mail.gmail.com (mailing list archive) |
---|---|
State | New |
Headers | show |
Series | [git,pull] drm for 6.15-rc1 | expand |
On Thu, 27 Mar 2025 at 19:53, Dave Airlie <airlied@gmail.com> wrote: > > This is the main drm pull request for 6.15. Bit late, but my wife was > away getting a PhD and kids took over my writing summaries time, and > fd.o was offline last week which slowed me down a small bit. Grr. I did the pull, resolved the (trivial) conflicts, but I notice that this ended up containing the disgusting "hdrtest" crap that (a) slows down the build because it's done for a regular allmodconfig build rather than be some simple thing that you guys can run as needed (b) also leaves random 'hdrtest' turds around in the include directories People already complained separately about this. It should never have made it to me in this broken form. Why the heck is this testing being done as a regular part of the build? And dammit we don't add random turd files for dependencies that then make the source tree nasty. The thing that made me notice that it was still there was that "git status" complains about the stupid turds not being ignored. But more importantly, those turds also break filename completion! So no, adding it to gitignore doesn't actually fix the problem, it would just have made me not notice as quickly. This thing needs to *die*. 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. 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). Linus
The pull request you sent on Fri, 28 Mar 2025 12:53:20 +1000:
> https://gitlab.freedesktop.org/drm/kernel.git tags/drm-next-2025-03-28
has been merged into torvalds/linux.git:
https://git.kernel.org/torvalds/c/0c86b42439b6c11d758b3392a21117934fef00c1
Thank you!
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
Hi Linus, On Mon, Mar 31, 2025 at 01:17:28PM +0300, Jani Nikula wrote: > 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. Mea culpa also from the drm maintainer side. As Jani explains below, we really want to make this and similar things happen in drm, and we thought this much more limited version would address your concerns. Evidently not. We also got a heads-up from the Kbuild maintainer that you really don't like this, and I guess that wasn't clear enough in the pr cover letter. Plus at that point it was all already in drm-next, and we figured it's not worth the trouble of pulling it out and doing a separate topic branch pr so you can check it out separately. Hindsight and all that. Cheers, Sima > > > 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
On Mon, Mar 31, 2025 at 01:03:38PM +0200, Simona Vetter wrote: > Hi Linus, > > On Mon, Mar 31, 2025 at 01:17:28PM +0300, Jani Nikula wrote: > > 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. > > Mea culpa also from the drm maintainer side. As Jani explains below, we > really want to make this and similar things happen in drm, and we thought > this much more limited version would address your concerns. Please don't keep it fully isolated to DRM.. This new stuff did find an error in the fwctl UAPI headers around uuid_t that had gone unnoticed: https://lore.kernel.org/all/f6489337-67c7-48c8-b48a-58603ec15328@paulmck-laptop/raw I think that was a valuable report, you just need to find a way to make the tests it runs more acceptable.. FWIW, there is a "trick" I like to use for C header files, just ensure that some C file someplace includes each header file first in the #include list. It automatically makes the compiler check it is self contained naturally. You can get pretty far by paying attention to this detail and it costs nothing at build time. Jason
On Mon, 31 Mar 2025 at 03:17, Jani Nikula <jani.nikula@linux.intel.com> wrote: > > I suggest a Kconfig knob to truly make this opt-in, only for developers > who actually want it. So honestly, the thing I *really* hated was the horrendous naming. I live in auto-complete. I basically never type out file-names, and I replace keyboards every once in a while because my TAB key has worn down (not really, but you get the idea). And *if* this feature is useful - and while I disagree about the whole "header files have to be self-sufficient" as a general rule, I can see it being useful for uapi headers - then dammit, the file naming needs to *DIE*. It needs to be taken out behind the shed and shot in the head, because it messes with TAB-completion. Having "this has been checked" turds that live in the same name-space as real files is wrong. In the kernel, we often hide them explicitly (ie using the dot prefix to make them hide, but also to make them not mess with auto-complete). That's an option. But some people hate the hiding, and if that's an issue, just put it all in a different subdirectory entirely. Yes, I realize that you guys may live in the whole "different subdirectory entirely" world of doing the whole build in a separate build directory, and might say "why are you working in the same tree as the generated files in the first place if auto-complete is so important to you". And to that I say "because I equally often look at the generated files". When they make *sense* to look at, not when they are auto-generated makefile checking crap. So please. This feature needs to be done completely differently. Linus