Skip to content

Commit

Permalink
nvidiafb: ensure that CRTC registers are accessible
Browse files Browse the repository at this point in the history
- 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>
  • Loading branch information
Antonino A. Daplas authored and Linus Torvalds committed May 8, 2007
1 parent 0404384 commit b9b2696
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions drivers/video/nvidia/nvidia.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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 */
Expand All @@ -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;
}
Expand Down

0 comments on commit b9b2696

Please sign in to comment.