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/amdgpu: fix build for CONFIG_DRM_FBDEV_EMULATION=n Date: Tue, 28 Apr 2026 13:41:56 +1000 Message-ID: In-Reply-To: <20260428024942.452389-1-ynorov@nvidia.com> References: <20260428024942.452389-1-ynorov@nvidia.com> <20260428024942.452389-1-ynorov@nvidia.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 **Correctness: Good.** The stub returns `false`, which is semantically corr= ect =E2=80=94 if fbdev emulation is disabled, no GEM object can be the fbde= v framebuffer. Both callers use the result in a `!drm_fb_helper_gem_is_fb(.= ..)` guard to decide whether to unpin buffers: ```c // amdgpu_display.c:1777 if (!drm_fb_helper_gem_is_fb(dev->fb_helper, fb->obj[0])) { struct amdgpu_bo *robj =3D gem_to_amdgpu_bo(fb->obj[0]); r =3D amdgpu_bo_reserve(robj, true); ``` ```c // radeon_device.c:1592 if (!drm_fb_helper_gem_is_fb(dev->fb_helper, fb->obj[0])) { struct radeon_bo *robj =3D gem_to_radeon_bo(fb->obj[0]); r =3D radeon_bo_reserve(robj, false); ``` With the stub returning `false`, the `!false` evaluates to `true`, meaning = all buffers get unpinned when there's no fbdev =E2=80=94 which is the right= behavior since there's no kernel fbdev object to protect. **Function signature: Matches exactly.** The stub's signature matches the r= eal declaration at line 274-275: ```c bool drm_fb_helper_gem_is_fb(const struct drm_fb_helper *fb_helper, const struct drm_gem_object *obj); ``` **Placement: Correct.** The stub goes right after `#else` on line 276, insi= de the `#ifdef CONFIG_DRM_FBDEV_EMULATION` / `#else` / `#endif` structure. **Fixes tag:** Points to the merge commit `02e778f12359` rather than either= individual commit. This is appropriate since neither commit in isolation c= aused the breakage =E2=80=94 it only manifested when both sides were merged= together. **Minor note on the subject line:** The subject says "drm/amdgpu" but this = is really a fix to `include/drm/drm_fb_helper.h`, a core DRM header. Both a= mdgpu and radeon benefit from it. A more precise prefix might have been `dr= m/fbdev-helper`, but this is cosmetic and doesn't affect correctness. **v2 note:** The changelog says v1 was revised per Thomas Zimmermann's feed= back to restore only `drm_fb_helper_gem_is_fb()` (rather than presumably mo= re stubs), which shows appropriate scope reduction. **No issues found.** The patch is straightforward, correct, and properly sc= oped. --- Generated by Claude Code Patch Reviewer