Date:2011-03-23 02:03:36 (11 years 6 months ago)
Author:Maarten ter Huurne
Commit:e84aa5403dc24f85e23d334d9a6b1e47bb418813
Message:MIPS: JZ4740: SLCD: Make blanking and TV-out mutually exclusive.

Perhaps this is overkill, but at least it does not crash anymore.
Not tested yet on an actual TV.
Files: drivers/video/jz4740_slcd_fb.c (3 diffs)

Change Details

drivers/video/jz4740_slcd_fb.c
473473static int jzfb_blank(int blank_mode, struct fb_info *info)
474474{
475475    struct jzfb* jzfb = info->par;
476    int ret = 0;
476477    int new_enabled = (blank_mode == FB_BLANK_UNBLANK);
477478
478479    mutex_lock(&jzfb->lock);
...... 
480481        if (!jzfb->is_enabled)
481482            jzfb_enable(jzfb);
482483    } else {
483        if (jzfb->is_enabled)
484            jzfb_disable(jzfb);
484        if (jzfb->is_enabled) {
485            /* No sleep in TV-out mode. */
486            if (readl(jzfb->base + JZ_REG_LCD_CFG) & JZ_LCD_CFG_SLCD)
487                jzfb_disable(jzfb);
488            else
489                ret = -EBUSY;
490        }
485491    }
486    jzfb->is_enabled = new_enabled;
492    if (!ret)
493        jzfb->is_enabled = new_enabled;
487494    mutex_unlock(&jzfb->lock);
488495
489    return 0;
496    return ret;
490497}
491498
492499static int jzfb_pan_display(struct fb_var_screeninfo *var, struct fb_info *info)
...... 
634641    struct jzfb *jzfb = info->par;
635642    switch (cmd) {
636643        case FBIOA320TVOUT:
644            /* No TV-out mode while sleeping. */
645            if (!jzfb->is_enabled)
646                return -EBUSY;
647
637648            jzfb_tv_out(jzfb, arg);
638649            break;
639650        default:

Archive Download the corresponding diff file



interactive