fbdev: Move framebuffer I/O helpers to <asm/fb.h>
Subsystems (16)
Thomas Zimmermann
maintainerv5 cover fbdev: Move framebuffer I/O helpers to <asm/fb.h>
Fbdev provides helpers for framebuffer I/O, such as fb_readl(), fb_writel() or fb_memcpy_to_fb(). The implementation of each helper depends on the architecture, but they are all equivalent to regular I/O functions of similar names. So use regular functions instead and move all helpers into <asm-generic/fb.h>
The first patch a simple whitespace cleanup.
Until now, <linux/fb.h> contained an include of <asm/io.h>. As this will go away, patches 2 to 4 prepare include statements in the various drivers. Source files that use regular I/O helpers, such as readl(), now include <linux/io.h>. Source files that use framebuffer I/O helpers, such as fb_readl(), now include <linux/fb.h>.
Patch 5 replaces the architecture-based if-else branching in <linux/fb.h> by helpers in <asm-generic/fb.h>. All helpers use Linux' existing I/O functions.
Patch 6 harmonizes naming among fbdev and existing I/O functions.
The patchset has been built for a variety of platforms, such as x86-64, arm, aarch64, ppc64, parisc, m64k, mips and sparc.
v5:
* fix build on s390
v4:
* keep fb_mem*() as-is on ia64, loongarch, sparc64 (Arnd)
* don't include <asm/fb.h> (Sam)
v3:
* add the new helpers in <asm-generic/fb.h>
* support reordering and native byte order (Geert, Arnd)
v2:
* use Linux I/O helpers (Sam, Arnd)
Thomas Zimmermann (6):
fbdev/matrox: Remove trailing whitespaces
ipu-v3: Include <linux/io.h>
fbdev: Include <linux/io.h> in various drivers
fbdev: Include <linux/fb.h> instead of <asm/fb.h>
fbdev: Move framebuffer I/O helpers into <asm/fb.h>
fbdev: Rename fb_mem*() helpers
arch/ia64/include/asm/fb.h | 20 ++++ arch/loongarch/include/asm/fb.h | 21 ++++ arch/parisc/video/fbdev.c | 3 +- arch/sparc/include/asm/fb.h | 20 ++++ arch/sparc/video/fbdev.c | 1 - arch/x86/video/fbdev.c | 2 - drivers/gpu/ipu-v3/ipu-prv.h | 1 + drivers/staging/sm750fb/sm750.c | 2 +- drivers/video/fbdev/arcfb.c | 1 + drivers/video/fbdev/aty/atyfb.h | 2 + drivers/video/fbdev/aty/mach64_cursor.c | 2 +- drivers/video/fbdev/chipsfb.c | 2 +- drivers/video/fbdev/core/fbcon.c | 1 - drivers/video/fbdev/core/fbmem.c | 6 +- drivers/video/fbdev/kyro/fbdev.c | 2 +- drivers/video/fbdev/matrox/matroxfb_accel.c | 6 +- drivers/video/fbdev/matrox/matroxfb_base.h | 4 +- drivers/video/fbdev/pvr2fb.c | 2 +- drivers/video/fbdev/sstfb.c | 2 +- drivers/video/fbdev/stifb.c | 4 +- drivers/video/fbdev/tdfxfb.c | 2 +- drivers/video/fbdev/wmt_ge_rops.c | 2 + include/asm-generic/fb.h | 102 ++++++++++++++++++++ include/linux/fb.h | 55 +---------- 24 files changed, 188 insertions(+), 77 deletions(-)
Signature · 1 line
2.40.1
Thomas Zimmermann
maintainerPATCH v5 1/6 fbdev/matrox: Remove trailing whitespaces
Fix coding style. No functional changes.
--- drivers/video/fbdev/matrox/matroxfb_accel.c | 6 +++--- drivers/video/fbdev/matrox/matroxfb_base.h | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-)
drivers/video/fbdev/matrox/matroxfb_accel.c +3 -3
@@ -88,7 +88,7 @@static inline void matrox_cfb4_pal (u_int32_t * pal) {unsigned int i; - +for (i =0 ; i <16 ; i++) { pal[i] = i *0x11111111U ; }
@@ -96,7 +96,7 @@ static inline void matrox_cfb4_pal(u_int32_t* pal) {static inline void matrox_cfb8_pal (u_int32_t * pal) {unsigned int i; - +for (i =0 ; i <16 ; i++) { pal[i] = i *0x01010101U ; }
@@ -482,7 +482,7 @@ static void matroxfb_1bpp_imageblit(struct matrox_fb_info *minfo, u_int32_t fgx,/* Tell... well, why bother... */ while (height--) {size_t i; - +for (i =0 ; i < step; i +=4 ) {/* Hope that there are at least three readable bytes beyond the end of bitmap */ fb_writel (get_unaligned ((u_int32_t *)(chardata + i)),mmio.vaddr);
drivers/video/fbdev/matrox/matroxfb_base.h +2 -2
@@ -301,9 +301,9 @@ struct matrox_altout {int (*verifymode)(void * altout_dev,u_int32_t mode);int (*getqueryctrl)(void * altout_dev,struct v4l2_queryctrl * ctrl); -int (*getctrl)(void * altout_dev, +int (*getctrl)(void *altout_dev,struct v4l2_control * ctrl); -int (*setctrl)(void * altout_dev, +int (*setctrl)(void *altout_dev,struct v4l2_control * ctrl); };
Signature · 1 line
2.40.1
Thomas Zimmermann
maintainerPATCH v5 2/6 ipu-v3: Include <linux/io.h>
In reply to Thomas ZimmermannThe code uses readl() and writel(). Include the header file to get the declarations.
--- drivers/gpu/ipu-v3/ipu-prv.h | 1 + 1 file changed, 1 insertion(+)
drivers/gpu/ipu-v3/ipu-prv.h +1 -0
@@ -8,6 +8,7 @@struct ipu_soc ; +#include <linux/io.h> #include <linux/types.h> #include <linux/device.h> #include <linux/clk.h>
Signature · 1 line
2.40.1
Thomas Zimmermann
maintainerPATCH v5 3/6 fbdev: Include <linux/io.h> in various drivers
In reply to Thomas ZimmermannThe code uses writel() and similar I/O-memory helpers. Include the header file to get the declarations.
--- drivers/video/fbdev/arcfb.c | 1 + drivers/video/fbdev/aty/atyfb.h | 2 ++ drivers/video/fbdev/wmt_ge_rops.c | 2 ++ 3 files changed, 5 insertions(+)
drivers/video/fbdev/arcfb.c +1 -0
@@ -41,6 +41,7 @@#include <linux/vmalloc.h> #include <linux/delay.h> #include <linux/interrupt.h> +#include <linux/io.h> #include <linux/fb.h> #include <linux/init.h> #include <linux/arcfb.h>
drivers/video/fbdev/aty/atyfb.h +2 -0
@@ -3,8 +3,10 @@* ATI Frame Buffer Device Driver Core Definitions */ +#include <linux/io.h> #include <linux/spinlock.h> #include <linux/wait.h> +/* * Elements of the hardware specific atyfb_par structure */
drivers/video/fbdev/wmt_ge_rops.c +2 -0
@@ -9,7 +9,9 @@#include <linux/module.h> #include <linux/fb.h> +#include <linux/io.h> #include <linux/platform_device.h> +#include "core/fb_draw.h" #include "wmt_ge_rops.h"
Signature · 1 line
2.40.1
Thomas Zimmermann
maintainerPATCH v5 4/6 fbdev: Include <linux/fb.h> instead of <asm/fb.h>
In reply to Thomas ZimmermannReplace include statements for <asm/fb.h> with <linux/fb.h>. Fixes the coding style: if a header is available in asm/ and linux/, it is preferable to include the header from linux/. This only affects a few source files, most of which already include <linux/fb.h>.
--- arch/parisc/video/fbdev.c | 3 +-- arch/sparc/video/fbdev.c | 1 - arch/x86/video/fbdev.c | 2 -- drivers/staging/sm750fb/sm750.c | 2 +- drivers/video/fbdev/core/fbcon.c | 1 - drivers/video/fbdev/core/fbmem.c | 2 -- include/linux/fb.h | 2 ++ 7 files changed, 4 insertions(+), 9 deletions(-)
arch/parisc/video/fbdev.c +1 -2
@@ -5,10 +5,9 @@* Copyright (C) 2001-2002 Thomas Bogendoerfer <[email protected]> */ +#include <linux/fb.h> #include <linux/module.h> -#include <asm/fb.h> -#include <video/sticore.h> int fb_is_primary_device (struct fb_info *info)
arch/sparc/video/fbdev.c +0 -1
@@ -4,7 +4,6 @@#include <linux/fb.h> #include <linux/module.h> -#include <asm/fb.h> #include <asm/prom.h> int fb_is_primary_device (struct fb_info *info)
arch/x86/video/fbdev.c +0 -2
@@ -7,8 +7,6 @@* */ -#include <asm/fb.h> -#include <linux/fb.h> #include <linux/module.h> #include <linux/pci.h>
drivers/staging/sm750fb/sm750.c +1 -1
@@ -16,7 +16,7 @@#include <linux/pagemap.h> #include <linux/screen_info.h> #include <linux/console.h> -#include <asm/fb.h> +#include "sm750.h" #include "sm750_accel.h" #include "sm750_cursor.h"
drivers/video/fbdev/core/fbcon.c +0 -1
@@ -75,7 +75,6 @@#include <linux/interrupt.h> #include <linux/crc32.h> /* For counting font checksums */ #include <linux/uaccess.h> -#include <asm/fb.h> #include <asm/irq.h> #include "fbcon.h"
drivers/video/fbdev/core/fbmem.c +0 -2
@@ -37,8 +37,6 @@#include <linux/mem_encrypt.h> #include <linux/pci.h> -#include <asm/fb.h> -#include <video/nomodeset.h> #include <video/vga.h>
include/linux/fb.h +2 -0
@@ -15,6 +15,8 @@#include <linux/list.h> #include <linux/backlight.h> #include <linux/slab.h> + +#include <asm/fb.h> #include <asm/io.h> struct vm_area_struct ;
Signature · 1 line
2.40.1
Thomas Zimmermann
maintainerPATCH v5 5/6 fbdev: Move framebuffer I/O helpers into <asm/fb.h>
In reply to Thomas ZimmermannImplement framebuffer I/O helpers, such as fb_read*() and fb_write*(), in the architecture's <asm/fb.h> header file or the generic one.
The common case has been the use of regular I/O functions, such as __raw_readb() or memset_io(). A few architectures used plain system- memory reads and writes. Sparc used helpers for its SBus.
The architectures that used special cases provide the same code in their __raw_*() I/O helpers. So the patch replaces this code with the __raw_*() functions and moves it to <asm-generic/fb.h> for all architectures.
v5:
* include <linux/io.h> in <asm-generic/fb>; fix s390 build
v4:
* ia64, loongarch, sparc64: add fb_mem*() to arch headers to keep current semantics (Arnd)
v3:
* implement all architectures with generic helpers
* support reordering and native byte order (Geert, Arnd)
--- arch/ia64/include/asm/fb.h | 20 +++++++ arch/loongarch/include/asm/fb.h | 21 +++++++ arch/sparc/include/asm/fb.h | 20 +++++++ include/asm-generic/fb.h | 102 ++++++++++++++++++++++++++++++++ include/linux/fb.h | 53 ----------------- 5 files changed, 163 insertions(+), 53 deletions(-)
arch/ia64/include/asm/fb.h +20 -0
@@ -2,7 +2,9 @@#ifndef _ASM_FB_H_#define _ASM_FB_H_ +#include <linux/compiler.h> #include <linux/efi.h> +#include <linux/string.h> #include <asm/page.h>
@@ -18,6 +20,24 @@ static inline void fb_pgprotect(struct file *file, struct vm_area_struct *vma, }#define fb_pgprotect fb_pgprotect +static inline void fb_memcpy_fromfb (void *to,const volatile void __iomem *from,size_t n) +{ +memcpy (to, (void __force *)from, n); +} +#define fb_memcpy_fromfb fb_memcpy_fromfb + +static inline void fb_memcpy_tofb (volatile void __iomem *to,const void *from,size_t n) +{ +memcpy ((void __force *)to, from, n); +} +#define fb_memcpy_tofb fb_memcpy_tofb + +static inline void fb_memset (volatile void __iomem *addr,int c,size_t n) +{ +memset ((void __force *)addr, c, n); +} +#define fb_memset fb_memset +#include <asm-generic/fb.h> #endif /* _ASM_FB_H_ */
arch/loongarch/include/asm/fb.h +21 -0
@@ -5,6 +5,27 @@#ifndef _ASM_FB_H_#define _ASM_FB_H_ +#include <linux/compiler.h> +#include <linux/string.h> + +static inline void fb_memcpy_fromfb (void *to,const volatile void __iomem *from,size_t n) +{ +memcpy (to, (void __force *)from, n); +} +#define fb_memcpy_fromfb fb_memcpy_fromfb + +static inline void fb_memcpy_tofb (volatile void __iomem *to,const void *from,size_t n) +{ +memcpy ((void __force *)to, from, n); +} +#define fb_memcpy_tofb fb_memcpy_tofb + +static inline void fb_memset (volatile void __iomem *addr,int c,size_t n) +{ +memset ((void __force *)addr, c, n); +} +#define fb_memset fb_memset +#include <asm-generic/fb.h> #endif /* _ASM_FB_H_ */
arch/sparc/include/asm/fb.h +20 -0
@@ -2,6 +2,8 @@#ifndef _SPARC_FB_H_#define _SPARC_FB_H_ +#include <linux/io.h> +struct fb_info ;struct file ;struct vm_area_struct ;
@@ -16,6 +18,24 @@ static inline void fb_pgprotect(struct file *file, struct vm_area_struct *vma,int fb_is_primary_device (struct fb_info *info);#define fb_is_primary_device fb_is_primary_device +static inline void fb_memcpy_fromfb (void *to,const volatile void __iomem *from,size_t n) +{ +sbus_memcpy_fromio (to, from, n); +} +#define fb_memcpy_fromfb fb_memcpy_fromfb + +static inline void fb_memcpy_tofb (volatile void __iomem *to,const void *from,size_t n) +{ +sbus_memcpy_toio (to, from, n); +} +#define fb_memcpy_tofb fb_memcpy_tofb + +static inline void fb_memset (volatile void __iomem *addr,int c,size_t n) +{ +sbus_memset_io (addr, c, n); +} +#define fb_memset fb_memset +#include <asm-generic/fb.h> #endif /* _SPARC_FB_H_ */
include/asm-generic/fb.h +102 -0
112 lines not on this page · raw message
include/linux/fb.h +0 -53
65 lines not on this page · raw message
Signature · 1 line
2.40.1
Thomas Zimmermann
maintainerPATCH v5 6/6 fbdev: Rename fb_mem*() helpers
In reply to Thomas ZimmermannUpdate the names of the fb_mem*() helpers to be consistent with their regular counterparts. Hence, fb_memset() now becomes fb_memset_io(), fb_memcpy_fromfb() now becomes fb_memcpy_fromio() and fb_memcpy_tofb() becomes fb_memcpy_toio(). No functional changes.
--- arch/ia64/include/asm/fb.h | 12 ++++++------ arch/loongarch/include/asm/fb.h | 12 ++++++------ arch/sparc/include/asm/fb.h | 12 ++++++------ drivers/video/fbdev/aty/mach64_cursor.c | 2 +- drivers/video/fbdev/chipsfb.c | 2 +- drivers/video/fbdev/core/fbmem.c | 4 ++-- drivers/video/fbdev/kyro/fbdev.c | 2 +- drivers/video/fbdev/pvr2fb.c | 2 +- drivers/video/fbdev/sstfb.c | 2 +- drivers/video/fbdev/stifb.c | 4 ++-- drivers/video/fbdev/tdfxfb.c | 2 +- include/asm-generic/fb.h | 16 ++++++++-------- 12 files changed, 36 insertions(+), 36 deletions(-)
arch/ia64/include/asm/fb.h +6 -6
@@ -20,23 +20,23 @@ static inline void fb_pgprotect(struct file *file, struct vm_area_struct *vma, }#define fb_pgprotect fb_pgprotect -static inline void fb_memcpy_fromfb (void *to,const volatile void __iomem *from,size_t n) +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_fromfb fb_memcpy_fromfb +#define fb_memcpy_fromio fb_memcpy_fromio -static inline void fb_memcpy_tofb (volatile void __iomem *to,const void *from,size_t n) +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_tofb fb_memcpy_tofb +#define fb_memcpy_toio fb_memcpy_toio -static inline void fb_memset (volatile void __iomem *addr,int c,size_t n) +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 +#define fb_memset fb_memset_io#include <asm-generic/fb.h>
arch/loongarch/include/asm/fb.h +6 -6
@@ -8,23 +8,23 @@#include <linux/compiler.h> #include <linux/string.h> -static inline void fb_memcpy_fromfb (void *to,const volatile void __iomem *from,size_t n) +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_fromfb fb_memcpy_fromfb +#define fb_memcpy_fromio fb_memcpy_fromio -static inline void fb_memcpy_tofb (volatile void __iomem *to,const void *from,size_t n) +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_tofb fb_memcpy_tofb +#define fb_memcpy_toio fb_memcpy_toio -static inline void fb_memset (volatile void __iomem *addr,int c,size_t n) +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 +#define fb_memset fb_memset_io#include <asm-generic/fb.h>
arch/sparc/include/asm/fb.h +6 -6
@@ -18,23 +18,23 @@ static inline void fb_pgprotect(struct file *file, struct vm_area_struct *vma,int fb_is_primary_device (struct fb_info *info);#define fb_is_primary_device fb_is_primary_device -static inline void fb_memcpy_fromfb (void *to,const volatile void __iomem *from,size_t n) +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_fromfb fb_memcpy_fromfb +#define fb_memcpy_fromio fb_memcpy_fromio -static inline void fb_memcpy_tofb (volatile void __iomem *to,const void *from,size_t n) +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_tofb fb_memcpy_tofb +#define fb_memcpy_toio fb_memcpy_toio -static inline void fb_memset (volatile void __iomem *addr,int c,size_t n) +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 +#define fb_memset fb_memset_io#include <asm-generic/fb.h>
drivers/video/fbdev/aty/mach64_cursor.c +1 -1
@@ -153,7 +153,7 @@ static int atyfb_cursor(struct fb_info *info, struct fb_cursor *cursor)u8 m, b;// Clear cursor image with 1010101010... -fb_memset (dst,0xaa ,1024 ); +fb_memset_io (dst,0xaa ,1024 ); offset = align - width*2 ;
drivers/video/fbdev/chipsfb.c +1 -1
@@ -332,7 +332,7 @@ static const struct fb_var_screeninfo chipsfb_var = {static void init_chips (struct fb_info *p,unsigned long addr) { -fb_memset (p->screen_base,0 ,0x100000 ); +fb_memset_io (p->screen_base,0 ,0x100000 ); p->fix = chipsfb_fix; p->fix.smem_start = addr;
drivers/video/fbdev/core/fbmem.c +2 -2
@@ -802,7 +802,7 @@ fb_read(struct file *file, char __user *buf, size_t count, loff_t *ppos)while (count) { c = (count >PAGE_SIZE ) ?PAGE_SIZE : count; dst = buffer; -fb_memcpy_fromfb (dst, src, c); +fb_memcpy_fromio (dst, src, c); dst += c; src += c;
@@ -879,7 +879,7 @@ fb_write(struct file *file, const char __user *buf, size_t count, loff_t *ppos)break ; } -fb_memcpy_tofb (dst, src, c); +fb_memcpy_toio (dst, src, c); dst += c; src += c; *ppos += c;
drivers/video/fbdev/kyro/fbdev.c +1 -1
@@ -737,7 +737,7 @@ static int kyrofb_probe(struct pci_dev *pdev, const struct pci_device_id *ent) info->var.bits_per_pixel); size *= info->var.yres_virtual; -fb_memset (info->screen_base,0 , size); +fb_memset_io (info->screen_base,0 , size);if (register_framebuffer (info) <0 ) goto out_unmap;
drivers/video/fbdev/pvr2fb.c +1 -1
@@ -798,7 +798,7 @@ static int __maybe_unused pvr2fb_common_init(void) goto out_err; } -fb_memset (fb_info->screen_base,0 , pvr2_fix.smem_len); +fb_memset_io (fb_info->screen_base,0 , pvr2_fix.smem_len); pvr2_fix.ypanstep = nopan ?0 :1 ; pvr2_fix.ywrapstep = nowrap ?0 :1 ;
drivers/video/fbdev/sstfb.c +1 -1
@@ -335,7 +335,7 @@ static int sst_calc_pll(const int freq, int *freq_out, struct pll_timing *t)static void sstfb_clear_screen (struct fb_info *info) {/* clear screen */ -fb_memset (info->screen_base,0 , info->fix.smem_len); +fb_memset_io (info->screen_base,0 , info->fix.smem_len); }
drivers/video/fbdev/stifb.c +2 -2
@@ -527,8 +527,8 @@ rattlerSetupPlanes(struct stifb_info *fb) fb->id = saved_id;for (y =0 ; y < fb->info.var.yres; ++y) -fb_memset (fb->info.screen_base + y * fb->info.fix.line_length, -0xff , fb->info.var.xres * fb->info.var.bits_per_pixel/8 ); +fb_memset_io (fb->info.screen_base + y * fb->info.fix.line_length, +0xff , fb->info.var.xres * fb->info.var.bits_per_pixel/8 );CRX24_SET_OVLY_MASK (fb);SETUP_FB (fb);
drivers/video/fbdev/tdfxfb.c +1 -1
@@ -1116,7 +1116,7 @@ static int tdfxfb_cursor(struct fb_info *info, struct fb_cursor *cursor)u8 *mask = (u8 *)cursor->mask;int i; -fb_memset (cursorbase,0 ,1024 ); +fb_memset_io (cursorbase,0 ,1024 );for (i =0 ; i < cursor->image.height; i++) {int h =0 ;
include/asm-generic/fb.h +8 -8
@@ -108,28 +108,28 @@ static inline void fb_writeq(u64 b, volatile void __iomem *addr)#endif #endif -#ifndef fb_memcpy_fromfb -static inline void fb_memcpy_fromfb (void *to,const volatile void __iomem *from,size_t n) +#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_fromfb fb_memcpy_fromfb +#define fb_memcpy_fromio fb_memcpy_fromio#endif -#ifndef fb_memcpy_tofb -static inline void fb_memcpy_tofb (volatile void __iomem *to,const void *from,size_t n) +#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_tofb fb_memcpy_tofb +#define fb_memcpy_toio fb_memcpy_toio#endif #ifndef fb_memset -static inline void fb_memset (volatile void __iomem *addr,int c,size_t n) +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 +#define fb_memset fb_memset_io#endif #endif /* __ASM_GENERIC_FB_H_ */
Signature · 1 line
2.40.1
kernel test robot
build botRe: [PATCH v5 5/6] fbdev: Move framebuffer I/O helpers into <asm/fb.h>
In reply to Thomas Zimmermannkernel test robot noticed the following build errors:
Hi Thomas,
kernel test robot noticed the following build errors:
[auto build test ERROR on drm-misc/drm-misc-next]
[cannot apply to deller-parisc/for-next arnd-asm-generic/master linus/master v6.4-rc1 next-20230509] [If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Thomas-Zimmermann/fbdev-matrox-Remove-trailing-whitespaces/20230508-195052 base: git://anongit.freedesktop.org/drm/drm-misc drm-misc-next patch link: https://lore.kernel.org/r/20230508114830.28182-6-tzimmermann%40suse.de patch subject: [PATCH v5 5/6] fbdev: Move framebuffer I/O helpers into <asm/fb.h> config: mips-randconfig-r016-20230507 (https://download.01.org/0day-ci/archive/20230509/[email protected]/config) compiler: mips64-linux-gcc (GCC) 12.1.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://github.com/intel-lab-lkp/linux/commit/c64dc7f407b3faa85d4e81ec762407388c5813c1
git remote add linux-review https://github.com/intel-lab-lkp/linux
git fetch --no-tags linux-review Thomas-Zimmermann/fbdev-matrox-Remove-trailing-whitespaces/20230508-195052 git checkout c64dc7f407b3faa85d4e81ec762407388c5813c1
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=mips olddefconfig COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=mips SHELL=/bin/bash drivers/video/fbdev/core/
If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <[email protected]>
| Link: https://lore.kernel.org/oe-kbuild-all/[email protected]/
All errors (new ones prefixed by >>):
drivers/video/fbdev/core/cfbfillrect.c: In function 'bitfill_aligned':
>> drivers/video/fbdev/core/cfbfillrect.c:26:21: error: implicit declaration of function 'fb_writeq'; did you mean 'fb_writel'? [-Werror=implicit-function-declaration]
26 | # define FB_WRITEL fb_writeq
| ^~~~~~~~~
drivers/video/fbdev/core/cfbfillrect.c:50:17: note: in expansion of macro 'FB_WRITEL'
50 | FB_WRITEL(comp(pat, FB_READL(dst), first), dst);
| ^~~~~~~~~
>> drivers/video/fbdev/core/cfbfillrect.c:27:21: error: implicit declaration of function 'fb_readq'; did you mean 'fb_readl'? [-Werror=implicit-function-declaration]
27 | # define FB_READL fb_readq
| ^~~~~~~~
drivers/video/fbdev/core/cfbfillrect.c:50:37: note: in expansion of macro 'FB_READL'
50 | FB_WRITEL(comp(pat, FB_READL(dst), first), dst);
| ^~~~~~~~
cc1: some warnings being treated as errors
--
drivers/video/fbdev/core/cfbcopyarea.c: In function 'bitcpy':
>> drivers/video/fbdev/core/cfbcopyarea.c:37:21: error: implicit declaration of function 'fb_writeq'; did you mean 'fb_writel'? [-Werror=implicit-function-declaration]
37 | # define FB_WRITEL fb_writeq
| ^~~~~~~~~
drivers/video/fbdev/core/cfbcopyarea.c:73:25: note: in expansion of macro 'FB_WRITEL'
73 | FB_WRITEL( comp( FB_READL(src), FB_READL(dst), first), dst);
| ^~~~~~~~~
>> drivers/video/fbdev/core/cfbcopyarea.c:38:21: error: implicit declaration of function 'fb_readq'; did you mean 'fb_readl'? [-Werror=implicit-function-declaration]
38 | # define FB_READL fb_readq
| ^~~~~~~~
drivers/video/fbdev/core/cfbcopyarea.c:73:42: note: in expansion of macro 'FB_READL'
73 | FB_WRITEL( comp( FB_READL(src), FB_READL(dst), first), dst);
| ^~~~~~~~cc1: some warnings being treated as errors
vim +26 drivers/video/fbdev/core/cfbfillrect.c
^1da177e4c3f41 drivers/video/cfbfillrect.c Linus Torvalds 2005-04-16 21 ^1da177e4c3f41 drivers/video/cfbfillrect.c Linus Torvalds 2005-04-16 22 #if BITS_PER_LONG = 32 ^1da177e4c3f41 drivers/video/cfbfillrect.c Linus Torvalds 2005-04-16 23 # define FB_WRITEL fb_writel ^1da177e4c3f41 drivers/video/cfbfillrect.c Linus Torvalds 2005-04-16 24 # define FB_READL fb_readl ^1da177e4c3f41 drivers/video/cfbfillrect.c Linus Torvalds 2005-04-16 25 #else ^1da177e4c3f41 drivers/video/cfbfillrect.c Linus Torvalds 2005-04-16 @26 # define FB_WRITEL fb_writeq ^1da177e4c3f41 drivers/video/cfbfillrect.c Linus Torvalds 2005-04-16 @27 # define FB_READL fb_readq ^1da177e4c3f41 drivers/video/cfbfillrect.c Linus Torvalds 2005-04-16 28 #endif ^1da177e4c3f41 drivers/video/cfbfillrect.c Linus Torvalds 2005-04-16 29 ^1da177e4c3f41 drivers/video/cfbfillrect.c Linus Torvalds 2005-04-16 30 /* ^1da177e4c3f41 drivers/video/cfbfillrect.c Linus Torvalds 2005-04-16 31 * Aligned pattern fill using 32/64-bit memory accesses ^1da177e4c3f41 drivers/video/cfbfillrect.c Linus Torvalds 2005-04-16 32 */ ^1da177e4c3f41 drivers/video/cfbfillrect.c Linus Torvalds 2005-04-16 33
Signature · 2 lines
0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests