Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

lxfb: fix console blanking

Simply enabling DAC blanking without turning off the CRT seems to be resulting
in characters remaining on the screen when the monitor blanks. This patch
turns off the CRT for all modes, and also powers down the DACs when vsync
and/or hsync are disabled.

Signed-off-by: Jordan Crouse <jordan.crouse@amd.com>
Acked-by: Andres Salomon <dilinger@debian.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by

Jordan Crouse and committed by
Linus Torvalds
104b198d be935d5b

+18 -10
+18 -10
drivers/video/geode/lxfb_ops.c
··· 517 517 int lx_blank_display(struct fb_info *info, int blank_mode) 518 518 { 519 519 struct lxfb_par *par = info->par; 520 - u32 dcfg, fp_pm; 521 - int blank, hsync, vsync, crt; 520 + u32 dcfg, misc, fp_pm; 521 + int blank, hsync, vsync; 522 522 523 523 /* CRT power saving modes. */ 524 524 switch (blank_mode) { 525 525 case FB_BLANK_UNBLANK: 526 - blank = 0; hsync = 1; vsync = 1; crt = 1; 526 + blank = 0; hsync = 1; vsync = 1; 527 527 break; 528 528 case FB_BLANK_NORMAL: 529 - blank = 1; hsync = 1; vsync = 1; crt = 1; 529 + blank = 1; hsync = 1; vsync = 1; 530 530 break; 531 531 case FB_BLANK_VSYNC_SUSPEND: 532 - blank = 1; hsync = 1; vsync = 0; crt = 1; 532 + blank = 1; hsync = 1; vsync = 0; 533 533 break; 534 534 case FB_BLANK_HSYNC_SUSPEND: 535 - blank = 1; hsync = 0; vsync = 1; crt = 1; 535 + blank = 1; hsync = 0; vsync = 1; 536 536 break; 537 537 case FB_BLANK_POWERDOWN: 538 - blank = 1; hsync = 0; vsync = 0; crt = 0; 538 + blank = 1; hsync = 0; vsync = 0; 539 539 break; 540 540 default: 541 541 return -EINVAL; ··· 545 545 dcfg &= ~(VP_DCFG_DAC_BL_EN | VP_DCFG_HSYNC_EN | VP_DCFG_VSYNC_EN | 546 546 VP_DCFG_CRT_EN); 547 547 if (!blank) 548 - dcfg |= VP_DCFG_DAC_BL_EN; 548 + dcfg |= VP_DCFG_DAC_BL_EN | VP_DCFG_CRT_EN; 549 549 if (hsync) 550 550 dcfg |= VP_DCFG_HSYNC_EN; 551 551 if (vsync) 552 552 dcfg |= VP_DCFG_VSYNC_EN; 553 - if (crt) 554 - dcfg |= VP_DCFG_CRT_EN; 553 + 555 554 write_vp(par, VP_DCFG, dcfg); 555 + 556 + misc = read_vp(par, VP_MISC); 557 + 558 + if (vsync && hsync) 559 + misc &= ~VP_MISC_DACPWRDN; 560 + else 561 + misc |= VP_MISC_DACPWRDN; 562 + 563 + write_vp(par, VP_MISC, misc); 556 564 557 565 /* Power on/off flat panel */ 558 566