diff mbox series

[v2,1/3] arch: Select fbdev helpers with CONFIG_VIDEO

Message ID 20240327204450.14914-2-tzimmermann@suse.de (mailing list archive)
State Not Applicable
Headers show
Series arch: Remove fbdev dependency from video helpers | expand

Commit Message

Thomas Zimmermann March 27, 2024, 8:41 p.m. UTC
Various Kconfig options selected the per-architecture helpers for
fbdev. But none of the contained code depends on fbdev. Standardize
on CONFIG_VIDEO, which will allow to add more general helpers for
video functionality.

CONFIG_VIDEO protects each architecture's video/ directory. This
allows for the use of more fine-grained control for each directory's
files, such as the use of CONFIG_STI_CORE on parisc.

v2:
- sparc: rebased onto Makefile changes

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Cc: "James E.J. Bottomley" <James.Bottomley@HansenPartnership.com>
Cc: Helge Deller <deller@gmx.de>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Andreas Larsson <andreas@gaisler.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Dave Hansen <dave.hansen@linux.intel.com>
Cc: x86@kernel.org
Cc: "H. Peter Anvin" <hpa@zytor.com>
---
 arch/parisc/Makefile      | 2 +-
 arch/sparc/Makefile       | 4 ++--
 arch/sparc/video/Makefile | 2 +-
 arch/x86/Makefile         | 2 +-
 arch/x86/video/Makefile   | 3 ++-
 5 files changed, 7 insertions(+), 6 deletions(-)

Comments

Sam Ravnborg March 28, 2024, 7:24 a.m. UTC | #1
On Wed, Mar 27, 2024 at 09:41:29PM +0100, Thomas Zimmermann wrote:
> Various Kconfig options selected the per-architecture helpers for
> fbdev. But none of the contained code depends on fbdev. Standardize
> on CONFIG_VIDEO, which will allow to add more general helpers for
> video functionality.
> 
> CONFIG_VIDEO protects each architecture's video/ directory. This
> allows for the use of more fine-grained control for each directory's
> files, such as the use of CONFIG_STI_CORE on parisc.
> 
> v2:
> - sparc: rebased onto Makefile changes
> 
> Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
> Cc: "James E.J. Bottomley" <James.Bottomley@HansenPartnership.com>
> Cc: Helge Deller <deller@gmx.de>
> Cc: "David S. Miller" <davem@davemloft.net>
> Cc: Andreas Larsson <andreas@gaisler.com>
> Cc: Thomas Gleixner <tglx@linutronix.de>
> Cc: Ingo Molnar <mingo@redhat.com>
> Cc: Borislav Petkov <bp@alien8.de>
> Cc: Dave Hansen <dave.hansen@linux.intel.com>
> Cc: x86@kernel.org
> Cc: "H. Peter Anvin" <hpa@zytor.com>

Reviewed-by: Sam Ravnborg <sam@ravnborg.org>
Helge Deller March 28, 2024, 12:39 p.m. UTC | #2
On 3/27/24 21:41, Thomas Zimmermann wrote:
> Various Kconfig options selected the per-architecture helpers for
> fbdev. But none of the contained code depends on fbdev. Standardize
> on CONFIG_VIDEO, which will allow to add more general helpers for
> video functionality.
>
> CONFIG_VIDEO protects each architecture's video/ directory.

Your patch in general looks good.
But is renaming the config option from CONFIG_FB_CORE to CONFIG_VIDEO
the best choice?
CONFIG_VIDEO might be mixed up with multimedia/video-streaming.

Why not e.g. CONFIG_GRAPHICS_CORE?
I'm fine with CONFIG_VIDEO as well, but if someone has a better idea
we maybe should go with that instead now?

Helge

> This
> allows for the use of more fine-grained control for each directory's
> files, such as the use of CONFIG_STI_CORE on parisc.
>
> v2:
> - sparc: rebased onto Makefile changes
>
> Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
> Cc: "James E.J. Bottomley" <James.Bottomley@HansenPartnership.com>
> Cc: Helge Deller <deller@gmx.de>
> Cc: "David S. Miller" <davem@davemloft.net>
> Cc: Andreas Larsson <andreas@gaisler.com>
> Cc: Thomas Gleixner <tglx@linutronix.de>
> Cc: Ingo Molnar <mingo@redhat.com>
> Cc: Borislav Petkov <bp@alien8.de>
> Cc: Dave Hansen <dave.hansen@linux.intel.com>
> Cc: x86@kernel.org
> Cc: "H. Peter Anvin" <hpa@zytor.com>
> ---
>   arch/parisc/Makefile      | 2 +-
>   arch/sparc/Makefile       | 4 ++--
>   arch/sparc/video/Makefile | 2 +-
>   arch/x86/Makefile         | 2 +-
>   arch/x86/video/Makefile   | 3 ++-
>   5 files changed, 7 insertions(+), 6 deletions(-)
>
> diff --git a/arch/parisc/Makefile b/arch/parisc/Makefile
> index 316f84f1d15c8..21b8166a68839 100644
> --- a/arch/parisc/Makefile
> +++ b/arch/parisc/Makefile
> @@ -119,7 +119,7 @@ export LIBGCC
>
>   libs-y	+= arch/parisc/lib/ $(LIBGCC)
>
> -drivers-y += arch/parisc/video/
> +drivers-$(CONFIG_VIDEO) += arch/parisc/video/
>
>   boot	:= arch/parisc/boot
>
> diff --git a/arch/sparc/Makefile b/arch/sparc/Makefile
> index 2a03daa68f285..757451c3ea1df 100644
> --- a/arch/sparc/Makefile
> +++ b/arch/sparc/Makefile
> @@ -59,8 +59,8 @@ endif
>   libs-y                 += arch/sparc/prom/
>   libs-y                 += arch/sparc/lib/
>
> -drivers-$(CONFIG_PM) += arch/sparc/power/
> -drivers-$(CONFIG_FB_CORE) += arch/sparc/video/
> +drivers-$(CONFIG_PM)    += arch/sparc/power/
> +drivers-$(CONFIG_VIDEO) += arch/sparc/video/
>
>   boot := arch/sparc/boot
>
> diff --git a/arch/sparc/video/Makefile b/arch/sparc/video/Makefile
> index d4d83f1702c61..9dd82880a027a 100644
> --- a/arch/sparc/video/Makefile
> +++ b/arch/sparc/video/Makefile
> @@ -1,3 +1,3 @@
>   # SPDX-License-Identifier: GPL-2.0-only
>
> -obj-$(CONFIG_FB_CORE) += fbdev.o
> +obj-y	+= fbdev.o
> diff --git a/arch/x86/Makefile b/arch/x86/Makefile
> index 15a5f4f2ff0aa..c0ea612c62ebe 100644
> --- a/arch/x86/Makefile
> +++ b/arch/x86/Makefile
> @@ -265,7 +265,7 @@ drivers-$(CONFIG_PCI)            += arch/x86/pci/
>   # suspend and hibernation support
>   drivers-$(CONFIG_PM) += arch/x86/power/
>
> -drivers-$(CONFIG_FB_CORE) += arch/x86/video/
> +drivers-$(CONFIG_VIDEO) += arch/x86/video/
>
>   ####
>   # boot loader support. Several targets are kept for legacy purposes
> diff --git a/arch/x86/video/Makefile b/arch/x86/video/Makefile
> index 5ebe48752ffc4..9dd82880a027a 100644
> --- a/arch/x86/video/Makefile
> +++ b/arch/x86/video/Makefile
> @@ -1,2 +1,3 @@
>   # SPDX-License-Identifier: GPL-2.0-only
> -obj-$(CONFIG_FB_CORE)		+= fbdev.o
> +
> +obj-y	+= fbdev.o
Thomas Zimmermann March 28, 2024, 1:21 p.m. UTC | #3
Hi

Am 28.03.24 um 13:39 schrieb Helge Deller:
> On 3/27/24 21:41, Thomas Zimmermann wrote:
>> Various Kconfig options selected the per-architecture helpers for
>> fbdev. But none of the contained code depends on fbdev. Standardize
>> on CONFIG_VIDEO, which will allow to add more general helpers for
>> video functionality.
>>
>> CONFIG_VIDEO protects each architecture's video/ directory.
>
> Your patch in general looks good.
> But is renaming the config option from CONFIG_FB_CORE to CONFIG_VIDEO
> the best choice?
> CONFIG_VIDEO might be mixed up with multimedia/video-streaming.
>
> Why not e.g. CONFIG_GRAPHICS_CORE?
> I'm fine with CONFIG_VIDEO as well, but if someone has a better idea
> we maybe should go with that instead now?

We already have CONFIG_VIDEO in drivers/video/Kconfig specifically for 
such low-level graphics code. For generic multimedia, we could have 
CONFIG_MEDIA, CONFIG_STREAMING, etc. rather than renaming an established 
Kconfig symbol.

Best regards
Thomas

>
> Helge
>
>> This
>> allows for the use of more fine-grained control for each directory's
>> files, such as the use of CONFIG_STI_CORE on parisc.
>>
>> v2:
>> - sparc: rebased onto Makefile changes
>>
>> Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
>> Cc: "James E.J. Bottomley" <James.Bottomley@HansenPartnership.com>
>> Cc: Helge Deller <deller@gmx.de>
>> Cc: "David S. Miller" <davem@davemloft.net>
>> Cc: Andreas Larsson <andreas@gaisler.com>
>> Cc: Thomas Gleixner <tglx@linutronix.de>
>> Cc: Ingo Molnar <mingo@redhat.com>
>> Cc: Borislav Petkov <bp@alien8.de>
>> Cc: Dave Hansen <dave.hansen@linux.intel.com>
>> Cc: x86@kernel.org
>> Cc: "H. Peter Anvin" <hpa@zytor.com>
>> ---
>>   arch/parisc/Makefile      | 2 +-
>>   arch/sparc/Makefile       | 4 ++--
>>   arch/sparc/video/Makefile | 2 +-
>>   arch/x86/Makefile         | 2 +-
>>   arch/x86/video/Makefile   | 3 ++-
>>   5 files changed, 7 insertions(+), 6 deletions(-)
>>
>> diff --git a/arch/parisc/Makefile b/arch/parisc/Makefile
>> index 316f84f1d15c8..21b8166a68839 100644
>> --- a/arch/parisc/Makefile
>> +++ b/arch/parisc/Makefile
>> @@ -119,7 +119,7 @@ export LIBGCC
>>
>>   libs-y    += arch/parisc/lib/ $(LIBGCC)
>>
>> -drivers-y += arch/parisc/video/
>> +drivers-$(CONFIG_VIDEO) += arch/parisc/video/
>>
>>   boot    := arch/parisc/boot
>>
>> diff --git a/arch/sparc/Makefile b/arch/sparc/Makefile
>> index 2a03daa68f285..757451c3ea1df 100644
>> --- a/arch/sparc/Makefile
>> +++ b/arch/sparc/Makefile
>> @@ -59,8 +59,8 @@ endif
>>   libs-y                 += arch/sparc/prom/
>>   libs-y                 += arch/sparc/lib/
>>
>> -drivers-$(CONFIG_PM) += arch/sparc/power/
>> -drivers-$(CONFIG_FB_CORE) += arch/sparc/video/
>> +drivers-$(CONFIG_PM)    += arch/sparc/power/
>> +drivers-$(CONFIG_VIDEO) += arch/sparc/video/
>>
>>   boot := arch/sparc/boot
>>
>> diff --git a/arch/sparc/video/Makefile b/arch/sparc/video/Makefile
>> index d4d83f1702c61..9dd82880a027a 100644
>> --- a/arch/sparc/video/Makefile
>> +++ b/arch/sparc/video/Makefile
>> @@ -1,3 +1,3 @@
>>   # SPDX-License-Identifier: GPL-2.0-only
>>
>> -obj-$(CONFIG_FB_CORE) += fbdev.o
>> +obj-y    += fbdev.o
>> diff --git a/arch/x86/Makefile b/arch/x86/Makefile
>> index 15a5f4f2ff0aa..c0ea612c62ebe 100644
>> --- a/arch/x86/Makefile
>> +++ b/arch/x86/Makefile
>> @@ -265,7 +265,7 @@ drivers-$(CONFIG_PCI)            += arch/x86/pci/
>>   # suspend and hibernation support
>>   drivers-$(CONFIG_PM) += arch/x86/power/
>>
>> -drivers-$(CONFIG_FB_CORE) += arch/x86/video/
>> +drivers-$(CONFIG_VIDEO) += arch/x86/video/
>>
>>   ####
>>   # boot loader support. Several targets are kept for legacy purposes
>> diff --git a/arch/x86/video/Makefile b/arch/x86/video/Makefile
>> index 5ebe48752ffc4..9dd82880a027a 100644
>> --- a/arch/x86/video/Makefile
>> +++ b/arch/x86/video/Makefile
>> @@ -1,2 +1,3 @@
>>   # SPDX-License-Identifier: GPL-2.0-only
>> -obj-$(CONFIG_FB_CORE)        += fbdev.o
>> +
>> +obj-y    += fbdev.o
>
diff mbox series

Patch

diff --git a/arch/parisc/Makefile b/arch/parisc/Makefile
index 316f84f1d15c8..21b8166a68839 100644
--- a/arch/parisc/Makefile
+++ b/arch/parisc/Makefile
@@ -119,7 +119,7 @@  export LIBGCC
 
 libs-y	+= arch/parisc/lib/ $(LIBGCC)
 
-drivers-y += arch/parisc/video/
+drivers-$(CONFIG_VIDEO) += arch/parisc/video/
 
 boot	:= arch/parisc/boot
 
diff --git a/arch/sparc/Makefile b/arch/sparc/Makefile
index 2a03daa68f285..757451c3ea1df 100644
--- a/arch/sparc/Makefile
+++ b/arch/sparc/Makefile
@@ -59,8 +59,8 @@  endif
 libs-y                 += arch/sparc/prom/
 libs-y                 += arch/sparc/lib/
 
-drivers-$(CONFIG_PM) += arch/sparc/power/
-drivers-$(CONFIG_FB_CORE) += arch/sparc/video/
+drivers-$(CONFIG_PM)    += arch/sparc/power/
+drivers-$(CONFIG_VIDEO) += arch/sparc/video/
 
 boot := arch/sparc/boot
 
diff --git a/arch/sparc/video/Makefile b/arch/sparc/video/Makefile
index d4d83f1702c61..9dd82880a027a 100644
--- a/arch/sparc/video/Makefile
+++ b/arch/sparc/video/Makefile
@@ -1,3 +1,3 @@ 
 # SPDX-License-Identifier: GPL-2.0-only
 
-obj-$(CONFIG_FB_CORE) += fbdev.o
+obj-y	+= fbdev.o
diff --git a/arch/x86/Makefile b/arch/x86/Makefile
index 15a5f4f2ff0aa..c0ea612c62ebe 100644
--- a/arch/x86/Makefile
+++ b/arch/x86/Makefile
@@ -265,7 +265,7 @@  drivers-$(CONFIG_PCI)            += arch/x86/pci/
 # suspend and hibernation support
 drivers-$(CONFIG_PM) += arch/x86/power/
 
-drivers-$(CONFIG_FB_CORE) += arch/x86/video/
+drivers-$(CONFIG_VIDEO) += arch/x86/video/
 
 ####
 # boot loader support. Several targets are kept for legacy purposes
diff --git a/arch/x86/video/Makefile b/arch/x86/video/Makefile
index 5ebe48752ffc4..9dd82880a027a 100644
--- a/arch/x86/video/Makefile
+++ b/arch/x86/video/Makefile
@@ -1,2 +1,3 @@ 
 # SPDX-License-Identifier: GPL-2.0-only
-obj-$(CONFIG_FB_CORE)		+= fbdev.o
+
+obj-y	+= fbdev.o