From: Claude Code Review Bot <claude-review@example.com>
To: dri-devel-reviews@example.com
Subject: Claude review: drm/dumb-buffers: document that it's only for linear FB
Date: Fri, 27 Feb 2026 13:56:36 +1000 [thread overview]
Message-ID: <review-patch1-20260225061315.1003811-1-zhengxingda@iscas.ac.cn> (raw)
In-Reply-To: <20260225061315.1003811-1-zhengxingda@iscas.ac.cn>
Patch Review
**Content review:**
The added text:
```c
* a hardware-specific ioctl to allocate suitable buffer objects. They are
* also currently meant for only linear buffers, and using them with any
* modifier other than DRM_FORMAT_MOD_LINEAR is undefined behavior. There
* exist some KMS drivers abusing dumb objects for AFBC framebuffers, but this
* behavior is discouraged, only exists as a hack now and shouldn't be
* replicated.
```
A few observations:
1. **"undefined behavior" is misleading.** In the kernel context, "undefined behavior" has a very specific C-language connotation. Dumb buffers don't take a modifier argument at all — the `drm_mode_create_dumb` ioctl has `height`, `width`, `bpp`, `flags`, `handle`, `pitch`, and `size`. There's no modifier field. The issue isn't that passing a non-linear modifier is "undefined behavior"; it's that the interface has no mechanism to request or communicate a non-linear layout. Consider wording like: "The dumb buffer interface has no way to specify or negotiate buffer modifiers, so buffers are implicitly linear (DRM_FORMAT_MOD_LINEAR)."
2. **"They" is ambiguous.** The sentence "They are also currently meant for only linear buffers" follows a sentence about "Such drivers", so "They" could be read as referring to those specific ARM drivers rather than dumb buffers in general. Starting a new sentence more explicitly would help, e.g., "Dumb buffers are also currently meant for..."
3. **"abusing" and "hack" are strong language for kernel documentation.** While technically accurate, kernel documentation typically uses more neutral phrasing. Something like "Some KMS drivers use dumb objects for AFBC framebuffers, but this usage is non-standard and should not be replicated in new drivers" would be more appropriate for documentation that ends up in the built kernel docs.
4. **"only exists as a hack now"** — the word "now" is time-relative and will become stale. Consider "only exists for legacy reasons" or "only exists for backward compatibility" instead.
5. **Minor style nit:** "meant for only linear buffers" reads more naturally as "only meant for linear buffers."
**Suggested rewrite** of the added text:
```
* a hardware-specific ioctl to allocate suitable buffer objects.
*
* Dumb buffers are only meant for linear framebuffers. The dumb buffer
* interface has no way to specify or negotiate buffer modifiers, so
* buffers are implicitly DRM_FORMAT_MOD_LINEAR. Some existing KMS
* drivers use dumb objects for AFBC framebuffers, but this usage is
* non-standard and should not be replicated in new drivers.
```
Overall, the patch addresses a real documentation gap and is welcome. With the wording cleaned up, it would be a useful addition.
---
Generated by Claude Code Patch Reviewer
prev parent reply other threads:[~2026-02-27 3:56 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-25 6:13 [PATCH] drm/dumb-buffers: document that it's only for linear FB Icenowy Zheng
2026-02-25 7:26 ` Thomas Zimmermann
2026-02-25 7:38 ` Icenowy Zheng
2026-02-25 7:47 ` Thomas Zimmermann
2026-02-25 8:10 ` Icenowy Zheng
2026-02-25 8:34 ` Thomas Zimmermann
2026-02-25 14:13 ` Icenowy Zheng
2026-02-27 3:56 ` Claude review: " Claude Code Review Bot
2026-02-27 3:56 ` 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-20260225061315.1003811-1-zhengxingda@iscas.ac.cn \
--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