From mboxrd@z Thu Jan 1 00:00:00 1970 From: Claude Code Review Bot 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 Message-ID: In-Reply-To: <20260225061315.1003811-1-zhengxingda@iscas.ac.cn> References: <20260225061315.1003811-1-zhengxingda@iscas.ac.cn> <20260225061315.1003811-1-zhengxingda@iscas.ac.cn> X-Mailer: Claude Code Patch Reviewer Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 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 t= his * 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, "undefine= d behavior" has a very specific C-language connotation. Dumb buffers don't = take a modifier argument at all =E2=80=94 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" co= uld be read as referring to those specific ARM drivers rather than dumb buf= fers 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.** W= hile technically accurate, kernel documentation typically uses more neutral= phrasing. Something like "Some KMS drivers use dumb objects for AFBC frame= buffers, 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 b= uilt kernel docs. 4. **"only exists as a hack now"** =E2=80=94 the word "now" is time-relativ= e 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 naturall= y 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