From: Jesse Barnes <jbarnes@virtuousgeek.org>
To: Andres Freund <andres@anarazel.de>
Cc: Nico -telmich- Schottelius <nico-linux-next@schottelius.org>,
linux-next@vger.kernel.org, LKML <linux-kernel@vger.kernel.org>
Subject: Re: Current suspend issues on Lenovo X200
Date: Fri, 24 Oct 2008 11:23:17 -0700 [thread overview]
Message-ID: <200810241123.17883.jbarnes@virtuousgeek.org> (raw)
In-Reply-To: <200810241628.23002.andres@anarazel.de>
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 trying
to save/restore the DSPARB reg.
Jesse
diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
index 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)
#endif
diff --git a/drivers/gpu/drm/i915/i915_suspend.c b/drivers/gpu/drm/i915/i915_suspend.c
index 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 */
\0
WARNING: multiple messages have this Message-ID (diff)
From: Jesse Barnes <jbarnes@virtuousgeek.org>
To: Andres Freund <andres@anarazel.de>
Cc: "Nico -telmich- Schottelius" <nico-linux-next@schottelius.org>,
linux-next@vger.kernel.org, LKML <linux-kernel@vger.kernel.org>
Subject: Re: Current suspend issues on Lenovo X200
Date: Fri, 24 Oct 2008 11:23:17 -0700 [thread overview]
Message-ID: <200810241123.17883.jbarnes@virtuousgeek.org> (raw)
In-Reply-To: <200810241628.23002.andres@anarazel.de>
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 */\0ÿôèº{.nÇ+·®+%Ëÿ±éݶ\x17¥wÿº{.nÇ+·¥{±þG«éÿ{ayº\x1dÊÚë,j\a¢f£¢·hïêÿêçz_è®\x03(éÝ¢j"ú\x1a¶^[m§ÿÿŸ\a«þG«éÿ¢ž?šèÚ&£ø§~á¶iOæ¬z·vØ^\x14\x04\x1a¶^[m§ÿÿÃ\fÿ¶ìÿ¢ž?I¥
next prev parent reply other threads:[~2008-10-24 18:23 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-23 20:43 Current suspend issues on Lenovo X200 Nico -telmich- Schottelius
2008-10-23 21:07 ` Nico Schottelius
2008-10-23 22:06 ` Rafael J. Wysocki
2008-10-24 3:03 ` Nigel Cunningham
2008-10-24 7:11 ` Current suspend issues on Lenovo X200 (w/ Intel graphics) Rafael J. Wysocki
2008-10-24 13:01 ` Nico -telmich- Schottelius
2008-10-24 14:01 ` Mikael Abrahamsson
2008-10-24 14:30 ` Andres Freund
2008-10-24 14:30 ` Andres Freund
2008-10-24 18:02 ` Jens Axboe
2008-10-24 18:30 ` Rafael J. Wysocki
2008-10-24 18:47 ` Jens Axboe
2008-10-24 18:56 ` Rafael J. Wysocki
2008-10-24 18:55 ` Jens Axboe
2008-10-24 19:05 ` Rafael J. Wysocki
2008-10-24 18:50 ` Andres Freund
2008-10-24 18:26 ` Rafael J. Wysocki
2008-10-24 14:28 ` Current suspend issues on Lenovo X200 Andres Freund
2008-10-24 18:23 ` Jesse Barnes [this message]
2008-10-24 18:23 ` Jesse Barnes
2008-10-25 14:53 ` Nico -telmich- Schottelius
2008-10-25 15:55 ` Andres Freund
2008-11-12 18:24 ` Jesse Barnes
2008-11-14 15:15 ` Nico -telmich- Schottelius
2008-11-14 15:52 ` Mikael Abrahamsson
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=200810241123.17883.jbarnes@virtuousgeek.org \
--to=jbarnes@virtuousgeek.org \
--cc=andres@anarazel.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-next@vger.kernel.org \
--cc=nico-linux-next@schottelius.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.