LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Wang Zhenyu <zhenyu.z.wang@intel.com>
To: davej@redhat.com
Cc: LKML <linux-kernel@vger.kernel.org>,
	Keith Packard <keithp@keithp.com>, Eric Anholt <eric@anholt.net>
Subject: [PATCH] intel_agp: restore graphics device's pci space early in resume
Date: Wed, 17 Jan 2007 11:07:54 +0800	[thread overview]
Message-ID: <20070117030754.GA30564@zhen-devel.sh.intel.com> (raw)


Dave, 

Currently in resuming path graphics device's pci space restore is 
behind host bridge, so resume function wrongly accesses graphics 
device's space. This makes resuming failure which crashed X. So 
here's a patch to restore device's pci space early, which makes
resuming ok with X. Patch against 2.6.20-rc5.

Signed-off-by: Wang Zhenyu <zhenyu.z.wang@intel.com>

---
diff --git a/drivers/char/agp/intel-agp.c b/drivers/char/agp/intel-agp.c
index ab0a9c0..7af734b 100644
--- a/drivers/char/agp/intel-agp.c
+++ b/drivers/char/agp/intel-agp.c
@@ -1955,6 +1955,15 @@ static int agp_intel_resume(struct pci_d
 
 	pci_restore_state(pdev);
 
+	/* We should restore our graphics device's config space,
+	 * as host bridge (00:00) resumes before graphics device (02:00),
+	 * then our access to its pci space can work right. 
+	 */
+	if (intel_i810_private.i810_dev)
+		pci_restore_state(intel_i810_private.i810_dev);
+	if (intel_i830_private.i830_dev)
+		pci_restore_state(intel_i830_private.i830_dev);
+
 	if (bridge->driver == &intel_generic_driver)
 		intel_configure();
 	else if (bridge->driver == &intel_850_driver)

                 reply	other threads:[~2007-01-17  3:08 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20070117030754.GA30564@zhen-devel.sh.intel.com \
    --to=zhenyu.z.wang@intel.com \
    --cc=davej@redhat.com \
    --cc=eric@anholt.net \
    --cc=keithp@keithp.com \
    --cc=linux-kernel@vger.kernel.org \
    --subject='Re: [PATCH] intel_agp: restore graphics device'\''s pci space early in resume' \
    /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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).