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

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>

authored by

Antonino A. Daplas and committed by
Linus Torvalds
b9b2696d 04043849

+4 -3
+4 -3
drivers/video/nvidia/nvidia.c
··· 200 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 205 unsigned char tmp; 206 206 ··· 649 649 NVLockUnlock(par, 0); 650 650 } 651 651 652 - nvidia_vga_protect(par, 1); 652 + nvidia_screen_off(par, 1); 653 653 654 654 nvidia_write_regs(par, &par->ModeReg); 655 655 NVSetStartAddress(par, 0); ··· 687 687 688 688 par->cursor_reset = 1; 689 689 690 - nvidia_vga_protect(par, 0); 690 + nvidia_screen_off(par, 0); 691 691 692 692 #ifdef CONFIG_BOOTX_TEXT 693 693 /* Update debug text engine */ ··· 696 696 info->var.bits_per_pixel, info->fix.line_length); 697 697 #endif 698 698 699 + NVLockUnlock(par, 0); 699 700 NVTRACE_LEAVE(); 700 701 return 0; 701 702 }