linux-fbdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] vga_switcheroo: Depend upon fbcon being built-in, if enabled
@ 2019-06-24  9:21 Daniel Vetter
  2019-06-24 13:07 ` Maarten Lankhorst
  2019-06-26  8:35 ` Daniel Vetter
  0 siblings, 2 replies; 6+ messages in thread
From: Daniel Vetter @ 2019-06-24  9:21 UTC (permalink / raw)
  To: DRI Development
  Cc: Sean Paul, Stephen Rothwell, Hans de Goede, kbuild test robot,
	Bartlomiej Zolnierkiewicz, David Airlie, Daniel Vetter,
	linux-fbdev, Yisheng Xie, Maxime Ripard, Daniel Vetter, Lee Jones,
	Daniel Thompson, Sam Ravnborg

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'

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: 1cd51b5d200d ("vgaswitcheroo: call fbcon_remap_all directly")
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
--
wrt merging probably best if Maarten adds this to the topic branch we
have already and sends out an updated pull request.

Apologies for the mess.
-Daniel
---
 drivers/gpu/vga/Kconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/gpu/vga/Kconfig b/drivers/gpu/vga/Kconfig
index 84ab482d0db6..c8c770b05ed9 100644
--- a/drivers/gpu/vga/Kconfig
+++ b/drivers/gpu/vga/Kconfig
@@ -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
-- 
2.20.1

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH] vga_switcheroo: Depend upon fbcon being built-in, if enabled
  2019-06-24  9:21 [PATCH] vga_switcheroo: Depend upon fbcon being built-in, if enabled Daniel Vetter
@ 2019-06-24 13:07 ` Maarten Lankhorst
  2019-06-24 14:03   ` Daniel Vetter
  2019-06-26  8:35 ` Daniel Vetter
  1 sibling, 1 reply; 6+ messages in thread
From: Maarten Lankhorst @ 2019-06-24 13:07 UTC (permalink / raw)
  To: Daniel Vetter, DRI Development
  Cc: Stephen Rothwell, Hans de Goede, kbuild test robot,
	Bartlomiej Zolnierkiewicz, David Airlie, Sean Paul, linux-fbdev,
	Yisheng Xie, Maxime Ripard, Daniel Vetter, Lee Jones,
	Daniel Thompson, Sam Ravnborg

Op 24-06-2019 om 11:21 schreef Daniel Vetter:
> 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'
>
> 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: 1cd51b5d200d ("vgaswitcheroo: call fbcon_remap_all directly")
> 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
> --
> wrt merging probably best if Maarten adds this to the topic branch we
> have already and sends out an updated pull request.
>
> Apologies for the mess.
> -Daniel
> ---
>  drivers/gpu/vga/Kconfig | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/drivers/gpu/vga/Kconfig b/drivers/gpu/vga/Kconfig
> index 84ab482d0db6..c8c770b05ed9 100644
> --- a/drivers/gpu/vga/Kconfig
> +++ b/drivers/gpu/vga/Kconfig
> @@ -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

In a default allmodconfig we disable vgaswitcheroo then. Not sure it's an issue. Just worth noting. :)

~Maarten

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] vga_switcheroo: Depend upon fbcon being built-in, if enabled
  2019-06-24 13:07 ` Maarten Lankhorst
@ 2019-06-24 14:03   ` Daniel Vetter
  2019-06-26  8:34     ` Maarten Lankhorst
  0 siblings, 1 reply; 6+ messages in thread
From: Daniel Vetter @ 2019-06-24 14:03 UTC (permalink / raw)
  To: Maarten Lankhorst
  Cc: Sean Paul, Stephen Rothwell, Hans de Goede, kbuild test robot,
	Bartlomiej Zolnierkiewicz, David Airlie, Daniel Vetter,
	linux-fbdev, DRI Development, Yisheng Xie, Maxime Ripard,
	Daniel Vetter, Lee Jones, Daniel Thompson, Sam Ravnborg

On Mon, Jun 24, 2019 at 03:07:26PM +0200, Maarten Lankhorst wrote:
> Op 24-06-2019 om 11:21 schreef Daniel Vetter:
> > 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'
> >
> > 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: 1cd51b5d200d ("vgaswitcheroo: call fbcon_remap_all directly")
> > 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
> > --
> > wrt merging probably best if Maarten adds this to the topic branch we
> > have already and sends out an updated pull request.
> >
> > Apologies for the mess.
> > -Daniel
> > ---
> >  drivers/gpu/vga/Kconfig | 1 +
> >  1 file changed, 1 insertion(+)
> >
> > diff --git a/drivers/gpu/vga/Kconfig b/drivers/gpu/vga/Kconfig
> > index 84ab482d0db6..c8c770b05ed9 100644
> > --- a/drivers/gpu/vga/Kconfig
> > +++ b/drivers/gpu/vga/Kconfig
> > @@ -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
> 
> In a default allmodconfig we disable vgaswitcheroo then. Not sure it's an issue. Just worth noting. :)

If you haven't applied yet, might be good to add that note to the commit
message when you merge.

Thanks, Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] vga_switcheroo: Depend upon fbcon being built-in, if enabled
  2019-06-24 14:03   ` Daniel Vetter
@ 2019-06-26  8:34     ` Maarten Lankhorst
  0 siblings, 0 replies; 6+ messages in thread
From: Maarten Lankhorst @ 2019-06-26  8:34 UTC (permalink / raw)
  To: Daniel Vetter
  Cc: Sean Paul, Stephen Rothwell, Hans de Goede, kbuild test robot,
	Bartlomiej Zolnierkiewicz, David Airlie, Daniel Vetter,
	linux-fbdev, DRI Development, Yisheng Xie, Maxime Ripard,
	Daniel Vetter, Lee Jones, Daniel Thompson, Sam Ravnborg

Op 24-06-2019 om 16:03 schreef Daniel Vetter:
> On Mon, Jun 24, 2019 at 03:07:26PM +0200, Maarten Lankhorst wrote:
>> Op 24-06-2019 om 11:21 schreef Daniel Vetter:
>>> 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'
>>>
>>> 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: 1cd51b5d200d ("vgaswitcheroo: call fbcon_remap_all directly")
>>> 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
>>> --
>>> wrt merging probably best if Maarten adds this to the topic branch we
>>> have already and sends out an updated pull request.
>>>
>>> Apologies for the mess.
>>> -Daniel
>>> ---
>>>  drivers/gpu/vga/Kconfig | 1 +
>>>  1 file changed, 1 insertion(+)
>>>
>>> diff --git a/drivers/gpu/vga/Kconfig b/drivers/gpu/vga/Kconfig
>>> index 84ab482d0db6..c8c770b05ed9 100644
>>> --- a/drivers/gpu/vga/Kconfig
>>> +++ b/drivers/gpu/vga/Kconfig
>>> @@ -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
>> In a default allmodconfig we disable vgaswitcheroo then. Not sure it's an issue. Just worth noting. :)
> If you haven't applied yet, might be good to add that note to the commit
> message when you merge.
>
> Thanks, Daniel

Thanks, pushed. :)

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] vga_switcheroo: Depend upon fbcon being built-in, if enabled
  2019-06-24  9:21 [PATCH] vga_switcheroo: Depend upon fbcon being built-in, if enabled Daniel Vetter
  2019-06-24 13:07 ` Maarten Lankhorst
@ 2019-06-26  8:35 ` Daniel Vetter
  2019-06-26  8:37   ` Maarten Lankhorst
  1 sibling, 1 reply; 6+ messages in thread
From: Daniel Vetter @ 2019-06-26  8:35 UTC (permalink / raw)
  To: DRI Development
  Cc: Sean Paul, Stephen Rothwell, Hans de Goede, kbuild test robot,
	Bartlomiej Zolnierkiewicz, David Airlie, Daniel Vetter,
	linux-fbdev, Yisheng Xie, Maxime Ripard, Daniel Vetter, Lee Jones,
	Daniel Thompson, Sam Ravnborg

On Mon, Jun 24, 2019 at 11:21:53AM +0200, Daniel Vetter wrote:
> 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'
> 
> 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: 1cd51b5d200d ("vgaswitcheroo: call fbcon_remap_all directly")
> 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: Daniel Vetter <daniel.vetter@intel.com>

> --
> wrt merging probably best if Maarten adds this to the topic branch we
> have already and sends out an updated pull request.
> 
> Apologies for the mess.
> -Daniel
> ---
>  drivers/gpu/vga/Kconfig | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/gpu/vga/Kconfig b/drivers/gpu/vga/Kconfig
> index 84ab482d0db6..c8c770b05ed9 100644
> --- a/drivers/gpu/vga/Kconfig
> +++ b/drivers/gpu/vga/Kconfig
> @@ -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
> -- 
> 2.20.1
> 

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] vga_switcheroo: Depend upon fbcon being built-in, if enabled
  2019-06-26  8:35 ` Daniel Vetter
@ 2019-06-26  8:37   ` Maarten Lankhorst
  0 siblings, 0 replies; 6+ messages in thread
From: Maarten Lankhorst @ 2019-06-26  8:37 UTC (permalink / raw)
  To: Daniel Vetter, DRI Development
  Cc: Sean Paul, Stephen Rothwell, Hans de Goede, kbuild test robot,
	Bartlomiej Zolnierkiewicz, David Airlie, Daniel Vetter,
	linux-fbdev, Yisheng Xie, Maxime Ripard, Daniel Vetter, Lee Jones,
	Daniel Thompson, Sam Ravnborg

Op 26-06-2019 om 10:35 schreef Daniel Vetter:
> On Mon, Jun 24, 2019 at 11:21:53AM +0200, Daniel Vetter wrote:
>> 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'
>>
>> 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: 1cd51b5d200d ("vgaswitcheroo: call fbcon_remap_all directly")
>> 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: Daniel Vetter <daniel.vetter@intel.com>
>
>> --
>> wrt merging probably best if Maarten adds this to the topic branch we
>> have already and sends out an updated pull request.
>>
>> Apologies for the mess.
>> -Daniel
>> ---
>>  drivers/gpu/vga/Kconfig | 1 +
>>  1 file changed, 1 insertion(+)
>>
>> diff --git a/drivers/gpu/vga/Kconfig b/drivers/gpu/vga/Kconfig
>> index 84ab482d0db6..c8c770b05ed9 100644
>> --- a/drivers/gpu/vga/Kconfig
>> +++ b/drivers/gpu/vga/Kconfig
>> @@ -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
>> -- 
>> 2.20.1
>>
Thanks, pushed. :)

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2019-06-26  8:37 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-06-24  9:21 [PATCH] vga_switcheroo: Depend upon fbcon being built-in, if enabled Daniel Vetter
2019-06-24 13:07 ` Maarten Lankhorst
2019-06-24 14:03   ` Daniel Vetter
2019-06-26  8:34     ` Maarten Lankhorst
2019-06-26  8:35 ` Daniel Vetter
2019-06-26  8:37   ` Maarten Lankhorst

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).