* [PATCH v2] drm/amdgpu: fix build for CONFIG_DRM_FBDEV_EMULATION=n
@ 2026-04-28 2:49 Yury Norov
2026-04-28 3:41 ` Claude review: " Claude Code Review Bot
2026-04-28 3:41 ` Claude Code Review Bot
0 siblings, 2 replies; 3+ messages in thread
From: Yury Norov @ 2026-04-28 2:49 UTC (permalink / raw)
To: Dave Airlie, Alex Deucher, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, Simona Vetter, dri-devel, linux-kernel
Cc: Yury Norov, Yury Norov
The merge-commit 02e778f12359 ("Merge tag 'amd-drm-next-7.1-2026-03-12' of
https://gitlab.freedesktop.org/agd5f/linux into drm-next") removes the stub
for drm_fb_helper_gem_is_fb(), so the buld gets broken if DRM_FBDEV_EMULATION
is not set.
‘drm_fb_helper_gem_is_fb’; did you mean ‘drm_fb_helper_from_client’? [-Wimplicit-function-declaration]
1777 | if (!drm_fb_helper_gem_is_fb(dev->fb_helper, fb->obj[0])) {
| ^~~~~~~~~~~~~~~~~~~~~~~
| drm_fb_helper_from_client
Restore it.
Fixes: 02e778f12359 ("Merge tag 'amd-drm-next-7.1-2026-03-12' of https://gitlab.freedesktop.org/agd5f/linux into drm-next")
Signed-off-by: Yury Norov <ynorov@nvidia.com>
---
v2: restore only drm_fb_helper_gem_is_fb() (Thomas)
include/drm/drm_fb_helper.h | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/include/drm/drm_fb_helper.h b/include/drm/drm_fb_helper.h
index bf391903443d..0c5e5ed7b5e7 100644
--- a/include/drm/drm_fb_helper.h
+++ b/include/drm/drm_fb_helper.h
@@ -273,6 +273,12 @@ int drm_fb_helper_hotplug_event(struct drm_fb_helper *fb_helper);
int drm_fb_helper_initial_config(struct drm_fb_helper *fb_helper);
bool drm_fb_helper_gem_is_fb(const struct drm_fb_helper *fb_helper,
const struct drm_gem_object *obj);
+#else
+static inline bool drm_fb_helper_gem_is_fb(const struct drm_fb_helper *fb_helper,
+ const struct drm_gem_object *obj)
+{
+ return false;
+}
#endif
#endif
--
2.51.0
^ permalink raw reply related [flat|nested] 3+ messages in thread* Claude review: drm/amdgpu: fix build for CONFIG_DRM_FBDEV_EMULATION=n
2026-04-28 2:49 [PATCH v2] drm/amdgpu: fix build for CONFIG_DRM_FBDEV_EMULATION=n Yury Norov
@ 2026-04-28 3:41 ` Claude Code Review Bot
2026-04-28 3:41 ` Claude Code Review Bot
1 sibling, 0 replies; 3+ messages in thread
From: Claude Code Review Bot @ 2026-04-28 3:41 UTC (permalink / raw)
To: dri-devel-reviews
Patch Review
**Correctness: Good.** The stub returns `false`, which is semantically correct — if fbdev emulation is disabled, no GEM object can be the fbdev 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 = gem_to_amdgpu_bo(fb->obj[0]);
r = 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 = gem_to_radeon_bo(fb->obj[0]);
r = 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 — which is the right behavior since there's no kernel fbdev object to protect.
**Function signature: Matches exactly.** The stub's signature matches the real 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, inside 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 caused the breakage — 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 amdgpu and radeon benefit from it. A more precise prefix might have been `drm/fbdev-helper`, but this is cosmetic and doesn't affect correctness.
**v2 note:** The changelog says v1 was revised per Thomas Zimmermann's feedback to restore only `drm_fb_helper_gem_is_fb()` (rather than presumably more stubs), which shows appropriate scope reduction.
**No issues found.** The patch is straightforward, correct, and properly scoped.
---
Generated by Claude Code Patch Reviewer
^ permalink raw reply [flat|nested] 3+ messages in thread* Claude review: drm/amdgpu: fix build for CONFIG_DRM_FBDEV_EMULATION=n
2026-04-28 2:49 [PATCH v2] drm/amdgpu: fix build for CONFIG_DRM_FBDEV_EMULATION=n Yury Norov
2026-04-28 3:41 ` Claude review: " Claude Code Review Bot
@ 2026-04-28 3:41 ` Claude Code Review Bot
1 sibling, 0 replies; 3+ messages in thread
From: Claude Code Review Bot @ 2026-04-28 3:41 UTC (permalink / raw)
To: dri-devel-reviews
Overall Series Review
Subject: drm/amdgpu: fix build for CONFIG_DRM_FBDEV_EMULATION=n
Author: Yury Norov <ynorov@nvidia.com>
Patches: 1
Reviewed: 2026-04-28T13:41:56.696633
---
This is a single-patch fix for a build breakage when `CONFIG_DRM_FBDEV_EMULATION=n`. The fix is correct, minimal, and well-targeted. The regression arose from two commits meeting in a merge: `6d438685340df` ("drm/fbdev-emulation: Remove empty placeholders") stripped all `#else` stubs, while `1837c76b780a4` ("drm/amdgpu: Move test for fbdev GEM object into generic helper") added `drm_fb_helper_gem_is_fb()` inside the `#ifdef CONFIG_DRM_FBDEV_EMULATION` block without providing a stub for the disabled case. The merge commit `02e778f12359` brought both together, breaking the build.
**Verdict: Looks good. Ready to merge.**
---
Generated by Claude Code Patch Reviewer
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-04-28 3:41 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-28 2:49 [PATCH v2] drm/amdgpu: fix build for CONFIG_DRM_FBDEV_EMULATION=n Yury Norov
2026-04-28 3:41 ` Claude review: " Claude Code Review Bot
2026-04-28 3:41 ` Claude Code Review Bot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox