diff options
author | Volker Braun <vbraun@physics.upenn.edu> | 2006-07-30 06:04:18 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-07-31 16:28:45 -0400 |
commit | 994aad251acab32a5d40d4a9501dc3e736562b6d (patch) | |
tree | 4c816fa097d07b2c4a4f46d26023af94f9a26822 /drivers/video/aty/radeonfb.h | |
parent | 256154fbc31c25a8df4d398232acfa9d4892224c (diff) |
[PATCH] radeonfb sleep fixes
Many IBM Thinkpad T4* models and some R* and X* with radeon video cards draw
too much power when suspended to RAM, reducing drastically the battery
lifetime. The solution is to enable suspend-to-D2 on these machines. They
are whitelisted through their subsystem vendor/device ID. This fixes
http://bugzilla.kernel.org/show_bug.cgi?id=3022
The patch introduces a framework to alter the pm_mode and reinit_func fields
of the radeonfb_info structure based on a whitelist. This should facilitate
future hardware-dependent workarounds. The workaround for the Samsung P35
that is already in the radeonfb code has been rewritten using this framework.
The behavior can be overridden with module options:
i) video=radeonfb:force_sleep=1
enable suspend-to-D2 also on non-whitelisted machines (useful for
testing new notebook models),
ii) video=radeonfb:ignore_devlist=1
Disable checking the whitelist and do not apply any workarounds.
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: "Antonino A. Daplas" <adaplas@pol.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/video/aty/radeonfb.h')
-rw-r--r-- | drivers/video/aty/radeonfb.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/video/aty/radeonfb.h b/drivers/video/aty/radeonfb.h index 38657b2d10eb..d5ff224a6258 100644 --- a/drivers/video/aty/radeonfb.h +++ b/drivers/video/aty/radeonfb.h | |||
@@ -273,6 +273,8 @@ enum radeon_pm_mode { | |||
273 | radeon_pm_off = 0x00000002, /* Can resume from D3 cold */ | 273 | radeon_pm_off = 0x00000002, /* Can resume from D3 cold */ |
274 | }; | 274 | }; |
275 | 275 | ||
276 | typedef void (*reinit_function_ptr)(struct radeonfb_info *rinfo); | ||
277 | |||
276 | struct radeonfb_info { | 278 | struct radeonfb_info { |
277 | struct fb_info *info; | 279 | struct fb_info *info; |
278 | 280 | ||
@@ -338,7 +340,7 @@ struct radeonfb_info { | |||
338 | int dynclk; | 340 | int dynclk; |
339 | int no_schedule; | 341 | int no_schedule; |
340 | enum radeon_pm_mode pm_mode; | 342 | enum radeon_pm_mode pm_mode; |
341 | void (*reinit_func)(struct radeonfb_info *rinfo); | 343 | reinit_function_ptr reinit_func; |
342 | 344 | ||
343 | /* Lock on register access */ | 345 | /* Lock on register access */ |
344 | spinlock_t reg_lock; | 346 | spinlock_t reg_lock; |
@@ -600,7 +602,7 @@ extern int radeon_probe_i2c_connector(struct radeonfb_info *rinfo, int conn, u8 | |||
600 | /* PM Functions */ | 602 | /* PM Functions */ |
601 | extern int radeonfb_pci_suspend(struct pci_dev *pdev, pm_message_t state); | 603 | extern int radeonfb_pci_suspend(struct pci_dev *pdev, pm_message_t state); |
602 | extern int radeonfb_pci_resume(struct pci_dev *pdev); | 604 | extern int radeonfb_pci_resume(struct pci_dev *pdev); |
603 | extern void radeonfb_pm_init(struct radeonfb_info *rinfo, int dynclk); | 605 | extern void radeonfb_pm_init(struct radeonfb_info *rinfo, int dynclk, int ignore_devlist, int force_sleep); |
604 | extern void radeonfb_pm_exit(struct radeonfb_info *rinfo); | 606 | extern void radeonfb_pm_exit(struct radeonfb_info *rinfo); |
605 | 607 | ||
606 | /* Monitor probe functions */ | 608 | /* Monitor probe functions */ |