From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alex Deucher Subject: Re: [Regression, post-2.6.34] Hibernation broken on machines with radeon/KMS and r300 Date: Wed, 16 Jun 2010 16:44:47 -0400 Message-ID: References: <201006141653.03879.rjw@sisk.pl> <201006160107.54822.rjw@sisk.pl> <201006160811.43926.linux@rainbow-software.org> <201006162216.49756.rjw@sisk.pl> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary=0016363107bde18e3904892bcae9 Return-path: In-Reply-To: <201006162216.49756.rjw@sisk.pl> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linux-pm-bounces@lists.linux-foundation.org Errors-To: linux-pm-bounces@lists.linux-foundation.org To: "Rafael J. Wysocki" Cc: Ondrej Zary , linux-kernel@vger.kernel.org, dri-devel , Dave Airlie , Andrew Morton , Linus Torvalds , linux-pm@lists.linux-foundation.org List-Id: linux-pm@vger.kernel.org --0016363107bde18e3904892bcae9 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On Wed, Jun 16, 2010 at 4:16 PM, Rafael J. Wysocki wrote: > On Wednesday, June 16, 2010, Ondrej Zary wrote: >> On Wednesday 16 June 2010, Rafael J. Wysocki wrote: >> > On Tuesday, June 15, 2010, Rafael J. Wysocki wrote: >> > > On Monday, June 14, 2010, Alex Deucher wrote: >> > > > On Mon, Jun 14, 2010 at 3:03 PM, Rafael J. Wysocki w= rote: >> > > > > On Monday, June 14, 2010, Alex Deucher wrote: >> > > > >> On Mon, Jun 14, 2010 at 10:53 AM, Rafael J. Wysocki >> wrote: >> > > > >> > Alex, Dave, >> > > > >> > >> > > > >> > I'm afraid hibernation is broken on all machines using radeon= /KMS >> > > > >> > with r300 after commit ce8f53709bf440100cb9d31b1303291551cf51= 7f >> > > > >> > (drm/radeon/kms/pm: rework power management). =A0At least, I'= m able >> > > > >> > to reproduce the symptom, which is that the machine hangs har= d >> > > > >> > around the point where an image is created (probably during t= he >> > > > >> > device thaw phase), on two different boxes with r300 (the out= put >> > > > >> > of lspci from one of them is attached for reference, the othe= r one >> > > > >> > is HP nx6325). >> > > > >> > >> > > > >> > Suspend to RAM appears to work fine at least on one of the >> > > > >> > affected boxes. >> > > > >> > >> > > > >> > Unfortunately, the commit above changes a lot of code and it'= s not >> > > > >> > too easy to figure out what's wrong with it and I didn't have= the >> > > > >> > time to look more into details of this failure. =A0However, i= t looks >> > > > >> > like you use .suspend() and .resume() callbacks as .freeze() = and >> > > > >> > .thaw() which may not be 100% correct (in fact it looks like = the >> > > > >> > "legacy" PCI suspend/resume is used, which is not recommended= any >> > > > >> > more). >> > > > >> >> > > > >> Does it work any better after Dave's last drm pull request? >> > > > > >> > > > > Nope. =A0The symptom is slightly different, though, because now = it >> > > > > hangs after turning off the screen. >> > > > > >> > > > >> With the latest changes, pm should not be a factor unless it's >> > > > >> explicitly enabled via sysfs. >> > > > > >> > > > > Well, I guess the first pm patch changed more than just pm, then= . >> > > > >> > > > Does this patch help? >> > > > http://lists.freedesktop.org/archives/dri-devel/2010-June/001314.h= tml >> > > >> > > No, it doesn't. =A0I try to hibernate, everything works to the point= where >> > > the screen goes off and the box hangs (solid). =A0Normally, it would= turn >> > > the screen back on and continue with saving the image. >> > > >> > > But, since that happens with the patch above applied, I think it doe= sn't >> > > really pass the suspend phase (IOW, it probably hangs somewhere in t= he >> > > radeon's suspend routine). >> > >> > I've just verified that in fact hibernation works on HP nx6325 with >> > 2.6.35-rc3, but it takes about 55 sec. to suspend the graphics adapter= in >> > the "freeze" phase. =A0Surprisingly enough, during suspend to RAM it w= orks >> > normally (as well as in the "poweroff" phase of hibernation). >> >> It takes 2 minutes on RV530: >> https://bugzilla.redhat.com/show_bug.cgi?id=3D586522 > > Well, my second affected box appears to hang somewhere in the radeon's su= spend > routine. Does the attached patch help? Alex --0016363107bde18e3904892bcae9 Content-Type: text/x-patch; charset=US-ASCII; name="0001-drm-radeon-kms-only-attempt-to-cancel-delayed-work-i.patch" Content-Disposition: attachment; filename="0001-drm-rad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G0uZHlucG1faWRsZV93b3JrKTsKKwlpZiAocmRldi0+cG0ucG1fbWV0aG9kID09IFBN X01FVEhPRF9EWU5QTSkKKwkJY2FuY2VsX2RlbGF5ZWRfd29yaygmcmRldi0+cG0uZHlucG1faWRs ZV93b3JrKTsKIAltdXRleF91bmxvY2soJnJkZXYtPnBtLm11dGV4KTsKIH0KIAotLSAKMS43LjAu MQoK --0016363107bde18e3904892bcae9 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline --0016363107bde18e3904892bcae9--