From: Antti Andreimann <Antti.Andreimann@mail.ee>
To: Volker Braun <vbraun@physics.upenn.edu>
Cc: linux-kernel@vger.kernel.org
Subject: Re: Trying to fix radeonfb suspending on IBM Thinkpad T41
Date: Mon, 24 Jan 2005 02:54:00 +0200 [thread overview]
Message-ID: <1106528040.17621.7.camel@localhost.localdomain> (raw)
In-Reply-To: <1106517245.10964.3.camel@carrot.hep.upenn.edu>
[-- Attachment #1: Type: text/plain, Size: 759 bytes --]
Ühel kenal päeval (pühapäev, 23. jaanuar 2005, 16:54-0500), kirjutas
Volker Braun:
> Update: I compiled a kernel with the radeonfb-massive-update-of-pm-
> code.patch. Now I can successfully resume from acpi S3 again. The power
> drain issue remains, it still uses about 5W in the suspend state.
radeonfb power management is not enabled on PC platform.
I cooked up some code to turn D2 sleep mode on for selected PC-s and
managed to get my ThinkPad to work.
Try this patch on top of radeonfb-massive.
NB! The patch has a model specific triger, so You MUST add Your laptop
model number to the top of the drivers/video/aty/radeon_pm.c.
--
Antti Andreimann - Security Expert
Using Linux since 1993
Member of ELUG since 29.01.2000
[-- Attachment #2: radeonfb-thinkpad-pm.patch --]
[-- Type: text/x-patch, Size: 1864 bytes --]
--- linux-2.6.11-rc2-tank/drivers/video/aty/radeon_pm.c.orig 2005-01-23 14:55:57.000000000 +0200
+++ linux-2.6.11-rc2-tank/drivers/video/aty/radeon_pm.c 2005-01-23 21:53:47.000000000 +0200
@@ -25,8 +25,31 @@
#include <asm/pmac_feature.h>
#endif
+/* For detecting supported PC laptops */
+#ifdef CONFIG_X86
+#include <linux/dmi.h>
+#endif
+
#include "ati_ids.h"
+#ifdef CONFIG_X86
+/* This array holds a list of supported PC laptops.
+ * Currently only few IBM models are tested.
+ * If you want to experiment, use dmidecode to find out
+ * vendor and product codes for Your laptop.
+ */
+static struct dmi_system_id __devinitdata radeonfb_dmi_table[] = {
+ {
+ .ident = "IBM ThinkPad T41 (2373-2FG)",
+ .matches = {
+ DMI_MATCH(DMI_SYS_VENDOR, "IBM"),
+ DMI_MATCH(DMI_PRODUCT_NAME, "23732FG"),
+ },
+ },
+ { },
+};
+#endif
+
void radeon_pm_disable_dynamic_mode(struct radeonfb_info *rinfo)
{
u32 tmp;
@@ -2748,6 +2771,24 @@
OUTREG(TV_DAC_CNTL, INREG(TV_DAC_CNTL) | 0x07000000);
}
#endif /* defined(CONFIG_PM) && defined(CONFIG_PPC_OF) */
+
+/* The PM code also works on some PC laptops.
+ * Only a few models are actually tested so Your mileage may vary.
+ * We can do D2 on at least M7 and M9 on some IBM ThinkPad T41 models.
+ */
+#if defined(CONFIG_PM) && defined(CONFIG_X86)
+ if (dmi_check_system(radeonfb_dmi_table)) {
+ if (rinfo->is_mobility && rinfo->pm_reg &&
+ rinfo->family <= CHIP_FAMILY_RV250)
+ rinfo->pm_mode |= radeon_pm_d2;
+
+ /* Power down TV DAC, that saves a significant amount of power,
+ * we'll have something better once we actually have some TVOut
+ * support
+ */
+ OUTREG(TV_DAC_CNTL, INREG(TV_DAC_CNTL) | 0x07000000);
+ }
+#endif /* defined(CONFIG_PM) && defined(CONFIG_X86) */
}
void radeonfb_pm_exit(struct radeonfb_info *rinfo)
next prev parent reply other threads:[~2005-01-24 0:54 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-01-23 3:25 Antti Andreimann
2005-01-23 4:33 ` Volker Braun
2005-01-23 21:54 ` Volker Braun
2005-01-24 0:54 ` Antti Andreimann [this message]
[not found] ` <1106537779.5069.2.camel@localhost.localdomain>
[not found] ` <1106552017.17621.13.camel@localhost.localdomain>
[not found] ` <1106600491.14176.21.camel@carrot.hep.upenn.edu>
2005-01-24 22:12 ` Antti Andreimann
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1106528040.17621.7.camel@localhost.localdomain \
--to=antti.andreimann@mail.ee \
--cc=linux-kernel@vger.kernel.org \
--cc=vbraun@physics.upenn.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome