Sleep fix
Here's a fix for a hang when sleeping on some wallstreet revisions:
drivers/video/atyfb.c +7 -3
@@ -3922,13 +3922,15 @@/* Stop accel engine (stop bus mastering) */ if (info->current_par.accel_flags &FB_ACCELF_TEXT )reset_engine (info); -#if 1 -/* Backup fb content */ + +/* Backup fb content (apparently only required for some +chips, we keep it like this for now) +*/ info->save_framebuffer =vmalloc (nb);if (info->save_framebuffer)memcpy (info->save_framebuffer, (void *)info->frame_buffer, nb); -#endif +/* Blank display and LCD */ atyfbcon_blank (VESA_POWERDOWN +1 , (struct fb_info *)info);
@@ -3950,6 +3952,11 @@aty_st_le32 (POWER_MANAGEMENT , pm, info); do { pm = aty_ld_le32(POWER_MANAGEMENT, info); + /* There's apparently a problem with the chip ID 4c50 + here's a temp fix until ATI
gives me a definitive
+ answer. --BenH */
+ if (Gx == LP_CHIP_ID)
+ break;
} while ((pm & PWR_MGT_STATUS_MASK) != PWR_MGT_STATUS_SUSPEND); mdelay(500);
}
@@ -3969,10 +3976,12 @@
aty_st_le32(POWER_MANAGEMENT, pm, info);
do {
pm = aty_ld_le32(POWER_MANAGEMENT, info);
+ if (Gx == LP_CHIP_ID)
+ break;
} while ((pm & PWR_MGT_STATUS_MASK) != 0); mdelay(500);
}
-#if 1
+
/* Restore fb content */
if (info->save_framebuffer) {
memcpy((void *)info->frame_buffer,
@@ -3980,7 +3989,7 @@
vfree(info->save_framebuffer); info->save_framebuffer = 0;
}
-#endif
+
/* Restore display */
atyfb_set_par(&info->current_par, info); atyfbcon_blank(0, (struct fb_info *)info);
Signature · 3 lines
Perso. e-mail: <mailto:[email protected]> Work e-mail: <mailto:[email protected]> BenH. Web : <http://calvaweb.calvacom.fr/bh40/>
drivers/video/atyfb.c +14 -5
@@ -3922,13 +3922,15 @@/* Stop accel engine (stop bus mastering) */ if (info->current_par.accel_flags &FB_ACCELF_TEXT )reset_engine (info); -#if 1 -/* Backup fb content */ + +/* Backup fb content (apparently only required for some +chips, we keep it like this for now) +*/ info->save_framebuffer =vmalloc (nb);if (info->save_framebuffer)memcpy (info->save_framebuffer, (void *)info->frame_buffer, nb); -#endif +/* Blank display and LCD */ atyfbcon_blank (VESA_POWERDOWN +1 , (struct fb_info *)info);
@@ -3950,6 +3952,11 @@aty_st_le32 (POWER_MANAGEMENT , pm, info);do { pm =aty_ld_le32 (POWER_MANAGEMENT , info); +/* There's apparently a problem with the chip ID 4c50 +here's a temp fix until ATI gives me a definitive +answer. --BenH */ +if (Gx ==LP_CHIP_ID ) +break ; }while ((pm &PWR_MGT_STATUS_MASK ) !=PWR_MGT_STATUS_SUSPEND );mdelay (500 ); }
@@ -3969,10 +3976,12 @@aty_st_le32 (POWER_MANAGEMENT , pm, info);do { pm =aty_ld_le32 (POWER_MANAGEMENT , info); +if (Gx ==LP_CHIP_ID ) +break ; }while ((pm &PWR_MGT_STATUS_MASK ) !=0 );mdelay (500 ); } -#if 1 +/* Restore fb content */ if (info->save_framebuffer) { memcpy((void *)info->frame_buffer,
@@ -3980,7 +3989,7 @@vfree (info->save_framebuffer); info->save_framebuffer =0 ; } -#endif +/* Restore display */ atyfb_set_par (&info->current_par, info);atyfbcon_blank (0 , (struct fb_info *)info);