From: Antonino A. Daplas Date: Fri, 16 Mar 2007 21:38:18 +0000 (-0800) Subject: [PATCH] savagefb: Fix black screen on load in Savage IX X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=5b600464f0514efd49d24182daf0e9d62cf8bb8f;p=openwrt%2Fstaging%2Fblogic.git [PATCH] savagefb: Fix black screen on load in Savage IX This is a hack that seems to kick start the 2D engine of the Savage IX in some Toshiba laptops. Without this, the laptop starts with a black screen and occasionally crashes X. Signed-off-by: Antonino Daplas Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/drivers/video/savage/savagefb_driver.c b/drivers/video/savage/savagefb_driver.c index 4afa30522fdb..d952bf3199a6 100644 --- a/drivers/video/savage/savagefb_driver.c +++ b/drivers/video/savage/savagefb_driver.c @@ -384,6 +384,19 @@ SavageSetup2DEngine(struct savagefb_par *par) BCI_SEND(0); BCI_SEND(BCI_CMD_SETREG | (1 << 16) | BCI_GBD2); BCI_SEND(GlobalBitmapDescriptor); + + /* + * I don't know why, sending this twice fixes the intial black screen, + * prevents X from crashing at least in Toshiba laptops with SavageIX. + * --Tony + */ + par->bci_ptr = 0; + par->SavageWaitFifo(par, 4); + + BCI_SEND(BCI_CMD_SETREG | (1 << 16) | BCI_GBD1); + BCI_SEND(0); + BCI_SEND(BCI_CMD_SETREG | (1 << 16) | BCI_GBD2); + BCI_SEND(GlobalBitmapDescriptor); } static void savagefb_set_clip(struct fb_info *info)