1 /* SPDX-License-Identifier: GPL-2.0 */
6 #include <linux/device.h>
8 #include <linux/mutex.h>
11 #if defined(CONFIG_FB_DEVICE)
12 int fb_register_chrdev(void);
13 void fb_unregister_chrdev(void);
15 static inline int fb_register_chrdev(void)
19 static inline void fb_unregister_chrdev(void)
24 #if defined(CONFIG_LOGO)
25 extern bool fb_center_logo
;
26 extern int fb_logo_count
;
27 int fb_prepare_logo(struct fb_info
*fb_info
, int rotate
);
28 int fb_show_logo(struct fb_info
*fb_info
, int rotate
);
30 static inline int fb_prepare_logo(struct fb_info
*info
, int rotate
)
34 static inline int fb_show_logo(struct fb_info
*info
, int rotate
)
38 #endif /* CONFIG_LOGO */
41 extern struct class *fb_class
;
42 extern struct mutex registration_lock
;
43 extern struct fb_info
*registered_fb
[FB_MAX
];
44 extern int num_registered_fb
;
45 struct fb_info
*get_fb_info(unsigned int idx
);
46 void put_fb_info(struct fb_info
*fb_info
);
49 #if defined(CONFIG_FB_DEVICE)
50 int fb_init_procfs(void);
51 void fb_cleanup_procfs(void);
53 static inline int fb_init_procfs(void)
57 static inline void fb_cleanup_procfs(void)
62 #if defined(CONFIG_FB_DEVICE)
63 int fb_device_create(struct fb_info
*fb_info
);
64 void fb_device_destroy(struct fb_info
*fb_info
);
66 static inline int fb_device_create(struct fb_info
*fb_info
)
69 * Acquire a reference on the parent device to avoid
70 * unplug operations behind our back. With the fbdev
71 * device enabled, this is performed within register_device().
73 get_device(fb_info
->device
);
77 static inline void fb_device_destroy(struct fb_info
*fb_info
)
79 /* Undo the get_device() from fb_device_create() */
80 put_device(fb_info
->device
);