* [PATCH] drm/i915/fbdev: fix link failure without FBDEV emulation
@ 2026-03-04 8:36 Arnd Bergmann
2026-03-04 8:43 ` Thomas Zimmermann
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Arnd Bergmann @ 2026-03-04 8:36 UTC (permalink / raw)
To: Jani Nikula, Joonas Lahtinen, Rodrigo Vivi, Tvrtko Ursulin,
David Airlie, Simona Vetter, Uma Shankar, Mika Kahola,
Ville Syrjälä, Vinod Govindapillai
Cc: Arnd Bergmann, Jouni Högander, Thomas Zimmermann,
Chaitanya Kumar Borah, intel-gfx, dri-devel, linux-kernel
From: Arnd Bergmann <arnd@arndb.de>
If CONFIG_DRM_FBDEV_EMULATION is disabled but CONFIG_FRAMEBUFFER_CONSOLE
is turned on, the i915 driver now fails to link:
ERROR: modpost: "intel_fbdev_fb_prefer_stolen" [drivers/gpu/drm/i915/i915.ko] undefined!
Fix the contition to include a check for the symbol that controls compilation
of intel_fbdev_fb.c.
Fixes: 94c7d2861292 ("drm/i915/fbdev: Extract intel_fbdev_fb_prefer_stolen()")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
drivers/gpu/drm/i915/i915_initial_plane.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/i915/i915_initial_plane.c b/drivers/gpu/drm/i915/i915_initial_plane.c
index 5594548f51d8..390a9248d631 100644
--- a/drivers/gpu/drm/i915/i915_initial_plane.c
+++ b/drivers/gpu/drm/i915/i915_initial_plane.c
@@ -115,7 +115,8 @@ initial_plane_vma(struct drm_i915_private *i915,
* important and we should probably use that space with FBC or other
* features.
*/
- if (IS_ENABLED(CONFIG_FRAMEBUFFER_CONSOLE) &&
+ if (IS_ENABLED(CONFIG_DRM_FBDEV_EMULATION) &&
+ IS_ENABLED(CONFIG_FRAMEBUFFER_CONSOLE) &&
mem == i915->mm.stolen_region &&
!intel_fbdev_fb_prefer_stolen(&i915->drm, size)) {
drm_dbg_kms(&i915->drm, "Initial FB size exceeds half of stolen, discarding\n");
--
2.39.5
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] drm/i915/fbdev: fix link failure without FBDEV emulation
2026-03-04 8:36 [PATCH] drm/i915/fbdev: fix link failure without FBDEV emulation Arnd Bergmann
@ 2026-03-04 8:43 ` Thomas Zimmermann
2026-03-05 3:43 ` Claude review: " Claude Code Review Bot
2026-03-05 3:43 ` Claude Code Review Bot
2 siblings, 0 replies; 4+ messages in thread
From: Thomas Zimmermann @ 2026-03-04 8:43 UTC (permalink / raw)
To: Arnd Bergmann, Jani Nikula, Joonas Lahtinen, Rodrigo Vivi,
Tvrtko Ursulin, David Airlie, Simona Vetter, Uma Shankar,
Mika Kahola, Ville Syrjälä, Vinod Govindapillai
Cc: Arnd Bergmann, Jouni Högander, Chaitanya Kumar Borah,
intel-gfx, dri-devel, linux-kernel
Hi
Am 04.03.26 um 09:36 schrieb Arnd Bergmann:
> From: Arnd Bergmann <arnd@arndb.de>
>
> If CONFIG_DRM_FBDEV_EMULATION is disabled but CONFIG_FRAMEBUFFER_CONSOLE
> is turned on, the i915 driver now fails to link:
>
> ERROR: modpost: "intel_fbdev_fb_prefer_stolen" [drivers/gpu/drm/i915/i915.ko] undefined!
>
> Fix the contition to include a check for the symbol that controls compilation
> of intel_fbdev_fb.c.
>
> Fixes: 94c7d2861292 ("drm/i915/fbdev: Extract intel_fbdev_fb_prefer_stolen()")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
> drivers/gpu/drm/i915/i915_initial_plane.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/i915/i915_initial_plane.c b/drivers/gpu/drm/i915/i915_initial_plane.c
> index 5594548f51d8..390a9248d631 100644
> --- a/drivers/gpu/drm/i915/i915_initial_plane.c
> +++ b/drivers/gpu/drm/i915/i915_initial_plane.c
> @@ -115,7 +115,8 @@ initial_plane_vma(struct drm_i915_private *i915,
> * important and we should probably use that space with FBC or other
> * features.
> */
> - if (IS_ENABLED(CONFIG_FRAMEBUFFER_CONSOLE) &&
> + if (IS_ENABLED(CONFIG_DRM_FBDEV_EMULATION) &&
> + IS_ENABLED(CONFIG_FRAMEBUFFER_CONSOLE) &&
It's possible to run fbdev without the console. So if I'm not mistaken,
only CONFIG_DRM_FBDEV_EMULATION would be correct.
Best regards
Thomas
> mem == i915->mm.stolen_region &&
> !intel_fbdev_fb_prefer_stolen(&i915->drm, size)) {
> drm_dbg_kms(&i915->drm, "Initial FB size exceeds half of stolen, discarding\n");
--
--
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Frankenstr. 146, 90461 Nürnberg, Germany, www.suse.com
GF: Jochen Jaser, Andrew McDonald, Werner Knoblich, (HRB 36809, AG Nürnberg)
^ permalink raw reply [flat|nested] 4+ messages in thread
* Claude review: drm/i915/fbdev: fix link failure without FBDEV emulation
2026-03-04 8:36 [PATCH] drm/i915/fbdev: fix link failure without FBDEV emulation Arnd Bergmann
2026-03-04 8:43 ` Thomas Zimmermann
@ 2026-03-05 3:43 ` Claude Code Review Bot
2026-03-05 3:43 ` Claude Code Review Bot
2 siblings, 0 replies; 4+ messages in thread
From: Claude Code Review Bot @ 2026-03-05 3:43 UTC (permalink / raw)
To: dri-devel-reviews
Overall Series Review
Subject: drm/i915/fbdev: fix link failure without FBDEV emulation
Author: Arnd Bergmann <arnd@kernel.org>
Patches: 2
Reviewed: 2026-03-05T13:43:28.995608
---
This is a single-patch fix for a link error that occurs when `CONFIG_DRM_FBDEV_EMULATION=n` but `CONFIG_FRAMEBUFFER_CONSOLE=y`. The function `intel_fbdev_fb_prefer_stolen()` lives in `intel_fbdev_fb.c`, which is only compiled when `CONFIG_DRM_FBDEV_EMULATION` is enabled (confirmed by the Makefile at line 325-327). The original code only guarded the call with `IS_ENABLED(CONFIG_FRAMEBUFFER_CONSOLE)`, which is insufficient since `CONFIG_FRAMEBUFFER_CONSOLE` can be enabled independently.
The fix is correct, minimal, and well-targeted. Adding the `IS_ENABLED(CONFIG_DRM_FBDEV_EMULATION)` check ensures the call to `intel_fbdev_fb_prefer_stolen()` is compiled out when the object file providing that symbol isn't built.
**Verdict: Good to merge.**
---
Generated by Claude Code Patch Reviewer
^ permalink raw reply [flat|nested] 4+ messages in thread
* Claude review: drm/i915/fbdev: fix link failure without FBDEV emulation
2026-03-04 8:36 [PATCH] drm/i915/fbdev: fix link failure without FBDEV emulation Arnd Bergmann
2026-03-04 8:43 ` Thomas Zimmermann
2026-03-05 3:43 ` Claude review: " Claude Code Review Bot
@ 2026-03-05 3:43 ` Claude Code Review Bot
2 siblings, 0 replies; 4+ messages in thread
From: Claude Code Review Bot @ 2026-03-05 3:43 UTC (permalink / raw)
To: dri-devel-reviews
Patch Review
**Correctness:** The fix is correct. The condition now reads:
```c
if (IS_ENABLED(CONFIG_DRM_FBDEV_EMULATION) &&
IS_ENABLED(CONFIG_FRAMEBUFFER_CONSOLE) &&
mem == i915->mm.stolen_region &&
!intel_fbdev_fb_prefer_stolen(&i915->drm, size)) {
```
Since C short-circuit evaluation will skip `intel_fbdev_fb_prefer_stolen()` when `CONFIG_DRM_FBDEV_EMULATION` is disabled, and the compiler will eliminate the dead code (including the reference to the undefined symbol), this resolves the link error.
**Minor nit:** The commit message has a typo: "contition" should be "condition". This is cosmetic and doesn't affect the fix itself.
**Fixes tag:** Correctly references the commit that introduced the regression (94c7d2861292).
**Scope:** Minimal one-line change (adding one check), appropriately scoped for a build fix.
**No other concerns.** The patch is straightforward and correct.
---
Generated by Claude Code Patch Reviewer
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2026-03-05 3:43 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-04 8:36 [PATCH] drm/i915/fbdev: fix link failure without FBDEV emulation Arnd Bergmann
2026-03-04 8:43 ` Thomas Zimmermann
2026-03-05 3:43 ` Claude review: " Claude Code Review Bot
2026-03-05 3:43 ` 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