Skip to contentSkip to conversation

drm/fbdev-helper: Fix deletion of stub for drm_fb_helper_gem_is_fb()

PATCH In review [email protected] 2 participants 4 messages May 1 – May 8

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/fbdev-helper: Fix deletion of stub for drm_fb_helper_gem_is_fb()

From: Mike Marciniszyn <[email protected]>

When CONFIG_DRM_FBDEV_EMULATION is not defined this error results when building amdgpu_display.c with CONFIG_DRM_AMDGPU:

error: call to undeclared function 'drm_fb_helper_gem_is_fb'; ISO C99 and later do not support implicit function
declarations [-Wimplicit-function-declaration]

1777 | if (!drm_fb_helper_gem_is_fb(dev->fb_helper, fb->obj[0])) {

---
 include/drm/drm_fb_helper.h | 7 +++++++
 1 file changed, 7 insertions(+)
include/drm/drm_fb_helper.h +7 -0
index bf391903443d..7f9ad421af3f 100644
@@ -273,6 +273,13 @@ 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.43.0

Reviewed-by on v1 1/1
#1 lore raw
Quoted 5 lines · On Fri, May 01, 2026 at 04:43:13PM -0400, [email protected] wrote:

From: Mike Marciniszyn <[email protected]>

When CONFIG_DRM_FBDEV_EMULATION is not defined this error results when building amdgpu_display.c with CONFIG_DRM_AMDGPU:

Quoted 8 lines

error: call to undeclared function 'drm_fb_helper_gem_is_fb'; ISO C99 and later do not support implicit function
declarations [-Wimplicit-function-declaration]

1777 | if (!drm_fb_helper_gem_is_fb(dev->fb_helper, fb->obj[0])) {

Just hit the same problem, thanks for the fix.

#2 lore raw
Quoted 10 lines · Dmitry Ilvokhin
Quoted 9 lines · On Fri, May 01, 2026 at 04:43:13PM -0400, [email protected] wrote:

From: Mike Marciniszyn <[email protected]>

When CONFIG_DRM_FBDEV_EMULATION is not defined this error results when building amdgpu_display.c with CONFIG_DRM_AMDGPU:

error: call to undeclared function 'drm_fb_helper_gem_is_fb'; ISO C99 and later do not support implicit function
declarations [-Wimplicit-function-declaration]

Quoted 8 lines
Quoted 4 lines

1777 | if (!drm_fb_helper_gem_is_fb(dev->fb_helper, fb->obj[0])) {

Just hit the same problem, thanks for the fix.

Thanks, but actually there was already a fix.

Take a look at linux.git/master:

commit 927011b65a875302d08709bbe82eaf4d0d96c5d5

Author: Yury Norov <[email protected]>
Date:   Mon Apr 27 22:49:41 2026 -0400

drm/amdgpu: fix build for CONFIG_DRM_FBDEV_EMULATION=n

I encountered this in net-next, but the above has yet to be put into net-next.

Mike

#3 lore raw
Quoted 25 lines · Mike Marciniszyn
Quoted 10 lines · Dmitry Ilvokhin
Quoted 9 lines · On Fri, May 01, 2026 at 04:43:13PM -0400, [email protected] wrote:

From: Mike Marciniszyn <[email protected]>

When CONFIG_DRM_FBDEV_EMULATION is not defined this error results when building amdgpu_display.c with CONFIG_DRM_AMDGPU:

error: call to undeclared function 'drm_fb_helper_gem_is_fb'; ISO C99 and later do not support implicit function
declarations [-Wimplicit-function-declaration]

Quoted 8 lines
Quoted 4 lines

1777 | if (!drm_fb_helper_gem_is_fb(dev->fb_helper, fb->obj[0])) {

Just hit the same problem, thanks for the fix.

Thanks, but actually there was already a fix.

Take a look at linux.git/master:

commit 927011b65a875302d08709bbe82eaf4d0d96c5d5

Quoted 8 lines
Author: Yury Norov <[email protected]>
Date:   Mon Apr 27 22:49:41 2026 -0400

drm/amdgpu: fix build for CONFIG_DRM_FBDEV_EMULATION=n

I encountered this in net-next, but the above has yet to be put into net-next.

Mike

Indeed. Thanks, Mike.