From: Paul Menzel Date: Tue, 16 Jun 2009 22:34:37 +0000 (-0700) Subject: intelfb: fix a bug when changing video timing X-Git-Tag: v2.6.31-rc1~299^2~8 X-Git-Url: https://openfabrics.org/gitweb/?a=commitdiff_plain;h=b586640141ab5f4ab3b194419bc2c0f039e91dbc;p=~shefty%2Frdma-dev.git intelfb: fix a bug when changing video timing When changing video timing dynamically via fbset the screen sporadically is rendered black. With the attached fix which disables VCO prior to timing register change the problem disappears. I had a look at the Xserver register setup code. Here the VCO is disabled in the same way [1]. This patch is taken from vga-sync-field version 0.0.11 [2][3]. [1] http://cgit.freedesktop.org/xorg/driver/xf86-video-intel/tree/src/i830_= driver.c [2] http://lowbyte.de/vga-sync-fields/vga-sync-fields-0.0.11.tgz [3] http://easy-vdr.de/git?p=frc.git/.git;a=commit;h=dcc3b863e5a663652587619c357bd20075af6896 2587619c357bd20075af6896 Signed-off-by: Thomas Hilber Signed-off-by: Paul Menzel Cc: Krzysztof Helt Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/drivers/video/intelfb/intelfbdrv.c b/drivers/video/intelfb/intelfbdrv.c index ace14fe02fc..0cafd642fbc 100644 --- a/drivers/video/intelfb/intelfbdrv.c +++ b/drivers/video/intelfb/intelfbdrv.c @@ -1365,6 +1365,11 @@ static int intelfb_set_par(struct fb_info *info) DBG_MSG("intelfb_set_par (%dx%d-%d)\n", info->var.xres, info->var.yres, info->var.bits_per_pixel); + /* + * Disable VCO prior to timing register change. + */ + OUTREG(DPLL_A, INREG(DPLL_A) & ~DPLL_VCO_ENABLE); + intelfb_blank(FB_BLANK_POWERDOWN, info); if (ACCEL(dinfo, info))