source: trunk/target/linux/s3c24xx/patches-2.6.28/010-preserve-resolution.patch @ 14768

Last change on this file since 14768 was 14768, checked in by lars, 7 years ago

Switch back to the previous set resolution when unblanking the screen.

File size: 1.4 KB
  • drivers/video/display/jbt6k74.c

    diff --git a/drivers/video/display/jbt6k74.c b/drivers/video/display/jbt6k74.c
    index a1d48dd..2ca1bd4 100644
    a b int jbt6k74_enter_state(struct jbt_info *jbt, enum jbt_state new_state) 
    443443                break; 
    444444        } 
    445445         
    446         if (rc == 0) 
     446        if (rc == 0) { 
     447                switch (new_state) { 
     448                case JBT_STATE_NORMAL: 
     449                case JBT_STATE_QVGA_NORMAL: 
     450                        jbt->last_state = new_state; 
     451                        break; 
     452                default: 
     453                        break; 
     454                } 
    447455                jbt->state = new_state; 
     456        } 
    448457 
    449458        return rc; 
    450459} 
    static int fb_notifier_callback(struct notifier_block *self, 
    595604        switch (fb_blank) { 
    596605        case FB_BLANK_UNBLANK: 
    597606                dev_info(&jbt->spi_dev->dev, "**** jbt6k74 unblank\n"); 
    598                 jbt6k74_enter_state(jbt, JBT_STATE_NORMAL); 
     607                switch (jbt->last_state) { 
     608                case JBT_STATE_QVGA_NORMAL: 
     609                        jbt6k74_enter_state(jbt, JBT_STATE_QVGA_NORMAL); 
     610                        break; 
     611                default: 
     612                        jbt6k74_enter_state(jbt, JBT_STATE_NORMAL); 
     613                        break; 
     614                } 
    599615                break; 
    600616        case FB_BLANK_NORMAL: 
    601617                dev_info(&jbt->spi_dev->dev, "**** jbt6k74 normal\n"); 
    static int jbt_suspend(struct spi_device *spi, pm_message_t state) 
    720736{ 
    721737        struct jbt_info *jbt = dev_get_drvdata(&spi->dev); 
    722738 
    723         /* Save mode for resume */ 
    724         jbt->last_state = jbt->state; 
    725739        /* FIXME: deep standby causes WSOD on certain devices. We use 
    726740         * sleep as workaround */ 
    727741        jbt6k74_enter_state(jbt, JBT_STATE_SLEEP); 
Note: See TracBrowser for help on using the repository browser.