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/msm: fbdev: Calculate buffer geometry with format helpers Date: Thu, 23 Apr 2026 08:30:53 +1000 Message-ID: In-Reply-To: <20260421125733.209568-5-tzimmermann@suse.de> References: <20260421125733.209568-1-tzimmermann@suse.de> <20260421125733.209568-5-tzimmermann@suse.de> X-Mailer: Claude Code Patch Reviewer Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Patch Review **Status: Looks good.** This patch replaces the msm-specific `align_pitch()` helper with standard D= RM format helpers: ```c fourcc =3D drm_mode_legacy_fb_format(sizes->surface_bpp, sizes->surface_dep= th); format =3D drm_get_format_info(dev, fourcc, DRM_FORMAT_MOD_LINEAR); pitch =3D drm_format_info_min_pitch(format, 0, ALIGN(sizes->surface_width, = 32)); size =3D ALIGN(pitch * sizes->surface_height, PAGE_SIZE); ``` The `ALIGN(sizes->surface_width, 32)` preserves the adreno 32-pixel alignme= nt requirement that was in the old `align_pitch()`. The `drm_format_info_mi= n_pitch()` call correctly returns `uint64_t`, and the `size` variable is up= dated to `u64` to match, along with the `DBG` format specifier changing fro= m `%d` to `%llu`. The removal of `align_pitch()` from `msm_drv.h` is safe =E2=80=94 the grep = confirms it was only used from `msm_fbdev.c`. The removal of `mode_cmd.modifier[0] =3D DRM_FORMAT_MOD_LINEAR` is fine sin= ce `format` is now computed directly with `DRM_FORMAT_MOD_LINEAR` and passe= d to `msm_framebuffer_init()`, and the zero-initialized `mode_cmd` already = has `modifier[0] =3D=3D 0 =3D=3D DRM_FORMAT_MOD_LINEAR`. The `PAGE_SIZE` alignment on the buffer size is a good addition =E2=80=94 `= msm_gem_new()` likely requires page-aligned sizes internally. --- Generated by Claude Code Patch Reviewer