All of lore.kernel.org
 help / color / mirror / Atom feed
* [Bug 65068] New: AtomBIOS stuck after suspend/resume cycle whilst GPU turned off
@ 2013-05-28  7:59 bugzilla-daemon
  2013-05-29  4:39 ` [Bug 65068] vgaswitcheroo doesn't deal with powered off dGPU on resume bugzilla-daemon
                   ` (9 more replies)
  0 siblings, 10 replies; 11+ messages in thread
From: bugzilla-daemon @ 2013-05-28  7:59 UTC (permalink / raw)
  To: dri-devel


[-- Attachment #1.1: Type: text/plain, Size: 1425 bytes --]

https://bugs.freedesktop.org/show_bug.cgi?id=65068

          Priority: medium
            Bug ID: 65068
          Assignee: dri-devel@lists.freedesktop.org
           Summary: AtomBIOS stuck after suspend/resume cycle whilst GPU
                    turned off
          Severity: normal
    Classification: Unclassified
                OS: All
          Reporter: austin.lund@gmail.com
          Hardware: Other
            Status: NEW
           Version: XOrg CVS
         Component: DRM/Radeon
           Product: DRI

Created attachment 79884
  --> https://bugs.freedesktop.org/attachment.cgi?id=79884&action=edit
dmesg output when trying to switch back to radeon gpu.

I have two GPUs in my system:

01:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI]
Whistler [Radeon HD 6600M/6700M/7600M Series]

00:02.0 VGA compatible controller: Intel Corporation 2nd Generation Core
Processor Family Integrated Graphics Controller (rev 09)

This is a macbookpro8,2 and hence the gmuxer is controlled by the apple-gmux
driver.

If I suspend the system to ram whilst on the integrated gpu (i.e. the intel
gpu), then after resume switch back to the radeon, I get a GPU hang.

I've attached the dmesg output that I get when I try this.

I'm using linux 3.10-rc3.  I don't have X running when doing this
(vgaswitcheroo won't allow this).

-- 
You are receiving this mail because:
You are the assignee for the bug.

[-- Attachment #1.2: Type: text/html, Size: 2923 bytes --]

[-- Attachment #2: Type: text/plain, Size: 159 bytes --]

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug 65068] vgaswitcheroo doesn't deal with powered off dGPU on resume
  2013-05-28  7:59 [Bug 65068] New: AtomBIOS stuck after suspend/resume cycle whilst GPU turned off bugzilla-daemon
@ 2013-05-29  4:39 ` bugzilla-daemon
  2013-05-29 10:03 ` bugzilla-daemon
                   ` (8 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: bugzilla-daemon @ 2013-05-29  4:39 UTC (permalink / raw)
  To: dri-devel


[-- Attachment #1.1: Type: text/plain, Size: 683 bytes --]

https://bugs.freedesktop.org/show_bug.cgi?id=65068

Alex Deucher <agd5f@yahoo.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|AtomBIOS stuck after        |vgaswitcheroo doesn't deal
                   |suspend/resume cycle whilst |with powered off dGPU on
                   |GPU turned off              |resume

--- Comment #1 from Alex Deucher <agd5f@yahoo.com> ---
It looks like vagswitcheroo doesn't properly enable the dgpu on resume so the
driver tried to resume disabled hardware.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[-- Attachment #1.2: Type: text/html, Size: 1954 bytes --]

[-- Attachment #2: Type: text/plain, Size: 159 bytes --]

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug 65068] vgaswitcheroo doesn't deal with powered off dGPU on resume
  2013-05-28  7:59 [Bug 65068] New: AtomBIOS stuck after suspend/resume cycle whilst GPU turned off bugzilla-daemon
  2013-05-29  4:39 ` [Bug 65068] vgaswitcheroo doesn't deal with powered off dGPU on resume bugzilla-daemon
@ 2013-05-29 10:03 ` bugzilla-daemon
  2013-05-29 13:29 ` bugzilla-daemon
                   ` (7 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: bugzilla-daemon @ 2013-05-29 10:03 UTC (permalink / raw)
  To: dri-devel


[-- Attachment #1.1: Type: text/plain, Size: 257 bytes --]

https://bugs.freedesktop.org/show_bug.cgi?id=65068

--- Comment #2 from Austin Lund <austin.lund@gmail.com> ---
Are there any traces/dumps which I could produce to help debug this?

-- 
You are receiving this mail because:
You are the assignee for the bug.

[-- Attachment #1.2: Type: text/html, Size: 1049 bytes --]

[-- Attachment #2: Type: text/plain, Size: 159 bytes --]

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug 65068] vgaswitcheroo doesn't deal with powered off dGPU on resume
  2013-05-28  7:59 [Bug 65068] New: AtomBIOS stuck after suspend/resume cycle whilst GPU turned off bugzilla-daemon
  2013-05-29  4:39 ` [Bug 65068] vgaswitcheroo doesn't deal with powered off dGPU on resume bugzilla-daemon
  2013-05-29 10:03 ` bugzilla-daemon
@ 2013-05-29 13:29 ` bugzilla-daemon
  2013-05-31 23:57 ` bugzilla-daemon
                   ` (6 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: bugzilla-daemon @ 2013-05-29 13:29 UTC (permalink / raw)
  To: dri-devel


[-- Attachment #1.1: Type: text/plain, Size: 401 bytes --]

https://bugs.freedesktop.org/show_bug.cgi?id=65068

--- Comment #3 from Alex Deucher <agd5f@yahoo.com> ---
There's nothing that needs to be debugged per se.  Someone just needs to
implement support for making sure the dGPU is powered up when the driver
resumes or having the driver defer resume until the dGPU is powered up.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[-- Attachment #1.2: Type: text/html, Size: 1188 bytes --]

[-- Attachment #2: Type: text/plain, Size: 159 bytes --]

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug 65068] vgaswitcheroo doesn't deal with powered off dGPU on resume
  2013-05-28  7:59 [Bug 65068] New: AtomBIOS stuck after suspend/resume cycle whilst GPU turned off bugzilla-daemon
                   ` (2 preceding siblings ...)
  2013-05-29 13:29 ` bugzilla-daemon
@ 2013-05-31 23:57 ` bugzilla-daemon
  2013-06-01 20:27 ` bugzilla-daemon
                   ` (5 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: bugzilla-daemon @ 2013-05-31 23:57 UTC (permalink / raw)
  To: dri-devel


[-- Attachment #1.1: Type: text/plain, Size: 1304 bytes --]

https://bugs.freedesktop.org/show_bug.cgi?id=65068

--- Comment #4 from Austin Lund <austin.lund@gmail.com> ---
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:

# cat /sys/kernel/debug/vgaswitcheroo/switch 
0:IGD:+:Pwr:0000:00:02.0
1:DIS: :Off:0000:01:00.0
2:DIS-Audio: :Off:0000:01:00.1
# lspci -s 01:00 -xx
01:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI]
Whistler [Radeon HD 6600M/6700M/7600M Series] (rev ff)
00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
10: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
20: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
30: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff

01:00.1 Audio device: Advanced Micro Devices, Inc. [AMD/ATI] Turks/Whistler
HDMI Audio [Radeon HD 6000 Series] (rev ff)
00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
10: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
20: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
30: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff

Maybe this is why suspend/resume doesn't work?  Should the apple gmuxer remove
the radeon device from the list of pci devices when in this state?  (Like
hotplugging?)

-- 
You are receiving this mail because:
You are the assignee for the bug.

[-- Attachment #1.2: Type: text/html, Size: 2096 bytes --]

[-- Attachment #2: Type: text/plain, Size: 159 bytes --]

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug 65068] vgaswitcheroo doesn't deal with powered off dGPU on resume
  2013-05-28  7:59 [Bug 65068] New: AtomBIOS stuck after suspend/resume cycle whilst GPU turned off bugzilla-daemon
                   ` (3 preceding siblings ...)
  2013-05-31 23:57 ` bugzilla-daemon
@ 2013-06-01 20:27 ` bugzilla-daemon
  2013-06-03  1:39 ` bugzilla-daemon
                   ` (4 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: bugzilla-daemon @ 2013-06-01 20:27 UTC (permalink / raw)
  To: dri-devel


[-- Attachment #1.1: Type: text/plain, Size: 579 bytes --]

https://bugs.freedesktop.org/show_bug.cgi?id=65068

--- Comment #5 from Alex Deucher <agd5f@yahoo.com> ---
(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.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[-- Attachment #1.2: Type: text/html, Size: 1439 bytes --]

[-- Attachment #2: Type: text/plain, Size: 159 bytes --]

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug 65068] vgaswitcheroo doesn't deal with powered off dGPU on resume
  2013-05-28  7:59 [Bug 65068] New: AtomBIOS stuck after suspend/resume cycle whilst GPU turned off bugzilla-daemon
                   ` (4 preceding siblings ...)
  2013-06-01 20:27 ` bugzilla-daemon
@ 2013-06-03  1:39 ` bugzilla-daemon
  2013-06-03 13:18 ` bugzilla-daemon
                   ` (3 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: bugzilla-daemon @ 2013-06-03  1:39 UTC (permalink / raw)
  To: dri-devel


[-- Attachment #1.1: Type: text/plain, Size: 1266 bytes --]

https://bugs.freedesktop.org/show_bug.cgi?id=65068

--- Comment #6 from Austin Lund <austin.lund@gmail.com> ---
(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 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 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.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[-- Attachment #1.2: Type: text/html, Size: 2217 bytes --]

[-- Attachment #2: Type: text/plain, Size: 159 bytes --]

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug 65068] vgaswitcheroo doesn't deal with powered off dGPU on resume
  2013-05-28  7:59 [Bug 65068] New: AtomBIOS stuck after suspend/resume cycle whilst GPU turned off bugzilla-daemon
                   ` (5 preceding siblings ...)
  2013-06-03  1:39 ` bugzilla-daemon
@ 2013-06-03 13:18 ` bugzilla-daemon
  2013-06-03 13:22 ` bugzilla-daemon
                   ` (2 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: bugzilla-daemon @ 2013-06-03 13:18 UTC (permalink / raw)
  To: dri-devel


[-- Attachment #1.1: Type: text/plain, Size: 1862 bytes --]

https://bugs.freedesktop.org/show_bug.cgi?id=65068

--- Comment #7 from Alex Deucher <agd5f@yahoo.com> ---
(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.

[-- Attachment #1.2: Type: text/html, Size: 2969 bytes --]

[-- Attachment #2: Type: text/plain, Size: 159 bytes --]

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug 65068] vgaswitcheroo doesn't deal with powered off dGPU on resume
  2013-05-28  7:59 [Bug 65068] New: AtomBIOS stuck after suspend/resume cycle whilst GPU turned off bugzilla-daemon
                   ` (6 preceding siblings ...)
  2013-06-03 13:18 ` bugzilla-daemon
@ 2013-06-03 13:22 ` bugzilla-daemon
  2013-06-09  4:05 ` bugzilla-daemon
  2019-11-19  8:33 ` bugzilla-daemon
  9 siblings, 0 replies; 11+ messages in thread
From: bugzilla-daemon @ 2013-06-03 13:22 UTC (permalink / raw)
  To: dri-devel


[-- Attachment #1.1: Type: text/plain, Size: 506 bytes --]

https://bugs.freedesktop.org/show_bug.cgi?id=65068

--- Comment #8 from Alex Deucher <agd5f@yahoo.com> ---
Additionally, since the audio device is part of the GPU, it needs to work
properly with vgaswitcheroo.  Dave Airlie was doing some work to support all of
this properly, but it's not complete yet:
http://cgit.freedesktop.org/~airlied/linux/log/?h=switchy-wip
http://cgit.freedesktop.org/~airlied/linux/log/?h=nv-pm-ops2-wip

-- 
You are receiving this mail because:
You are the assignee for the bug.

[-- Attachment #1.2: Type: text/html, Size: 1448 bytes --]

[-- Attachment #2: Type: text/plain, Size: 159 bytes --]

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug 65068] vgaswitcheroo doesn't deal with powered off dGPU on resume
  2013-05-28  7:59 [Bug 65068] New: AtomBIOS stuck after suspend/resume cycle whilst GPU turned off bugzilla-daemon
                   ` (7 preceding siblings ...)
  2013-06-03 13:22 ` bugzilla-daemon
@ 2013-06-09  4:05 ` bugzilla-daemon
  2019-11-19  8:33 ` bugzilla-daemon
  9 siblings, 0 replies; 11+ messages in thread
From: bugzilla-daemon @ 2013-06-09  4:05 UTC (permalink / raw)
  To: dri-devel


[-- Attachment #1.1: Type: text/plain, Size: 849 bytes --]

https://bugs.freedesktop.org/show_bug.cgi?id=65068

--- Comment #9 from Austin Lund <austin.lund@gmail.com> ---
Created attachment 80547
  --> https://bugs.freedesktop.org/attachment.cgi?id=80547&action=edit
pci_restore_config_dword debugging when resuming with dGPU off at suspend

It is log output like this that worries my about the 0xff reads from the pci
config space.

I set this in dynamic_debug:

drivers/pci/pci.c:964 [pci]pci_restore_config_dword =p "restoring config space
at offset %#x (was %#x, writing %#x)\012"

Then it gives this 0xff writing to the pci address space on restore when using
the integrated gpu.  Surely this cannot help.  My guess is that the hardware
should be removed from the kernel when the power is turned off.  But that's
just a hunch.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[-- Attachment #1.2: Type: text/html, Size: 1888 bytes --]

[-- Attachment #2: Type: text/plain, Size: 159 bytes --]

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug 65068] vgaswitcheroo doesn't deal with powered off dGPU on resume
  2013-05-28  7:59 [Bug 65068] New: AtomBIOS stuck after suspend/resume cycle whilst GPU turned off bugzilla-daemon
                   ` (8 preceding siblings ...)
  2013-06-09  4:05 ` bugzilla-daemon
@ 2019-11-19  8:33 ` bugzilla-daemon
  9 siblings, 0 replies; 11+ messages in thread
From: bugzilla-daemon @ 2019-11-19  8:33 UTC (permalink / raw)
  To: dri-devel


[-- Attachment #1.1: Type: text/plain, Size: 805 bytes --]

https://bugs.freedesktop.org/show_bug.cgi?id=65068

Martin Peres <martin.peres@free.fr> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |MOVED

--- Comment #10 from Martin Peres <martin.peres@free.fr> ---
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been
closed from further activity.

You can subscribe and participate further through the new bug through this link
to our GitLab instance: https://gitlab.freedesktop.org/drm/amd/issues/331.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[-- Attachment #1.2: Type: text/html, Size: 2395 bytes --]

[-- Attachment #2: Type: text/plain, Size: 159 bytes --]

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2019-11-19  8:33 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-05-28  7:59 [Bug 65068] New: AtomBIOS stuck after suspend/resume cycle whilst GPU turned off bugzilla-daemon
2013-05-29  4:39 ` [Bug 65068] vgaswitcheroo doesn't deal with powered off dGPU on resume bugzilla-daemon
2013-05-29 10:03 ` bugzilla-daemon
2013-05-29 13:29 ` bugzilla-daemon
2013-05-31 23:57 ` bugzilla-daemon
2013-06-01 20:27 ` bugzilla-daemon
2013-06-03  1:39 ` bugzilla-daemon
2013-06-03 13:18 ` bugzilla-daemon
2013-06-03 13:22 ` bugzilla-daemon
2013-06-09  4:05 ` bugzilla-daemon
2019-11-19  8:33 ` bugzilla-daemon

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.