From 471d4ee1008d17e899a3ad0a2d422295c05ed830 Mon Sep 17 00:00:00 2001 From: Thomas Zimmermann Date: Tue, 13 Jun 2023 13:06:37 +0200 Subject: backlight/bd6107: Rename struct bd6107_platform_data.fbdev to 'dev' Rename struct bd6107_platform_data.fbdev to 'dev', as it stores a pointer to the Linux platform device; not the fbdev device. Makes the code easier to understand. Signed-off-by: Thomas Zimmermann Cc: Lee Jones Cc: Daniel Thompson Cc: Jingoo Han Reviewed-by: Javier Martinez Canillas Reviewed-by: Sam Ravnborg Reviewed-by: Daniel Thompson Link: https://patchwork.freedesktop.org/patch/msgid/20230613110953.24176-3-tzimmermann@suse.de --- include/linux/platform_data/bd6107.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include/linux') diff --git a/include/linux/platform_data/bd6107.h b/include/linux/platform_data/bd6107.h index 54a06a4d2618..596ca4f95cfa 100644 --- a/include/linux/platform_data/bd6107.h +++ b/include/linux/platform_data/bd6107.h @@ -8,7 +8,7 @@ struct device; struct bd6107_platform_data { - struct device *fbdev; + struct device *dev; unsigned int def_value; }; -- cgit v1.2.3 From ed369def91c1579a34cd6f9494e4614745430322 Mon Sep 17 00:00:00 2001 From: Thomas Zimmermann Date: Tue, 13 Jun 2023 13:06:39 +0200 Subject: backlight/gpio_backlight: Rename field 'fbdev' to 'dev' Rename the field 'fbdev' in struct gpio_backlight_platform_data and struct gpio_backlight to 'dev', as they store pointers to the Linux platform device; not the fbdev device. Makes the code easier to understand. Signed-off-by: Thomas Zimmermann Cc: Rich Felker Cc: John Paul Adrian Glaubitz Cc: Lee Jones Cc: Daniel Thompson Cc: Jingoo Han Cc: linux-sh@vger.kernel.org Reviewed-by: Sam Ravnborg Reviewed-by: Daniel Thompson Link: https://patchwork.freedesktop.org/patch/msgid/20230613110953.24176-5-tzimmermann@suse.de --- include/linux/platform_data/gpio_backlight.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include/linux') diff --git a/include/linux/platform_data/gpio_backlight.h b/include/linux/platform_data/gpio_backlight.h index 1a8b5b1946fe..323fbf5f7613 100644 --- a/include/linux/platform_data/gpio_backlight.h +++ b/include/linux/platform_data/gpio_backlight.h @@ -8,7 +8,7 @@ struct device; struct gpio_backlight_platform_data { - struct device *fbdev; + struct device *dev; }; #endif -- cgit v1.2.3 From 7fa1675e840535876921b44d7f88b9b314d13edf Mon Sep 17 00:00:00 2001 From: Thomas Zimmermann Date: Tue, 13 Jun 2023 13:06:41 +0200 Subject: backlight/lv5207lp: Rename struct lv5207lp_platform_data.fbdev to 'dev' Rename struct lv5207lp_platform_data.fbdev to 'dev', as it stores a pointer to the Linux platform device; not the fbdev device. Makes the code easier to understand. Signed-off-by: Thomas Zimmermann Cc: Yoshinori Sato Cc: Rich Felker Cc: John Paul Adrian Glaubitz Cc: Lee Jones Cc: Daniel Thompson Cc: Jingoo Han Cc: linux-sh@vger.kernel.org Reviewed-by: Javier Martinez Canillas Reviewed-by: Sam Ravnborg Reviewed-by: Daniel Thompson Link: https://patchwork.freedesktop.org/patch/msgid/20230613110953.24176-7-tzimmermann@suse.de --- include/linux/platform_data/lv5207lp.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include/linux') diff --git a/include/linux/platform_data/lv5207lp.h b/include/linux/platform_data/lv5207lp.h index c9da8d402750..95d85c1394bc 100644 --- a/include/linux/platform_data/lv5207lp.h +++ b/include/linux/platform_data/lv5207lp.h @@ -8,7 +8,7 @@ struct device; struct lv5207lp_platform_data { - struct device *fbdev; + struct device *dev; unsigned int max_value; unsigned int def_value; }; -- cgit v1.2.3 From e2af003210c6395f32a5ba9a032ff9589ee7bb09 Mon Sep 17 00:00:00 2001 From: Thomas Zimmermann Date: Tue, 13 Jun 2023 13:07:09 +0200 Subject: fbdev/core: Add fb_device_{create,destroy}() Move the logic to create and destroy fbdev devices into the new helpers fb_device_create() and fb_device_destroy(). There was a call to fb_cleanup_device() in do_unregister_framebuffer() that was too late. The device had already been removed at this point. Move the call into fb_device_destroy(). Declare the helpers in the new internal header file fb_internal.h, as they are only used within the fbdev core module. Signed-off-by: Thomas Zimmermann Reviewed-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20230613110953.24176-35-tzimmermann@suse.de --- include/linux/fb.h | 3 --- 1 file changed, 3 deletions(-) (limited to 'include/linux') diff --git a/include/linux/fb.h b/include/linux/fb.h index ce7d588edc3e..47f3cdc104b0 100644 --- a/include/linux/fb.h +++ b/include/linux/fb.h @@ -735,11 +735,8 @@ static inline bool fb_be_math(struct fb_info *info) #endif /* CONFIG_FB_FOREIGN_ENDIAN */ } -/* drivers/video/fbsysfs.c */ extern struct fb_info *framebuffer_alloc(size_t size, struct device *dev); extern void framebuffer_release(struct fb_info *info); -extern int fb_init_device(struct fb_info *fb_info); -extern void fb_cleanup_device(struct fb_info *head); extern void fb_bl_default_curve(struct fb_info *fb_info, u8 off, u8 min, u8 max); /* drivers/video/fbmon.c */ -- cgit v1.2.3 From ff8fbcf605f59c5b7b82805c9f7a7dfe6abac784 Mon Sep 17 00:00:00 2001 From: Thomas Zimmermann Date: Tue, 13 Jun 2023 13:07:12 +0200 Subject: fbdev/core: Rework fb init code Init the class "graphics" before the rest of fbdev. Later steps, such as the sysfs code, depend on the class. Also arrange the module's exit code in reverse order. Unexport the global variable fb_class, which is only shared internally within the fbdev core module. Signed-off-by: Thomas Zimmermann Reviewed-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20230613110953.24176-38-tzimmermann@suse.de --- include/linux/fb.h | 1 - 1 file changed, 1 deletion(-) (limited to 'include/linux') diff --git a/include/linux/fb.h b/include/linux/fb.h index 47f3cdc104b0..a7f55edca373 100644 --- a/include/linux/fb.h +++ b/include/linux/fb.h @@ -609,7 +609,6 @@ extern int fb_new_modelist(struct fb_info *info); extern bool fb_center_logo; extern int fb_logo_count; -extern struct class *fb_class; static inline void lock_fb_info(struct fb_info *info) { -- cgit v1.2.3 From 701d2054fa317188cd4039c84e72c73254013b23 Mon Sep 17 00:00:00 2001 From: Thomas Zimmermann Date: Tue, 13 Jun 2023 13:07:13 +0200 Subject: fbdev: Make support for userspace interfaces configurable Add Kconfig option CONFIG_FB_DEVICE and make the virtual fbdev device optional. If the new option has not been selected, fbdev does not create files in devfs, sysfs or procfs. Most modern Linux systems run a DRM-based graphics stack that uses the kernel's framebuffer console, but has otherwise deprecated fbdev support. Yet fbdev userspace interfaces are still present. The option makes it possible to use the fbdev subsystem as console implementation without support for userspace. This closes potential entry points to manipulate kernel or I/O memory via framebuffers. It also prevents the execution of driver code via ioctl or sysfs, both of which might allow malicious software to exploit bugs in the fbdev code. A small number of fbdev drivers require struct fbinfo.dev to be initialized, usually for the support of sysfs interface. Make these drivers depend on FB_DEVICE. They can later be fixed if necessary. v3: * effect -> affect in Kconfig help (Daniel) v2: * set FB_DEVICE default to y (Geert) * comment on {get,put}_device() (Sam) * Kconfig fixes (Sam) * add TODO item about FB_DEVICE dependencies (Sam) Signed-off-by: Thomas Zimmermann Acked-by: Greg Kroah-Hartman Reviewed-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20230613110953.24176-39-tzimmermann@suse.de --- include/linux/fb.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include/linux') diff --git a/include/linux/fb.h b/include/linux/fb.h index a7f55edca373..1d5c13f34b09 100644 --- a/include/linux/fb.h +++ b/include/linux/fb.h @@ -481,7 +481,9 @@ struct fb_info { const struct fb_ops *fbops; struct device *device; /* This is the parent */ +#if defined(CONFIG_FB_DEVICE) struct device *dev; /* This is this fb device */ +#endif int class_flag; /* private sysfs flags */ #ifdef CONFIG_FB_TILEBLITTING struct fb_tile_ops *tileops; /* Tile Blitting */ -- cgit v1.2.3 From 8b0d13545b091729e0aa05ff9981e2d06c1e2ee5 Mon Sep 17 00:00:00 2001 From: Thomas Zimmermann Date: Thu, 6 Jul 2023 12:42:14 +0200 Subject: efi: Do not include from EFI header The header file does not need anything from . Declare struct screen_info and remove the include statements. Update a number of source files that require struct screen_info's definition. v2: * update loongarch (Jingfeng) Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas Reviewed-by: Sui Jingfeng Cc: Ard Biesheuvel Cc: Russell King Cc: Catalin Marinas Cc: Will Deacon Reviewed-by: Arnd Bergmann Link: https://patchwork.freedesktop.org/patch/msgid/20230706104852.27451-2-tzimmermann@suse.de --- include/linux/efi.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'include/linux') diff --git a/include/linux/efi.h b/include/linux/efi.h index 571d1a6e1b74..360895a5572c 100644 --- a/include/linux/efi.h +++ b/include/linux/efi.h @@ -24,10 +24,11 @@ #include #include #include -#include #include +struct screen_info; + #define EFI_SUCCESS 0 #define EFI_LOAD_ERROR ( 1 | (1UL << (BITS_PER_LONG-1))) #define EFI_INVALID_PARAMETER ( 2 | (1UL << (BITS_PER_LONG-1))) -- cgit v1.2.3 From a78b4b17eb8ad503e694b39fd61681f2b612b79e Mon Sep 17 00:00:00 2001 From: Thomas Zimmermann Date: Thu, 6 Jul 2023 12:42:16 +0200 Subject: sysfb: Do not include from sysfb header The header file does not need anything from . Declare struct screen_info and remove the include statements. Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas Reviewed-by: Sui Jingfeng Cc: Ard Biesheuvel Cc: Hans de Goede Cc: Javier Martinez Canillas Reviewed-by: Arnd Bergmann Link: https://patchwork.freedesktop.org/patch/msgid/20230706104852.27451-4-tzimmermann@suse.de --- include/linux/sysfb.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'include/linux') diff --git a/include/linux/sysfb.h b/include/linux/sysfb.h index c1ef5fc60a3c..19cb803dd5ec 100644 --- a/include/linux/sysfb.h +++ b/include/linux/sysfb.h @@ -9,7 +9,8 @@ #include #include -#include + +struct screen_info; enum { M_I17, /* 17-Inch iMac */ -- cgit v1.2.3 From 0444fa357c16a4c36c6c6e3ef13e690875fad208 Mon Sep 17 00:00:00 2001 From: Thomas Zimmermann Date: Sat, 15 Jul 2023 20:51:59 +0200 Subject: fbdev: Remove FBINFO_DEFAULT and FBINFO_FLAG_DEFAULT Remove the unused flags FBINFO_DEFAULT and FBINFO_FLAG_DEFAULT. No functional changes. Signed-off-by: Thomas Zimmermann Acked-by: Sam Ravnborg Cc: Helge Deller Link: https://patchwork.freedesktop.org/patch/msgid/20230715185343.7193-18-tzimmermann@suse.de --- include/linux/fb.h | 3 --- 1 file changed, 3 deletions(-) (limited to 'include/linux') diff --git a/include/linux/fb.h b/include/linux/fb.h index 1d5c13f34b09..43458f582f35 100644 --- a/include/linux/fb.h +++ b/include/linux/fb.h @@ -383,7 +383,6 @@ struct fb_tile_ops { #endif /* CONFIG_FB_TILEBLITTING */ /* FBINFO_* = fb_info.flags bit flags */ -#define FBINFO_DEFAULT 0 #define FBINFO_HWACCEL_DISABLED 0x0002 /* When FBINFO_HWACCEL_DISABLED is set: * Hardware acceleration is turned off. Software implementations @@ -504,8 +503,6 @@ struct fb_info { bool skip_vt_switch; /* no VT switch on suspend/resume required */ }; -#define FBINFO_FLAG_DEFAULT FBINFO_DEFAULT - /* This will go away * fbset currently hacks in FB_ACCELF_TEXT into var.accel_flags * when it wants to turn the acceleration engine on. This is -- cgit v1.2.3 From 6f0f6941624d6ded57d362e47e07f8ffe77fa394 Mon Sep 17 00:00:00 2001 From: Thomas Zimmermann Date: Fri, 7 Jul 2023 10:31:52 +0200 Subject: fbdev: Add fb_ops init macros for framebuffers in DMA-able memory Add initializer macros for struct fb_ops for framebuffers in DMA-able memory areas. Also add a corresponding Kconfig token. As of now, this is equivalent to system framebuffers and mostly useful for labeling drivers correctly. A later patch may add a generic DMA-specific mmap operation. Linux offers a number of dma_mmap_*() helpers for different use cases. Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas Acked-by: Maxime Ripard Cc: Helge Deller Link: https://patchwork.freedesktop.org/patch/msgid/20230707083422.18691-2-tzimmermann@suse.de --- include/linux/fb.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'include/linux') diff --git a/include/linux/fb.h b/include/linux/fb.h index 43458f582f35..cb23f7d7df10 100644 --- a/include/linux/fb.h +++ b/include/linux/fb.h @@ -591,6 +591,19 @@ extern ssize_t fb_sys_write(struct fb_info *info, const char __user *buf, __FB_DEFAULT_SYS_OPS_DRAW, \ __FB_DEFAULT_SYS_OPS_MMAP +/* + * Helpers for framebuffers in DMA-able memory + */ + +#define __FB_DEFAULT_DMA_OPS_RDWR \ + .fb_read = fb_sys_read, \ + .fb_write = fb_sys_write + +#define __FB_DEFAULT_DMA_OPS_DRAW \ + .fb_fillrect = sys_fillrect, \ + .fb_copyarea = sys_copyarea, \ + .fb_imageblit = sys_imageblit + /* drivers/video/fbmem.c */ extern int register_framebuffer(struct fb_info *fb_info); extern void unregister_framebuffer(struct fb_info *fb_info); -- cgit v1.2.3 From 94fc7ad91b0da4c13c0f7fdf96f24b2baa2eccc0 Mon Sep 17 00:00:00 2001 From: Thomas Zimmermann Date: Fri, 7 Jul 2023 10:32:02 +0200 Subject: fbdev: Remove FB_DEFAULT_SYS_OPS Remove the initializer macro FB_DEFAULT_SYS_OPS and its helper macro __FB_DEFAULT_SYS_OPS_MMAP. There are no users. Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas Acked-by: Maxime Ripard Cc: Helge Deller (maintainer:FRAMEBUFFER LAYER) Link: https://patchwork.freedesktop.org/patch/msgid/20230707083422.18691-12-tzimmermann@suse.de --- include/linux/fb.h | 8 -------- 1 file changed, 8 deletions(-) (limited to 'include/linux') diff --git a/include/linux/fb.h b/include/linux/fb.h index cb23f7d7df10..a63077154ff6 100644 --- a/include/linux/fb.h +++ b/include/linux/fb.h @@ -583,14 +583,6 @@ extern ssize_t fb_sys_write(struct fb_info *info, const char __user *buf, .fb_copyarea = sys_copyarea, \ .fb_imageblit = sys_imageblit -#define __FB_DEFAULT_SYS_OPS_MMAP \ - .fb_mmap = NULL /* default implementation */ - -#define FB_DEFAULT_SYS_OPS \ - __FB_DEFAULT_SYS_OPS_RDWR, \ - __FB_DEFAULT_SYS_OPS_DRAW, \ - __FB_DEFAULT_SYS_OPS_MMAP - /* * Helpers for framebuffers in DMA-able memory */ -- cgit v1.2.3 From 9c053ef5c8d4c0675756c3fca059f338fdf1d37b Mon Sep 17 00:00:00 2001 From: Thomas Zimmermann Date: Fri, 7 Jul 2023 10:32:03 +0200 Subject: fbdev: Harmonize some comments in Make the comments for I/O, system and DMA memory say the same. Makes the header file's structure more obvious. Suggested-by: Javier Martinez Canillas Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas Link: https://patchwork.freedesktop.org/patch/msgid/20230707083422.18691-13-tzimmermann@suse.de --- include/linux/fb.h | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) (limited to 'include/linux') diff --git a/include/linux/fb.h b/include/linux/fb.h index a63077154ff6..2ef7788311fc 100644 --- a/include/linux/fb.h +++ b/include/linux/fb.h @@ -526,7 +526,7 @@ extern int fb_pan_display(struct fb_info *info, struct fb_var_screeninfo *var); extern int fb_blank(struct fb_info *info, int blank); /* - * Drawing operations where framebuffer is in I/O memory + * Helpers for framebuffers in I/O memory */ extern void cfb_fillrect(struct fb_info *info, const struct fb_fillrect *rect); @@ -537,10 +537,6 @@ extern ssize_t fb_io_read(struct fb_info *info, char __user *buf, extern ssize_t fb_io_write(struct fb_info *info, const char __user *buf, size_t count, loff_t *ppos); -/* - * Initializes struct fb_ops for framebuffers in I/O memory. - */ - #define __FB_DEFAULT_IO_OPS_RDWR \ .fb_read = fb_io_read, \ .fb_write = fb_io_write @@ -559,7 +555,7 @@ extern ssize_t fb_io_write(struct fb_info *info, const char __user *buf, __FB_DEFAULT_IO_OPS_MMAP /* - * Drawing operations where framebuffer is in system RAM + * Helpers for framebuffers in system memory */ extern void sys_fillrect(struct fb_info *info, const struct fb_fillrect *rect); @@ -570,10 +566,6 @@ extern ssize_t fb_sys_read(struct fb_info *info, char __user *buf, extern ssize_t fb_sys_write(struct fb_info *info, const char __user *buf, size_t count, loff_t *ppos); -/* - * Initializes struct fb_ops for framebuffers in system memory. - */ - #define __FB_DEFAULT_SYS_OPS_RDWR \ .fb_read = fb_sys_read, \ .fb_write = fb_sys_write -- cgit v1.2.3 From 4520844b44323ebc7085020d798be166322672fd Mon Sep 17 00:00:00 2001 From: Thomas Zimmermann Date: Sat, 29 Jul 2023 21:26:46 +0200 Subject: fbdev: Use _IOMEM_ infix for I/O-memory helpers Change the infix for fbdev's I/O-memory helpers from _IO_ to _IOMEM_ to distiguish them from other types of I/O, such as file operations. The helpers operate on memory ranges in the I/O address space and the naming should make this clear. Adapt all users. No functional changes. Suggested-by: Helge Deller Signed-off-by: Thomas Zimmermann Reviewed-by: Sam Ravnborg Acked-by: Helge Deller Link: https://patchwork.freedesktop.org/patch/msgid/20230729193157.15446-2-tzimmermann@suse.de --- include/linux/fb.h | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'include/linux') diff --git a/include/linux/fb.h b/include/linux/fb.h index 2ef7788311fc..bb5eb98cde83 100644 --- a/include/linux/fb.h +++ b/include/linux/fb.h @@ -537,22 +537,22 @@ extern ssize_t fb_io_read(struct fb_info *info, char __user *buf, extern ssize_t fb_io_write(struct fb_info *info, const char __user *buf, size_t count, loff_t *ppos); -#define __FB_DEFAULT_IO_OPS_RDWR \ +#define __FB_DEFAULT_IOMEM_OPS_RDWR \ .fb_read = fb_io_read, \ .fb_write = fb_io_write -#define __FB_DEFAULT_IO_OPS_DRAW \ +#define __FB_DEFAULT_IOMEM_OPS_DRAW \ .fb_fillrect = cfb_fillrect, \ .fb_copyarea = cfb_copyarea, \ .fb_imageblit = cfb_imageblit -#define __FB_DEFAULT_IO_OPS_MMAP \ +#define __FB_DEFAULT_IOMEM_OPS_MMAP \ .fb_mmap = NULL /* default implementation */ -#define FB_DEFAULT_IO_OPS \ - __FB_DEFAULT_IO_OPS_RDWR, \ - __FB_DEFAULT_IO_OPS_DRAW, \ - __FB_DEFAULT_IO_OPS_MMAP +#define FB_DEFAULT_IOMEM_OPS \ + __FB_DEFAULT_IOMEM_OPS_RDWR, \ + __FB_DEFAULT_IOMEM_OPS_DRAW, \ + __FB_DEFAULT_IOMEM_OPS_MMAP /* * Helpers for framebuffers in system memory -- cgit v1.2.3 From cd8a064ffa57df895a8ab79b1b9ad4847e79cf7b Mon Sep 17 00:00:00 2001 From: Thomas Zimmermann Date: Sat, 29 Jul 2023 21:26:47 +0200 Subject: fbdev: Use _SYSMEM_ infix for system-memory helpers Change the infix for fbdev's system-memory helpers from _SYS_ to _SYSMEM_. The helpers perform operations within system memory, but not on the state of the operating system itself. Naming should make this clear. Adapt all users. No functional changes. Suggested-by: Helge Deller Signed-off-by: Thomas Zimmermann Reviewed-by: Sam Ravnborg Acked-by: Helge Deller Link: https://patchwork.freedesktop.org/patch/msgid/20230729193157.15446-3-tzimmermann@suse.de --- include/linux/fb.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'include/linux') diff --git a/include/linux/fb.h b/include/linux/fb.h index bb5eb98cde83..76472482dc30 100644 --- a/include/linux/fb.h +++ b/include/linux/fb.h @@ -566,11 +566,11 @@ extern ssize_t fb_sys_read(struct fb_info *info, char __user *buf, extern ssize_t fb_sys_write(struct fb_info *info, const char __user *buf, size_t count, loff_t *ppos); -#define __FB_DEFAULT_SYS_OPS_RDWR \ +#define __FB_DEFAULT_SYSMEM_OPS_RDWR \ .fb_read = fb_sys_read, \ .fb_write = fb_sys_write -#define __FB_DEFAULT_SYS_OPS_DRAW \ +#define __FB_DEFAULT_SYSMEM_OPS_DRAW \ .fb_fillrect = sys_fillrect, \ .fb_copyarea = sys_copyarea, \ .fb_imageblit = sys_imageblit -- cgit v1.2.3 From b21f187ff1d032d7541fe441587da1e650b5907e Mon Sep 17 00:00:00 2001 From: Thomas Zimmermann Date: Sat, 29 Jul 2023 21:26:48 +0200 Subject: fbdev: Use _DMAMEM_ infix for DMA-memory helpers Change the infix for fbdev's DMA-memory helpers from _DMA_ to _DMAMEM_. The helpers perform operations within DMA-able memory, but they don't perform DMA operations. Naming should make this clear. Adapt all users. No functional changes. Signed-off-by: Thomas Zimmermann Reviewed-by: Sam Ravnborg Acked-by: Helge Deller Link: https://patchwork.freedesktop.org/patch/msgid/20230729193157.15446-4-tzimmermann@suse.de --- include/linux/fb.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'include/linux') diff --git a/include/linux/fb.h b/include/linux/fb.h index 76472482dc30..d255263c2d1d 100644 --- a/include/linux/fb.h +++ b/include/linux/fb.h @@ -579,11 +579,11 @@ extern ssize_t fb_sys_write(struct fb_info *info, const char __user *buf, * Helpers for framebuffers in DMA-able memory */ -#define __FB_DEFAULT_DMA_OPS_RDWR \ +#define __FB_DEFAULT_DMAMEM_OPS_RDWR \ .fb_read = fb_sys_read, \ .fb_write = fb_sys_write -#define __FB_DEFAULT_DMA_OPS_DRAW \ +#define __FB_DEFAULT_DMAMEM_OPS_DRAW \ .fb_fillrect = sys_fillrect, \ .fb_copyarea = sys_copyarea, \ .fb_imageblit = sys_imageblit -- cgit v1.2.3 From 744d35d3436fbeed9131f6ab717aeb3f775b19c4 Mon Sep 17 00:00:00 2001 From: Thomas Zimmermann Date: Sat, 29 Jul 2023 21:26:49 +0200 Subject: fbdev: Align deferred I/O with naming of helpers Deferred-I/O generator macros generate callbacks for struct fb_ops that operate on memory ranges in I/O address space or system address space. Rename the macros to use the _IOMEM_ and _SYSMEM_ infixes of their underlying helpers. Adapt all users. No functional changes. Signed-off-by: Thomas Zimmermann Reviewed-by: Sam Ravnborg Acked-by: Helge Deller Link: https://patchwork.freedesktop.org/patch/msgid/20230729193157.15446-5-tzimmermann@suse.de --- include/linux/fb.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'include/linux') diff --git a/include/linux/fb.h b/include/linux/fb.h index d255263c2d1d..16c3e6d6c55d 100644 --- a/include/linux/fb.h +++ b/include/linux/fb.h @@ -682,11 +682,11 @@ extern int fb_deferred_io_fsync(struct file *file, loff_t start, __damage_area(info, image->dx, image->dy, image->width, image->height); \ } -#define FB_GEN_DEFAULT_DEFERRED_IO_OPS(__prefix, __damage_range, __damage_area) \ +#define FB_GEN_DEFAULT_DEFERRED_IOMEM_OPS(__prefix, __damage_range, __damage_area) \ __FB_GEN_DEFAULT_DEFERRED_OPS_RDWR(__prefix, __damage_range, io) \ __FB_GEN_DEFAULT_DEFERRED_OPS_DRAW(__prefix, __damage_area, cfb) -#define FB_GEN_DEFAULT_DEFERRED_SYS_OPS(__prefix, __damage_range, __damage_area) \ +#define FB_GEN_DEFAULT_DEFERRED_SYSMEM_OPS(__prefix, __damage_range, __damage_area) \ __FB_GEN_DEFAULT_DEFERRED_OPS_RDWR(__prefix, __damage_range, sys) \ __FB_GEN_DEFAULT_DEFERRED_OPS_DRAW(__prefix, __damage_area, sys) -- cgit v1.2.3