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/tegra: fbdev: Calculate buffer geometry with format helpers Date: Thu, 23 Apr 2026 08:46:58 +1000 Message-ID: In-Reply-To: <20260421073646.144712-4-tzimmermann@suse.de> References: <20260421073646.144712-1-tzimmermann@suse.de> <20260421073646.144712-4-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: Good, one minor style nit** Replaces the manual `bytes_per_pixel` / pitch / size calculation with the s= tandard DRM format helpers: ```c fourcc =3D drm_mode_legacy_fb_format(sizes->surface_bpp, sizes->surface_dep= th); format =3D drm_get_format_info(drm, fourcc, DRM_FORMAT_MOD_LINEAR); pitch =3D round_up(drm_format_info_min_pitch(format, 0, sizes->surface_widt= h), tegra->pitch_align); size =3D ALIGN(pitch * sizes->surface_height, PAGE_SIZE); ``` The `DRM_FORMAT_MOD_LINEAR` argument is equivalent to the old zero-initiali= zed `cmd.modifier[0]`. The added `PAGE_SIZE` alignment on size is an improv= ement =E2=80=94 `tegra_bo_create` will round up anyway, and this makes the = allocation explicit. Using `bo->gem.size` instead of the locally calculated `size` for `screen_s= ize` / `smem_len` is correct =E2=80=94 it reflects the actual allocated buf= fer size after any internal alignment by the GEM allocator: ```c - info->screen_size =3D size; + info->screen_size =3D bo->gem.size; ``` **Minor nit:** Variable declarations are not in reverse-christmas-tree orde= r =E2=80=94 `const struct drm_format_info *format` is declared after the sh= orter variables. Very minor and not worth blocking. --- Generated by Claude Code Patch Reviewer