Skip to contentSkip to conversation

fbdev: Fix lockup when switching to/from X/console

PATCH New Antonino A. Daplas 1 participant 1 message Nov 21, 2004 Framebuffer layer

lore
Share & tools
lore
#0 lore raw

PATCH 2/4 fbdev: Fix lockup when switching to/from X/console

- Do a set_par very late instead of during fbcon_blank by setting the FBINFO_MISC_MODESWITCHLATE flag which should help prevent lockups when switching from X
- Shorten chipset names that were missed before
- Do not validate modeline if monitor specifications are not available

---

 savagefb.c |   16 +++++++++-------
 1 files changed, 9 insertions(+), 7 deletions(-)
drivers/video/savage/savagefb.c +9 -7
diff -Nru a/drivers/video/savage/savagefb.c b/drivers/video/savage/savagefb.c
@@ -719,7 +719,8 @@
 		return -EINVAL;
 	}
 
-	if (!fb_validate_mode(var, info))
+	if (!info->monspecs.hfmax || !info->monspecs.vfmax ||
+	    !info->monspecs.dclkmax || !fb_validate_mode(var, info))
 		mode_valid = 1;
 
 	/* calculate modeline if supported by monitor */
@@ -1801,23 +1802,23 @@
 	switch (info->fix.accel) {
 	case FB_ACCEL_SUPERSAVAGE:
 		par->chip = S3_SUPERSAVAGE;
-		snprintf (info->fix.id, 16, "S3 SuperSavage");
+		snprintf (info->fix.id, 16, "SuperSavage");
 		break;
 	case FB_ACCEL_SAVAGE4:
 		par->chip = S3_SAVAGE4;
-		snprintf (info->fix.id, 16, "S3 Savage4");
+		snprintf (info->fix.id, 16, "Savage4");
 		break;
 	case FB_ACCEL_SAVAGE3D:
 		par->chip = S3_SAVAGE3D;
-		snprintf (info->fix.id, 16, "S3 Savage3D");
+		snprintf (info->fix.id, 16, "Savage3D");
 		break;
 	case FB_ACCEL_SAVAGE3D_MV:
 		par->chip = S3_SAVAGE3D;
-		snprintf (info->fix.id, 16, "S3 Savage3D-MV");
+		snprintf (info->fix.id, 16, "Savage3D-MV");
 		break;
 	case FB_ACCEL_SAVAGE2000:
 		par->chip = S3_SAVAGE2000;
-		snprintf (info->fix.id, 16, "S3 Savage2000");
+		snprintf (info->fix.id, 16, "Savage2000");
 		break;
 	case FB_ACCEL_SAVAGE_MX_MV:
 		par->chip = S3_SAVAGE_MX;
@@ -1882,7 +1883,8 @@
 	info->fbops          = &savagefb_ops;
 	info->flags          = FBINFO_DEFAULT |
 		               FBINFO_HWACCEL_YPAN |
-		               FBINFO_HWACCEL_XPAN;
+		               FBINFO_HWACCEL_XPAN |
+	                       FBINFO_MISC_MODESWITCHLATE;
 
 	info->pseudo_palette = par->pseudo_palette;
 

-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now.
http://productguide.itmanagersjournal.com/