]> git.baikalelectronics.ru Git - kernel.git/commitdiff
vga_switcheroo: Depend upon fbcon being built-in, if enabled
authorDaniel Vetter <daniel.vetter@ffwll.ch>
Mon, 24 Jun 2019 09:21:53 +0000 (11:21 +0200)
committerMaarten Lankhorst <maarten.lankhorst@linux.intel.com>
Wed, 26 Jun 2019 08:36:49 +0000 (10:36 +0200)
Fixes linking fail when fbcon/fbdev is modular and vgaswitcheroo is
enabled:

x86_64-linux-gnu-ld: drivers/gpu/vga/vga_switcheroo.o: in function `vga_switchto_stage2':
vga_switcheroo.c:(.text+0x997): undefined reference to `fbcon_remap_all'

Unfortunately this means that in a default allmodconfig we will disable vgaswitcheroo.

v2: I first tried to fix this with an EXPORT_SYMBOL, but vga_switcheroo is
never a module, so this doesn't work.

Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Reported-by: kbuild test robot <lkp@intel.com>
Fixes: 7f7eb604ada6 ("vgaswitcheroo: call fbcon_remap_all directly")
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Cc: Stephen Rothwell <sfr@canb.auug.org.au>
Cc: Lukas Wunner <lukas@wunner.de>
Cc: Daniel Vetter <daniel.vetter@intel.com>
Cc: Sam Ravnborg <sam@ravnborg.org>
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Cc: David Airlie <airlied@linux.ie>
Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: Maxime Ripard <maxime.ripard@bootlin.com>
Cc: Sean Paul <sean@poorly.run>
Cc: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Cc: Hans de Goede <hdegoede@redhat.com>
Cc: Yisheng Xie <ysxie@foxmail.com>
Cc: linux-fbdev@vger.kernel.org
Cc: Daniel Thompson <daniel.thompson@linaro.org>
Cc: Lee Jones <lee.jones@linaro.org>
Cc: dri-devel@lists.freedesktop.org
Cc: linux-fbdev@vger.kernel.org
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190624092153.23375-1-daniel.vetter@ffwll.ch
drivers/gpu/vga/Kconfig

index 84ab482d0db619e7ea34fcdbfa95d56e64ff467f..c8c770b05ed9b16ba2b005cf21028a579cd8a19e 100644 (file)
@@ -23,6 +23,7 @@ config VGA_SWITCHEROO
        depends on X86
        depends on ACPI
        depends on PCI
+       depends on (FRAMEBUFFER_CONSOLE=n || FB=y)
        select VGA_ARB
        help
          Many laptops released in 2008/9/10 have two GPUs with a multiplexer