lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Tue, 10 Nov 2009 09:42:52 -0500
From:	Andrew Lutomirski <luto@....edu>
To:	Jesse Barnes <jbarnes@...tuousgeek.org>
Cc:	intel-gfx@...ts.freedesktop.org, linux-kernel@...r.kernel.org,
	dri-devel@...ts.sf.net
Subject: Re: [resend] i915: high power consumption after suspend/resume

Just to confuse matters further, the following patch does *not* help.
Even with this patch applied, power consumption often goes high when
resuming, and writing 1 to i915_wedged after fully resuming fixes it.

I now officially have no clue what's going on.  Maybe there's
something wrong with the i915 resume code that increases power
consumption.

diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c
index 7f436ec..71472a9 100644
--- a/drivers/gpu/drm/i915/i915_drv.c
+++ b/drivers/gpu/drm/i915/i915_drv.c
@@ -99,11 +99,28 @@ static int i915_resume(struct drm_device *dev)
 {
 	struct drm_i915_private *dev_priv = dev->dev_private;
 	int ret = 0;
+	u8 gdrst;
+	unsigned long timeout;
+

 	if (pci_enable_device(dev->pdev))
 		return -1;
 	pci_set_master(dev->pdev);

+	pci_read_config_byte(dev->pdev, GDRST, &gdrst);
+	pci_write_config_byte(dev->pdev, GDRST, gdrst | GDRST_RENDER);
+	udelay(50);
+	//pci_write_config_byte(dev->pdev, GDRST, gdrst & 0xfe);
+	
+	/* ...we don't want to loop forever though, 500ms should be plenty */
+	timeout = jiffies + msecs_to_jiffies(500);
+	do {
+		udelay(100);
+		pci_read_config_byte(dev->pdev, GDRST, &gdrst);
+	} while ((gdrst & 0x1) && time_after(timeout, jiffies));
+	printk(KERN_INFO "i915: Reset on resume took %d ms\n",
+	       jiffies_to_msecs(jiffies - timeout + msecs_to_jiffies(500)));
+
 	i915_restore_state(dev);

 	intel_opregion_init(dev, 1);

--Andy
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists