@@ -3298,6 +3298,30 @@ done:
return ret;
}
+static void fbcon_con_bind(void)
+{
+ struct fb_info *info = NULL;
+
+ info = registered_fb[info_idx];
+ if (!info)
+ return;
+
+ if (info->fbops->fb_bind)
+ info->fbops->fb_bind(info);
+}
+
+static void fbcon_con_unbind(void)
+{
+ struct fb_info *info = NULL;
+
+ info = registered_fb[info_idx];
+ if (!info)
+ return;
+
+ if (info->fbops->fb_unbind)
+ info->fbops->fb_unbind(info);
+}
+
/*
* The console `switch' structure for the frame buffer based console
*/
@@ -3328,6 +3352,8 @@ static const struct consw fb_con = {
.con_resize = fbcon_resize,
.con_debug_enter = fbcon_debug_enter,
.con_debug_leave = fbcon_debug_leave,
+ .con_bind = fbcon_con_bind,
+ .con_unbind = fbcon_con_unbind,
};
static struct notifier_block fbcon_event_notifier = {
@@ -304,6 +304,10 @@ struct fb_ops {
/* called at KDB enter and leave time to prepare the console */
int (*fb_debug_enter)(struct fb_info *info);
int (*fb_debug_leave)(struct fb_info *info);
+
+ /* called when binding/unbinding */
+ void (*fb_bind)(struct fb_info *info);
+ void (*fb_unbind)(struct fb_info *info);
};
#ifdef CONFIG_FB_TILEBLITTING