diff options
Diffstat (limited to 'drivers/video/fb.c')
-rw-r--r-- | drivers/video/fb.c | 32 |
1 files changed, 27 insertions, 5 deletions
diff --git a/drivers/video/fb.c b/drivers/video/fb.c index e30ab59377..a4f1734996 100644 --- a/drivers/video/fb.c +++ b/drivers/video/fb.c @@ -29,6 +29,30 @@ static int fb_ioctl(struct cdev* cdev, int req, void *data) return 0; } +int fb_enable(struct fb_info *info) +{ + if (info->enabled) + return 0; + + info->fbops->fb_enable(info); + + info->enabled = true; + + return 0; +} + +int fb_disable(struct fb_info *info) +{ + if (!info->enabled) + return 0; + + info->fbops->fb_disable(info); + + info->enabled = false; + + return 0; +} + static int fb_enable_set(struct param_d *param, void *priv) { struct fb_info *info = priv; @@ -36,16 +60,11 @@ static int fb_enable_set(struct param_d *param, void *priv) enable = info->p_enable; - if (enable == info->enabled) - return 0; - if (enable) info->fbops->fb_enable(info); else info->fbops->fb_disable(info); - info->enabled = enable; - return 0; } @@ -219,6 +238,9 @@ int register_framebuffer(struct fb_info *info) strerror(-ret)); } + if (IS_ENABLED(CONFIG_FRAMEBUFFER_CONSOLE)) + register_fbconsole(info); + return 0; err_unregister: |