radeonfb: Fix hang on boot with some laptops
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Date: 2005-02-16 02:31:49
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 <benh@kernel.crashing.org> Index: linux-work/drivers/video/aty/radeon_base.c ===================================================================
--- linux-work.orig/drivers/video/aty/radeon_base.c 2005-02-13 23:18:52.000000000 +1100
+++ linux-work/drivers/video/aty/radeon_base.c 2005-02-16 13:25:30.000000000 +1100@@ -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