From: Jani Nikula <jani.nikula@linux.intel.com>
To: Javier Martinez Canillas <javierm@redhat.com>,
linux-kernel@vger.kernel.org
Cc: "Dan Horák" <dan@danny.cz>,
"Justin M . Forbes" <jforbes@fedoraproject.org>,
"Peter Robinson" <pbrobinson@gmail.com>,
"Javier Martinez Canillas" <javierm@redhat.com>,
"Daniel Vetter" <daniel@ffwll.ch>,
"David Airlie" <airlied@linux.ie>,
"Maarten Lankhorst" <maarten.lankhorst@linux.intel.com>,
"Maxime Ripard" <mripard@kernel.org>,
"Thomas Zimmermann" <tzimmermann@suse.de>,
dri-devel@lists.freedesktop.org
Subject: Re: [PATCH] drm: Make DRM_FBDEV_EMULATION deps more robust to fix linker errors
Date: Wed, 27 Oct 2021 14:51:31 +0300 [thread overview]
Message-ID: <875ytiit30.fsf@intel.com> (raw)
In-Reply-To: <20211027072044.4105113-1-javierm@redhat.com>
On Wed, 27 Oct 2021, Javier Martinez Canillas <javierm@redhat.com> wrote:
> Enabling the CONFIG_DRM_FBDEV_EMULATION Kconfig symbol can lead to linker
> errors, if CONFIG_DRM_KMS_HELPER is built-in but CONFIG_FB as a module.
>
> Because in that case the drm_kms_helper.o object will have references to
> symbols that are defined in the fb.ko module, i.e:
>
> $ make bzImage modules
> DESCEND objtool
> CALL scripts/atomic/check-atomics.sh
> CALL scripts/checksyscalls.sh
> CHK include/generated/compile.h
> GEN .version
> CHK include/generated/compile.h
> UPD include/generated/compile.h
> CC init/version.o
> AR init/built-in.a
> LD vmlinux.o
> MODPOST vmlinux.symvers
> MODINFO modules.builtin.modinfo
> GEN modules.builtin
> LD .tmp_vmlinux.kallsyms1
> ld: drivers/gpu/drm/drm_fb_helper.o: in function `drm_fb_helper_resume_worker':
> drm_fb_helper.c:(.text+0x2a0): undefined reference to `fb_set_suspend'
> ...
>
> To prevent this, make following changes to the config option dependencies:
>
> * Depend on FB && !(DRM_KMS_HELPER=y && FB=m), to avoid invalid configs.
> * Depend on DRM_KMS_HELPER instead selecting it, to avoid circular deps.
>
> Reported-by: Justin M. Forbes <jforbes@fedoraproject.org>
> Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
Please see [1]. I think it's a big mess. I don't think this is the fix
either.
BR,
Jani.
[1] https://lore.kernel.org/r/878ryeit9i.fsf@intel.com
> ---
>
> This fixes linker errors found when building the Fedora kernel package
> for the s390x architecture:
>
> https://kojipkgs.fedoraproject.org//work/tasks/9849/77859849/build.log
>
> drivers/gpu/drm/Kconfig | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/Kconfig b/drivers/gpu/drm/Kconfig
> index cea777ae7fb9..9a21e57b4a0d 100644
> --- a/drivers/gpu/drm/Kconfig
> +++ b/drivers/gpu/drm/Kconfig
> @@ -103,8 +103,8 @@ config DRM_DEBUG_DP_MST_TOPOLOGY_REFS
> config DRM_FBDEV_EMULATION
> bool "Enable legacy fbdev support for your modesetting driver"
> depends on DRM
> - depends on FB
> - select DRM_KMS_HELPER
> + depends on FB && !(DRM_KMS_HELPER=y && FB=m)
> + depends on DRM_KMS_HELPER
> select FB_CFB_FILLRECT
> select FB_CFB_COPYAREA
> select FB_CFB_IMAGEBLIT
--
Jani Nikula, Intel Open Source Graphics Center
prev parent reply other threads:[~2021-10-27 11:51 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-27 7:20 [PATCH] drm: Make DRM_FBDEV_EMULATION deps more robust to fix linker errors Javier Martinez Canillas
2021-10-27 11:51 ` Jani Nikula [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=875ytiit30.fsf@intel.com \
--to=jani.nikula@linux.intel.com \
--cc=airlied@linux.ie \
--cc=dan@danny.cz \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=javierm@redhat.com \
--cc=jforbes@fedoraproject.org \
--cc=linux-kernel@vger.kernel.org \
--cc=maarten.lankhorst@linux.intel.com \
--cc=mripard@kernel.org \
--cc=pbrobinson@gmail.com \
--cc=tzimmermann@suse.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox