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

Cc: [email protected]
Signed-off-by: Mike Marciniszyn <[email protected]>
---
 include/drm/drm_fb_helper.h | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/include/drm/drm_fb_helper.h b/include/drm/drm_fb_helper.h
index bf391903443d..7f9ad421af3f 100644
--- a/include/drm/drm_fb_helper.h
+++ b/include/drm/drm_fb_helper.h
@@ -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

Reply via email to