[PATCH] drm/i915/fbdev: fix link failure without FBDEV emulation

Arnd Bergmann posted 1 patch 1 month, 1 week ago
drivers/gpu/drm/i915/i915_initial_plane.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
[PATCH] drm/i915/fbdev: fix link failure without FBDEV emulation
Posted by Arnd Bergmann 1 month, 1 week ago
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
Re: [PATCH] drm/i915/fbdev: fix link failure without FBDEV emulation
Posted by Thomas Zimmermann 1 month, 1 week ago
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)


Re: [PATCH] drm/i915/fbdev: fix link failure without FBDEV emulation
Posted by Thomas Zimmermann 4 weeks ago
Hi

Am 04.03.26 um 09:43 schrieb Thomas Zimmermann:
> 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.

Did anyone pick up this fix?

Best regards
Thomas

>
> 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)


Re: [PATCH] drm/i915/fbdev: fix link failure without FBDEV emulation
Posted by Jani Nikula 3 weeks, 5 days ago
On Mon, 16 Mar 2026, Thomas Zimmermann <tzimmermann@suse.de> wrote:
> Hi
>
> Am 04.03.26 um 09:43 schrieb Thomas Zimmermann:
>> 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.
>
> Did anyone pick up this fix?

Pushed to drm-intel-next, thanks for the patch.

BR,
Jani.

>
> Best regards
> Thomas
>
>>
>> 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");
>>

-- 
Jani Nikula, Intel