With commit 6104c37094e729f3d4ce65797002112735d49cd1 Author: Daniel Vetter <daniel.vetter@ffwll.ch> Date: Tue Aug 1 17:32:07 2017 +0200 fbcon: Make fbcon a built-time depency for fbdev we have a static dependency between fbcon and fbdev, and we can replace the indirection through the notifier chain with a function call. v2: Sam Ravnborg noticed that mach-pxa/am200epd.c has a notifier too, and listens to this. ... Looking at the code it seems to wait for some fb to show up, so that it can get the framebuffer base address from the fb_info struct. I suspect his is some firmware fbdev. Then it uses that information to let the real fbdev driver (metronomefb.c by the looks) get at the framebuffer memory. This doesn't looke like it's easy to fix (except by deleting the entire thing, seems untouched since 2008, we might be able to get away with that), so let's just stuff a few #ifdef into fb.h and fbmem.c and cry over them for a bit.
Showing the changes to include/linux (2 of 5 files). Show all
Unified · Split
| @@ -136,10 +136,13 @@ struct fb_cursor_user { · 135 unmodified lines | ||
| 136 | 136 | #define FB_EVENT_RESUME 0x03 |
| 137 | 137 | /* An entry from the modelist was removed */ |
| 138 | 138 | #define FB_EVENT_MODE_DELETE 0x04 |
| 139 | −/* A driver registered itself */ | |
| 139 | + | |
| 140 | +#ifdef CONFIG_GUMSTIX_AM200EPD | |
| 141 | +/* only used by mach-pxa/am200epd.c */ | |
| 140 | 142 | #define FB_EVENT_FB_REGISTERED 0x05 |
| 141 | −/* A driver unregistered itself */ | |
| 142 | 143 | #define FB_EVENT_FB_UNREGISTERED 0x06 |
| 144 | +#endif | |
| 145 | + | |
| 143 | 146 | /* CONSOLE-SPECIFIC: get console to framebuffer mapping */ |
| 144 | 147 | #define FB_EVENT_GET_CONSOLE_MAP 0x07 |
| 145 | 148 | /* CONSOLE-SPECIFIC: set console to framebuffer mapping */ |
| @@ -4,9 +4,13 @@ · 3 unmodified lines | ||
| 4 | 4 | #ifdef CONFIG_FRAMEBUFFER_CONSOLE |
| 5 | 5 | void __init fb_console_init(void); |
| 6 | 6 | void __exit fb_console_exit(void); |
| 7 | +int fbcon_fb_registered(struct fb_info *info); | |
| 8 | +void fbcon_fb_unregistered(struct fb_info *info); | |
| 7 | 9 | #else |
| 8 | 10 | static inline void fb_console_init(void) {} |
| 9 | 11 | static inline void fb_console_exit(void) {} |
| 12 | +static inline int fbcon_fb_registered(struct fb_info *info) { return 0; } | |
| 13 | +static inline void fbcon_fb_unregistered(struct fb_info *info) {} | |
| 10 | 14 | #endif |
| 11 | 15 | |
| 12 | 16 | #endif /* _LINUX_FBCON_H */ |