+++ /dev/null
-/* SPDX-License-Identifier: GPL-2.0 */
-
-#ifndef _ASM_FB_H_
-#define _ASM_FB_H_
-
-#include <asm-generic/fb.h>
-
-#endif /* _ASM_FB_H_ */
+++ /dev/null
-#ifndef _ASM_FB_H_
-#define _ASM_FB_H_
-
-#include <asm-generic/fb.h>
-
-#endif /* _ASM_FB_H_ */
+++ /dev/null
-/* SPDX-License-Identifier: GPL-2.0-only */
-/*
- * Copyright (C) 2012 ARM Ltd.
- */
-#ifndef __ASM_FB_H_
-#define __ASM_FB_H_
-
-#include <asm-generic/fb.h>
-
-#endif /* __ASM_FB_H_ */
+++ /dev/null
-/* SPDX-License-Identifier: GPL-2.0 */
-/*
- * Copyright (C) 2020-2022 Loongson Technology Corporation Limited
- */
-#ifndef _ASM_FB_H_
-#define _ASM_FB_H_
-
-#include <linux/compiler.h>
-#include <linux/string.h>
-
-static inline void fb_memcpy_fromio(void *to, const volatile void __iomem *from, size_t n)
-{
- memcpy(to, (void __force *)from, n);
-}
-#define fb_memcpy_fromio fb_memcpy_fromio
-
-static inline void fb_memcpy_toio(volatile void __iomem *to, const void *from, size_t n)
-{
- memcpy((void __force *)to, from, n);
-}
-#define fb_memcpy_toio fb_memcpy_toio
-
-static inline void fb_memset_io(volatile void __iomem *addr, int c, size_t n)
-{
- memset((void __force *)addr, c, n);
-}
-#define fb_memset fb_memset_io
-
-#include <asm-generic/fb.h>
-
-#endif /* _ASM_FB_H_ */
--- /dev/null
+/* SPDX-License-Identifier: GPL-2.0 */
+/*
+ * Copyright (C) 2020-2022 Loongson Technology Corporation Limited
+ */
+#ifndef _ASM_VIDEO_H_
+#define _ASM_VIDEO_H_
+
+#include <linux/compiler.h>
+#include <linux/string.h>
+
+static inline void fb_memcpy_fromio(void *to, const volatile void __iomem *from, size_t n)
+{
+ memcpy(to, (void __force *)from, n);
+}
+#define fb_memcpy_fromio fb_memcpy_fromio
+
+static inline void fb_memcpy_toio(volatile void __iomem *to, const void *from, size_t n)
+{
+ memcpy((void __force *)to, from, n);
+}
+#define fb_memcpy_toio fb_memcpy_toio
+
+static inline void fb_memset_io(volatile void __iomem *addr, int c, size_t n)
+{
+ memset((void __force *)addr, c, n);
+}
+#define fb_memset fb_memset_io
+
+#include <asm-generic/video.h>
+
+#endif /* _ASM_VIDEO_H_ */
+++ /dev/null
-/* SPDX-License-Identifier: GPL-2.0 */
-#ifndef _ASM_FB_H_
-#define _ASM_FB_H_
-
-#include <asm/page.h>
-#include <asm/setup.h>
-
-static inline pgprot_t pgprot_framebuffer(pgprot_t prot,
- unsigned long vm_start, unsigned long vm_end,
- unsigned long offset)
-{
-#ifdef CONFIG_MMU
-#ifdef CONFIG_SUN3
- pgprot_val(prot) |= SUN3_PAGE_NOCACHE;
-#else
- if (CPU_IS_020_OR_030)
- pgprot_val(prot) |= _PAGE_NOCACHE030;
- if (CPU_IS_040_OR_060) {
- pgprot_val(prot) &= _CACHEMASK040;
- /* Use no-cache mode, serialized */
- pgprot_val(prot) |= _PAGE_NOCACHE_S;
- }
-#endif /* CONFIG_SUN3 */
-#endif /* CONFIG_MMU */
-
- return prot;
-}
-#define pgprot_framebuffer pgprot_framebuffer
-
-#include <asm-generic/fb.h>
-
-#endif /* _ASM_FB_H_ */
--- /dev/null
+/* SPDX-License-Identifier: GPL-2.0 */
+#ifndef _ASM_VIDEO_H_
+#define _ASM_VIDEO_H_
+
+#include <asm/page.h>
+#include <asm/setup.h>
+
+static inline pgprot_t pgprot_framebuffer(pgprot_t prot,
+ unsigned long vm_start, unsigned long vm_end,
+ unsigned long offset)
+{
+#ifdef CONFIG_MMU
+#ifdef CONFIG_SUN3
+ pgprot_val(prot) |= SUN3_PAGE_NOCACHE;
+#else
+ if (CPU_IS_020_OR_030)
+ pgprot_val(prot) |= _PAGE_NOCACHE030;
+ if (CPU_IS_040_OR_060) {
+ pgprot_val(prot) &= _CACHEMASK040;
+ /* Use no-cache mode, serialized */
+ pgprot_val(prot) |= _PAGE_NOCACHE_S;
+ }
+#endif /* CONFIG_SUN3 */
+#endif /* CONFIG_MMU */
+
+ return prot;
+}
+#define pgprot_framebuffer pgprot_framebuffer
+
+#include <asm-generic/video.h>
+
+#endif /* _ASM_VIDEO_H_ */
+++ /dev/null
-#ifndef _ASM_FB_H_
-#define _ASM_FB_H_
-
-#include <asm/page.h>
-
-static inline pgprot_t pgprot_framebuffer(pgprot_t prot,
- unsigned long vm_start, unsigned long vm_end,
- unsigned long offset)
-{
- return pgprot_noncached(prot);
-}
-#define pgprot_framebuffer pgprot_framebuffer
-
-/*
- * MIPS doesn't define __raw_ I/O macros, so the helpers
- * in <asm-generic/fb.h> don't generate fb_readq() and
- * fb_write(). We have to provide them here.
- *
- * TODO: Convert MIPS to generic I/O. The helpers below can
- * then be removed.
- */
-#ifdef CONFIG_64BIT
-static inline u64 fb_readq(const volatile void __iomem *addr)
-{
- return __raw_readq(addr);
-}
-#define fb_readq fb_readq
-
-static inline void fb_writeq(u64 b, volatile void __iomem *addr)
-{
- __raw_writeq(b, addr);
-}
-#define fb_writeq fb_writeq
-#endif
-
-#include <asm-generic/fb.h>
-
-#endif /* _ASM_FB_H_ */
--- /dev/null
+#ifndef _ASM_VIDEO_H_
+#define _ASM_VIDEO_H_
+
+#include <asm/page.h>
+
+static inline pgprot_t pgprot_framebuffer(pgprot_t prot,
+ unsigned long vm_start, unsigned long vm_end,
+ unsigned long offset)
+{
+ return pgprot_noncached(prot);
+}
+#define pgprot_framebuffer pgprot_framebuffer
+
+/*
+ * MIPS doesn't define __raw_ I/O macros, so the helpers
+ * in <asm-generic/video.h> 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.
+ */
+#ifdef CONFIG_64BIT
+static inline u64 fb_readq(const volatile void __iomem *addr)
+{
+ return __raw_readq(addr);
+}
+#define fb_readq fb_readq
+
+static inline void fb_writeq(u64 b, volatile void __iomem *addr)
+{
+ __raw_writeq(b, addr);
+}
+#define fb_writeq fb_writeq
+#endif
+
+#include <asm-generic/video.h>
+
+#endif /* _ASM_VIDEO_H_ */
+++ /dev/null
-/* SPDX-License-Identifier: GPL-2.0 */
-#ifndef _ASM_FB_H_
-#define _ASM_FB_H_
-
-#include <linux/types.h>
-
-struct device;
-
-#if defined(CONFIG_STI_CORE)
-bool video_is_primary_device(struct device *dev);
-#define video_is_primary_device video_is_primary_device
-#endif
-
-#include <asm-generic/fb.h>
-
-#endif /* _ASM_FB_H_ */
--- /dev/null
+/* SPDX-License-Identifier: GPL-2.0 */
+#ifndef _ASM_VIDEO_H_
+#define _ASM_VIDEO_H_
+
+#include <linux/types.h>
+
+struct device;
+
+#if defined(CONFIG_STI_CORE)
+bool video_is_primary_device(struct device *dev);
+#define video_is_primary_device video_is_primary_device
+#endif
+
+#include <asm-generic/video.h>
+
+#endif /* _ASM_VIDEO_H_ */
# SPDX-License-Identifier: GPL-2.0-only
-obj-$(CONFIG_STI_CORE) += fbdev.o
+obj-$(CONFIG_STI_CORE) += video-sti.o
+++ /dev/null
-// SPDX-License-Identifier: GPL-2.0-only
-/*
- * Copyright (C) 2000 Philipp Rumpf <prumpf@tux.org>
- * Copyright (C) 2001-2020 Helge Deller <deller@gmx.de>
- * Copyright (C) 2001-2002 Thomas Bogendoerfer <tsbogend@alpha.franken.de>
- */
-
-#include <linux/module.h>
-
-#include <video/sticore.h>
-
-#include <asm/fb.h>
-
-bool video_is_primary_device(struct device *dev)
-{
- struct sti_struct *sti;
-
- sti = sti_get_rom(0);
-
- /* if no built-in graphics card found, allow any fb driver as default */
- if (!sti)
- return true;
-
- /* return true if it's the default built-in framebuffer driver */
- return (sti->dev == dev);
-}
-EXPORT_SYMBOL(video_is_primary_device);
--- /dev/null
+// SPDX-License-Identifier: GPL-2.0-only
+/*
+ * Copyright (C) 2000 Philipp Rumpf <prumpf@tux.org>
+ * Copyright (C) 2001-2020 Helge Deller <deller@gmx.de>
+ * Copyright (C) 2001-2002 Thomas Bogendoerfer <tsbogend@alpha.franken.de>
+ */
+
+#include <linux/module.h>
+
+#include <video/sticore.h>
+
+#include <asm/video.h>
+
+bool video_is_primary_device(struct device *dev)
+{
+ struct sti_struct *sti;
+
+ sti = sti_get_rom(0);
+
+ /* if no built-in graphics card found, allow any fb driver as default */
+ if (!sti)
+ return true;
+
+ /* return true if it's the default built-in framebuffer driver */
+ return (sti->dev == dev);
+}
+EXPORT_SYMBOL(video_is_primary_device);
+++ /dev/null
-/* SPDX-License-Identifier: GPL-2.0 */
-#ifndef _ASM_FB_H_
-#define _ASM_FB_H_
-
-#include <asm/page.h>
-
-static inline pgprot_t pgprot_framebuffer(pgprot_t prot,
- unsigned long vm_start, unsigned long vm_end,
- unsigned long offset)
-{
- return __phys_mem_access_prot(PHYS_PFN(offset), vm_end - vm_start, prot);
-}
-#define pgprot_framebuffer pgprot_framebuffer
-
-#include <asm-generic/fb.h>
-
-#endif /* _ASM_FB_H_ */
--- /dev/null
+/* SPDX-License-Identifier: GPL-2.0 */
+#ifndef _ASM_VIDEO_H_
+#define _ASM_VIDEO_H_
+
+#include <asm/page.h>
+
+static inline pgprot_t pgprot_framebuffer(pgprot_t prot,
+ unsigned long vm_start, unsigned long vm_end,
+ unsigned long offset)
+{
+ return __phys_mem_access_prot(PHYS_PFN(offset), vm_end - vm_start, prot);
+}
+#define pgprot_framebuffer pgprot_framebuffer
+
+#include <asm-generic/video.h>
+
+#endif /* _ASM_VIDEO_H_ */
}
/*
- * This one is used by /dev/mem and fbdev who have no clue about the
+ * This one is used by /dev/mem and video who have no clue about the
* PCI device, it tries to find the PCI device first and calls the
* above routine
*/
+++ /dev/null
-/* SPDX-License-Identifier: GPL-2.0 */
-#ifndef _ASM_FB_H_
-#define _ASM_FB_H_
-
-#include <asm-generic/fb.h>
-
-#endif /* _ASM_FB_H_ */
+++ /dev/null
-/* SPDX-License-Identifier: GPL-2.0 */
-#ifndef _SPARC_FB_H_
-#define _SPARC_FB_H_
-
-#include <linux/io.h>
-#include <linux/types.h>
-
-#include <asm/page.h>
-
-struct device;
-
-#ifdef CONFIG_SPARC32
-static inline pgprot_t pgprot_framebuffer(pgprot_t prot,
- unsigned long vm_start, unsigned long vm_end,
- unsigned long offset)
-{
- return prot;
-}
-#define pgprot_framebuffer pgprot_framebuffer
-#endif
-
-bool video_is_primary_device(struct device *dev);
-#define video_is_primary_device video_is_primary_device
-
-static inline void fb_memcpy_fromio(void *to, const volatile void __iomem *from, size_t n)
-{
- sbus_memcpy_fromio(to, from, n);
-}
-#define fb_memcpy_fromio fb_memcpy_fromio
-
-static inline void fb_memcpy_toio(volatile void __iomem *to, const void *from, size_t n)
-{
- sbus_memcpy_toio(to, from, n);
-}
-#define fb_memcpy_toio fb_memcpy_toio
-
-static inline void fb_memset_io(volatile void __iomem *addr, int c, size_t n)
-{
- sbus_memset_io(addr, c, n);
-}
-#define fb_memset fb_memset_io
-
-#include <asm-generic/fb.h>
-
-#endif /* _SPARC_FB_H_ */
--- /dev/null
+/* SPDX-License-Identifier: GPL-2.0 */
+#ifndef _SPARC_VIDEO_H_
+#define _SPARC_VIDEO_H_
+
+#include <linux/io.h>
+#include <linux/types.h>
+
+#include <asm/page.h>
+
+struct device;
+
+#ifdef CONFIG_SPARC32
+static inline pgprot_t pgprot_framebuffer(pgprot_t prot,
+ unsigned long vm_start, unsigned long vm_end,
+ unsigned long offset)
+{
+ return prot;
+}
+#define pgprot_framebuffer pgprot_framebuffer
+#endif
+
+bool video_is_primary_device(struct device *dev);
+#define video_is_primary_device video_is_primary_device
+
+static inline void fb_memcpy_fromio(void *to, const volatile void __iomem *from, size_t n)
+{
+ sbus_memcpy_fromio(to, from, n);
+}
+#define fb_memcpy_fromio fb_memcpy_fromio
+
+static inline void fb_memcpy_toio(volatile void __iomem *to, const void *from, size_t n)
+{
+ sbus_memcpy_toio(to, from, n);
+}
+#define fb_memcpy_toio fb_memcpy_toio
+
+static inline void fb_memset_io(volatile void __iomem *addr, int c, size_t n)
+{
+ sbus_memset_io(addr, c, n);
+}
+#define fb_memset fb_memset_io
+
+#include <asm-generic/video.h>
+
+#endif /* _SPARC_VIDEO_H_ */
# SPDX-License-Identifier: GPL-2.0-only
-obj-y += fbdev.o
+obj-y += video.o
+++ /dev/null
-// SPDX-License-Identifier: GPL-2.0
-
-#include <linux/console.h>
-#include <linux/device.h>
-#include <linux/module.h>
-
-#include <asm/fb.h>
-#include <asm/prom.h>
-
-bool video_is_primary_device(struct device *dev)
-{
- struct device_node *node = dev->of_node;
-
- if (console_set_on_cmdline)
- return false;
-
- if (node && node == of_console_device)
- return true;
-
- return false;
-}
-EXPORT_SYMBOL(video_is_primary_device);
-
-MODULE_DESCRIPTION("Sparc fbdev helpers");
-MODULE_LICENSE("GPL");
--- /dev/null
+// SPDX-License-Identifier: GPL-2.0
+
+#include <linux/console.h>
+#include <linux/device.h>
+#include <linux/module.h>
+
+#include <asm/prom.h>
+#include <asm/video.h>
+
+bool video_is_primary_device(struct device *dev)
+{
+ struct device_node *node = dev->of_node;
+
+ if (console_set_on_cmdline)
+ return false;
+
+ if (node && node == of_console_device)
+ return true;
+
+ return false;
+}
+EXPORT_SYMBOL(video_is_primary_device);
+
+MODULE_DESCRIPTION("Sparc video helpers");
+MODULE_LICENSE("GPL");
generic-y += emergency-restart.h
generic-y += exec.h
generic-y += extable.h
-generic-y += fb.h
generic-y += ftrace.h
generic-y += hw_irq.h
generic-y += irq_regs.h
generic-y += kprobes.h
generic-y += mm_hooks.h
generic-y += vga.h
+generic-y += video.h
+++ /dev/null
-/* SPDX-License-Identifier: GPL-2.0 */
-#ifndef _ASM_X86_FB_H
-#define _ASM_X86_FB_H
-
-#include <linux/types.h>
-
-#include <asm/page.h>
-
-struct device;
-
-pgprot_t pgprot_framebuffer(pgprot_t prot,
- unsigned long vm_start, unsigned long vm_end,
- unsigned long offset);
-#define pgprot_framebuffer pgprot_framebuffer
-
-bool video_is_primary_device(struct device *dev);
-#define video_is_primary_device video_is_primary_device
-
-#include <asm-generic/fb.h>
-
-#endif /* _ASM_X86_FB_H */
--- /dev/null
+/* SPDX-License-Identifier: GPL-2.0 */
+#ifndef _ASM_X86_VIDEO_H
+#define _ASM_X86_VIDEO_H
+
+#include <linux/types.h>
+
+#include <asm/page.h>
+
+struct device;
+
+pgprot_t pgprot_framebuffer(pgprot_t prot,
+ unsigned long vm_start, unsigned long vm_end,
+ unsigned long offset);
+#define pgprot_framebuffer pgprot_framebuffer
+
+bool video_is_primary_device(struct device *dev);
+#define video_is_primary_device video_is_primary_device
+
+#include <asm-generic/video.h>
+
+#endif /* _ASM_X86_VIDEO_H */
# SPDX-License-Identifier: GPL-2.0-only
-obj-y += fbdev.o
+obj-y += video.o
+++ /dev/null
-/*
- * Copyright (C) 2007 Antonino Daplas <adaplas@gmail.com>
- *
- * This file is subject to the terms and conditions of the GNU General Public
- * License. See the file COPYING in the main directory of this archive
- * for more details.
- *
- */
-
-#include <linux/module.h>
-#include <linux/pci.h>
-#include <linux/vgaarb.h>
-#include <asm/fb.h>
-
-pgprot_t pgprot_framebuffer(pgprot_t prot,
- unsigned long vm_start, unsigned long vm_end,
- unsigned long offset)
-{
- pgprot_val(prot) &= ~_PAGE_CACHE_MASK;
- if (boot_cpu_data.x86 > 3)
- pgprot_val(prot) |= cachemode2protval(_PAGE_CACHE_MODE_UC_MINUS);
-
- return prot;
-}
-EXPORT_SYMBOL(pgprot_framebuffer);
-
-bool video_is_primary_device(struct device *dev)
-{
- struct pci_dev *pdev;
-
- if (!dev_is_pci(dev))
- return false;
-
- pdev = to_pci_dev(dev);
-
- return (pdev == vga_default_device());
-}
-EXPORT_SYMBOL(video_is_primary_device);
-
-MODULE_LICENSE("GPL");
--- /dev/null
+/*
+ * Copyright (C) 2007 Antonino Daplas <adaplas@gmail.com>
+ *
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License. See the file COPYING in the main directory of this archive
+ * for more details.
+ *
+ */
+
+#include <linux/module.h>
+#include <linux/pci.h>
+#include <linux/vgaarb.h>
+
+#include <asm/video.h>
+
+pgprot_t pgprot_framebuffer(pgprot_t prot,
+ unsigned long vm_start, unsigned long vm_end,
+ unsigned long offset)
+{
+ pgprot_val(prot) &= ~_PAGE_CACHE_MASK;
+ if (boot_cpu_data.x86 > 3)
+ pgprot_val(prot) |= cachemode2protval(_PAGE_CACHE_MODE_UC_MINUS);
+
+ return prot;
+}
+EXPORT_SYMBOL(pgprot_framebuffer);
+
+bool video_is_primary_device(struct device *dev)
+{
+ struct pci_dev *pdev;
+
+ if (!dev_is_pci(dev))
+ return false;
+
+ pdev = to_pci_dev(dev);
+
+ return (pdev == vga_default_device());
+}
+EXPORT_SYMBOL(video_is_primary_device);
+
+MODULE_LICENSE("GPL");
mandatory-y += dma.h
mandatory-y += emergency-restart.h
mandatory-y += exec.h
-mandatory-y += fb.h
mandatory-y += ftrace.h
mandatory-y += futex.h
mandatory-y += hardirq.h
mandatory-y += unaligned.h
mandatory-y += vermagic.h
mandatory-y += vga.h
+mandatory-y += video.h
mandatory-y += word-at-a-time.h
mandatory-y += xor.h
+++ /dev/null
-/* SPDX-License-Identifier: GPL-2.0 */
-
-#ifndef __ASM_GENERIC_FB_H_
-#define __ASM_GENERIC_FB_H_
-
-/*
- * Only include this header file from your architecture's <asm/fb.h>.
- */
-
-#include <linux/io.h>
-#include <linux/mm_types.h>
-#include <linux/pgtable.h>
-#include <linux/types.h>
-
-struct device;
-
-#ifndef pgprot_framebuffer
-#define pgprot_framebuffer pgprot_framebuffer
-static inline pgprot_t pgprot_framebuffer(pgprot_t prot,
- unsigned long vm_start, unsigned long vm_end,
- unsigned long offset)
-{
- return pgprot_writecombine(prot);
-}
-#endif
-
-#ifndef video_is_primary_device
-#define video_is_primary_device video_is_primary_device
-static inline bool video_is_primary_device(struct device *dev)
-{
- return false;
-}
-#endif
-
-/*
- * I/O helpers for the framebuffer. Prefer these functions over their
- * regular counterparts. The regular I/O functions provide in-order
- * access and swap bytes to/from little-endian ordering. Neither is
- * required for framebuffers. Instead, the helpers read and write
- * raw framebuffer data. Independent operations can be reordered for
- * improved performance.
- */
-
-#ifndef fb_readb
-static inline u8 fb_readb(const volatile void __iomem *addr)
-{
- return __raw_readb(addr);
-}
-#define fb_readb fb_readb
-#endif
-
-#ifndef fb_readw
-static inline u16 fb_readw(const volatile void __iomem *addr)
-{
- return __raw_readw(addr);
-}
-#define fb_readw fb_readw
-#endif
-
-#ifndef fb_readl
-static inline u32 fb_readl(const volatile void __iomem *addr)
-{
- return __raw_readl(addr);
-}
-#define fb_readl fb_readl
-#endif
-
-#ifndef fb_readq
-#if defined(__raw_readq)
-static inline u64 fb_readq(const volatile void __iomem *addr)
-{
- return __raw_readq(addr);
-}
-#define fb_readq fb_readq
-#endif
-#endif
-
-#ifndef fb_writeb
-static inline void fb_writeb(u8 b, volatile void __iomem *addr)
-{
- __raw_writeb(b, addr);
-}
-#define fb_writeb fb_writeb
-#endif
-
-#ifndef fb_writew
-static inline void fb_writew(u16 b, volatile void __iomem *addr)
-{
- __raw_writew(b, addr);
-}
-#define fb_writew fb_writew
-#endif
-
-#ifndef fb_writel
-static inline void fb_writel(u32 b, volatile void __iomem *addr)
-{
- __raw_writel(b, addr);
-}
-#define fb_writel fb_writel
-#endif
-
-#ifndef fb_writeq
-#if defined(__raw_writeq)
-static inline void fb_writeq(u64 b, volatile void __iomem *addr)
-{
- __raw_writeq(b, addr);
-}
-#define fb_writeq fb_writeq
-#endif
-#endif
-
-#ifndef fb_memcpy_fromio
-static inline void fb_memcpy_fromio(void *to, const volatile void __iomem *from, size_t n)
-{
- memcpy_fromio(to, from, n);
-}
-#define fb_memcpy_fromio fb_memcpy_fromio
-#endif
-
-#ifndef fb_memcpy_toio
-static inline void fb_memcpy_toio(volatile void __iomem *to, const void *from, size_t n)
-{
- memcpy_toio(to, from, n);
-}
-#define fb_memcpy_toio fb_memcpy_toio
-#endif
-
-#ifndef fb_memset
-static inline void fb_memset_io(volatile void __iomem *addr, int c, size_t n)
-{
- memset_io(addr, c, n);
-}
-#define fb_memset fb_memset_io
-#endif
-
-#endif /* __ASM_GENERIC_FB_H_ */
--- /dev/null
+/* SPDX-License-Identifier: GPL-2.0 */
+
+#ifndef __ASM_GENERIC_VIDEO_H_
+#define __ASM_GENERIC_VIDEO_H_
+
+/*
+ * Only include this header file from your architecture's <asm/fb.h>.
+ */
+
+#include <linux/io.h>
+#include <linux/mm_types.h>
+#include <linux/pgtable.h>
+#include <linux/types.h>
+
+struct device;
+
+#ifndef pgprot_framebuffer
+#define pgprot_framebuffer pgprot_framebuffer
+static inline pgprot_t pgprot_framebuffer(pgprot_t prot,
+ unsigned long vm_start, unsigned long vm_end,
+ unsigned long offset)
+{
+ return pgprot_writecombine(prot);
+}
+#endif
+
+#ifndef video_is_primary_device
+#define video_is_primary_device video_is_primary_device
+static inline bool video_is_primary_device(struct device *dev)
+{
+ return false;
+}
+#endif
+
+/*
+ * I/O helpers for the framebuffer. Prefer these functions over their
+ * regular counterparts. The regular I/O functions provide in-order
+ * access and swap bytes to/from little-endian ordering. Neither is
+ * required for framebuffers. Instead, the helpers read and write
+ * raw framebuffer data. Independent operations can be reordered for
+ * improved performance.
+ */
+
+#ifndef fb_readb
+static inline u8 fb_readb(const volatile void __iomem *addr)
+{
+ return __raw_readb(addr);
+}
+#define fb_readb fb_readb
+#endif
+
+#ifndef fb_readw
+static inline u16 fb_readw(const volatile void __iomem *addr)
+{
+ return __raw_readw(addr);
+}
+#define fb_readw fb_readw
+#endif
+
+#ifndef fb_readl
+static inline u32 fb_readl(const volatile void __iomem *addr)
+{
+ return __raw_readl(addr);
+}
+#define fb_readl fb_readl
+#endif
+
+#ifndef fb_readq
+#if defined(__raw_readq)
+static inline u64 fb_readq(const volatile void __iomem *addr)
+{
+ return __raw_readq(addr);
+}
+#define fb_readq fb_readq
+#endif
+#endif
+
+#ifndef fb_writeb
+static inline void fb_writeb(u8 b, volatile void __iomem *addr)
+{
+ __raw_writeb(b, addr);
+}
+#define fb_writeb fb_writeb
+#endif
+
+#ifndef fb_writew
+static inline void fb_writew(u16 b, volatile void __iomem *addr)
+{
+ __raw_writew(b, addr);
+}
+#define fb_writew fb_writew
+#endif
+
+#ifndef fb_writel
+static inline void fb_writel(u32 b, volatile void __iomem *addr)
+{
+ __raw_writel(b, addr);
+}
+#define fb_writel fb_writel
+#endif
+
+#ifndef fb_writeq
+#if defined(__raw_writeq)
+static inline void fb_writeq(u64 b, volatile void __iomem *addr)
+{
+ __raw_writeq(b, addr);
+}
+#define fb_writeq fb_writeq
+#endif
+#endif
+
+#ifndef fb_memcpy_fromio
+static inline void fb_memcpy_fromio(void *to, const volatile void __iomem *from, size_t n)
+{
+ memcpy_fromio(to, from, n);
+}
+#define fb_memcpy_fromio fb_memcpy_fromio
+#endif
+
+#ifndef fb_memcpy_toio
+static inline void fb_memcpy_toio(volatile void __iomem *to, const void *from, size_t n)
+{
+ memcpy_toio(to, from, n);
+}
+#define fb_memcpy_toio fb_memcpy_toio
+#endif
+
+#ifndef fb_memset
+static inline void fb_memset_io(volatile void __iomem *addr, int c, size_t n)
+{
+ memset_io(addr, c, n);
+}
+#define fb_memset fb_memset_io
+#endif
+
+#endif /* __ASM_GENERIC_VIDEO_H_ */
#include <linux/types.h>
#include <linux/workqueue.h>
-#include <asm/fb.h>
+#include <asm/video.h>
struct backlight_device;
struct device;