From: Claude Code Review Bot <claude-review@example.com>
To: dri-devel-reviews@example.com
Subject: Claude review: drm/i915: replace select with dependency for visible DEBUG_OBJECTS
Date: Tue, 05 May 2026 08:46:43 +1000 [thread overview]
Message-ID: <review-patch1-20260502191932.4491-1-julianbraha@gmail.com> (raw)
In-Reply-To: <20260502191932.4491-1-julianbraha@gmail.com>
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
prev parent reply other threads:[~2026-05-04 22:46 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
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 message]
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=review-patch1-20260502191932.4491-1-julianbraha@gmail.com \
--to=claude-review@example.com \
--cc=dri-devel-reviews@example.com \
/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