Commit b63c6b9b authored by Arnd Bergmann's avatar Arnd Bergmann Committed by Jani Nikula
Browse files

drm/i915/fbdev: fix link failure without FBDEV emulation



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: 94c7d286 ("drm/i915/fbdev: Extract intel_fbdev_fb_prefer_stolen()")
Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
Link: https://patch.msgid.link/20260304083701.724908-1-arnd@kernel.org


Signed-off-by: default avatarJani Nikula <jani.nikula@intel.com>
parent e5b3fe57
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -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");