[PATCH v2] drm/amdgpu: fix build for CONFIG_DRM_FBDEV_EMULATION=n

Yury Norov posted 1 patch 1 month, 2 weeks ago
include/drm/drm_fb_helper.h | 6 ++++++
1 file changed, 6 insertions(+)
[PATCH v2] drm/amdgpu: fix build for CONFIG_DRM_FBDEV_EMULATION=n
Posted by Yury Norov 1 month, 2 weeks ago
The merge-commit 02e778f12359 ("Merge tag 'amd-drm-next-7.1-2026-03-12' of
https://gitlab.freedesktop.org/agd5f/linux into drm-next") removes the stub
for drm_fb_helper_gem_is_fb(), so the buld gets broken if DRM_FBDEV_EMULATION
is not set.

‘drm_fb_helper_gem_is_fb’; did you mean ‘drm_fb_helper_from_client’? [-Wimplicit-function-declaration]
 1777 |                 if (!drm_fb_helper_gem_is_fb(dev->fb_helper, fb->obj[0])) {
      |                      ^~~~~~~~~~~~~~~~~~~~~~~
      |                      drm_fb_helper_from_client

Restore it.

Fixes: 02e778f12359 ("Merge tag 'amd-drm-next-7.1-2026-03-12' of https://gitlab.freedesktop.org/agd5f/linux into drm-next")
Signed-off-by: Yury Norov <ynorov@nvidia.com>
---
v2: restore only drm_fb_helper_gem_is_fb() (Thomas)

 include/drm/drm_fb_helper.h | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/include/drm/drm_fb_helper.h b/include/drm/drm_fb_helper.h
index bf391903443d..0c5e5ed7b5e7 100644
--- a/include/drm/drm_fb_helper.h
+++ b/include/drm/drm_fb_helper.h
@@ -273,6 +273,12 @@ 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.51.0

Re: [PATCH v2] drm/amdgpu: fix build for CONFIG_DRM_FBDEV_EMULATION=n
Posted by Thomas Zimmermann 1 month, 2 weeks ago

Am 28.04.26 um 04:49 schrieb Yury Norov:
> The merge-commit 02e778f12359 ("Merge tag 'amd-drm-next-7.1-2026-03-12' of
> https://gitlab.freedesktop.org/agd5f/linux into drm-next") removes the stub
> for drm_fb_helper_gem_is_fb(), so the buld gets broken if DRM_FBDEV_EMULATION
> is not set.
>
> ‘drm_fb_helper_gem_is_fb’; did you mean ‘drm_fb_helper_from_client’? [-Wimplicit-function-declaration]
>   1777 |                 if (!drm_fb_helper_gem_is_fb(dev->fb_helper, fb->obj[0])) {
>        |                      ^~~~~~~~~~~~~~~~~~~~~~~
>        |                      drm_fb_helper_from_client
>
> Restore it.
>
> Fixes: 02e778f12359 ("Merge tag 'amd-drm-next-7.1-2026-03-12' of https://gitlab.freedesktop.org/agd5f/linux into drm-next")
> Signed-off-by: Yury Norov <ynorov@nvidia.com>

Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de>

> ---
> v2: restore only drm_fb_helper_gem_is_fb() (Thomas)
>
>   include/drm/drm_fb_helper.h | 6 ++++++
>   1 file changed, 6 insertions(+)
>
> diff --git a/include/drm/drm_fb_helper.h b/include/drm/drm_fb_helper.h
> index bf391903443d..0c5e5ed7b5e7 100644
> --- a/include/drm/drm_fb_helper.h
> +++ b/include/drm/drm_fb_helper.h
> @@ -273,6 +273,12 @@ 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

-- 
--
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 v2] drm/amdgpu: fix build for CONFIG_DRM_FBDEV_EMULATION=n
Posted by Alex Deucher 1 month, 2 weeks ago
Applied.  Thanks!

Alex

On Tue, Apr 28, 2026 at 2:59 AM Thomas Zimmermann <tzimmermann@suse.de> wrote:
>
>
>
> Am 28.04.26 um 04:49 schrieb Yury Norov:
> > The merge-commit 02e778f12359 ("Merge tag 'amd-drm-next-7.1-2026-03-12' of
> > https://gitlab.freedesktop.org/agd5f/linux into drm-next") removes the stub
> > for drm_fb_helper_gem_is_fb(), so the buld gets broken if DRM_FBDEV_EMULATION
> > is not set.
> >
> > ‘drm_fb_helper_gem_is_fb’; did you mean ‘drm_fb_helper_from_client’? [-Wimplicit-function-declaration]
> >   1777 |                 if (!drm_fb_helper_gem_is_fb(dev->fb_helper, fb->obj[0])) {
> >        |                      ^~~~~~~~~~~~~~~~~~~~~~~
> >        |                      drm_fb_helper_from_client
> >
> > Restore it.
> >
> > Fixes: 02e778f12359 ("Merge tag 'amd-drm-next-7.1-2026-03-12' of https://gitlab.freedesktop.org/agd5f/linux into drm-next")
> > Signed-off-by: Yury Norov <ynorov@nvidia.com>
>
> Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de>
>
> > ---
> > v2: restore only drm_fb_helper_gem_is_fb() (Thomas)
> >
> >   include/drm/drm_fb_helper.h | 6 ++++++
> >   1 file changed, 6 insertions(+)
> >
> > diff --git a/include/drm/drm_fb_helper.h b/include/drm/drm_fb_helper.h
> > index bf391903443d..0c5e5ed7b5e7 100644
> > --- a/include/drm/drm_fb_helper.h
> > +++ b/include/drm/drm_fb_helper.h
> > @@ -273,6 +273,12 @@ 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
>
> --
> --
> 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)
>
>