Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

arch: Rename fbdev header and source files

The per-architecture fbdev code has no dependencies on fbdev and can
be used for any video-related subsystem. Rename the files to 'video'.
Use video-sti.c on parisc as the source file depends on CONFIG_STI_CORE.

On arc, arm, arm64, sh, and um the asm header file is an empty wrapper
around the file in asm-generic. Let Kbuild generate the file. The build
system does this automatically. Only um needs to generate video.h
explicitly, so that it overrides the host architecture's header. The
latter would otherwise interfere with the build.

Further update all includes statements, include guards, and Makefiles.
Also update a few strings and comments to refer to video instead of
fbdev.

v3:
- arc, arm, arm64, sh: generate asm header via build system (Sam,
Helge, Arnd)
- um: rename fb.h to video.h
- fix typo in commit message (Sam)

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Sam Ravnborg <sam@ravnborg.org>
Cc: Vineet Gupta <vgupta@kernel.org>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Will Deacon <will@kernel.org>
Cc: Huacai Chen <chenhuacai@kernel.org>
Cc: WANG Xuerui <kernel@xen0n.name>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Cc: "James E.J. Bottomley" <James.Bottomley@HansenPartnership.com>
Cc: Helge Deller <deller@gmx.de>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: Nicholas Piggin <npiggin@gmail.com>
Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
Cc: Rich Felker <dalias@libc.org>
Cc: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.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>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>

authored by

Thomas Zimmermann and committed by
Arnd Bergmann
2fd001cd f178e96d

+45 -75
-8
arch/arc/include/asm/fb.h
··· 1 - /* SPDX-License-Identifier: GPL-2.0 */ 2 - 3 - #ifndef _ASM_FB_H_ 4 - #define _ASM_FB_H_ 5 - 6 - #include <asm-generic/fb.h> 7 - 8 - #endif /* _ASM_FB_H_ */
-6
arch/arm/include/asm/fb.h
··· 1 - #ifndef _ASM_FB_H_ 2 - #define _ASM_FB_H_ 3 - 4 - #include <asm-generic/fb.h> 5 - 6 - #endif /* _ASM_FB_H_ */
-10
arch/arm64/include/asm/fb.h
··· 1 - /* SPDX-License-Identifier: GPL-2.0-only */ 2 - /* 3 - * Copyright (C) 2012 ARM Ltd. 4 - */ 5 - #ifndef __ASM_FB_H_ 6 - #define __ASM_FB_H_ 7 - 8 - #include <asm-generic/fb.h> 9 - 10 - #endif /* __ASM_FB_H_ */
+4 -4
arch/loongarch/include/asm/fb.h arch/loongarch/include/asm/video.h
··· 2 2 /* 3 3 * Copyright (C) 2020-2022 Loongson Technology Corporation Limited 4 4 */ 5 - #ifndef _ASM_FB_H_ 6 - #define _ASM_FB_H_ 5 + #ifndef _ASM_VIDEO_H_ 6 + #define _ASM_VIDEO_H_ 7 7 8 8 #include <linux/compiler.h> 9 9 #include <linux/string.h> ··· 26 26 } 27 27 #define fb_memset fb_memset_io 28 28 29 - #include <asm-generic/fb.h> 29 + #include <asm-generic/video.h> 30 30 31 - #endif /* _ASM_FB_H_ */ 31 + #endif /* _ASM_VIDEO_H_ */
+4 -4
arch/m68k/include/asm/fb.h arch/m68k/include/asm/video.h
··· 1 1 /* SPDX-License-Identifier: GPL-2.0 */ 2 - #ifndef _ASM_FB_H_ 3 - #define _ASM_FB_H_ 2 + #ifndef _ASM_VIDEO_H_ 3 + #define _ASM_VIDEO_H_ 4 4 5 5 #include <asm/page.h> 6 6 #include <asm/setup.h> ··· 27 27 } 28 28 #define pgprot_framebuffer pgprot_framebuffer 29 29 30 - #include <asm-generic/fb.h> 30 + #include <asm-generic/video.h> 31 31 32 - #endif /* _ASM_FB_H_ */ 32 + #endif /* _ASM_VIDEO_H_ */
+6 -6
arch/mips/include/asm/fb.h arch/mips/include/asm/video.h
··· 1 - #ifndef _ASM_FB_H_ 2 - #define _ASM_FB_H_ 1 + #ifndef _ASM_VIDEO_H_ 2 + #define _ASM_VIDEO_H_ 3 3 4 4 #include <asm/page.h> 5 5 ··· 13 13 14 14 /* 15 15 * MIPS doesn't define __raw_ I/O macros, so the helpers 16 - * in <asm-generic/fb.h> don't generate fb_readq() and 17 - * fb_write(). We have to provide them here. 16 + * in <asm-generic/video.h> don't generate fb_readq() and 17 + * fb_writeq(). We have to provide them here. 18 18 * 19 19 * TODO: Convert MIPS to generic I/O. The helpers below can 20 20 * then be removed. ··· 33 33 #define fb_writeq fb_writeq 34 34 #endif 35 35 36 - #include <asm-generic/fb.h> 36 + #include <asm-generic/video.h> 37 37 38 - #endif /* _ASM_FB_H_ */ 38 + #endif /* _ASM_VIDEO_H_ */
+4 -4
arch/parisc/include/asm/fb.h arch/parisc/include/asm/video.h
··· 1 1 /* SPDX-License-Identifier: GPL-2.0 */ 2 - #ifndef _ASM_FB_H_ 3 - #define _ASM_FB_H_ 2 + #ifndef _ASM_VIDEO_H_ 3 + #define _ASM_VIDEO_H_ 4 4 5 5 #include <linux/types.h> 6 6 ··· 11 11 #define video_is_primary_device video_is_primary_device 12 12 #endif 13 13 14 - #include <asm-generic/fb.h> 14 + #include <asm-generic/video.h> 15 15 16 - #endif /* _ASM_FB_H_ */ 16 + #endif /* _ASM_VIDEO_H_ */
+1 -1
arch/parisc/video/Makefile
··· 1 1 # SPDX-License-Identifier: GPL-2.0-only 2 2 3 - obj-$(CONFIG_STI_CORE) += fbdev.o 3 + obj-$(CONFIG_STI_CORE) += video-sti.o
+1 -1
arch/parisc/video/fbdev.c arch/parisc/video/video-sti.c
··· 9 9 10 10 #include <video/sticore.h> 11 11 12 - #include <asm/fb.h> 12 + #include <asm/video.h> 13 13 14 14 bool video_is_primary_device(struct device *dev) 15 15 {
+4 -4
arch/powerpc/include/asm/fb.h arch/powerpc/include/asm/video.h
··· 1 1 /* SPDX-License-Identifier: GPL-2.0 */ 2 - #ifndef _ASM_FB_H_ 3 - #define _ASM_FB_H_ 2 + #ifndef _ASM_VIDEO_H_ 3 + #define _ASM_VIDEO_H_ 4 4 5 5 #include <asm/page.h> 6 6 ··· 12 12 } 13 13 #define pgprot_framebuffer pgprot_framebuffer 14 14 15 - #include <asm-generic/fb.h> 15 + #include <asm-generic/video.h> 16 16 17 - #endif /* _ASM_FB_H_ */ 17 + #endif /* _ASM_VIDEO_H_ */
+1 -1
arch/powerpc/kernel/pci-common.c
··· 517 517 } 518 518 519 519 /* 520 - * This one is used by /dev/mem and fbdev who have no clue about the 520 + * This one is used by /dev/mem and video who have no clue about the 521 521 * PCI device, it tries to find the PCI device first and calls the 522 522 * above routine 523 523 */
-7
arch/sh/include/asm/fb.h
··· 1 - /* SPDX-License-Identifier: GPL-2.0 */ 2 - #ifndef _ASM_FB_H_ 3 - #define _ASM_FB_H_ 4 - 5 - #include <asm-generic/fb.h> 6 - 7 - #endif /* _ASM_FB_H_ */
+4 -4
arch/sparc/include/asm/fb.h arch/sparc/include/asm/video.h
··· 1 1 /* SPDX-License-Identifier: GPL-2.0 */ 2 - #ifndef _SPARC_FB_H_ 3 - #define _SPARC_FB_H_ 2 + #ifndef _SPARC_VIDEO_H_ 3 + #define _SPARC_VIDEO_H_ 4 4 5 5 #include <linux/io.h> 6 6 #include <linux/types.h> ··· 40 40 } 41 41 #define fb_memset fb_memset_io 42 42 43 - #include <asm-generic/fb.h> 43 + #include <asm-generic/video.h> 44 44 45 - #endif /* _SPARC_FB_H_ */ 45 + #endif /* _SPARC_VIDEO_H_ */
+1 -1
arch/sparc/video/Makefile
··· 1 1 # SPDX-License-Identifier: GPL-2.0-only 2 2 3 - obj-y += fbdev.o 3 + obj-y += video.o
+2 -2
arch/sparc/video/fbdev.c arch/sparc/video/video.c
··· 4 4 #include <linux/device.h> 5 5 #include <linux/module.h> 6 6 7 - #include <asm/fb.h> 8 7 #include <asm/prom.h> 8 + #include <asm/video.h> 9 9 10 10 bool video_is_primary_device(struct device *dev) 11 11 { ··· 21 21 } 22 22 EXPORT_SYMBOL(video_is_primary_device); 23 23 24 - MODULE_DESCRIPTION("Sparc fbdev helpers"); 24 + MODULE_DESCRIPTION("Sparc video helpers"); 25 25 MODULE_LICENSE("GPL");
+1 -1
arch/um/include/asm/Kbuild
··· 8 8 generic-y += emergency-restart.h 9 9 generic-y += exec.h 10 10 generic-y += extable.h 11 - generic-y += fb.h 12 11 generic-y += ftrace.h 13 12 generic-y += hw_irq.h 14 13 generic-y += irq_regs.h ··· 27 28 generic-y += kprobes.h 28 29 generic-y += mm_hooks.h 29 30 generic-y += vga.h 31 + generic-y += video.h
+4 -4
arch/x86/include/asm/fb.h arch/x86/include/asm/video.h
··· 1 1 /* SPDX-License-Identifier: GPL-2.0 */ 2 - #ifndef _ASM_X86_FB_H 3 - #define _ASM_X86_FB_H 2 + #ifndef _ASM_X86_VIDEO_H 3 + #define _ASM_X86_VIDEO_H 4 4 5 5 #include <linux/types.h> 6 6 ··· 16 16 bool video_is_primary_device(struct device *dev); 17 17 #define video_is_primary_device video_is_primary_device 18 18 19 - #include <asm-generic/fb.h> 19 + #include <asm-generic/video.h> 20 20 21 - #endif /* _ASM_X86_FB_H */ 21 + #endif /* _ASM_X86_VIDEO_H */
+1 -1
arch/x86/video/Makefile
··· 1 1 # SPDX-License-Identifier: GPL-2.0-only 2 2 3 - obj-y += fbdev.o 3 + obj-y += video.o
+2 -1
arch/x86/video/fbdev.c arch/x86/video/video.c
··· 10 10 #include <linux/module.h> 11 11 #include <linux/pci.h> 12 12 #include <linux/vgaarb.h> 13 - #include <asm/fb.h> 13 + 14 + #include <asm/video.h> 14 15 15 16 pgprot_t pgprot_framebuffer(pgprot_t prot, 16 17 unsigned long vm_start, unsigned long vm_end,
+1 -1
include/asm-generic/Kbuild
··· 22 22 mandatory-y += dma.h 23 23 mandatory-y += emergency-restart.h 24 24 mandatory-y += exec.h 25 - mandatory-y += fb.h 26 25 mandatory-y += ftrace.h 27 26 mandatory-y += futex.h 28 27 mandatory-y += hardirq.h ··· 61 62 mandatory-y += unaligned.h 62 63 mandatory-y += vermagic.h 63 64 mandatory-y += vga.h 65 + mandatory-y += video.h 64 66 mandatory-y += word-at-a-time.h 65 67 mandatory-y += xor.h
+3 -3
include/asm-generic/fb.h include/asm-generic/video.h
··· 1 1 /* SPDX-License-Identifier: GPL-2.0 */ 2 2 3 - #ifndef __ASM_GENERIC_FB_H_ 4 - #define __ASM_GENERIC_FB_H_ 3 + #ifndef __ASM_GENERIC_VIDEO_H_ 4 + #define __ASM_GENERIC_VIDEO_H_ 5 5 6 6 /* 7 7 * Only include this header file from your architecture's <asm/fb.h>. ··· 133 133 #define fb_memset fb_memset_io 134 134 #endif 135 135 136 - #endif /* __ASM_GENERIC_FB_H_ */ 136 + #endif /* __ASM_GENERIC_VIDEO_H_ */
+1 -1
include/linux/fb.h
··· 12 12 #include <linux/types.h> 13 13 #include <linux/workqueue.h> 14 14 15 - #include <asm/fb.h> 15 + #include <asm/video.h> 16 16 17 17 struct backlight_device; 18 18 struct device;