From mboxrd@z Thu Jan 1 00:00:00 1970 From: bugzilla-daemon@freedesktop.org Subject: [Bug 65068] vgaswitcheroo doesn't deal with powered off dGPU on resume Date: Mon, 03 Jun 2013 13:18:22 +0000 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0273828421==" Return-path: Received: from culpepper.freedesktop.org (unknown [131.252.210.165]) by gabe.freedesktop.org (Postfix) with ESMTP id 1A1A2E6158 for ; Mon, 3 Jun 2013 06:18:22 -0700 (PDT) In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dri-devel-bounces+sf-dri-devel=m.gmane.org@lists.freedesktop.org Errors-To: dri-devel-bounces+sf-dri-devel=m.gmane.org@lists.freedesktop.org To: dri-devel@lists.freedesktop.org List-Id: dri-devel@lists.freedesktop.org --===============0273828421== Content-Type: multipart/alternative; boundary="1370265502.3C2C203C1.27735"; charset="us-ascii" --1370265502.3C2C203C1.27735 Date: Mon, 3 Jun 2013 13:18:22 +0000 MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" https://bugs.freedesktop.org/show_bug.cgi?id=65068 --- Comment #7 from Alex Deucher --- (In reply to comment #6) > (In reply to comment #5) > > (In reply to comment #4) > > > I'm not sure if this has anything to do with this bug, but the PCI config > > > space is all messed up when running on the integrated GPU: > > > > When you disable the GPU the hardware is physically powered off so you are > > accessing non-existent registers. You need to power up the GPU using > > vgaswitcheroo before loading/resuming the driver or access the config space > > with lspci. > > I guess what I was trying to say was, does having the device in this state > before you start suspend make the power management subsystem confused? Will > it try to "restore" the pci configuration space to 0xff? The reason you are getting 0xff is because you are accessing a disabled device. lspci would need to power up the GPU using vgaswitcheroo before accessing the hardware. > > The radeon GPU is definitely turned on by the firmware on resume and the > apple-gmux driver turns it off if that was the state of the system when > suspend was started. I suspect the gmux driver resumes first and disables the hardware before the radeon driver resumes. So the radeon driver resumes on disabled hardware. > > I tried a quick hack to call the "ON" function for vga-switcheroo from the > apple-gmux driver suspend hook. But that didn't work. However, if I do it > manually (i.e. echo ON > /sys/kernel/debug/vgaswitcheroo/switch) before > suspend, then it does seem to fix it. Some one needs to sort out the interactions between the the vgaswitcheroo drivers and the GPU drivers so that they do the right thing on suspend and resume and hw access from userspace utilities like lspci. -- You are receiving this mail because: You are the assignee for the bug. --1370265502.3C2C203C1.27735 Date: Mon, 3 Jun 2013 13:18:22 +0000 MIME-Version: 1.0 Content-Type: text/html; charset="UTF-8"

Comment # 7 on bug 65068 from
(In reply to comment #6)
> (In reply to comment #5)
> > (In reply to comment #4)
> > > I'm not sure if this has anything to do with this bug, but the PCI config
> > > space is all messed up when running on the integrated GPU:
> > 
> > When you disable the GPU the hardware is physically powered off so you are
> > accessing non-existent registers.  You need to power up the GPU using
> > vgaswitcheroo before loading/resuming the driver or access the config space
> > with lspci.
> 
> I guess what I was trying to say was, does having the device in this state
> before you start suspend make the power management subsystem confused?  Will
> it try to "restore" the pci configuration space to 0xff?  

The reason you are getting 0xff is because you are accessing a disabled device.
 lspci would need to power up the GPU using vgaswitcheroo before accessing the
hardware.

> 
> The radeon GPU is definitely turned on by the firmware on resume and the
> apple-gmux driver turns it off if that was the state of the system when
> suspend was started.

I suspect the gmux driver resumes first and disables the hardware before the
radeon driver resumes. So the radeon driver resumes on disabled hardware.

> 
> I tried a quick hack to call the "ON" function for vga-switcheroo from the
> apple-gmux driver suspend hook.  But that didn't work.  However, if I do it
> manually (i.e. echo ON > /sys/kernel/debug/vgaswitcheroo/switch) before
> suspend, then it does seem to fix it.

Some one needs to sort out the interactions between the the vgaswitcheroo
drivers and the GPU drivers so that they do the right thing on suspend and
resume and hw access from userspace utilities like lspci.


You are receiving this mail because:
  • You are the assignee for the bug.
--1370265502.3C2C203C1.27735-- --===============0273828421== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/dri-devel --===============0273828421==--