Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757382AbYJXSXb (ORCPT ); Fri, 24 Oct 2008 14:23:31 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752814AbYJXSXX (ORCPT ); Fri, 24 Oct 2008 14:23:23 -0400 Received: from outbound-mail-102.bluehost.com ([69.89.22.12]:51103 "HELO outbound-mail-102.bluehost.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1752667AbYJXSXX (ORCPT ); Fri, 24 Oct 2008 14:23:23 -0400 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=default; d=virtuousgeek.org; h=Received:From:To:Subject:Date:User-Agent:Cc:References:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding:Content-Disposition:Message-Id:X-Identified-User; b=b5nWXhcufYGPkgbHwKqEiGdVi1+uxrahb7ECfFLtTka20aedtit51YgUwLStT7MsJato8kaL+Yip6ow4d+3YdsNv2jw5aniMv41ZoBUZFqZpBP2lqEJSnDgPR5aRiI4B; From: Jesse Barnes To: Andres Freund Subject: Re: Current suspend issues on Lenovo X200 Date: Fri, 24 Oct 2008 11:23:17 -0700 User-Agent: KMail/1.10.1 (Linux/2.6.26.5-45.fc9.x86_64; KDE/4.1.2; x86_64; ; ) Cc: "Nico -telmich- Schottelius" , linux-next@vger.kernel.org, LKML References: <20081023204326.GB4175@denkbrett.schottelius.org> <200810241628.23002.andres@anarazel.de> In-Reply-To: <200810241628.23002.andres@anarazel.de> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-15" Content-Disposition: inline Message-Id: <200810241123.17883.jbarnes@virtuousgeek.org> X-Identified-User: {642:box128.bluehost.com:virtuous:virtuousgeek.org} {sentby:smtp auth 75.111.27.49 authed with jbarnes@virtuousgeek.org} Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from base64 to 8bit by alpha id m9OINZdq027245 Content-Length: 2536 Lines: 5 On Friday, October 24, 2008 7:28 am Andres Freund wrote:> Hi Nico,>> On Thursday 23 October 2008 22:43:26 Nico -telmich- Schottelius wrote:> > - 2.6.27-next-20081023:> > -> no X running (because xorg does not work with that kernel)>> I think what you need is one rather short fix for the intel xorg driver:>> diff --git a/src/i830_driver.c b/src/i830_driver.c> index c1d61f4..eaf5d27 100644> --- a/src/i830_driver.c> +++ b/src/i830_driver.c> @@ -502,8 +502,8 @@ I830DetectMemory(ScrnInfoPtr pScrn)> range = gtt_size + 4;>> /* new 4 series hardware has seperate GTT stolen with GFX stolen */> - if (IS_G4X(pI830))> - range = 0;> + if (IS_G4X(pI830) || IS_GM45(pI830))> + range = 4;>> if (IS_I85X(pI830) || IS_I865G(pI830) || IS_I9XX(pI830)) {> switch (gmch_ctrl & I855_GMCH_GMS_MASK) {>> (Out of the "[git pull] agp patches for 2.6.28-rc1" thread) Something like this might also help. G4x chips do their own memory arbitration management, so we shouldn't tryingto save/restore the DSPARB reg. Jesse diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.hindex f20ffe1..6ba8712 100644--- a/drivers/gpu/drm/i915/i915_drv.h+++ b/drivers/gpu/drm/i915/i915_drv.h@@ -657,6 +657,9 @@ extern int i915_wait_ring(struct drm_device * dev, int n, const char *caller); #define I915_NEED_GFX_HWS(dev) (IS_G33(dev) || IS_GM45(dev) || IS_G4X(dev)) +/* dsparb controlled by hw only */+#define DSPARB_HWCONTROL(dev) (IS_G4X(dev) || IS_GM45(dev))+ #define PRIMARY_RINGBUFFER_SIZE (128*1024) #endifdiff --git a/drivers/gpu/drm/i915/i915_suspend.c b/drivers/gpu/drm/i915/i915_suspend.cindex 603fe74..4bea6ea 100644--- a/drivers/gpu/drm/i915/i915_suspend.c+++ b/drivers/gpu/drm/i915/i915_suspend.c@@ -241,7 +241,8 @@ int i915_save_state(struct drm_device *dev) pci_read_config_byte(dev->pdev, LBB, &dev_priv->saveLBB); /* Display arbitration control */- dev_priv->saveDSPARB = I915_READ(DSPARB);+ if (!DSPARB_HWCONTROL(dev))+ dev_priv->saveDSPARB = I915_READ(DSPARB); /* Pipe & plane A info */ dev_priv->savePIPEACONF = I915_READ(PIPEACONF);@@ -365,7 +366,8 @@ int i915_restore_state(struct drm_device *dev) pci_write_config_byte(dev->pdev, LBB, dev_priv->saveLBB); - I915_WRITE(DSPARB, dev_priv->saveDSPARB);+ if (!DSPARB_HWCONTROL(dev))+ I915_WRITE(DSPARB, dev_priv->saveDSPARB); /* Pipe & plane A info */ /* Prime the clock */????{.n?+???????+%?????ݶ??w??{.n?+????{??G?????{ay?ʇڙ?,j??f???h?????????z_??(?階?ݢj"???m??????G????????????&???~???iO???z??v?^?m???? ????????I?