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/tiny: sharp-memory: fix line address assignment on partial update Date: Tue, 31 Mar 2026 17:34:58 +1000 Message-ID: In-Reply-To: <20260330-flickering-v1-1-5a192bf4b93d@axis.com> References: <20260330-flickering-v1-0-5a192bf4b93d@axis.com> <20260330-flickering-v1-1-5a192bf4b93d@axis.com> X-Mailer: Claude Code Patch Reviewer Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Patch Review **Analysis:** The original code in `sharp_memory_set_tx_buffer_addresses()`= was: ```c for (u32 line =3D 0; line < clip.y2; ++line) buffer[line * pitch] =3D line + 1; ``` When the dirty region is e.g. lines 10=E2=80=9320 (`clip.y1=3D10, clip.y2= =3D20`), this iterates 20 times (0..19) and writes addresses 1=E2=80=9320. = But the pixel data populated by `sharp_memory_set_tx_buffer_data()` at `&tx= _buffer[2]` only covers 10 lines (the dirty height). So the first 10 addres= s slots (addresses 1=E2=80=9310) have no valid pixel data behind them, and = addresses 11=E2=80=9320 point to the wrong pixel data positions in the buff= er. The fix correctly: 1. Iterates only `drm_rect_height(&clip)` times (10 lines, not `clip.y2`) 2. Assigns addresses starting from `clip.y1 + 1` (11), matching the 1-based= line addressing the panel expects ```c for (u32 line =3D 0; line < drm_rect_height(&clip); ++line) buffer[line * pitch] =3D clip.y1 + line + 1; ``` **No issues.** Correct fix, good commit message with proper Fixes tag. --- --- Generated by Claude Code Patch Reviewer