Detaching fbcon: Add sysfs class device entry for fbcon
Subsystems (2)
PATCH 4/7 Detaching fbcon: Add sysfs class device entry for fbcon
In order for this feature to work, an interface will be needed. The most appropriate is sysfs. However, the framebuffer console has no sysfs entry yet. This will create a sysfs class device entry for fbcon under /sys/class/graphics.
Add a class_device entry 'fbcon' under class 'graphics'. Console-specific attributes which where previously under class/graphics/fb[x] are moved to class/graphics/fbcon. These attributes, 'con_rotate' and 'con_rotate_all', are also renamed to 'rotate' and 'rotate_all' respectively.
Signed-off-by Antonino Daplas <[email protected]>
---
drivers/video/Makefile | 8 +-- drivers/video/console/fbcon.c | 113 ++++++++++++++++++++++++++++++++++++++--- drivers/video/console/fbcon.h | 1 drivers/video/fbmem.c | 25 +-------- drivers/video/fbsysfs.c | 41 --------------- include/linux/fb.h | 7 --- 6 files changed, 112 insertions(+), 83 deletions(-)
drivers/video/Makefile +4 -4
@@ -4,15 +4,15 @@ # Rewritten to use lists instead of if-s # Each configuration option enables a list of files. -obj-$(CONFIG_VT) += console/ -obj-$(CONFIG_LOGO) += logo/ -obj-$(CONFIG_SYSFS) += backlight/ - obj-$(CONFIG_FB) += fb.o fb-y := fbmem.o fbmon.o fbcmap.o fbsysfs.o \ modedb.o fbcvt.o fb-objs := $(fb-y) +obj-$(CONFIG_VT) += console/ +obj-$(CONFIG_LOGO) += logo/ +obj-$(CONFIG_SYSFS) += backlight/ + obj-$(CONFIG_FB_CFB_FILLRECT) += cfbfillrect.o obj-$(CONFIG_FB_CFB_COPYAREA) += cfbcopyarea.o obj-$(CONFIG_FB_CFB_IMAGEBLIT) += cfbimgblt.o
drivers/video/console/fbcon.c +105 -8
147 lines not on this page · raw message
drivers/video/console/fbcon.h +1 -0
@@ -175,6 +175,7 @@ extern void fbcon_set_tileops(struct vc_#endif extern void fbcon_set_bitops (struct fbcon_ops *ops);extern int soft_cursor (struct fb_info *info,struct fb_cursor *cursor); +extern struct class *fb_class;#define FBCON_ATTRIBUTE_UNDERLINE 1#define FBCON_ATTRIBUTE_REVERSE 2
drivers/video/fbmem.c +2 -23
@@ -1276,8 +1276,8 @@ #ifdef HAVE_ARCH_FB_UNMAPPED_AREA#endif }; -static struct class *fb_class; - +struct class *fb_class; +EXPORT_SYMBOL (fb_class);/** * register_framebuffer - registers a frame buffer device * @fb_info: frame buffer info structure
@@ -1489,27 +1489,6 @@ int fb_new_modelist(struct fb_info *inforeturn err; } -/** -* fb_con_duit - user<->fbcon passthrough -* @info: struct fb_info -* @event: notification event to be passed to fbcon -* @data: private data -* -* DESCRIPTION -* This function is an fbcon-user event passing channel -* which bypasses fbdev. This is hopefully temporary -* until a user interface for fbcon is created -*/ -int fb_con_duit (struct fb_info *info,int event,void *data) -{ -struct fb_event evnt; - - evnt.info = info; - evnt.data = data; - -return blocking_notifier_call_chain (&fb_notifier_list, event, &evnt); -} -static char *video_options[FB_MAX ];static int ofonly;
drivers/video/fbsysfs.c +0 -41
53 lines not on this page · raw message
include/linux/fb.h +0 -7
@@ -515,12 +515,6 @@ #define FB_EVENT_NEW_MODELIST/* The resolution of the passed in fb_info about to change and all vc's should be changed */ #define FB_EVENT_MODE_CHANGE_ALL 0x0A -/* CONSOLE-SPECIFIC: set console rotation */ -#define FB_EVENT_SET_CON_ROTATE 0x0B -/* CONSOLE-SPECIFIC: get console rotation */ -#define FB_EVENT_GET_CON_ROTATE 0x0C -/* CONSOLE-SPECIFIC: rotate all consoles */ -#define FB_EVENT_SET_CON_ROTATE_ALL 0x0Dstruct fb_event {struct fb_info *info;
@@ -892,7 +886,6 @@ extern int fb_get_color_depth(struct fb_ struct fb_fix_screeninfo *fix);extern int fb_get_options (char *name,char **option);extern int fb_new_modelist (struct fb_info *info); -extern int fb_con_duit (struct fb_info *info,int event,void *data);extern struct fb_info *registered_fb[FB_MAX ];extern int num_registered_fb;