Re: [PATCH] [RESEND] drm: fb_helper: fix CONFIG_FB dependency
From: Arnd Bergmann
Date: Wed Oct 27 2021 - 09:26:01 EST
On Wed, Oct 27, 2021 at 3:06 PM Jani Nikula <jani.nikula@xxxxxxxxxxxxxxx> wrote:
> On Wed, 27 Oct 2021, Arnd Bergmann <arnd@xxxxxxxxxx> wrote:
> > This fails because of all the other drivers that try to 'select DRM_KMS_HELPER'.
> > Kconfig will now complain about a symbol that gets selected while its
> > dependencies
> > are not met.
> >
> > To work around that, every single driver that has 'selects DRM_KMS_HELPER' would
> > now have to also list 'depends on (DRM_FBDEV_EMULATION && FB) ||
> > !DRM_FBDEV_EMULATION'.
>
> So the fix would be that nobody selects DRM_KMS_HELPER...
That's not going to help in this case, the way the helper functions work is that
you select them as needed, and you avoid the other dependencies. This part
works fine.
We could probably get rid of this symbol by just making it an unconditional
part of drm.ko, as almost every driver ends up using it anyway.
Arguably, this would make the end result worse, as you'd again get drm.ko
itself to link against the old framebuffer code.
What I'm not sure about is whether drivers/video/fbdev/core/fb.ko could
be split up into smaller parts so DRM_FBDEV_EMULATION could
only depend on a set of common code without the bits that are needed
for the classic fbdev drivers.
Arnd