提交 b9b2696d 编写于 作者: A Antonino A. Daplas 提交者: Linus Torvalds

nvidiafb: ensure that CRTC registers are accessible

- Ensure that CRTC registers are accessible by unlocking them on set_par(),
  otherwise i2c reading will fail.

- The function nvidia_vga_protect(), does not protect the VGA registers, but
  turns off the screen.  Rename it to nvidia_screen_off().
Signed-off-by: NAntonino Daplas <adaplas@gmail.com>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 04043849
......@@ -200,7 +200,7 @@ static int nvidia_panel_tweak(struct nvidia_par *par,
return tweak;
}
static void nvidia_vga_protect(struct nvidia_par *par, int on)
static void nvidia_screen_off(struct nvidia_par *par, int on)
{
unsigned char tmp;
......@@ -649,7 +649,7 @@ static int nvidiafb_set_par(struct fb_info *info)
NVLockUnlock(par, 0);
}
nvidia_vga_protect(par, 1);
nvidia_screen_off(par, 1);
nvidia_write_regs(par, &par->ModeReg);
NVSetStartAddress(par, 0);
......@@ -687,7 +687,7 @@ static int nvidiafb_set_par(struct fb_info *info)
par->cursor_reset = 1;
nvidia_vga_protect(par, 0);
nvidia_screen_off(par, 0);
#ifdef CONFIG_BOOTX_TEXT
/* Update debug text engine */
......@@ -696,6 +696,7 @@ static int nvidiafb_set_par(struct fb_info *info)
info->var.bits_per_pixel, info->fix.line_length);
#endif
NVLockUnlock(par, 0);
NVTRACE_LEAVE();
return 0;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册