aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video/savage/savagefb_driver.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/video/savage/savagefb_driver.c')
-rw-r--r--drivers/video/savage/savagefb_driver.c18
1 files changed, 15 insertions, 3 deletions
diff --git a/drivers/video/savage/savagefb_driver.c b/drivers/video/savage/savagefb_driver.c
index 4afa30522fdb..0166ec2ccf32 100644
--- a/drivers/video/savage/savagefb_driver.c
+++ b/drivers/video/savage/savagefb_driver.c
@@ -384,6 +384,19 @@ SavageSetup2DEngine(struct savagefb_par *par)
384 BCI_SEND(0); 384 BCI_SEND(0);
385 BCI_SEND(BCI_CMD_SETREG | (1 << 16) | BCI_GBD2); 385 BCI_SEND(BCI_CMD_SETREG | (1 << 16) | BCI_GBD2);
386 BCI_SEND(GlobalBitmapDescriptor); 386 BCI_SEND(GlobalBitmapDescriptor);
387
388 /*
389 * I don't know why, sending this twice fixes the intial black screen,
390 * prevents X from crashing at least in Toshiba laptops with SavageIX.
391 * --Tony
392 */
393 par->bci_ptr = 0;
394 par->SavageWaitFifo(par, 4);
395
396 BCI_SEND(BCI_CMD_SETREG | (1 << 16) | BCI_GBD1);
397 BCI_SEND(0);
398 BCI_SEND(BCI_CMD_SETREG | (1 << 16) | BCI_GBD2);
399 BCI_SEND(GlobalBitmapDescriptor);
387} 400}
388 401
389static void savagefb_set_clip(struct fb_info *info) 402static void savagefb_set_clip(struct fb_info *info)
@@ -496,7 +509,7 @@ static int common_calc_clock(long freq, int min_m, int min_n1, int max_n1,
496#ifdef SAVAGEFB_DEBUG 509#ifdef SAVAGEFB_DEBUG
497/* This function is used to debug, it prints out the contents of s3 regs */ 510/* This function is used to debug, it prints out the contents of s3 regs */
498 511
499static void SavagePrintRegs(void) 512static void SavagePrintRegs(struct savagefb_par *par)
500{ 513{
501 unsigned char i; 514 unsigned char i;
502 int vgaCRIndex = 0x3d4; 515 int vgaCRIndex = 0x3d4;
@@ -1525,7 +1538,7 @@ static int savagefb_set_par(struct fb_info *info)
1525 savagefb_set_fix(info); 1538 savagefb_set_fix(info);
1526 savagefb_set_clip(info); 1539 savagefb_set_clip(info);
1527 1540
1528 SavagePrintRegs(); 1541 SavagePrintRegs(par);
1529 return 0; 1542 return 0;
1530} 1543}
1531 1544
@@ -2155,7 +2168,6 @@ static int __devinit savagefb_probe(struct pci_dev* dev,
2155 int video_len; 2168 int video_len;
2156 2169
2157 DBG("savagefb_probe"); 2170 DBG("savagefb_probe");
2158 SavagePrintRegs();
2159 2171
2160 info = framebuffer_alloc(sizeof(struct savagefb_par), &dev->dev); 2172 info = framebuffer_alloc(sizeof(struct savagefb_par), &dev->dev);
2161 if (!info) 2173 if (!info)