Skip to content

Commit b9b2696

Browse files
adaplasLinus Torvalds
authored andcommitted
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>
1 parent 0404384 commit b9b2696

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

‎drivers/video/nvidia/nvidia.c‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ static int nvidia_panel_tweak(struct nvidia_par *par,
200200
return tweak;
201201
}
202202

203-
static void nvidia_vga_protect(struct nvidia_par *par, int on)
203+
static void nvidia_screen_off(struct nvidia_par *par, int on)
204204
{
205205
unsigned char tmp;
206206

@@ -649,7 +649,7 @@ static int nvidiafb_set_par(struct fb_info *info)
649649
NVLockUnlock(par, 0);
650650
}
651651

652-
nvidia_vga_protect(par, 1);
652+
nvidia_screen_off(par, 1);
653653

654654
nvidia_write_regs(par, &par->ModeReg);
655655
NVSetStartAddress(par, 0);
@@ -687,7 +687,7 @@ static int nvidiafb_set_par(struct fb_info *info)
687687

688688
par->cursor_reset = 1;
689689

690-
nvidia_vga_protect(par, 0);
690+
nvidia_screen_off(par, 0);
691691

692692
#ifdef CONFIG_BOOTX_TEXT
693693
/* Update debug text engine */
@@ -696,6 +696,7 @@ static int nvidiafb_set_par(struct fb_info *info)
696696
info->var.bits_per_pixel, info->fix.line_length);
697697
#endif
698698

699+
NVLockUnlock(par, 0);
699700
NVTRACE_LEAVE();
700701
return 0;
701702
}

0 commit comments

Comments
 (0)