Commit 9bd4ca7a authored by Brian Swetland's avatar Brian Swetland Committed by Juha Yrjola

omapfb: panel enable/disable reordering

Some LCD panels require the pixel clock to be active before being
able to enable them.
Signed-off-by: default avatarBrian Swetland <swetland@google.com>
Signed-off-by: default avatarJuha Yrjl <juha.yrjola@nokia.com>
parent 0de555ee
...@@ -349,9 +349,9 @@ static int omapfb_blank(int blank, struct fb_info *fbi) ...@@ -349,9 +349,9 @@ static int omapfb_blank(int blank, struct fb_info *fbi)
switch (blank) { switch (blank) {
case VESA_NO_BLANKING: case VESA_NO_BLANKING:
if (fbdev->state == OMAPFB_SUSPENDED) { if (fbdev->state == OMAPFB_SUSPENDED) {
fbdev->panel->enable();
if (fbdev->ctrl->resume) if (fbdev->ctrl->resume)
fbdev->ctrl->resume(); fbdev->ctrl->resume();
fbdev->panel->enable();
fbdev->state = OMAPFB_ACTIVE; fbdev->state = OMAPFB_ACTIVE;
if (fbdev->ctrl->get_update_mode() == if (fbdev->ctrl->get_update_mode() ==
OMAPFB_MANUAL_UPDATE) OMAPFB_MANUAL_UPDATE)
...@@ -360,9 +360,9 @@ static int omapfb_blank(int blank, struct fb_info *fbi) ...@@ -360,9 +360,9 @@ static int omapfb_blank(int blank, struct fb_info *fbi)
break; break;
case VESA_POWERDOWN: case VESA_POWERDOWN:
if (fbdev->state == OMAPFB_ACTIVE) { if (fbdev->state == OMAPFB_ACTIVE) {
fbdev->panel->disable();
if (fbdev->ctrl->suspend) if (fbdev->ctrl->suspend)
fbdev->ctrl->suspend(); fbdev->ctrl->suspend();
fbdev->panel->disable();
fbdev->state = OMAPFB_SUSPENDED; fbdev->state = OMAPFB_SUSPENDED;
} }
break; break;
...@@ -1108,11 +1108,12 @@ static void omapfb_free_resources(struct omapfb_device *fbdev, int state) ...@@ -1108,11 +1108,12 @@ static void omapfb_free_resources(struct omapfb_device *fbdev, int state)
switch (state) { switch (state) {
case OMAPFB_ACTIVE: case OMAPFB_ACTIVE:
unregister_framebuffer(fbdev->fb_info); unregister_framebuffer(fbdev->fb_info);
case 6: case 7:
omapfb_unregister_sysfs(fbdev); omapfb_unregister_sysfs(fbdev);
omapfb_set_update_mode(fbdev, OMAPFB_UPDATE_DISABLED); case 6:
case 5:
fbdev->panel->disable(); fbdev->panel->disable();
case 5:
omapfb_set_update_mode(fbdev, OMAPFB_UPDATE_DISABLED);
case 4: case 4:
fbinfo_cleanup(fbdev); fbinfo_cleanup(fbdev);
case 3: case 3:
...@@ -1296,11 +1297,6 @@ static int omapfb_probe(struct platform_device *pdev) ...@@ -1296,11 +1297,6 @@ static int omapfb_probe(struct platform_device *pdev)
omap_set_dma_priority(OMAP_DMA_PORT_EMIFF, 15); omap_set_dma_priority(OMAP_DMA_PORT_EMIFF, 15);
#endif #endif
r = fbdev->panel->enable();
if (r)
goto cleanup;
init_state++;
r = ctrl_change_mode(fbdev); r = ctrl_change_mode(fbdev);
if (r) { if (r) {
pr_err("mode setting failed\n"); pr_err("mode setting failed\n");
...@@ -1311,6 +1307,12 @@ static int omapfb_probe(struct platform_device *pdev) ...@@ -1311,6 +1307,12 @@ static int omapfb_probe(struct platform_device *pdev)
omapfb_set_update_mode(fbdev, manual_update ? omapfb_set_update_mode(fbdev, manual_update ?
OMAPFB_MANUAL_UPDATE : OMAPFB_AUTO_UPDATE); OMAPFB_MANUAL_UPDATE : OMAPFB_AUTO_UPDATE);
init_state++;
r = fbdev->panel->enable();
if (r)
goto cleanup;
init_state++;
r = omapfb_register_sysfs(fbdev); r = omapfb_register_sysfs(fbdev);
if (r) if (r)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment