rk3066B lcdc: add AXI_MS_ID config,fix stanby issue
[firefly-linux-kernel-4.4.55.git] / drivers / video / fbmem.c
old mode 100644 (file)
new mode 100755 (executable)
index 5aac00e..ae7c421
@@ -354,6 +354,12 @@ static struct logo_data {
        const struct linux_logo *logo;
 } fb_logo __read_mostly;
 
+void fb_show_charge_logo(struct linux_logo *logo)
+{
+       fb_logo.logo = logo;
+       return;
+}
+
 static void fb_rotate_logo_ud(const u8 *in, u8 *out, u32 width, u32 height)
 {
        u32 size = width * height, i;
@@ -1050,6 +1056,7 @@ fb_blank(struct fb_info *info, int blank)
 
        return ret;
 }
+int fb_vaddr = 0;
 
 static long do_fb_ioctl(struct fb_info *info, unsigned int cmd,
                        unsigned long arg)
@@ -1651,6 +1658,7 @@ static int do_unregister_framebuffer(struct fb_info *fb_info)
        if (ret)
                return -EINVAL;
 
+       unlink_framebuffer(fb_info);
        if (fb_info->pixmap.addr &&
            (fb_info->pixmap.flags & FB_PIXMAP_DEFAULT))
                kfree(fb_info->pixmap.addr);
@@ -1658,7 +1666,6 @@ static int do_unregister_framebuffer(struct fb_info *fb_info)
        registered_fb[i] = NULL;
        num_registered_fb--;
        fb_cleanup_device(fb_info);
-       device_destroy(fb_class, MKDEV(FB_MAJOR, i));
        event.info = fb_info;
        fb_notifier_call_chain(FB_EVENT_FB_UNREGISTERED, &event);
 
@@ -1667,6 +1674,22 @@ static int do_unregister_framebuffer(struct fb_info *fb_info)
        return 0;
 }
 
+int unlink_framebuffer(struct fb_info *fb_info)
+{
+       int i;
+
+       i = fb_info->node;
+       if (i < 0 || i >= FB_MAX || registered_fb[i] != fb_info)
+               return -EINVAL;
+
+       if (fb_info->dev) {
+               device_destroy(fb_class, MKDEV(FB_MAJOR, i));
+               fb_info->dev = NULL;
+       }
+       return 0;
+}
+EXPORT_SYMBOL(unlink_framebuffer);
+
 void remove_conflicting_framebuffers(struct apertures_struct *a,
                                     const char *name, bool primary)
 {
@@ -1738,8 +1761,6 @@ void fb_set_suspend(struct fb_info *info, int state)
 {
        struct fb_event event;
 
-       if (!lock_fb_info(info))
-               return;
        event.info = info;
        if (state) {
                fb_notifier_call_chain(FB_EVENT_SUSPEND, &event);
@@ -1748,7 +1769,6 @@ void fb_set_suspend(struct fb_info *info, int state)
                info->state = FBINFO_STATE_RUNNING;
                fb_notifier_call_chain(FB_EVENT_RESUME, &event);
        }
-       unlock_fb_info(info);
 }
 
 /**