On 3/27/24 21:41, Thomas Zimmermann wrote: > 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. > > Further update all includes statements, includ guards, and Makefiles. > Also update a few strings and comments to refer to video instead of > fbdev. > > Signed-off-by: Thomas Zimmermann > Cc: Vineet Gupta > Cc: Catalin Marinas > Cc: Will Deacon > Cc: Huacai Chen > Cc: WANG Xuerui > Cc: Geert Uytterhoeven > Cc: Thomas Bogendoerfer > Cc: "James E.J. Bottomley" > Cc: Helge Deller > Cc: Michael Ellerman > Cc: Nicholas Piggin > Cc: Yoshinori Sato > Cc: Rich Felker > Cc: John Paul Adrian Glaubitz > Cc: "David S. Miller" > Cc: Andreas Larsson > Cc: Thomas Gleixner > Cc: Ingo Molnar > Cc: Borislav Petkov > Cc: Dave Hansen > Cc: x86@kernel.org > Cc: "H. Peter Anvin" > --- > arch/arc/include/asm/fb.h | 8 -------- > arch/arc/include/asm/video.h | 8 ++++++++ > arch/arm/include/asm/fb.h | 6 ------ > arch/arm/include/asm/video.h | 6 ++++++ > arch/arm64/include/asm/fb.h | 10 ---------- > arch/arm64/include/asm/video.h | 10 ++++++++++ > arch/loongarch/include/asm/{fb.h =3D> video.h} | 8 ++++---- > arch/m68k/include/asm/{fb.h =3D> video.h} | 8 ++++---- > arch/mips/include/asm/{fb.h =3D> video.h} | 12 ++++++------ > arch/parisc/include/asm/{fb.h =3D> video.h} | 8 ++++---- > arch/parisc/video/Makefile | 2 +- > arch/parisc/video/{fbdev.c =3D> video-sti.c} | 2 +- > arch/powerpc/include/asm/{fb.h =3D> video.h} | 8 ++++---- > arch/powerpc/kernel/pci-common.c | 2 +- > arch/sh/include/asm/fb.h | 7 ------- > arch/sh/include/asm/video.h | 7 +++++++ > arch/sparc/include/asm/{fb.h =3D> video.h} | 8 ++++---- > arch/sparc/video/Makefile | 2 +- > arch/sparc/video/{fbdev.c =3D> video.c} | 4 ++-- > arch/x86/include/asm/{fb.h =3D> video.h} | 8 ++++---- > arch/x86/video/Makefile | 2 +- > arch/x86/video/{fbdev.c =3D> video.c} | 3 ++- > include/asm-generic/Kbuild | 2 +- > include/asm-generic/{fb.h =3D> video.h} | 6 +++--- > include/linux/fb.h | 2 +- > 25 files changed, 75 insertions(+), 74 deletions(-) > delete mode 100644 arch/arc/include/asm/fb.h > create mode 100644 arch/arc/include/asm/video.h > delete mode 100644 arch/arm/include/asm/fb.h > create mode 100644 arch/arm/include/asm/video.h > delete mode 100644 arch/arm64/include/asm/fb.h > create mode 100644 arch/arm64/include/asm/video.h > rename arch/loongarch/include/asm/{fb.h =3D> video.h} (86%) > rename arch/m68k/include/asm/{fb.h =3D> video.h} (86%) > rename arch/mips/include/asm/{fb.h =3D> video.h} (76%) > rename arch/parisc/include/asm/{fb.h =3D> video.h} (68%) > rename arch/parisc/video/{fbdev.c =3D> video-sti.c} (96%) > rename arch/powerpc/include/asm/{fb.h =3D> video.h} (76%) > delete mode 100644 arch/sh/include/asm/fb.h > create mode 100644 arch/sh/include/asm/video.h > rename arch/sparc/include/asm/{fb.h =3D> video.h} (89%) > rename arch/sparc/video/{fbdev.c =3D> video.c} (86%) > rename arch/x86/include/asm/{fb.h =3D> video.h} (77%) > rename arch/x86/video/{fbdev.c =3D> video.c} (97%) > rename include/asm-generic/{fb.h =3D> video.h} (96%) > > diff --git a/arch/arc/include/asm/fb.h b/arch/arc/include/asm/fb.h > deleted file mode 100644 > index 9c2383d29cbb9..0000000000000 > --- a/arch/arc/include/asm/fb.h > +++ /dev/null > @@ -1,8 +0,0 @@ > -/* SPDX-License-Identifier: GPL-2.0 */ > - > -#ifndef _ASM_FB_H_ > -#define _ASM_FB_H_ > - > -#include > - > -#endif /* _ASM_FB_H_ */ > diff --git a/arch/arc/include/asm/video.h b/arch/arc/include/asm/video.h > new file mode 100644 > index 0000000000000..8ff7263727fe7 > --- /dev/null > +++ b/arch/arc/include/asm/video.h > @@ -0,0 +1,8 @@ > +/* SPDX-License-Identifier: GPL-2.0 */ > + > +#ifndef _ASM_VIDEO_H_ > +#define _ASM_VIDEO_H_ > + > +#include > + > +#endif /* _ASM_VIDEO_H_ */ I wonder, since that file simply #includes the generic version, wasn't there a possibility that kbuild could symlink the generic version for us? Does it need to be mandatory in include/asm-generic/Kbuild ? Same applies to a few other files below. Helge > diff --git a/arch/arm/include/asm/fb.h b/arch/arm/include/asm/fb.h > deleted file mode 100644 > index ce20a43c30339..0000000000000 > --- a/arch/arm/include/asm/fb.h > +++ /dev/null > @@ -1,6 +0,0 @@ > -#ifndef _ASM_FB_H_ > -#define _ASM_FB_H_ > - > -#include > - > -#endif /* _ASM_FB_H_ */ > diff --git a/arch/arm/include/asm/video.h b/arch/arm/include/asm/video.h > new file mode 100644 > index 0000000000000..f570565366e67 > --- /dev/null > +++ b/arch/arm/include/asm/video.h > @@ -0,0 +1,6 @@ > +#ifndef _ASM_VIDEO_H_ > +#define _ASM_VIDEO_H_ > + > +#include > + > +#endif /* _ASM_VIDEO_H_ */ > diff --git a/arch/arm64/include/asm/fb.h b/arch/arm64/include/asm/fb.h > deleted file mode 100644 > index 1a495d8fb2ce0..0000000000000 > --- a/arch/arm64/include/asm/fb.h > +++ /dev/null > @@ -1,10 +0,0 @@ > -/* SPDX-License-Identifier: GPL-2.0-only */ > -/* > - * Copyright (C) 2012 ARM Ltd. > - */ > -#ifndef __ASM_FB_H_ > -#define __ASM_FB_H_ > - > -#include > - > -#endif /* __ASM_FB_H_ */ > diff --git a/arch/arm64/include/asm/video.h b/arch/arm64/include/asm/vid= eo.h > new file mode 100644 > index 0000000000000..fe0e74983f4d9 > --- /dev/null > +++ b/arch/arm64/include/asm/video.h > @@ -0,0 +1,10 @@ > +/* SPDX-License-Identifier: GPL-2.0-only */ > +/* > + * Copyright (C) 2012 ARM Ltd. > + */ > +#ifndef __ASM_VIDEO_H_ > +#define __ASM_VIDEO_H_ > + > +#include > + > +#endif /* __ASM_VIDEO_H_ */ > diff --git a/arch/loongarch/include/asm/fb.h b/arch/loongarch/include/as= m/video.h > similarity index 86% > rename from arch/loongarch/include/asm/fb.h > rename to arch/loongarch/include/asm/video.h > index 0b218b10a9ec3..9f76845f2d4fd 100644 > --- a/arch/loongarch/include/asm/fb.h > +++ b/arch/loongarch/include/asm/video.h > @@ -2,8 +2,8 @@ > /* > * Copyright (C) 2020-2022 Loongson Technology Corporation Limited > */ > -#ifndef _ASM_FB_H_ > -#define _ASM_FB_H_ > +#ifndef _ASM_VIDEO_H_ > +#define _ASM_VIDEO_H_ > > #include > #include > @@ -26,6 +26,6 @@ static inline void fb_memset_io(volatile void __iomem = *addr, int c, size_t n) > } > #define fb_memset fb_memset_io > > -#include > +#include > > -#endif /* _ASM_FB_H_ */ > +#endif /* _ASM_VIDEO_H_ */ > diff --git a/arch/m68k/include/asm/fb.h b/arch/m68k/include/asm/video.h > similarity index 86% > rename from arch/m68k/include/asm/fb.h > rename to arch/m68k/include/asm/video.h > index 9941b7434b696..6cf2194c413d8 100644 > --- a/arch/m68k/include/asm/fb.h > +++ b/arch/m68k/include/asm/video.h > @@ -1,6 +1,6 @@ > /* SPDX-License-Identifier: GPL-2.0 */ > -#ifndef _ASM_FB_H_ > -#define _ASM_FB_H_ > +#ifndef _ASM_VIDEO_H_ > +#define _ASM_VIDEO_H_ > > #include > #include > @@ -27,6 +27,6 @@ static inline pgprot_t pgprot_framebuffer(pgprot_t pro= t, > } > #define pgprot_framebuffer pgprot_framebuffer > > -#include > +#include > > -#endif /* _ASM_FB_H_ */ > +#endif /* _ASM_VIDEO_H_ */ > diff --git a/arch/mips/include/asm/fb.h b/arch/mips/include/asm/video.h > similarity index 76% > rename from arch/mips/include/asm/fb.h > rename to arch/mips/include/asm/video.h > index d98d6681d64ec..007c106d980fd 100644 > --- a/arch/mips/include/asm/fb.h > +++ b/arch/mips/include/asm/video.h > @@ -1,5 +1,5 @@ > -#ifndef _ASM_FB_H_ > -#define _ASM_FB_H_ > +#ifndef _ASM_VIDEO_H_ > +#define _ASM_VIDEO_H_ > > #include > > @@ -13,8 +13,8 @@ static inline pgprot_t pgprot_framebuffer(pgprot_t pro= t, > > /* > * MIPS doesn't define __raw_ I/O macros, so the helpers > - * in don't generate fb_readq() and > - * fb_write(). We have to provide them here. > + * in don't generate fb_readq() and > + * fb_writeq(). We have to provide them here. > * > * TODO: Convert MIPS to generic I/O. The helpers below can > * then be removed. > @@ -33,6 +33,6 @@ static inline void fb_writeq(u64 b, volatile void __io= mem *addr) > #define fb_writeq fb_writeq > #endif > > -#include > +#include > > -#endif /* _ASM_FB_H_ */ > +#endif /* _ASM_VIDEO_H_ */ > diff --git a/arch/parisc/include/asm/fb.h b/arch/parisc/include/asm/vide= o.h > similarity index 68% > rename from arch/parisc/include/asm/fb.h > rename to arch/parisc/include/asm/video.h > index ed2a195a3e762..c5dff3223194a 100644 > --- a/arch/parisc/include/asm/fb.h > +++ b/arch/parisc/include/asm/video.h > @@ -1,6 +1,6 @@ > /* SPDX-License-Identifier: GPL-2.0 */ > -#ifndef _ASM_FB_H_ > -#define _ASM_FB_H_ > +#ifndef _ASM_VIDEO_H_ > +#define _ASM_VIDEO_H_ > > #include > > @@ -11,6 +11,6 @@ bool video_is_primary_device(struct device *dev); > #define video_is_primary_device video_is_primary_device > #endif > > -#include > +#include > > -#endif /* _ASM_FB_H_ */ > +#endif /* _ASM_VIDEO_H_ */ > diff --git a/arch/parisc/video/Makefile b/arch/parisc/video/Makefile > index 16a73cce46612..b5db5b42880f8 100644 > --- a/arch/parisc/video/Makefile > +++ b/arch/parisc/video/Makefile > @@ -1,3 +1,3 @@ > # SPDX-License-Identifier: GPL-2.0-only > > -obj-$(CONFIG_STI_CORE) +=3D fbdev.o > +obj-$(CONFIG_STI_CORE) +=3D video-sti.o > diff --git a/arch/parisc/video/fbdev.c b/arch/parisc/video/video-sti.c > similarity index 96% > rename from arch/parisc/video/fbdev.c > rename to arch/parisc/video/video-sti.c > index 540fa0c919d59..564661e87093c 100644 > --- a/arch/parisc/video/fbdev.c > +++ b/arch/parisc/video/video-sti.c > @@ -9,7 +9,7 @@ > > #include