* [PATCH] drm/i915: replace select with dependency for visible DEBUG_OBJECTS
@ 2026-05-02 19:19 Julian Braha
2026-05-04 22:46 ` Claude review: " Claude Code Review Bot
2026-05-04 22:46 ` Claude Code Review Bot
0 siblings, 2 replies; 3+ messages in thread
From: Julian Braha @ 2026-05-02 19:19 UTC (permalink / raw)
To: jani.nikula, joonas.lahtinen, rodrigo.vivi, tursulin, airlied,
simona
Cc: intel-gfx, dri-devel, linux-kernel, Julian Braha
DRM_I915_SW_FENCE_DEBUG_OBJECTS currently selects DEBUG_OBJECTS even though
DEBUG_OBJECTS is visible to users. Other config options use 'depends on'
for DEBUG_OBJECTS, so let's do the same here.
This select-visible Kconfig misusage was detected by Kconfirm, a static
analysis tool for Kconfig.
Signed-off-by: Julian Braha <julianbraha@gmail.com>
---
drivers/gpu/drm/i915/Kconfig.debug | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/i915/Kconfig.debug b/drivers/gpu/drm/i915/Kconfig.debug
index 52a3a59b4ba2..028a2c97361d 100644
--- a/drivers/gpu/drm/i915/Kconfig.debug
+++ b/drivers/gpu/drm/i915/Kconfig.debug
@@ -153,7 +153,7 @@ config DRM_I915_TRACE_GTT
config DRM_I915_SW_FENCE_DEBUG_OBJECTS
bool "Enable additional driver debugging for fence objects"
depends on DRM_I915
- select DEBUG_OBJECTS
+ depends on DEBUG_OBJECTS
default n
help
Choose this option to turn on extra driver debugging that may affect
--
2.53.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Claude review: drm/i915: replace select with dependency for visible DEBUG_OBJECTS
2026-05-02 19:19 [PATCH] drm/i915: replace select with dependency for visible DEBUG_OBJECTS Julian Braha
@ 2026-05-04 22:46 ` Claude Code Review Bot
2026-05-04 22:46 ` Claude Code Review Bot
1 sibling, 0 replies; 3+ messages in thread
From: Claude Code Review Bot @ 2026-05-04 22:46 UTC (permalink / raw)
To: dri-devel-reviews
Patch Review
**The change:**
```diff
- select DEBUG_OBJECTS
+ depends on DEBUG_OBJECTS
```
**Issue 1 (functional regression — blocker):** `DRM_I915_DEBUG` (Kconfig.debug:36) contains:
```
select DRM_I915_SW_FENCE_DEBUG_OBJECTS
```
With the old code, enabling `DRM_I915_DEBUG` would pull in `DRM_I915_SW_FENCE_DEBUG_OBJECTS`, which in turn pulled in `DEBUG_OBJECTS` via `select`. The full debug chain worked automatically.
After this patch, `DRM_I915_SW_FENCE_DEBUG_OBJECTS` now `depends on DEBUG_OBJECTS`. When Kconfig processes the `select DRM_I915_SW_FENCE_DEBUG_OBJECTS` from `DRM_I915_DEBUG`, if `DEBUG_OBJECTS` is not already enabled, the `select` is silently ignored because the dependency is unsatisfied. This means a developer enabling `DRM_I915_DEBUG` (the umbrella debug option) will silently lose sw_fence debug object tracking — the opposite of the expected behavior.
To fix this properly, the author needs to also add `select DEBUG_OBJECTS` (or `depends on DEBUG_OBJECTS`) to `DRM_I915_DEBUG` itself, so that the dependency is satisfied before `DRM_I915_SW_FENCE_DEBUG_OBJECTS` is selected. For example:
```
config DRM_I915_DEBUG
...
select DEBUG_OBJECTS
select DRM_I915_SW_FENCE_DEBUG_OBJECTS
```
Or alternatively, `DRM_I915_DEBUG` could switch from `select DRM_I915_SW_FENCE_DEBUG_OBJECTS` to `select DRM_I915_SW_FENCE_DEBUG_OBJECTS if DEBUG_OBJECTS`, making the dependency chain explicit.
**Issue 2 (minor — usability):** `DEBUG_OBJECTS` itself has dependencies (`depends on PREEMPT_COUNT || !DEFERRED_STRUCT_PAGE_INIT` and `depends on DEBUG_KERNEL`). With the old `select`, these were irrelevant for the i915 path — the symbol was force-enabled. Now users must ensure `DEBUG_KERNEL` (and potentially `PREEMPT_COUNT`) are enabled for `DRM_I915_SW_FENCE_DEBUG_OBJECTS` to even appear in menuconfig. This may be intentional (making the dependency explicit), but it changes the usability for developers who just want fence debugging without the full `DRM_I915_DEBUG` umbrella.
**Nit:** The commit message says "Other config options use 'depends on' for DEBUG_OBJECTS" — this is true, but all those other options (`DEBUG_OBJECTS_SELFTEST`, `DEBUG_OBJECTS_FREE`, etc. in `lib/Kconfig.debug`) are children of the `DEBUG_OBJECTS` menu and are never force-selected by anything. The i915 case is different because of the `select` chain from `DRM_I915_DEBUG`, so the analogy doesn't fully hold.
---
Generated by Claude Code Patch Reviewer
^ permalink raw reply [flat|nested] 3+ messages in thread* Claude review: drm/i915: replace select with dependency for visible DEBUG_OBJECTS
2026-05-02 19:19 [PATCH] drm/i915: replace select with dependency for visible DEBUG_OBJECTS Julian Braha
2026-05-04 22:46 ` Claude review: " Claude Code Review Bot
@ 2026-05-04 22:46 ` Claude Code Review Bot
1 sibling, 0 replies; 3+ messages in thread
From: Claude Code Review Bot @ 2026-05-04 22:46 UTC (permalink / raw)
To: dri-devel-reviews
Overall Series Review
Subject: drm/i915: replace select with dependency for visible DEBUG_OBJECTS
Author: Julian Braha <julianbraha@gmail.com>
Patches: 1
Reviewed: 2026-05-05T08:46:43.221055
---
This is a single-patch series changing `DRM_I915_SW_FENCE_DEBUG_OBJECTS` from `select DEBUG_OBJECTS` to `depends on DEBUG_OBJECTS`. The stated rationale is that `select` should not be used on user-visible symbols. While that Kconfig convention is real, this patch has a **functional regression** that makes it unsuitable for merging as-is: `DRM_I915_DEBUG` uses `select DRM_I915_SW_FENCE_DEBUG_OBJECTS` (line 62 of `Kconfig.debug`), and after this change, that `select` will silently fail whenever `DEBUG_OBJECTS` is not already enabled — breaking the intended behavior of the umbrella `DRM_I915_DEBUG` option.
**Verdict: Needs rework.**
---
---
Generated by Claude Code Patch Reviewer
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-05-04 22:46 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-02 19:19 [PATCH] drm/i915: replace select with dependency for visible DEBUG_OBJECTS Julian Braha
2026-05-04 22:46 ` Claude review: " Claude Code Review Bot
2026-05-04 22:46 ` Claude Code Review Bot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox