radeonfb: Fix hang on boot with some laptops
Hi !
It appears that access to the PLL registers of the radeon chip is unreliable while the card is in "legacy VGA" text mode. I don't have a good explanation yet, it might be the BIOS mucking around behind my back. This fixes the lockup by moving the code that enables/disables the dynamic power management to after the mode is set.
I'm still waiting for a proper explanation from ATI...
Signed-off-by Benjamin Herrenschmidt <[email protected]>
drivers/video/aty/radeon_base.c +7 -7
@@ -2361,13 +2361,6 @@pci_set_drvdata (pdev, info); -/* Setup Power Management capabilities */ -if (default_dynclk <-1 ) { -/* -2 is special: means ON on mobility chips and do not change on others */ -radeonfb_pm_init (rinfo, rinfo->is_mobility ?1 :-1 ); - }else -radeonfb_pm_init (rinfo, default_dynclk); -/* Register with fbdev layer */ ret =register_framebuffer (info);if (ret <0 ) {
@@ -2376,6 +2369,13 @@ goto err_unmap_fb; } +/* Setup Power Management capabilities */ +if (default_dynclk <-1 ) { +/* -2 is special: means ON on mobility chips and do not change on others */ +radeonfb_pm_init (rinfo, rinfo->is_mobility ?1 :-1 ); + }else +radeonfb_pm_init (rinfo, default_dynclk); +#ifdef CONFIG_MTRR rinfo->mtrr_hdl = nomtrr ? -1 : mtrr_add(rinfo->fb_base_phys, rinfo->video_ram,
-------------------------------------------------------
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://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click