diff options
author | Antonino A. Daplas <adaplas@gmail.com> | 2007-05-08 03:38:23 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-05-08 14:15:28 -0400 |
commit | b9b2696de920e7366e2ce0cdc3b3b7fc11e44e99 (patch) | |
tree | 2d1c3b7365350b332e7bb9b39acf98851bf14596 /drivers/video | |
parent | 0404384982b2f71eb00573c8f9da514106aca08c (diff) |
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: Antonino Daplas <adaplas@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/video')
-rw-r--r-- | drivers/video/nvidia/nvidia.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/video/nvidia/nvidia.c b/drivers/video/nvidia/nvidia.c index b97ec6901263..c6afafcfc24b 100644 --- a/drivers/video/nvidia/nvidia.c +++ b/drivers/video/nvidia/nvidia.c | |||
@@ -200,7 +200,7 @@ static int nvidia_panel_tweak(struct nvidia_par *par, | |||
200 | return tweak; | 200 | return tweak; |
201 | } | 201 | } |
202 | 202 | ||
203 | static void nvidia_vga_protect(struct nvidia_par *par, int on) | 203 | static void nvidia_screen_off(struct nvidia_par *par, int on) |
204 | { | 204 | { |
205 | unsigned char tmp; | 205 | unsigned char tmp; |
206 | 206 | ||
@@ -649,7 +649,7 @@ static int nvidiafb_set_par(struct fb_info *info) | |||
649 | NVLockUnlock(par, 0); | 649 | NVLockUnlock(par, 0); |
650 | } | 650 | } |
651 | 651 | ||
652 | nvidia_vga_protect(par, 1); | 652 | nvidia_screen_off(par, 1); |
653 | 653 | ||
654 | nvidia_write_regs(par, &par->ModeReg); | 654 | nvidia_write_regs(par, &par->ModeReg); |
655 | NVSetStartAddress(par, 0); | 655 | NVSetStartAddress(par, 0); |
@@ -687,7 +687,7 @@ static int nvidiafb_set_par(struct fb_info *info) | |||
687 | 687 | ||
688 | par->cursor_reset = 1; | 688 | par->cursor_reset = 1; |
689 | 689 | ||
690 | nvidia_vga_protect(par, 0); | 690 | nvidia_screen_off(par, 0); |
691 | 691 | ||
692 | #ifdef CONFIG_BOOTX_TEXT | 692 | #ifdef CONFIG_BOOTX_TEXT |
693 | /* Update debug text engine */ | 693 | /* Update debug text engine */ |
@@ -696,6 +696,7 @@ static int nvidiafb_set_par(struct fb_info *info) | |||
696 | info->var.bits_per_pixel, info->fix.line_length); | 696 | info->var.bits_per_pixel, info->fix.line_length); |
697 | #endif | 697 | #endif |
698 | 698 | ||
699 | NVLockUnlock(par, 0); | ||
699 | NVTRACE_LEAVE(); | 700 | NVTRACE_LEAVE(); |
700 | return 0; | 701 | return 0; |
701 | } | 702 | } |