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/vblank: Add some debugging trace events Date: Fri, 27 Feb 2026 14:40:53 +1000 Message-ID: In-Reply-To: <20260224212639.390768-6-sunpeng.li@amd.com> References: <20260224212639.390768-1-sunpeng.li@amd.com> <20260224212639.390768-6-sunpeng.li@amd.com> X-Mailer: Claude Code Patch Reviewer Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit MIME-Version: 1.0 Patch Review Straightforward tracing additions. Useful for debugging the new deferred path. **Minor issues:** 1. Format string mismatch in `drm_vblank_get_put_template`: ```c TP_STRUCT__entry( __field(int, refcount) ), TP_printk( "crtc=%d, refcount=%u", // %u for signed int ``` `refcount` is declared as `int` but printed with `%u`. Use `%d` for consistency. 2. The `drm_vblank_put` trace point reads `atomic_read(&vblank->refcount)` **before** `atomic_dec_and_test()`: ```c trace_drm_vblank_put(pipe, atomic_read(&vblank->refcount)); /* Last user schedules interrupt disable */ if (!atomic_dec_and_test(&vblank->refcount)) return; ``` The comment "put's refcount not sync'd using vbl_lock, use for debugging purposes only" is appropriate, but the trace shows the refcount *before* the put, not after. This is fine for debugging but could confuse readers expecting the post-decrement value. 3. The `trace_drm_vblank_get` placement is before the `atomic_add_return`, so it also shows the pre-increment refcount, which is at least consistent with the put trace. --- Generated by Claude Code Patch Reviewer