summaryrefslogtreecommitdiff
path: root/include/linux/fb.h
diff options
context:
space:
mode:
authorThomas Zimmermann <tzimmermann@suse.de>2023-11-27 14:16:01 +0100
committerThomas Zimmermann <tzimmermann@suse.de>2023-11-29 12:20:53 +0100
commit8813e86f6d82a7931446c3cbc5d596f77d0f1ba6 (patch)
tree63ffd0e6dd822873b50eac67e6c0e59add7e9c93 /include/linux/fb.h
parentb3e8813773c568fd2d65e9752abfda27442e502e (diff)
fbdev: Remove default file-I/O implementations
Drop the default implementations for file read, write and mmap operations. Each fbdev driver must now provide an implementation and select any necessary helpers. If no implementation has been set, fbdev returns an errno code to user space. The code is the same as if the operation had not been set in the file_operations struct. This change makes the fbdev helpers for I/O memory optional. Most systems only use system-memory framebuffers via DRM's fbdev emulation. v2: * warn once if I/O callbacks are missing (Javier) Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Reviewed-by: Javier Martinez Canillas <javierm@redhat.com> Link: https://patchwork.freedesktop.org/patch/msgid/20231127131655.4020-33-tzimmermann@suse.de
Diffstat (limited to 'include/linux/fb.h')
-rw-r--r--include/linux/fb.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/linux/fb.h b/include/linux/fb.h
index 24f0ec366235..05dc9624897d 100644
--- a/include/linux/fb.h
+++ b/include/linux/fb.h
@@ -867,4 +867,9 @@ static inline bool fb_modesetting_disabled(const char *drvname)
#define fb_warn_once(fb_info, fmt, ...) \
pr_warn_once("fb%d: " fmt, (fb_info)->node, ##__VA_ARGS__)
+#define fb_WARN_ONCE(fb_info, condition, fmt, ...) \
+ WARN_ONCE(condition, "fb%d: " fmt, (fb_info)->node, ##__VA_ARGS__)
+#define fb_WARN_ON_ONCE(fb_info, x) \
+ fb_WARN_ONCE(fb_info, (x), "%s", "fb_WARN_ON_ONCE(" __stringify(x) ")")
+
#endif /* _LINUX_FB_H */