2013-08-22 18:25:14

by Ondrej Zary

[permalink] [raw]
Subject: Asus F5RL laptop unable to resume from S3 because of radeon module

Hello,
resume from suspend-to-RAM (S3) on Asus F5RL laptop does not work.
According to many reports found by Google, it was always been that and there
is no fix or workaround.

Did some tests:

radeon module loaded (usual state):
After "echo mem>/sys/power/state", the laptop suspends correctly (power LED
blinks). When power button is pressed, power LED goes on and that's all.
No more activity, machine is frozen completely.

radeon module not loaded at all:
Laptop resumes correctly (keyboard LED work, network works), only the LCD is
blank (obviously). Loading radeon module now initializes the card properly:
LCD goes on and console works.

radeon module loaded (but fbcon module not loaded) and then unloaded:
Machine freezes the same way as when the module is loaded.

So it looks like the radeon module does some initialization that prevents
resume from working.

Hibernation works fine.

Any ideas what to test or how to debug this?

Details:
01:05.0 VGA compatible controller [0300]: Advanced Micro Devices, Inc. [AMD/ATI] RC410M [Mobility Radeon Xpress 200M] [1002:5a62] (prog-if 00
[VGA controller])
Subsystem: ASUSTeK Computer Inc. Device [1043:1402]
Flags: bus master, 66MHz, medium devsel, latency 64, IRQ 10
Memory at c0000000 (32-bit, prefetchable) [size=256M]
I/O ports at 9800 [size=256]
Memory at fa8f0000 (32-bit, non-prefetchable) [size=64K]
Expansion ROM at fa8c0000 [disabled] [size=128K]
Capabilities: [50] Power Management version 2
Capabilities: [80] MSI: Enable- Count=1/1 Maskable- 64bit-
Kernel driver in use: radeon

[ 4.836009] [drm] radeon kernel modesetting enabled.
[ 4.837169] [drm] initializing kernel modesetting (RS400 0x1002:0x5A62 0x1043:0x1402).
[ 4.837251] [drm] register mmio base: 0xFA8F0000
[ 4.837302] [drm] register mmio size: 65536
[ 4.837570] [drm] Generation 2 PCI interface, using max accessible memory
[ 4.837653] radeon 0000:01:05.0: VRAM: 128M 0x0000000078000000 - 0x000000007FFFFFFF (128M used)
[ 4.837714] radeon 0000:01:05.0: GTT: 512M 0x0000000080000000 - 0x000000009FFFFFFF
[ 4.837787] [drm] Detected VRAM RAM=128M, BAR=256M
[ 4.837839] [drm] RAM width 128bits DDR
[ 4.839854] [TTM] Zone kernel: Available graphics memory: 444588 kiB
[ 4.839907] [TTM] Zone highmem: Available graphics memory: 972784 kiB
[ 4.839959] [TTM] Initializing pool allocator
[ 4.840042] [drm] radeon: 128M of VRAM memory ready
[ 4.840094] [drm] radeon: 512M of GTT memory ready.
[ 4.840160] [drm] GART: num cpu pages 131072, num gpu pages 131072
[ 4.866905] [drm] radeon: 2 quad pipes, 1 z pipes initialized.
[ 4.872945] [drm] PCIE GART of 512M enabled (table at 0x0000000035A00000).
[ 4.873213] radeon 0000:01:05.0: WB enabled
[ 4.873301] radeon 0000:01:05.0: fence driver on ring 0 use gpu addr 0x0000000080000000 and cpu addr 0xf592c000
[ 4.874929] [drm] Supports vblank timestamp caching Rev 1 (10.10.2010).
[ 4.874988] [drm] Driver supports precise vblank timestamp query.
[ 4.875055] [drm] radeon: irq initialized.
[ 4.875119] [drm] Loading R300 Microcode
[ 4.962083] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[ 5.088150] ohci-pci: OHCI PCI platform driver
[ 5.141799] [drm] radeon: ring at 0x0000000080001000
[ 5.141883] [drm] ring test succeeded in 2 usecs
[ 5.142064] spurious 8259A interrupt: IRQ7.
[ 5.142073] [drm] ib test succeeded in 0 usecs
[ 5.142317] [drm] Panel ID String: LPL
[ 5.142370] [drm] Panel Size 1280x800
[ 5.166305] [drm] radeon legacy LVDS backlight initialized
[ 5.166358] [drm] Radeon Display Connectors
[ 5.166408] [drm] Connector 0:
[ 5.166458] [drm] VGA-1
[ 5.166509] [drm] DDC: 0x68 0x68 0x68 0x68 0x68 0x68 0x68 0x68
[ 5.166560] [drm] Encoders:
[ 5.166610] [drm] CRT1: INTERNAL_DAC2
[ 5.166660] [drm] Connector 1:
[ 5.166710] [drm] LVDS-1
[ 5.166760] [drm] DDC: 0x198 0x198 0x19c 0x19c 0x1a0 0x1a0 0x1a4 0x1a4
[ 5.166812] [drm] Encoders:
[ 5.166862] [drm] LCD1: INTERNAL_LVDS
[ 5.426968] [drm] fb mappable at 0xC0040000
[ 5.427026] [drm] vram apper at 0xC0000000
[ 5.427076] [drm] size 4096000
[ 5.427126] [drm] fb depth is 24
[ 5.427176] [drm] pitch is 5120
[ 5.427388] radeon 0000:01:05.0: fb0: radeondrmfb frame buffer device
[ 5.427442] radeon 0000:01:05.0: registered panic notifier
[ 5.427501] [drm] Initialized radeon 2.34.0 20080528 for 0000:01:05.0 on minor 0

--
Ondrej Zary


2013-08-22 19:49:58

by Deucher, Alexander

[permalink] [raw]
Subject: RE: Asus F5RL laptop unable to resume from S3 because of radeon module

> -----Original Message-----
> From: Ondrej Zary [mailto:[email protected]]
> Sent: Thursday, August 22, 2013 2:18 PM
> To: Kernel development list
> Cc: Deucher, Alexander
> Subject: Asus F5RL laptop unable to resume from S3 because of radeon
> module
>
> Hello,
> resume from suspend-to-RAM (S3) on Asus F5RL laptop does not work.
> According to many reports found by Google, it was always been that and
> there
> is no fix or workaround.

Make sure your kernel has this patch:
http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=cef1d00cd56f600121ad121875655ad410a001b8

Alex

>
> Did some tests:
>
> radeon module loaded (usual state):
> After "echo mem>/sys/power/state", the laptop suspends correctly (power
> LED
> blinks). When power button is pressed, power LED goes on and that's all.
> No more activity, machine is frozen completely.
>
> radeon module not loaded at all:
> Laptop resumes correctly (keyboard LED work, network works), only the LCD
> is
> blank (obviously). Loading radeon module now initializes the card properly:
> LCD goes on and console works.
>
> radeon module loaded (but fbcon module not loaded) and then unloaded:
> Machine freezes the same way as when the module is loaded.
>
> So it looks like the radeon module does some initialization that prevents
> resume from working.
>
> Hibernation works fine.
>
> Any ideas what to test or how to debug this?
>
> Details:
> 01:05.0 VGA compatible controller [0300]: Advanced Micro Devices, Inc.
> [AMD/ATI] RC410M [Mobility Radeon Xpress 200M] [1002:5a62] (prog-if 00
> [VGA controller])
> Subsystem: ASUSTeK Computer Inc. Device [1043:1402]
> Flags: bus master, 66MHz, medium devsel, latency 64, IRQ 10
> Memory at c0000000 (32-bit, prefetchable) [size=256M]
> I/O ports at 9800 [size=256]
> Memory at fa8f0000 (32-bit, non-prefetchable) [size=64K]
> Expansion ROM at fa8c0000 [disabled] [size=128K]
> Capabilities: [50] Power Management version 2
> Capabilities: [80] MSI: Enable- Count=1/1 Maskable- 64bit-
> Kernel driver in use: radeon
>
> [ 4.836009] [drm] radeon kernel modesetting enabled.
> [ 4.837169] [drm] initializing kernel modesetting (RS400 0x1002:0x5A62
> 0x1043:0x1402).
> [ 4.837251] [drm] register mmio base: 0xFA8F0000
> [ 4.837302] [drm] register mmio size: 65536
> [ 4.837570] [drm] Generation 2 PCI interface, using max accessible memory
> [ 4.837653] radeon 0000:01:05.0: VRAM: 128M 0x0000000078000000 -
> 0x000000007FFFFFFF (128M used)
> [ 4.837714] radeon 0000:01:05.0: GTT: 512M 0x0000000080000000 -
> 0x000000009FFFFFFF
> [ 4.837787] [drm] Detected VRAM RAM=128M, BAR=256M
> [ 4.837839] [drm] RAM width 128bits DDR
> [ 4.839854] [TTM] Zone kernel: Available graphics memory: 444588 kiB
> [ 4.839907] [TTM] Zone highmem: Available graphics memory: 972784 kiB
> [ 4.839959] [TTM] Initializing pool allocator
> [ 4.840042] [drm] radeon: 128M of VRAM memory ready
> [ 4.840094] [drm] radeon: 512M of GTT memory ready.
> [ 4.840160] [drm] GART: num cpu pages 131072, num gpu pages 131072
> [ 4.866905] [drm] radeon: 2 quad pipes, 1 z pipes initialized.
> [ 4.872945] [drm] PCIE GART of 512M enabled (table at
> 0x0000000035A00000).
> [ 4.873213] radeon 0000:01:05.0: WB enabled
> [ 4.873301] radeon 0000:01:05.0: fence driver on ring 0 use gpu addr
> 0x0000000080000000 and cpu addr 0xf592c000
> [ 4.874929] [drm] Supports vblank timestamp caching Rev 1 (10.10.2010).
> [ 4.874988] [drm] Driver supports precise vblank timestamp query.
> [ 4.875055] [drm] radeon: irq initialized.
> [ 4.875119] [drm] Loading R300 Microcode
> [ 4.962083] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
> [ 5.088150] ohci-pci: OHCI PCI platform driver
> [ 5.141799] [drm] radeon: ring at 0x0000000080001000
> [ 5.141883] [drm] ring test succeeded in 2 usecs
> [ 5.142064] spurious 8259A interrupt: IRQ7.
> [ 5.142073] [drm] ib test succeeded in 0 usecs
> [ 5.142317] [drm] Panel ID String: LPL
> [ 5.142370] [drm] Panel Size 1280x800
> [ 5.166305] [drm] radeon legacy LVDS backlight initialized
> [ 5.166358] [drm] Radeon Display Connectors
> [ 5.166408] [drm] Connector 0:
> [ 5.166458] [drm] VGA-1
> [ 5.166509] [drm] DDC: 0x68 0x68 0x68 0x68 0x68 0x68 0x68 0x68
> [ 5.166560] [drm] Encoders:
> [ 5.166610] [drm] CRT1: INTERNAL_DAC2
> [ 5.166660] [drm] Connector 1:
> [ 5.166710] [drm] LVDS-1
> [ 5.166760] [drm] DDC: 0x198 0x198 0x19c 0x19c 0x1a0 0x1a0 0x1a4 0x1a4
> [ 5.166812] [drm] Encoders:
> [ 5.166862] [drm] LCD1: INTERNAL_LVDS
> [ 5.426968] [drm] fb mappable at 0xC0040000
> [ 5.427026] [drm] vram apper at 0xC0000000
> [ 5.427076] [drm] size 4096000
> [ 5.427126] [drm] fb depth is 24
> [ 5.427176] [drm] pitch is 5120
> [ 5.427388] radeon 0000:01:05.0: fb0: radeondrmfb frame buffer device
> [ 5.427442] radeon 0000:01:05.0: registered panic notifier
> [ 5.427501] [drm] Initialized radeon 2.34.0 20080528 for 0000:01:05.0 on
> minor 0
>
> --
> Ondrej Zary

2013-08-22 20:00:27

by Ondrej Zary

[permalink] [raw]
Subject: Re: Asus F5RL laptop unable to resume from S3 because of radeon module

On Thursday 22 August 2013 21:49:41 Deucher, Alexander wrote:
> > -----Original Message-----
> > From: Ondrej Zary [mailto:[email protected]]
> > Sent: Thursday, August 22, 2013 2:18 PM
> > To: Kernel development list
> > Cc: Deucher, Alexander
> > Subject: Asus F5RL laptop unable to resume from S3 because of radeon
> > module
> >
> > Hello,
> > resume from suspend-to-RAM (S3) on Asus F5RL laptop does not work.
> > According to many reports found by Google, it was always been that and
> > there
> > is no fix or workaround.
>
> Make sure your kernel has this patch:
> http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=c
>ef1d00cd56f600121ad121875655ad410a001b8

Just tried latest git (3.11-rc6+) and the problem persists.

> Alex
>
> > Did some tests:
> >
> > radeon module loaded (usual state):
> > After "echo mem>/sys/power/state", the laptop suspends correctly (power
> > LED
> > blinks). When power button is pressed, power LED goes on and that's all.
> > No more activity, machine is frozen completely.
> >
> > radeon module not loaded at all:
> > Laptop resumes correctly (keyboard LED work, network works), only the LCD
> > is
> > blank (obviously). Loading radeon module now initializes the card
> > properly: LCD goes on and console works.
> >
> > radeon module loaded (but fbcon module not loaded) and then unloaded:
> > Machine freezes the same way as when the module is loaded.
> >
> > So it looks like the radeon module does some initialization that prevents
> > resume from working.
> >
> > Hibernation works fine.
> >
> > Any ideas what to test or how to debug this?
> >
> > Details:
> > 01:05.0 VGA compatible controller [0300]: Advanced Micro Devices, Inc.
> > [AMD/ATI] RC410M [Mobility Radeon Xpress 200M] [1002:5a62] (prog-if 00
> > [VGA controller])
> > Subsystem: ASUSTeK Computer Inc. Device [1043:1402]
> > Flags: bus master, 66MHz, medium devsel, latency 64, IRQ 10
> > Memory at c0000000 (32-bit, prefetchable) [size=256M]
> > I/O ports at 9800 [size=256]
> > Memory at fa8f0000 (32-bit, non-prefetchable) [size=64K]
> > Expansion ROM at fa8c0000 [disabled] [size=128K]
> > Capabilities: [50] Power Management version 2
> > Capabilities: [80] MSI: Enable- Count=1/1 Maskable- 64bit-
> > Kernel driver in use: radeon
> >
> > [ 4.836009] [drm] radeon kernel modesetting enabled.
> > [ 4.837169] [drm] initializing kernel modesetting (RS400 0x1002:0x5A62
> > 0x1043:0x1402).
> > [ 4.837251] [drm] register mmio base: 0xFA8F0000
> > [ 4.837302] [drm] register mmio size: 65536
> > [ 4.837570] [drm] Generation 2 PCI interface, using max accessible
> > memory [ 4.837653] radeon 0000:01:05.0: VRAM: 128M 0x0000000078000000
> > - 0x000000007FFFFFFF (128M used)
> > [ 4.837714] radeon 0000:01:05.0: GTT: 512M 0x0000000080000000 -
> > 0x000000009FFFFFFF
> > [ 4.837787] [drm] Detected VRAM RAM=128M, BAR=256M
> > [ 4.837839] [drm] RAM width 128bits DDR
> > [ 4.839854] [TTM] Zone kernel: Available graphics memory: 444588 kiB
> > [ 4.839907] [TTM] Zone highmem: Available graphics memory: 972784 kiB
> > [ 4.839959] [TTM] Initializing pool allocator
> > [ 4.840042] [drm] radeon: 128M of VRAM memory ready
> > [ 4.840094] [drm] radeon: 512M of GTT memory ready.
> > [ 4.840160] [drm] GART: num cpu pages 131072, num gpu pages 131072
> > [ 4.866905] [drm] radeon: 2 quad pipes, 1 z pipes initialized.
> > [ 4.872945] [drm] PCIE GART of 512M enabled (table at
> > 0x0000000035A00000).
> > [ 4.873213] radeon 0000:01:05.0: WB enabled
> > [ 4.873301] radeon 0000:01:05.0: fence driver on ring 0 use gpu addr
> > 0x0000000080000000 and cpu addr 0xf592c000
> > [ 4.874929] [drm] Supports vblank timestamp caching Rev 1
> > (10.10.2010). [ 4.874988] [drm] Driver supports precise vblank
> > timestamp query. [ 4.875055] [drm] radeon: irq initialized.
> > [ 4.875119] [drm] Loading R300 Microcode
> > [ 4.962083] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
> > [ 5.088150] ohci-pci: OHCI PCI platform driver
> > [ 5.141799] [drm] radeon: ring at 0x0000000080001000
> > [ 5.141883] [drm] ring test succeeded in 2 usecs
> > [ 5.142064] spurious 8259A interrupt: IRQ7.
> > [ 5.142073] [drm] ib test succeeded in 0 usecs
> > [ 5.142317] [drm] Panel ID String: LPL
> > [ 5.142370] [drm] Panel Size 1280x800
> > [ 5.166305] [drm] radeon legacy LVDS backlight initialized
> > [ 5.166358] [drm] Radeon Display Connectors
> > [ 5.166408] [drm] Connector 0:
> > [ 5.166458] [drm] VGA-1
> > [ 5.166509] [drm] DDC: 0x68 0x68 0x68 0x68 0x68 0x68 0x68 0x68
> > [ 5.166560] [drm] Encoders:
> > [ 5.166610] [drm] CRT1: INTERNAL_DAC2
> > [ 5.166660] [drm] Connector 1:
> > [ 5.166710] [drm] LVDS-1
> > [ 5.166760] [drm] DDC: 0x198 0x198 0x19c 0x19c 0x1a0 0x1a0 0x1a4
> > 0x1a4 [ 5.166812] [drm] Encoders:
> > [ 5.166862] [drm] LCD1: INTERNAL_LVDS
> > [ 5.426968] [drm] fb mappable at 0xC0040000
> > [ 5.427026] [drm] vram apper at 0xC0000000
> > [ 5.427076] [drm] size 4096000
> > [ 5.427126] [drm] fb depth is 24
> > [ 5.427176] [drm] pitch is 5120
> > [ 5.427388] radeon 0000:01:05.0: fb0: radeondrmfb frame buffer device
> > [ 5.427442] radeon 0000:01:05.0: registered panic notifier
> > [ 5.427501] [drm] Initialized radeon 2.34.0 20080528 for 0000:01:05.0
> > on minor 0
> >
> > --
> > Ondrej Zary


--
Ondrej Zary

2013-08-22 20:27:12

by Deucher, Alexander

[permalink] [raw]
Subject: RE: Asus F5RL laptop unable to resume from S3 because of radeon module

> -----Original Message-----
> From: Ondrej Zary [mailto:[email protected]]
> Sent: Thursday, August 22, 2013 4:00 PM
> To: Deucher, Alexander
> Cc: Kernel development list
> Subject: Re: Asus F5RL laptop unable to resume from S3 because of radeon
> module
>
> On Thursday 22 August 2013 21:49:41 Deucher, Alexander wrote:
> > > -----Original Message-----
> > > From: Ondrej Zary [mailto:[email protected]]
> > > Sent: Thursday, August 22, 2013 2:18 PM
> > > To: Kernel development list
> > > Cc: Deucher, Alexander
> > > Subject: Asus F5RL laptop unable to resume from S3 because of radeon
> > > module
> > >
> > > Hello,
> > > resume from suspend-to-RAM (S3) on Asus F5RL laptop does not work.
> > > According to many reports found by Google, it was always been that and
> > > there
> > > is no fix or workaround.
> >
> > Make sure your kernel has this patch:
> > http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=c
> >ef1d00cd56f600121ad121875655ad410a001b8
>
> Just tried latest git (3.11-rc6+) and the problem persists.
>

You might try adding a quirk for your system in radeon_combios_asic_init() in radeon_combios.c. You can try something like this for testing:

diff --git a/drivers/gpu/drm/radeon/radeon_combios.c b/drivers/gpu/drm/radeon/radeon_combios.c
index 68ce360..0419a2c 100644
--- a/drivers/gpu/drm/radeon/radeon_combios.c
+++ b/drivers/gpu/drm/radeon/radeon_combios.c
@@ -3398,6 +3398,8 @@ void radeon_combios_asic_init(struct drm_device *dev)
rdev->pdev->subsystem_device == 0x30ae)
return;

+ return;
+
/* DYN CLK 1 */
table = combios_get_table_offset(dev, COMBIOS_DYN_CLK_1_TABLE);
if (table)

If that doesn't work, you'll probably have to track down where it's hanging during resume, or compare registers before and after resume to see if it's some particular state that's causing a problem.

Alex


> > Alex
> >
> > > Did some tests:
> > >
> > > radeon module loaded (usual state):
> > > After "echo mem>/sys/power/state", the laptop suspends correctly
> (power
> > > LED
> > > blinks). When power button is pressed, power LED goes on and that's all.
> > > No more activity, machine is frozen completely.
> > >
> > > radeon module not loaded at all:
> > > Laptop resumes correctly (keyboard LED work, network works), only the
> LCD
> > > is
> > > blank (obviously). Loading radeon module now initializes the card
> > > properly: LCD goes on and console works.
> > >
> > > radeon module loaded (but fbcon module not loaded) and then
> unloaded:
> > > Machine freezes the same way as when the module is loaded.
> > >
> > > So it looks like the radeon module does some initialization that prevents
> > > resume from working.
> > >
> > > Hibernation works fine.
> > >
> > > Any ideas what to test or how to debug this?
> > >
> > > Details:
> > > 01:05.0 VGA compatible controller [0300]: Advanced Micro Devices, Inc.
> > > [AMD/ATI] RC410M [Mobility Radeon Xpress 200M] [1002:5a62] (prog-if
> 00
> > > [VGA controller])
> > > Subsystem: ASUSTeK Computer Inc. Device [1043:1402]
> > > Flags: bus master, 66MHz, medium devsel, latency 64, IRQ 10
> > > Memory at c0000000 (32-bit, prefetchable) [size=256M]
> > > I/O ports at 9800 [size=256]
> > > Memory at fa8f0000 (32-bit, non-prefetchable) [size=64K]
> > > Expansion ROM at fa8c0000 [disabled] [size=128K]
> > > Capabilities: [50] Power Management version 2
> > > Capabilities: [80] MSI: Enable- Count=1/1 Maskable- 64bit-
> > > Kernel driver in use: radeon
> > >
> > > [ 4.836009] [drm] radeon kernel modesetting enabled.
> > > [ 4.837169] [drm] initializing kernel modesetting (RS400 0x1002:0x5A62
> > > 0x1043:0x1402).
> > > [ 4.837251] [drm] register mmio base: 0xFA8F0000
> > > [ 4.837302] [drm] register mmio size: 65536
> > > [ 4.837570] [drm] Generation 2 PCI interface, using max accessible
> > > memory [ 4.837653] radeon 0000:01:05.0: VRAM: 128M
> 0x0000000078000000
> > > - 0x000000007FFFFFFF (128M used)
> > > [ 4.837714] radeon 0000:01:05.0: GTT: 512M 0x0000000080000000 -
> > > 0x000000009FFFFFFF
> > > [ 4.837787] [drm] Detected VRAM RAM=128M, BAR=256M
> > > [ 4.837839] [drm] RAM width 128bits DDR
> > > [ 4.839854] [TTM] Zone kernel: Available graphics memory: 444588 kiB
> > > [ 4.839907] [TTM] Zone highmem: Available graphics memory: 972784
> kiB
> > > [ 4.839959] [TTM] Initializing pool allocator
> > > [ 4.840042] [drm] radeon: 128M of VRAM memory ready
> > > [ 4.840094] [drm] radeon: 512M of GTT memory ready.
> > > [ 4.840160] [drm] GART: num cpu pages 131072, num gpu pages 131072
> > > [ 4.866905] [drm] radeon: 2 quad pipes, 1 z pipes initialized.
> > > [ 4.872945] [drm] PCIE GART of 512M enabled (table at
> > > 0x0000000035A00000).
> > > [ 4.873213] radeon 0000:01:05.0: WB enabled
> > > [ 4.873301] radeon 0000:01:05.0: fence driver on ring 0 use gpu addr
> > > 0x0000000080000000 and cpu addr 0xf592c000
> > > [ 4.874929] [drm] Supports vblank timestamp caching Rev 1
> > > (10.10.2010). [ 4.874988] [drm] Driver supports precise vblank
> > > timestamp query. [ 4.875055] [drm] radeon: irq initialized.
> > > [ 4.875119] [drm] Loading R300 Microcode
> > > [ 4.962083] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
> > > [ 5.088150] ohci-pci: OHCI PCI platform driver
> > > [ 5.141799] [drm] radeon: ring at 0x0000000080001000
> > > [ 5.141883] [drm] ring test succeeded in 2 usecs
> > > [ 5.142064] spurious 8259A interrupt: IRQ7.
> > > [ 5.142073] [drm] ib test succeeded in 0 usecs
> > > [ 5.142317] [drm] Panel ID String: LPL
> > > [ 5.142370] [drm] Panel Size 1280x800
> > > [ 5.166305] [drm] radeon legacy LVDS backlight initialized
> > > [ 5.166358] [drm] Radeon Display Connectors
> > > [ 5.166408] [drm] Connector 0:
> > > [ 5.166458] [drm] VGA-1
> > > [ 5.166509] [drm] DDC: 0x68 0x68 0x68 0x68 0x68 0x68 0x68 0x68
> > > [ 5.166560] [drm] Encoders:
> > > [ 5.166610] [drm] CRT1: INTERNAL_DAC2
> > > [ 5.166660] [drm] Connector 1:
> > > [ 5.166710] [drm] LVDS-1
> > > [ 5.166760] [drm] DDC: 0x198 0x198 0x19c 0x19c 0x1a0 0x1a0 0x1a4
> > > 0x1a4 [ 5.166812] [drm] Encoders:
> > > [ 5.166862] [drm] LCD1: INTERNAL_LVDS
> > > [ 5.426968] [drm] fb mappable at 0xC0040000
> > > [ 5.427026] [drm] vram apper at 0xC0000000
> > > [ 5.427076] [drm] size 4096000
> > > [ 5.427126] [drm] fb depth is 24
> > > [ 5.427176] [drm] pitch is 5120
> > > [ 5.427388] radeon 0000:01:05.0: fb0: radeondrmfb frame buffer device
> > > [ 5.427442] radeon 0000:01:05.0: registered panic notifier
> > > [ 5.427501] [drm] Initialized radeon 2.34.0 20080528 for 0000:01:05.0
> > > on minor 0
> > >
> > > --
> > > Ondrej Zary
>
>
> --
> Ondrej Zary

2013-08-22 20:56:22

by Ondrej Zary

[permalink] [raw]
Subject: Re: Asus F5RL laptop unable to resume from S3 because of radeon module

On Thursday 22 August 2013 22:24:17 Deucher, Alexander wrote:
> > -----Original Message-----
> > From: Ondrej Zary [mailto:[email protected]]
> > Sent: Thursday, August 22, 2013 4:00 PM
> > To: Deucher, Alexander
> > Cc: Kernel development list
> > Subject: Re: Asus F5RL laptop unable to resume from S3 because of radeon
> > module
> >
> > On Thursday 22 August 2013 21:49:41 Deucher, Alexander wrote:
> > > > -----Original Message-----
> > > > From: Ondrej Zary [mailto:[email protected]]
> > > > Sent: Thursday, August 22, 2013 2:18 PM
> > > > To: Kernel development list
> > > > Cc: Deucher, Alexander
> > > > Subject: Asus F5RL laptop unable to resume from S3 because of radeon
> > > > module
> > > >
> > > > Hello,
> > > > resume from suspend-to-RAM (S3) on Asus F5RL laptop does not work.
> > > > According to many reports found by Google, it was always been that
> > > > and there
> > > > is no fix or workaround.
> > >
> > > Make sure your kernel has this patch:
> > > http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?
> > >id=c ef1d00cd56f600121ad121875655ad410a001b8
> >
> > Just tried latest git (3.11-rc6+) and the problem persists.
>
> You might try adding a quirk for your system in radeon_combios_asic_init()
> in radeon_combios.c. You can try something like this for testing:
>
> diff --git a/drivers/gpu/drm/radeon/radeon_combios.c
> b/drivers/gpu/drm/radeon/radeon_combios.c index 68ce360..0419a2c 100644
> --- a/drivers/gpu/drm/radeon/radeon_combios.c
> +++ b/drivers/gpu/drm/radeon/radeon_combios.c
> @@ -3398,6 +3398,8 @@ void radeon_combios_asic_init(struct drm_device *dev)
> rdev->pdev->subsystem_device == 0x30ae)
> return;
>
> + return;
> +
> /* DYN CLK 1 */
> table = combios_get_table_offset(dev, COMBIOS_DYN_CLK_1_TABLE);
> if (table)
>
> If that doesn't work, you'll probably have to track down where it's hanging
> during resume, or compare registers before and after resume to see if it's
> some particular state that's causing a problem.

No change.

Inserted "return -1;" before radeon_device_init() to
radeon_driver_load_kms() - driver fails to load and resume works.
Moved it (and changed to "r = -1; goto out;") a bit down before
radeon_modeset_init() - driver fails to load and resume stopped working.


> Alex
>
> > > Alex
> > >
> > > > Did some tests:
> > > >
> > > > radeon module loaded (usual state):
> > > > After "echo mem>/sys/power/state", the laptop suspends correctly
> >
> > (power
> >
> > > > LED
> > > > blinks). When power button is pressed, power LED goes on and that's
> > > > all. No more activity, machine is frozen completely.
> > > >
> > > > radeon module not loaded at all:
> > > > Laptop resumes correctly (keyboard LED work, network works), only the
> >
> > LCD
> >
> > > > is
> > > > blank (obviously). Loading radeon module now initializes the card
> > > > properly: LCD goes on and console works.
> > > >
> > > > radeon module loaded (but fbcon module not loaded) and then
> >
> > unloaded:
> > > > Machine freezes the same way as when the module is loaded.
> > > >
> > > > So it looks like the radeon module does some initialization that
> > > > prevents resume from working.
> > > >
> > > > Hibernation works fine.
> > > >
> > > > Any ideas what to test or how to debug this?
> > > >
> > > > Details:
> > > > 01:05.0 VGA compatible controller [0300]: Advanced Micro Devices,
> > > > Inc. [AMD/ATI] RC410M [Mobility Radeon Xpress 200M] [1002:5a62]
> > > > (prog-if
> >
> > 00
> >
> > > > [VGA controller])
> > > > Subsystem: ASUSTeK Computer Inc. Device [1043:1402]
> > > > Flags: bus master, 66MHz, medium devsel, latency 64, IRQ 10
> > > > Memory at c0000000 (32-bit, prefetchable) [size=256M]
> > > > I/O ports at 9800 [size=256]
> > > > Memory at fa8f0000 (32-bit, non-prefetchable) [size=64K]
> > > > Expansion ROM at fa8c0000 [disabled] [size=128K]
> > > > Capabilities: [50] Power Management version 2
> > > > Capabilities: [80] MSI: Enable- Count=1/1 Maskable- 64bit-
> > > > Kernel driver in use: radeon
> > > >
> > > > [ 4.836009] [drm] radeon kernel modesetting enabled.
> > > > [ 4.837169] [drm] initializing kernel modesetting (RS400
> > > > 0x1002:0x5A62 0x1043:0x1402).
> > > > [ 4.837251] [drm] register mmio base: 0xFA8F0000
> > > > [ 4.837302] [drm] register mmio size: 65536
> > > > [ 4.837570] [drm] Generation 2 PCI interface, using max accessible
> > > > memory [ 4.837653] radeon 0000:01:05.0: VRAM: 128M
> >
> > 0x0000000078000000
> >
> > > > - 0x000000007FFFFFFF (128M used)
> > > > [ 4.837714] radeon 0000:01:05.0: GTT: 512M 0x0000000080000000 -
> > > > 0x000000009FFFFFFF
> > > > [ 4.837787] [drm] Detected VRAM RAM=128M, BAR=256M
> > > > [ 4.837839] [drm] RAM width 128bits DDR
> > > > [ 4.839854] [TTM] Zone kernel: Available graphics memory: 444588
> > > > kiB [ 4.839907] [TTM] Zone highmem: Available graphics memory:
> > > > 972784
> >
> > kiB
> >
> > > > [ 4.839959] [TTM] Initializing pool allocator
> > > > [ 4.840042] [drm] radeon: 128M of VRAM memory ready
> > > > [ 4.840094] [drm] radeon: 512M of GTT memory ready.
> > > > [ 4.840160] [drm] GART: num cpu pages 131072, num gpu pages 131072
> > > > [ 4.866905] [drm] radeon: 2 quad pipes, 1 z pipes initialized.
> > > > [ 4.872945] [drm] PCIE GART of 512M enabled (table at
> > > > 0x0000000035A00000).
> > > > [ 4.873213] radeon 0000:01:05.0: WB enabled
> > > > [ 4.873301] radeon 0000:01:05.0: fence driver on ring 0 use gpu
> > > > addr 0x0000000080000000 and cpu addr 0xf592c000
> > > > [ 4.874929] [drm] Supports vblank timestamp caching Rev 1
> > > > (10.10.2010). [ 4.874988] [drm] Driver supports precise vblank
> > > > timestamp query. [ 4.875055] [drm] radeon: irq initialized.
> > > > [ 4.875119] [drm] Loading R300 Microcode
> > > > [ 4.962083] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
> > > > [ 5.088150] ohci-pci: OHCI PCI platform driver
> > > > [ 5.141799] [drm] radeon: ring at 0x0000000080001000
> > > > [ 5.141883] [drm] ring test succeeded in 2 usecs
> > > > [ 5.142064] spurious 8259A interrupt: IRQ7.
> > > > [ 5.142073] [drm] ib test succeeded in 0 usecs
> > > > [ 5.142317] [drm] Panel ID String: LPL
> > > > [ 5.142370] [drm] Panel Size 1280x800
> > > > [ 5.166305] [drm] radeon legacy LVDS backlight initialized
> > > > [ 5.166358] [drm] Radeon Display Connectors
> > > > [ 5.166408] [drm] Connector 0:
> > > > [ 5.166458] [drm] VGA-1
> > > > [ 5.166509] [drm] DDC: 0x68 0x68 0x68 0x68 0x68 0x68 0x68 0x68
> > > > [ 5.166560] [drm] Encoders:
> > > > [ 5.166610] [drm] CRT1: INTERNAL_DAC2
> > > > [ 5.166660] [drm] Connector 1:
> > > > [ 5.166710] [drm] LVDS-1
> > > > [ 5.166760] [drm] DDC: 0x198 0x198 0x19c 0x19c 0x1a0 0x1a0 0x1a4
> > > > 0x1a4 [ 5.166812] [drm] Encoders:
> > > > [ 5.166862] [drm] LCD1: INTERNAL_LVDS
> > > > [ 5.426968] [drm] fb mappable at 0xC0040000
> > > > [ 5.427026] [drm] vram apper at 0xC0000000
> > > > [ 5.427076] [drm] size 4096000
> > > > [ 5.427126] [drm] fb depth is 24
> > > > [ 5.427176] [drm] pitch is 5120
> > > > [ 5.427388] radeon 0000:01:05.0: fb0: radeondrmfb frame buffer
> > > > device [ 5.427442] radeon 0000:01:05.0: registered panic notifier
> > > > [ 5.427501] [drm] Initialized radeon 2.34.0 20080528 for
> > > > 0000:01:05.0 on minor 0
> > > >
> > > > --
> > > > Ondrej Zary
> >
> > --
> > Ondrej Zary


--
Ondrej Zary

2013-08-22 22:08:54

by Ondrej Zary

[permalink] [raw]
Subject: Re: Asus F5RL laptop unable to resume from S3 because of radeon module

On Thursday 22 August 2013 22:56:03 Ondrej Zary wrote:
> On Thursday 22 August 2013 22:24:17 Deucher, Alexander wrote:
> > > -----Original Message-----
> > > From: Ondrej Zary [mailto:[email protected]]
> > > Sent: Thursday, August 22, 2013 4:00 PM
> > > To: Deucher, Alexander
> > > Cc: Kernel development list
> > > Subject: Re: Asus F5RL laptop unable to resume from S3 because of
> > > radeon module
> > >
> > > On Thursday 22 August 2013 21:49:41 Deucher, Alexander wrote:
> > > > > -----Original Message-----
> > > > > From: Ondrej Zary [mailto:[email protected]]
> > > > > Sent: Thursday, August 22, 2013 2:18 PM
> > > > > To: Kernel development list
> > > > > Cc: Deucher, Alexander
> > > > > Subject: Asus F5RL laptop unable to resume from S3 because of
> > > > > radeon module
> > > > >
> > > > > Hello,
> > > > > resume from suspend-to-RAM (S3) on Asus F5RL laptop does not work.
> > > > > According to many reports found by Google, it was always been that
> > > > > and there
> > > > > is no fix or workaround.
> > > >
> > > > Make sure your kernel has this patch:
> > > > http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit
> > > >/? id=c ef1d00cd56f600121ad121875655ad410a001b8
> > >
> > > Just tried latest git (3.11-rc6+) and the problem persists.
> >
> > You might try adding a quirk for your system in
> > radeon_combios_asic_init() in radeon_combios.c. You can try something
> > like this for testing:
> >
> > diff --git a/drivers/gpu/drm/radeon/radeon_combios.c
> > b/drivers/gpu/drm/radeon/radeon_combios.c index 68ce360..0419a2c 100644
> > --- a/drivers/gpu/drm/radeon/radeon_combios.c
> > +++ b/drivers/gpu/drm/radeon/radeon_combios.c
> > @@ -3398,6 +3398,8 @@ void radeon_combios_asic_init(struct drm_device
> > *dev) rdev->pdev->subsystem_device == 0x30ae)
> > return;
> >
> > + return;
> > +
> > /* DYN CLK 1 */
> > table = combios_get_table_offset(dev, COMBIOS_DYN_CLK_1_TABLE);
> > if (table)
> >
> > If that doesn't work, you'll probably have to track down where it's
> > hanging during resume, or compare registers before and after resume to
> > see if it's some particular state that's causing a problem.
>
> No change.
>
> Inserted "return -1;" before radeon_device_init() to
> radeon_driver_load_kms() - driver fails to load and resume works.
> Moved it (and changed to "r = -1; goto out;") a bit down before
> radeon_modeset_init() - driver fails to load and resume stopped working.

Going deeper... it works before rs400_startup() and does not work after that.
Will continue later.

> > Alex
> >
> > > > Alex
> > > >
> > > > > Did some tests:
> > > > >
> > > > > radeon module loaded (usual state):
> > > > > After "echo mem>/sys/power/state", the laptop suspends correctly
> > >
> > > (power
> > >
> > > > > LED
> > > > > blinks). When power button is pressed, power LED goes on and that's
> > > > > all. No more activity, machine is frozen completely.
> > > > >
> > > > > radeon module not loaded at all:
> > > > > Laptop resumes correctly (keyboard LED work, network works), only
> > > > > the
> > >
> > > LCD
> > >
> > > > > is
> > > > > blank (obviously). Loading radeon module now initializes the card
> > > > > properly: LCD goes on and console works.
> > > > >
> > > > > radeon module loaded (but fbcon module not loaded) and then
> > >
> > > unloaded:
> > > > > Machine freezes the same way as when the module is loaded.
> > > > >
> > > > > So it looks like the radeon module does some initialization that
> > > > > prevents resume from working.
> > > > >
> > > > > Hibernation works fine.
> > > > >
> > > > > Any ideas what to test or how to debug this?
> > > > >
> > > > > Details:
> > > > > 01:05.0 VGA compatible controller [0300]: Advanced Micro Devices,
> > > > > Inc. [AMD/ATI] RC410M [Mobility Radeon Xpress 200M] [1002:5a62]
> > > > > (prog-if
> > >
> > > 00
> > >
> > > > > [VGA controller])
> > > > > Subsystem: ASUSTeK Computer Inc. Device [1043:1402]
> > > > > Flags: bus master, 66MHz, medium devsel, latency 64, IRQ 10
> > > > > Memory at c0000000 (32-bit, prefetchable) [size=256M]
> > > > > I/O ports at 9800 [size=256]
> > > > > Memory at fa8f0000 (32-bit, non-prefetchable) [size=64K]
> > > > > Expansion ROM at fa8c0000 [disabled] [size=128K]
> > > > > Capabilities: [50] Power Management version 2
> > > > > Capabilities: [80] MSI: Enable- Count=1/1 Maskable- 64bit-
> > > > > Kernel driver in use: radeon
> > > > >
> > > > > [ 4.836009] [drm] radeon kernel modesetting enabled.
> > > > > [ 4.837169] [drm] initializing kernel modesetting (RS400
> > > > > 0x1002:0x5A62 0x1043:0x1402).
> > > > > [ 4.837251] [drm] register mmio base: 0xFA8F0000
> > > > > [ 4.837302] [drm] register mmio size: 65536
> > > > > [ 4.837570] [drm] Generation 2 PCI interface, using max
> > > > > accessible memory [ 4.837653] radeon 0000:01:05.0: VRAM: 128M
> > >
> > > 0x0000000078000000
> > >
> > > > > - 0x000000007FFFFFFF (128M used)
> > > > > [ 4.837714] radeon 0000:01:05.0: GTT: 512M 0x0000000080000000 -
> > > > > 0x000000009FFFFFFF
> > > > > [ 4.837787] [drm] Detected VRAM RAM=128M, BAR=256M
> > > > > [ 4.837839] [drm] RAM width 128bits DDR
> > > > > [ 4.839854] [TTM] Zone kernel: Available graphics memory:
> > > > > 444588 kiB [ 4.839907] [TTM] Zone highmem: Available graphics
> > > > > memory: 972784
> > >
> > > kiB
> > >
> > > > > [ 4.839959] [TTM] Initializing pool allocator
> > > > > [ 4.840042] [drm] radeon: 128M of VRAM memory ready
> > > > > [ 4.840094] [drm] radeon: 512M of GTT memory ready.
> > > > > [ 4.840160] [drm] GART: num cpu pages 131072, num gpu pages
> > > > > 131072 [ 4.866905] [drm] radeon: 2 quad pipes, 1 z pipes
> > > > > initialized. [ 4.872945] [drm] PCIE GART of 512M enabled (table
> > > > > at
> > > > > 0x0000000035A00000).
> > > > > [ 4.873213] radeon 0000:01:05.0: WB enabled
> > > > > [ 4.873301] radeon 0000:01:05.0: fence driver on ring 0 use gpu
> > > > > addr 0x0000000080000000 and cpu addr 0xf592c000
> > > > > [ 4.874929] [drm] Supports vblank timestamp caching Rev 1
> > > > > (10.10.2010). [ 4.874988] [drm] Driver supports precise vblank
> > > > > timestamp query. [ 4.875055] [drm] radeon: irq initialized.
> > > > > [ 4.875119] [drm] Loading R300 Microcode
> > > > > [ 4.962083] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI)
> > > > > Driver [ 5.088150] ohci-pci: OHCI PCI platform driver
> > > > > [ 5.141799] [drm] radeon: ring at 0x0000000080001000
> > > > > [ 5.141883] [drm] ring test succeeded in 2 usecs
> > > > > [ 5.142064] spurious 8259A interrupt: IRQ7.
> > > > > [ 5.142073] [drm] ib test succeeded in 0 usecs
> > > > > [ 5.142317] [drm] Panel ID String: LPL
> > > > > [ 5.142370] [drm] Panel Size 1280x800
> > > > > [ 5.166305] [drm] radeon legacy LVDS backlight initialized
> > > > > [ 5.166358] [drm] Radeon Display Connectors
> > > > > [ 5.166408] [drm] Connector 0:
> > > > > [ 5.166458] [drm] VGA-1
> > > > > [ 5.166509] [drm] DDC: 0x68 0x68 0x68 0x68 0x68 0x68 0x68 0x68
> > > > > [ 5.166560] [drm] Encoders:
> > > > > [ 5.166610] [drm] CRT1: INTERNAL_DAC2
> > > > > [ 5.166660] [drm] Connector 1:
> > > > > [ 5.166710] [drm] LVDS-1
> > > > > [ 5.166760] [drm] DDC: 0x198 0x198 0x19c 0x19c 0x1a0 0x1a0
> > > > > 0x1a4 0x1a4 [ 5.166812] [drm] Encoders:
> > > > > [ 5.166862] [drm] LCD1: INTERNAL_LVDS
> > > > > [ 5.426968] [drm] fb mappable at 0xC0040000
> > > > > [ 5.427026] [drm] vram apper at 0xC0000000
> > > > > [ 5.427076] [drm] size 4096000
> > > > > [ 5.427126] [drm] fb depth is 24
> > > > > [ 5.427176] [drm] pitch is 5120
> > > > > [ 5.427388] radeon 0000:01:05.0: fb0: radeondrmfb frame buffer
> > > > > device [ 5.427442] radeon 0000:01:05.0: registered panic
> > > > > notifier [ 5.427501] [drm] Initialized radeon 2.34.0 20080528
> > > > > for 0000:01:05.0 on minor 0
> > > > >
> > > > > --
> > > > > Ondrej Zary
> > >
> > > --
> > > Ondrej Zary


--
Ondrej Zary

2013-08-23 17:55:56

by Ondrej Zary

[permalink] [raw]
Subject: Re: Asus F5RL laptop unable to resume from S3 because of radeon module

On Friday 23 August 2013 00:08:33 Ondrej Zary wrote:
> On Thursday 22 August 2013 22:56:03 Ondrej Zary wrote:
> > On Thursday 22 August 2013 22:24:17 Deucher, Alexander wrote:
> > > > -----Original Message-----
> > > > From: Ondrej Zary [mailto:[email protected]]
> > > > Sent: Thursday, August 22, 2013 4:00 PM
> > > > To: Deucher, Alexander
> > > > Cc: Kernel development list
> > > > Subject: Re: Asus F5RL laptop unable to resume from S3 because of
> > > > radeon module
> > > >
> > > > On Thursday 22 August 2013 21:49:41 Deucher, Alexander wrote:
> > > > > > -----Original Message-----
> > > > > > From: Ondrej Zary [mailto:[email protected]]
> > > > > > Sent: Thursday, August 22, 2013 2:18 PM
> > > > > > To: Kernel development list
> > > > > > Cc: Deucher, Alexander
> > > > > > Subject: Asus F5RL laptop unable to resume from S3 because of
> > > > > > radeon module
> > > > > >
> > > > > > Hello,
> > > > > > resume from suspend-to-RAM (S3) on Asus F5RL laptop does not
> > > > > > work. According to many reports found by Google, it was always
> > > > > > been that and there
> > > > > > is no fix or workaround.
> > > > >
> > > > > Make sure your kernel has this patch:
> > > > > http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/comm
> > > > >it /? id=c ef1d00cd56f600121ad121875655ad410a001b8
> > > >
> > > > Just tried latest git (3.11-rc6+) and the problem persists.
> > >
> > > You might try adding a quirk for your system in
> > > radeon_combios_asic_init() in radeon_combios.c. You can try something
> > > like this for testing:
> > >
> > > diff --git a/drivers/gpu/drm/radeon/radeon_combios.c
> > > b/drivers/gpu/drm/radeon/radeon_combios.c index 68ce360..0419a2c 100644
> > > --- a/drivers/gpu/drm/radeon/radeon_combios.c
> > > +++ b/drivers/gpu/drm/radeon/radeon_combios.c
> > > @@ -3398,6 +3398,8 @@ void radeon_combios_asic_init(struct drm_device
> > > *dev) rdev->pdev->subsystem_device == 0x30ae)
> > > return;
> > >
> > > + return;
> > > +
> > > /* DYN CLK 1 */
> > > table = combios_get_table_offset(dev, COMBIOS_DYN_CLK_1_TABLE);
> > > if (table)
> > >
> > > If that doesn't work, you'll probably have to track down where it's
> > > hanging during resume, or compare registers before and after resume to
> > > see if it's some particular state that's causing a problem.
> >
> > No change.
> >
> > Inserted "return -1;" before radeon_device_init() to
> > radeon_driver_load_kms() - driver fails to load and resume works.
> > Moved it (and changed to "r = -1; goto out;") a bit down before
> > radeon_modeset_init() - driver fails to load and resume stopped working.
>
> Going deeper... it works before rs400_startup() and does not work after
> that. Will continue later.

Tracked the problem down to rs400_gart_enable(). When this "Disable AGP mode"
code is commented out, the machine resumes fine:

if ((rdev->family == CHIP_RS690) || (rdev->family == CHIP_RS740)) {
WREG32_MC(RS480_MC_MISC_CNTL,
(RS480_GART_INDEX_REG_EN | RS690_BLOCK_GFX_D3_EN));
} else {
WREG32_MC(RS480_MC_MISC_CNTL, RS480_GART_INDEX_REG_EN);
}


> > > Alex
> > >
> > > > > Alex
> > > > >
> > > > > > Did some tests:
> > > > > >
> > > > > > radeon module loaded (usual state):
> > > > > > After "echo mem>/sys/power/state", the laptop suspends correctly
> > > >
> > > > (power
> > > >
> > > > > > LED
> > > > > > blinks). When power button is pressed, power LED goes on and
> > > > > > that's all. No more activity, machine is frozen completely.
> > > > > >
> > > > > > radeon module not loaded at all:
> > > > > > Laptop resumes correctly (keyboard LED work, network works), only
> > > > > > the
> > > >
> > > > LCD
> > > >
> > > > > > is
> > > > > > blank (obviously). Loading radeon module now initializes the card
> > > > > > properly: LCD goes on and console works.
> > > > > >
> > > > > > radeon module loaded (but fbcon module not loaded) and then
> > > >
> > > > unloaded:
> > > > > > Machine freezes the same way as when the module is loaded.
> > > > > >
> > > > > > So it looks like the radeon module does some initialization that
> > > > > > prevents resume from working.
> > > > > >
> > > > > > Hibernation works fine.
> > > > > >
> > > > > > Any ideas what to test or how to debug this?
> > > > > >
> > > > > > Details:
> > > > > > 01:05.0 VGA compatible controller [0300]: Advanced Micro Devices,
> > > > > > Inc. [AMD/ATI] RC410M [Mobility Radeon Xpress 200M] [1002:5a62]
> > > > > > (prog-if
> > > >
> > > > 00
> > > >
> > > > > > [VGA controller])
> > > > > > Subsystem: ASUSTeK Computer Inc. Device [1043:1402]
> > > > > > Flags: bus master, 66MHz, medium devsel, latency 64, IRQ
> > > > > > 10 Memory at c0000000 (32-bit, prefetchable) [size=256M] I/O
> > > > > > ports at 9800 [size=256]
> > > > > > Memory at fa8f0000 (32-bit, non-prefetchable) [size=64K]
> > > > > > Expansion ROM at fa8c0000 [disabled] [size=128K]
> > > > > > Capabilities: [50] Power Management version 2
> > > > > > Capabilities: [80] MSI: Enable- Count=1/1 Maskable-
> > > > > > 64bit- Kernel driver in use: radeon
> > > > > >
> > > > > > [ 4.836009] [drm] radeon kernel modesetting enabled.
> > > > > > [ 4.837169] [drm] initializing kernel modesetting (RS400
> > > > > > 0x1002:0x5A62 0x1043:0x1402).
> > > > > > [ 4.837251] [drm] register mmio base: 0xFA8F0000
> > > > > > [ 4.837302] [drm] register mmio size: 65536
> > > > > > [ 4.837570] [drm] Generation 2 PCI interface, using max
> > > > > > accessible memory [ 4.837653] radeon 0000:01:05.0: VRAM: 128M
> > > >
> > > > 0x0000000078000000
> > > >
> > > > > > - 0x000000007FFFFFFF (128M used)
> > > > > > [ 4.837714] radeon 0000:01:05.0: GTT: 512M 0x0000000080000000
> > > > > > - 0x000000009FFFFFFF
> > > > > > [ 4.837787] [drm] Detected VRAM RAM=128M, BAR=256M
> > > > > > [ 4.837839] [drm] RAM width 128bits DDR
> > > > > > [ 4.839854] [TTM] Zone kernel: Available graphics memory:
> > > > > > 444588 kiB [ 4.839907] [TTM] Zone highmem: Available graphics
> > > > > > memory: 972784
> > > >
> > > > kiB
> > > >
> > > > > > [ 4.839959] [TTM] Initializing pool allocator
> > > > > > [ 4.840042] [drm] radeon: 128M of VRAM memory ready
> > > > > > [ 4.840094] [drm] radeon: 512M of GTT memory ready.
> > > > > > [ 4.840160] [drm] GART: num cpu pages 131072, num gpu pages
> > > > > > 131072 [ 4.866905] [drm] radeon: 2 quad pipes, 1 z pipes
> > > > > > initialized. [ 4.872945] [drm] PCIE GART of 512M enabled
> > > > > > (table at
> > > > > > 0x0000000035A00000).
> > > > > > [ 4.873213] radeon 0000:01:05.0: WB enabled
> > > > > > [ 4.873301] radeon 0000:01:05.0: fence driver on ring 0 use
> > > > > > gpu addr 0x0000000080000000 and cpu addr 0xf592c000
> > > > > > [ 4.874929] [drm] Supports vblank timestamp caching Rev 1
> > > > > > (10.10.2010). [ 4.874988] [drm] Driver supports precise vblank
> > > > > > timestamp query. [ 4.875055] [drm] radeon: irq initialized.
> > > > > > [ 4.875119] [drm] Loading R300 Microcode
> > > > > > [ 4.962083] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI)
> > > > > > Driver [ 5.088150] ohci-pci: OHCI PCI platform driver
> > > > > > [ 5.141799] [drm] radeon: ring at 0x0000000080001000
> > > > > > [ 5.141883] [drm] ring test succeeded in 2 usecs
> > > > > > [ 5.142064] spurious 8259A interrupt: IRQ7.
> > > > > > [ 5.142073] [drm] ib test succeeded in 0 usecs
> > > > > > [ 5.142317] [drm] Panel ID String: LPL
> > > > > > [ 5.142370] [drm] Panel Size 1280x800
> > > > > > [ 5.166305] [drm] radeon legacy LVDS backlight initialized
> > > > > > [ 5.166358] [drm] Radeon Display Connectors
> > > > > > [ 5.166408] [drm] Connector 0:
> > > > > > [ 5.166458] [drm] VGA-1
> > > > > > [ 5.166509] [drm] DDC: 0x68 0x68 0x68 0x68 0x68 0x68 0x68
> > > > > > 0x68 [ 5.166560] [drm] Encoders:
> > > > > > [ 5.166610] [drm] CRT1: INTERNAL_DAC2
> > > > > > [ 5.166660] [drm] Connector 1:
> > > > > > [ 5.166710] [drm] LVDS-1
> > > > > > [ 5.166760] [drm] DDC: 0x198 0x198 0x19c 0x19c 0x1a0 0x1a0
> > > > > > 0x1a4 0x1a4 [ 5.166812] [drm] Encoders:
> > > > > > [ 5.166862] [drm] LCD1: INTERNAL_LVDS
> > > > > > [ 5.426968] [drm] fb mappable at 0xC0040000
> > > > > > [ 5.427026] [drm] vram apper at 0xC0000000
> > > > > > [ 5.427076] [drm] size 4096000
> > > > > > [ 5.427126] [drm] fb depth is 24
> > > > > > [ 5.427176] [drm] pitch is 5120
> > > > > > [ 5.427388] radeon 0000:01:05.0: fb0: radeondrmfb frame buffer
> > > > > > device [ 5.427442] radeon 0000:01:05.0: registered panic
> > > > > > notifier [ 5.427501] [drm] Initialized radeon 2.34.0 20080528
> > > > > > for 0000:01:05.0 on minor 0
> > > > > >
> > > > > > --
> > > > > > Ondrej Zary
> > > >
> > > > --
> > > > Ondrej Zary


--
Ondrej Zary

2013-08-25 14:51:17

by Deucher, Alexander

[permalink] [raw]
Subject: RE: Asus F5RL laptop unable to resume from S3 because of radeon module

> -----Original Message-----
> From: Ondrej Zary [mailto:[email protected]]
> Sent: Friday, August 23, 2013 1:55 PM
> To: Deucher, Alexander
> Cc: Kernel development list
> Subject: Re: Asus F5RL laptop unable to resume from S3 because of radeon
> module
>
> On Friday 23 August 2013 00:08:33 Ondrej Zary wrote:
> > On Thursday 22 August 2013 22:56:03 Ondrej Zary wrote:
> > > On Thursday 22 August 2013 22:24:17 Deucher, Alexander wrote:
> > > > > -----Original Message-----
> > > > > From: Ondrej Zary [mailto:[email protected]]
> > > > > Sent: Thursday, August 22, 2013 4:00 PM
> > > > > To: Deucher, Alexander
> > > > > Cc: Kernel development list
> > > > > Subject: Re: Asus F5RL laptop unable to resume from S3 because of
> > > > > radeon module
> > > > >
> > > > > On Thursday 22 August 2013 21:49:41 Deucher, Alexander wrote:
> > > > > > > -----Original Message-----
> > > > > > > From: Ondrej Zary [mailto:[email protected]]
> > > > > > > Sent: Thursday, August 22, 2013 2:18 PM
> > > > > > > To: Kernel development list
> > > > > > > Cc: Deucher, Alexander
> > > > > > > Subject: Asus F5RL laptop unable to resume from S3 because of
> > > > > > > radeon module
> > > > > > >
> > > > > > > Hello,
> > > > > > > resume from suspend-to-RAM (S3) on Asus F5RL laptop does not
> > > > > > > work. According to many reports found by Google, it was always
> > > > > > > been that and there
> > > > > > > is no fix or workaround.
> > > > > >
> > > > > > Make sure your kernel has this patch:
> > > > > > http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/comm
> > > > > >it /? id=c ef1d00cd56f600121ad121875655ad410a001b8
> > > > >
> > > > > Just tried latest git (3.11-rc6+) and the problem persists.
> > > >
> > > > You might try adding a quirk for your system in
> > > > radeon_combios_asic_init() in radeon_combios.c. You can try
> something
> > > > like this for testing:
> > > >
> > > > diff --git a/drivers/gpu/drm/radeon/radeon_combios.c
> > > > b/drivers/gpu/drm/radeon/radeon_combios.c index 68ce360..0419a2c
> 100644
> > > > --- a/drivers/gpu/drm/radeon/radeon_combios.c
> > > > +++ b/drivers/gpu/drm/radeon/radeon_combios.c
> > > > @@ -3398,6 +3398,8 @@ void radeon_combios_asic_init(struct
> drm_device
> > > > *dev) rdev->pdev->subsystem_device == 0x30ae)
> > > > return;
> > > >
> > > > + return;
> > > > +
> > > > /* DYN CLK 1 */
> > > > table = combios_get_table_offset(dev,
> COMBIOS_DYN_CLK_1_TABLE);
> > > > if (table)
> > > >
> > > > If that doesn't work, you'll probably have to track down where it's
> > > > hanging during resume, or compare registers before and after resume
> to
> > > > see if it's some particular state that's causing a problem.
> > >
> > > No change.
> > >
> > > Inserted "return -1;" before radeon_device_init() to
> > > radeon_driver_load_kms() - driver fails to load and resume works.
> > > Moved it (and changed to "r = -1; goto out;") a bit down before
> > > radeon_modeset_init() - driver fails to load and resume stopped
> working.
> >
> > Going deeper... it works before rs400_startup() and does not work after
> > that. Will continue later.
>
> Tracked the problem down to rs400_gart_enable(). When this "Disable AGP
> mode"
> code is commented out, the machine resumes fine:
>
> if ((rdev->family == CHIP_RS690) || (rdev->family == CHIP_RS740)) {
> WREG32_MC(RS480_MC_MISC_CNTL,
> (RS480_GART_INDEX_REG_EN | RS690_BLOCK_GFX_D3_EN));
> } else {
> WREG32_MC(RS480_MC_MISC_CNTL, RS480_GART_INDEX_REG_EN);
> }
>

Does the driver work properly after resume with that part commented out or does it just avoid the hang?

Alex

>
> > > > Alex
> > > >
> > > > > > Alex
> > > > > >
> > > > > > > Did some tests:
> > > > > > >
> > > > > > > radeon module loaded (usual state):
> > > > > > > After "echo mem>/sys/power/state", the laptop suspends
> correctly
> > > > >
> > > > > (power
> > > > >
> > > > > > > LED
> > > > > > > blinks). When power button is pressed, power LED goes on and
> > > > > > > that's all. No more activity, machine is frozen completely.
> > > > > > >
> > > > > > > radeon module not loaded at all:
> > > > > > > Laptop resumes correctly (keyboard LED work, network works),
> only
> > > > > > > the
> > > > >
> > > > > LCD
> > > > >
> > > > > > > is
> > > > > > > blank (obviously). Loading radeon module now initializes the card
> > > > > > > properly: LCD goes on and console works.
> > > > > > >
> > > > > > > radeon module loaded (but fbcon module not loaded) and then
> > > > >
> > > > > unloaded:
> > > > > > > Machine freezes the same way as when the module is loaded.
> > > > > > >
> > > > > > > So it looks like the radeon module does some initialization that
> > > > > > > prevents resume from working.
> > > > > > >
> > > > > > > Hibernation works fine.
> > > > > > >
> > > > > > > Any ideas what to test or how to debug this?
> > > > > > >
> > > > > > > Details:
> > > > > > > 01:05.0 VGA compatible controller [0300]: Advanced Micro
> Devices,
> > > > > > > Inc. [AMD/ATI] RC410M [Mobility Radeon Xpress 200M]
> [1002:5a62]
> > > > > > > (prog-if
> > > > >
> > > > > 00
> > > > >
> > > > > > > [VGA controller])
> > > > > > > Subsystem: ASUSTeK Computer Inc. Device [1043:1402]
> > > > > > > Flags: bus master, 66MHz, medium devsel, latency 64, IRQ
> > > > > > > 10 Memory at c0000000 (32-bit, prefetchable) [size=256M] I/O
> > > > > > > ports at 9800 [size=256]
> > > > > > > Memory at fa8f0000 (32-bit, non-prefetchable) [size=64K]
> > > > > > > Expansion ROM at fa8c0000 [disabled] [size=128K]
> > > > > > > Capabilities: [50] Power Management version 2
> > > > > > > Capabilities: [80] MSI: Enable- Count=1/1 Maskable-
> > > > > > > 64bit- Kernel driver in use: radeon
> > > > > > >
> > > > > > > [ 4.836009] [drm] radeon kernel modesetting enabled.
> > > > > > > [ 4.837169] [drm] initializing kernel modesetting (RS400
> > > > > > > 0x1002:0x5A62 0x1043:0x1402).
> > > > > > > [ 4.837251] [drm] register mmio base: 0xFA8F0000
> > > > > > > [ 4.837302] [drm] register mmio size: 65536
> > > > > > > [ 4.837570] [drm] Generation 2 PCI interface, using max
> > > > > > > accessible memory [ 4.837653] radeon 0000:01:05.0: VRAM:
> 128M
> > > > >
> > > > > 0x0000000078000000
> > > > >
> > > > > > > - 0x000000007FFFFFFF (128M used)
> > > > > > > [ 4.837714] radeon 0000:01:05.0: GTT: 512M 0x0000000080000000
> > > > > > > - 0x000000009FFFFFFF
> > > > > > > [ 4.837787] [drm] Detected VRAM RAM=128M, BAR=256M
> > > > > > > [ 4.837839] [drm] RAM width 128bits DDR
> > > > > > > [ 4.839854] [TTM] Zone kernel: Available graphics memory:
> > > > > > > 444588 kiB [ 4.839907] [TTM] Zone highmem: Available graphics
> > > > > > > memory: 972784
> > > > >
> > > > > kiB
> > > > >
> > > > > > > [ 4.839959] [TTM] Initializing pool allocator
> > > > > > > [ 4.840042] [drm] radeon: 128M of VRAM memory ready
> > > > > > > [ 4.840094] [drm] radeon: 512M of GTT memory ready.
> > > > > > > [ 4.840160] [drm] GART: num cpu pages 131072, num gpu pages
> > > > > > > 131072 [ 4.866905] [drm] radeon: 2 quad pipes, 1 z pipes
> > > > > > > initialized. [ 4.872945] [drm] PCIE GART of 512M enabled
> > > > > > > (table at
> > > > > > > 0x0000000035A00000).
> > > > > > > [ 4.873213] radeon 0000:01:05.0: WB enabled
> > > > > > > [ 4.873301] radeon 0000:01:05.0: fence driver on ring 0 use
> > > > > > > gpu addr 0x0000000080000000 and cpu addr 0xf592c000
> > > > > > > [ 4.874929] [drm] Supports vblank timestamp caching Rev 1
> > > > > > > (10.10.2010). [ 4.874988] [drm] Driver supports precise vblank
> > > > > > > timestamp query. [ 4.875055] [drm] radeon: irq initialized.
> > > > > > > [ 4.875119] [drm] Loading R300 Microcode
> > > > > > > [ 4.962083] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI)
> > > > > > > Driver [ 5.088150] ohci-pci: OHCI PCI platform driver
> > > > > > > [ 5.141799] [drm] radeon: ring at 0x0000000080001000
> > > > > > > [ 5.141883] [drm] ring test succeeded in 2 usecs
> > > > > > > [ 5.142064] spurious 8259A interrupt: IRQ7.
> > > > > > > [ 5.142073] [drm] ib test succeeded in 0 usecs
> > > > > > > [ 5.142317] [drm] Panel ID String: LPL
> > > > > > > [ 5.142370] [drm] Panel Size 1280x800
> > > > > > > [ 5.166305] [drm] radeon legacy LVDS backlight initialized
> > > > > > > [ 5.166358] [drm] Radeon Display Connectors
> > > > > > > [ 5.166408] [drm] Connector 0:
> > > > > > > [ 5.166458] [drm] VGA-1
> > > > > > > [ 5.166509] [drm] DDC: 0x68 0x68 0x68 0x68 0x68 0x68 0x68
> > > > > > > 0x68 [ 5.166560] [drm] Encoders:
> > > > > > > [ 5.166610] [drm] CRT1: INTERNAL_DAC2
> > > > > > > [ 5.166660] [drm] Connector 1:
> > > > > > > [ 5.166710] [drm] LVDS-1
> > > > > > > [ 5.166760] [drm] DDC: 0x198 0x198 0x19c 0x19c 0x1a0 0x1a0
> > > > > > > 0x1a4 0x1a4 [ 5.166812] [drm] Encoders:
> > > > > > > [ 5.166862] [drm] LCD1: INTERNAL_LVDS
> > > > > > > [ 5.426968] [drm] fb mappable at 0xC0040000
> > > > > > > [ 5.427026] [drm] vram apper at 0xC0000000
> > > > > > > [ 5.427076] [drm] size 4096000
> > > > > > > [ 5.427126] [drm] fb depth is 24
> > > > > > > [ 5.427176] [drm] pitch is 5120
> > > > > > > [ 5.427388] radeon 0000:01:05.0: fb0: radeondrmfb frame buffer
> > > > > > > device [ 5.427442] radeon 0000:01:05.0: registered panic
> > > > > > > notifier [ 5.427501] [drm] Initialized radeon 2.34.0 20080528
> > > > > > > for 0000:01:05.0 on minor 0
> > > > > > >
> > > > > > > --
> > > > > > > Ondrej Zary
> > > > >
> > > > > --
> > > > > Ondrej Zary
>
>
> --
> Ondrej Zary

2013-08-25 17:12:53

by Ondrej Zary

[permalink] [raw]
Subject: Re: Asus F5RL laptop unable to resume from S3 because of radeon module

On Sunday 25 August 2013 16:51:06 Deucher, Alexander wrote:
> > -----Original Message-----
> > From: Ondrej Zary [mailto:[email protected]]
> > Sent: Friday, August 23, 2013 1:55 PM
> > To: Deucher, Alexander
> > Cc: Kernel development list
> > Subject: Re: Asus F5RL laptop unable to resume from S3 because of radeon
> > module
> >
> > On Friday 23 August 2013 00:08:33 Ondrej Zary wrote:
> > > On Thursday 22 August 2013 22:56:03 Ondrej Zary wrote:
> > > > On Thursday 22 August 2013 22:24:17 Deucher, Alexander wrote:
> > > > > > -----Original Message-----
> > > > > > From: Ondrej Zary [mailto:[email protected]]
> > > > > > Sent: Thursday, August 22, 2013 4:00 PM
> > > > > > To: Deucher, Alexander
> > > > > > Cc: Kernel development list
> > > > > > Subject: Re: Asus F5RL laptop unable to resume from S3 because of
> > > > > > radeon module
> > > > > >
> > > > > > On Thursday 22 August 2013 21:49:41 Deucher, Alexander wrote:
> > > > > > > > -----Original Message-----
> > > > > > > > From: Ondrej Zary [mailto:[email protected]]
> > > > > > > > Sent: Thursday, August 22, 2013 2:18 PM
> > > > > > > > To: Kernel development list
> > > > > > > > Cc: Deucher, Alexander
> > > > > > > > Subject: Asus F5RL laptop unable to resume from S3 because of
> > > > > > > > radeon module
> > > > > > > >
> > > > > > > > Hello,
> > > > > > > > resume from suspend-to-RAM (S3) on Asus F5RL laptop does not
> > > > > > > > work. According to many reports found by Google, it was
> > > > > > > > always been that and there
> > > > > > > > is no fix or workaround.
> > > > > > >
> > > > > > > Make sure your kernel has this patch:
> > > > > > > http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/
> > > > > > >comm it /? id=c ef1d00cd56f600121ad121875655ad410a001b8
> > > > > >
> > > > > > Just tried latest git (3.11-rc6+) and the problem persists.
> > > > >
> > > > > You might try adding a quirk for your system in
> > > > > radeon_combios_asic_init() in radeon_combios.c. You can try
> >
> > something
> >
> > > > > like this for testing:
> > > > >
> > > > > diff --git a/drivers/gpu/drm/radeon/radeon_combios.c
> > > > > b/drivers/gpu/drm/radeon/radeon_combios.c index 68ce360..0419a2c
> >
> > 100644
> >
> > > > > --- a/drivers/gpu/drm/radeon/radeon_combios.c
> > > > > +++ b/drivers/gpu/drm/radeon/radeon_combios.c
> > > > > @@ -3398,6 +3398,8 @@ void radeon_combios_asic_init(struct
> >
> > drm_device
> >
> > > > > *dev) rdev->pdev->subsystem_device == 0x30ae)
> > > > > return;
> > > > >
> > > > > + return;
> > > > > +
> > > > > /* DYN CLK 1 */
> > > > > table = combios_get_table_offset(dev,
> >
> > COMBIOS_DYN_CLK_1_TABLE);
> >
> > > > > if (table)
> > > > >
> > > > > If that doesn't work, you'll probably have to track down where it's
> > > > > hanging during resume, or compare registers before and after resume
> >
> > to
> >
> > > > > see if it's some particular state that's causing a problem.
> > > >
> > > > No change.
> > > >
> > > > Inserted "return -1;" before radeon_device_init() to
> > > > radeon_driver_load_kms() - driver fails to load and resume works.
> > > > Moved it (and changed to "r = -1; goto out;") a bit down before
> > > > radeon_modeset_init() - driver fails to load and resume stopped
> >
> > working.
> >
> > > Going deeper... it works before rs400_startup() and does not work after
> > > that. Will continue later.
> >
> > Tracked the problem down to rs400_gart_enable(). When this "Disable AGP
> > mode"
> > code is commented out, the machine resumes fine:
> >
> > if ((rdev->family == CHIP_RS690) || (rdev->family == CHIP_RS740))
> > { WREG32_MC(RS480_MC_MISC_CNTL,
> > (RS480_GART_INDEX_REG_EN |
> > RS690_BLOCK_GFX_D3_EN)); } else {
> > WREG32_MC(RS480_MC_MISC_CNTL, RS480_GART_INDEX_REG_EN);
> > }
>
> Does the driver work properly after resume with that part commented out or
> does it just avoid the hang?

Console seems to work fine, haven't tested X, 3D or video.

> Alex
>
> > > > > Alex
> > > > >
> > > > > > > Alex
> > > > > > >
> > > > > > > > Did some tests:
> > > > > > > >
> > > > > > > > radeon module loaded (usual state):
> > > > > > > > After "echo mem>/sys/power/state", the laptop suspends
> >
> > correctly
> >
> > > > > > (power
> > > > > >
> > > > > > > > LED
> > > > > > > > blinks). When power button is pressed, power LED goes on and
> > > > > > > > that's all. No more activity, machine is frozen completely.
> > > > > > > >
> > > > > > > > radeon module not loaded at all:
> > > > > > > > Laptop resumes correctly (keyboard LED work, network works),
> >
> > only
> >
> > > > > > > > the
> > > > > >
> > > > > > LCD
> > > > > >
> > > > > > > > is
> > > > > > > > blank (obviously). Loading radeon module now initializes the
> > > > > > > > card properly: LCD goes on and console works.
> > > > > > > >
> > > > > > > > radeon module loaded (but fbcon module not loaded) and then
> > > > > >
> > > > > > unloaded:
> > > > > > > > Machine freezes the same way as when the module is loaded.
> > > > > > > >
> > > > > > > > So it looks like the radeon module does some initialization
> > > > > > > > that prevents resume from working.
> > > > > > > >
> > > > > > > > Hibernation works fine.
> > > > > > > >
> > > > > > > > Any ideas what to test or how to debug this?
> > > > > > > >
> > > > > > > > Details:
> > > > > > > > 01:05.0 VGA compatible controller [0300]: Advanced Micro
> >
> > Devices,
> >
> > > > > > > > Inc. [AMD/ATI] RC410M [Mobility Radeon Xpress 200M]
> >
> > [1002:5a62]
> >
> > > > > > > > (prog-if
> > > > > >
> > > > > > 00
> > > > > >
> > > > > > > > [VGA controller])
> > > > > > > > Subsystem: ASUSTeK Computer Inc. Device [1043:1402]
> > > > > > > > Flags: bus master, 66MHz, medium devsel, latency 64,
> > > > > > > > IRQ 10 Memory at c0000000 (32-bit, prefetchable) [size=256M]
> > > > > > > > I/O ports at 9800 [size=256]
> > > > > > > > Memory at fa8f0000 (32-bit, non-prefetchable)
> > > > > > > > [size=64K] Expansion ROM at fa8c0000 [disabled] [size=128K]
> > > > > > > > Capabilities: [50] Power Management version 2 Capabilities:
> > > > > > > > [80] MSI: Enable- Count=1/1 Maskable- 64bit- Kernel driver in
> > > > > > > > use: radeon
> > > > > > > >
> > > > > > > > [ 4.836009] [drm] radeon kernel modesetting enabled.
> > > > > > > > [ 4.837169] [drm] initializing kernel modesetting (RS400
> > > > > > > > 0x1002:0x5A62 0x1043:0x1402).
> > > > > > > > [ 4.837251] [drm] register mmio base: 0xFA8F0000
> > > > > > > > [ 4.837302] [drm] register mmio size: 65536
> > > > > > > > [ 4.837570] [drm] Generation 2 PCI interface, using max
> > > > > > > > accessible memory [ 4.837653] radeon 0000:01:05.0: VRAM:
> >
> > 128M
> >
> > > > > > 0x0000000078000000
> > > > > >
> > > > > > > > - 0x000000007FFFFFFF (128M used)
> > > > > > > > [ 4.837714] radeon 0000:01:05.0: GTT: 512M
> > > > > > > > 0x0000000080000000 - 0x000000009FFFFFFF
> > > > > > > > [ 4.837787] [drm] Detected VRAM RAM=128M, BAR=256M
> > > > > > > > [ 4.837839] [drm] RAM width 128bits DDR
> > > > > > > > [ 4.839854] [TTM] Zone kernel: Available graphics memory:
> > > > > > > > 444588 kiB [ 4.839907] [TTM] Zone highmem: Available
> > > > > > > > graphics memory: 972784
> > > > > >
> > > > > > kiB
> > > > > >
> > > > > > > > [ 4.839959] [TTM] Initializing pool allocator
> > > > > > > > [ 4.840042] [drm] radeon: 128M of VRAM memory ready
> > > > > > > > [ 4.840094] [drm] radeon: 512M of GTT memory ready.
> > > > > > > > [ 4.840160] [drm] GART: num cpu pages 131072, num gpu
> > > > > > > > pages 131072 [ 4.866905] [drm] radeon: 2 quad pipes, 1 z
> > > > > > > > pipes initialized. [ 4.872945] [drm] PCIE GART of 512M
> > > > > > > > enabled (table at
> > > > > > > > 0x0000000035A00000).
> > > > > > > > [ 4.873213] radeon 0000:01:05.0: WB enabled
> > > > > > > > [ 4.873301] radeon 0000:01:05.0: fence driver on ring 0
> > > > > > > > use gpu addr 0x0000000080000000 and cpu addr 0xf592c000
> > > > > > > > [ 4.874929] [drm] Supports vblank timestamp caching Rev 1
> > > > > > > > (10.10.2010). [ 4.874988] [drm] Driver supports precise
> > > > > > > > vblank timestamp query. [ 4.875055] [drm] radeon: irq
> > > > > > > > initialized. [ 4.875119] [drm] Loading R300 Microcode
> > > > > > > > [ 4.962083] ohci_hcd: USB 1.1 'Open' Host Controller
> > > > > > > > (OHCI) Driver [ 5.088150] ohci-pci: OHCI PCI platform
> > > > > > > > driver [ 5.141799] [drm] radeon: ring at
> > > > > > > > 0x0000000080001000 [ 5.141883] [drm] ring test succeeded
> > > > > > > > in 2 usecs
> > > > > > > > [ 5.142064] spurious 8259A interrupt: IRQ7.
> > > > > > > > [ 5.142073] [drm] ib test succeeded in 0 usecs
> > > > > > > > [ 5.142317] [drm] Panel ID String: LPL
> > > > > > > > [ 5.142370] [drm] Panel Size 1280x800
> > > > > > > > [ 5.166305] [drm] radeon legacy LVDS backlight initialized
> > > > > > > > [ 5.166358] [drm] Radeon Display Connectors
> > > > > > > > [ 5.166408] [drm] Connector 0:
> > > > > > > > [ 5.166458] [drm] VGA-1
> > > > > > > > [ 5.166509] [drm] DDC: 0x68 0x68 0x68 0x68 0x68 0x68
> > > > > > > > 0x68 0x68 [ 5.166560] [drm] Encoders:
> > > > > > > > [ 5.166610] [drm] CRT1: INTERNAL_DAC2
> > > > > > > > [ 5.166660] [drm] Connector 1:
> > > > > > > > [ 5.166710] [drm] LVDS-1
> > > > > > > > [ 5.166760] [drm] DDC: 0x198 0x198 0x19c 0x19c 0x1a0
> > > > > > > > 0x1a0 0x1a4 0x1a4 [ 5.166812] [drm] Encoders:
> > > > > > > > [ 5.166862] [drm] LCD1: INTERNAL_LVDS
> > > > > > > > [ 5.426968] [drm] fb mappable at 0xC0040000
> > > > > > > > [ 5.427026] [drm] vram apper at 0xC0000000
> > > > > > > > [ 5.427076] [drm] size 4096000
> > > > > > > > [ 5.427126] [drm] fb depth is 24
> > > > > > > > [ 5.427176] [drm] pitch is 5120
> > > > > > > > [ 5.427388] radeon 0000:01:05.0: fb0: radeondrmfb frame
> > > > > > > > buffer device [ 5.427442] radeon 0000:01:05.0: registered
> > > > > > > > panic notifier [ 5.427501] [drm] Initialized radeon 2.34.0
> > > > > > > > 20080528 for 0000:01:05.0 on minor 0
> > > > > > > >
> > > > > > > > --
> > > > > > > > Ondrej Zary
> > > > > >
> > > > > > --
> > > > > > Ondrej Zary
> >
> > --
> > Ondrej Zary
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to [email protected]
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/


--
Ondrej Zary

2013-08-25 22:01:49

by Ondrej Zary

[permalink] [raw]
Subject: Re: Asus F5RL laptop unable to resume from S3 because of radeon module

On Sunday 25 August 2013 19:12:32 Ondrej Zary wrote:
> On Sunday 25 August 2013 16:51:06 Deucher, Alexander wrote:
> > > -----Original Message-----
> > > From: Ondrej Zary [mailto:[email protected]]
> > > Sent: Friday, August 23, 2013 1:55 PM
> > > To: Deucher, Alexander
> > > Cc: Kernel development list
> > > Subject: Re: Asus F5RL laptop unable to resume from S3 because of
> > > radeon module
> > >
> > > On Friday 23 August 2013 00:08:33 Ondrej Zary wrote:
> > > > On Thursday 22 August 2013 22:56:03 Ondrej Zary wrote:
> > > > > On Thursday 22 August 2013 22:24:17 Deucher, Alexander wrote:
> > > > > > > -----Original Message-----
> > > > > > > From: Ondrej Zary [mailto:[email protected]]
> > > > > > > Sent: Thursday, August 22, 2013 4:00 PM
> > > > > > > To: Deucher, Alexander
> > > > > > > Cc: Kernel development list
> > > > > > > Subject: Re: Asus F5RL laptop unable to resume from S3 because
> > > > > > > of radeon module
> > > > > > >
> > > > > > > On Thursday 22 August 2013 21:49:41 Deucher, Alexander wrote:
> > > > > > > > > -----Original Message-----
> > > > > > > > > From: Ondrej Zary [mailto:[email protected]]
> > > > > > > > > Sent: Thursday, August 22, 2013 2:18 PM
> > > > > > > > > To: Kernel development list
> > > > > > > > > Cc: Deucher, Alexander
> > > > > > > > > Subject: Asus F5RL laptop unable to resume from S3 because
> > > > > > > > > of radeon module
> > > > > > > > >
> > > > > > > > > Hello,
> > > > > > > > > resume from suspend-to-RAM (S3) on Asus F5RL laptop does
> > > > > > > > > not work. According to many reports found by Google, it was
> > > > > > > > > always been that and there
> > > > > > > > > is no fix or workaround.
> > > > > > > >
> > > > > > > > Make sure your kernel has this patch:
> > > > > > > > http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.gi
> > > > > > > >t/ comm it /? id=c ef1d00cd56f600121ad121875655ad410a001b8
> > > > > > >
> > > > > > > Just tried latest git (3.11-rc6+) and the problem persists.
> > > > > >
> > > > > > You might try adding a quirk for your system in
> > > > > > radeon_combios_asic_init() in radeon_combios.c. You can try
> > >
> > > something
> > >
> > > > > > like this for testing:
> > > > > >
> > > > > > diff --git a/drivers/gpu/drm/radeon/radeon_combios.c
> > > > > > b/drivers/gpu/drm/radeon/radeon_combios.c index 68ce360..0419a2c
> > >
> > > 100644
> > >
> > > > > > --- a/drivers/gpu/drm/radeon/radeon_combios.c
> > > > > > +++ b/drivers/gpu/drm/radeon/radeon_combios.c
> > > > > > @@ -3398,6 +3398,8 @@ void radeon_combios_asic_init(struct
> > >
> > > drm_device
> > >
> > > > > > *dev) rdev->pdev->subsystem_device == 0x30ae)
> > > > > > return;
> > > > > >
> > > > > > + return;
> > > > > > +
> > > > > > /* DYN CLK 1 */
> > > > > > table = combios_get_table_offset(dev,
> > >
> > > COMBIOS_DYN_CLK_1_TABLE);
> > >
> > > > > > if (table)
> > > > > >
> > > > > > If that doesn't work, you'll probably have to track down where
> > > > > > it's hanging during resume, or compare registers before and after
> > > > > > resume
> > >
> > > to
> > >
> > > > > > see if it's some particular state that's causing a problem.
> > > > >
> > > > > No change.
> > > > >
> > > > > Inserted "return -1;" before radeon_device_init() to
> > > > > radeon_driver_load_kms() - driver fails to load and resume works.
> > > > > Moved it (and changed to "r = -1; goto out;") a bit down before
> > > > > radeon_modeset_init() - driver fails to load and resume stopped
> > >
> > > working.
> > >
> > > > Going deeper... it works before rs400_startup() and does not work
> > > > after that. Will continue later.
> > >
> > > Tracked the problem down to rs400_gart_enable(). When this "Disable AGP
> > > mode"
> > > code is commented out, the machine resumes fine:
> > >
> > > if ((rdev->family == CHIP_RS690) || (rdev->family ==
> > > CHIP_RS740)) { WREG32_MC(RS480_MC_MISC_CNTL,
> > > (RS480_GART_INDEX_REG_EN |
> > > RS690_BLOCK_GFX_D3_EN)); } else {
> > > WREG32_MC(RS480_MC_MISC_CNTL, RS480_GART_INDEX_REG_EN);
> > > }
> >
> > Does the driver work properly after resume with that part commented out
> > or does it just avoid the hang?
>
> Console seems to work fine, haven't tested X, 3D or video.

Testing it right now - everything seems to work. X, accelerated video
(mplayer), 3D (glxgears). Both before and after suspend.
That code does something with GART so maybe I should test something like
OpenArena (have to download it first).

> > Alex
> >
> > > > > > Alex
> > > > > >
> > > > > > > > Alex
> > > > > > > >
> > > > > > > > > Did some tests:
> > > > > > > > >
> > > > > > > > > radeon module loaded (usual state):
> > > > > > > > > After "echo mem>/sys/power/state", the laptop suspends
> > >
> > > correctly
> > >
> > > > > > > (power
> > > > > > >
> > > > > > > > > LED
> > > > > > > > > blinks). When power button is pressed, power LED goes on
> > > > > > > > > and that's all. No more activity, machine is frozen
> > > > > > > > > completely.
> > > > > > > > >
> > > > > > > > > radeon module not loaded at all:
> > > > > > > > > Laptop resumes correctly (keyboard LED work, network
> > > > > > > > > works),
> > >
> > > only
> > >
> > > > > > > > > the
> > > > > > >
> > > > > > > LCD
> > > > > > >
> > > > > > > > > is
> > > > > > > > > blank (obviously). Loading radeon module now initializes
> > > > > > > > > the card properly: LCD goes on and console works.
> > > > > > > > >
> > > > > > > > > radeon module loaded (but fbcon module not loaded) and then
> > > > > > >
> > > > > > > unloaded:
> > > > > > > > > Machine freezes the same way as when the module is loaded.
> > > > > > > > >
> > > > > > > > > So it looks like the radeon module does some initialization
> > > > > > > > > that prevents resume from working.
> > > > > > > > >
> > > > > > > > > Hibernation works fine.
> > > > > > > > >
> > > > > > > > > Any ideas what to test or how to debug this?
> > > > > > > > >
> > > > > > > > > Details:
> > > > > > > > > 01:05.0 VGA compatible controller [0300]: Advanced Micro
> > >
> > > Devices,
> > >
> > > > > > > > > Inc. [AMD/ATI] RC410M [Mobility Radeon Xpress 200M]
> > >
> > > [1002:5a62]
> > >
> > > > > > > > > (prog-if
> > > > > > >
> > > > > > > 00
> > > > > > >
> > > > > > > > > [VGA controller])
> > > > > > > > > Subsystem: ASUSTeK Computer Inc. Device [1043:1402]
> > > > > > > > > Flags: bus master, 66MHz, medium devsel, latency
> > > > > > > > > 64, IRQ 10 Memory at c0000000 (32-bit, prefetchable)
> > > > > > > > > [size=256M] I/O ports at 9800 [size=256]
> > > > > > > > > Memory at fa8f0000 (32-bit, non-prefetchable)
> > > > > > > > > [size=64K] Expansion ROM at fa8c0000 [disabled] [size=128K]
> > > > > > > > > Capabilities: [50] Power Management version 2 Capabilities:
> > > > > > > > > [80] MSI: Enable- Count=1/1 Maskable- 64bit- Kernel driver
> > > > > > > > > in use: radeon
> > > > > > > > >
> > > > > > > > > [ 4.836009] [drm] radeon kernel modesetting enabled.
> > > > > > > > > [ 4.837169] [drm] initializing kernel modesetting (RS400
> > > > > > > > > 0x1002:0x5A62 0x1043:0x1402).
> > > > > > > > > [ 4.837251] [drm] register mmio base: 0xFA8F0000
> > > > > > > > > [ 4.837302] [drm] register mmio size: 65536
> > > > > > > > > [ 4.837570] [drm] Generation 2 PCI interface, using max
> > > > > > > > > accessible memory [ 4.837653] radeon 0000:01:05.0: VRAM:
> > >
> > > 128M
> > >
> > > > > > > 0x0000000078000000
> > > > > > >
> > > > > > > > > - 0x000000007FFFFFFF (128M used)
> > > > > > > > > [ 4.837714] radeon 0000:01:05.0: GTT: 512M
> > > > > > > > > 0x0000000080000000 - 0x000000009FFFFFFF
> > > > > > > > > [ 4.837787] [drm] Detected VRAM RAM=128M, BAR=256M
> > > > > > > > > [ 4.837839] [drm] RAM width 128bits DDR
> > > > > > > > > [ 4.839854] [TTM] Zone kernel: Available graphics
> > > > > > > > > memory: 444588 kiB [ 4.839907] [TTM] Zone highmem:
> > > > > > > > > Available graphics memory: 972784
> > > > > > >
> > > > > > > kiB
> > > > > > >
> > > > > > > > > [ 4.839959] [TTM] Initializing pool allocator
> > > > > > > > > [ 4.840042] [drm] radeon: 128M of VRAM memory ready
> > > > > > > > > [ 4.840094] [drm] radeon: 512M of GTT memory ready.
> > > > > > > > > [ 4.840160] [drm] GART: num cpu pages 131072, num gpu
> > > > > > > > > pages 131072 [ 4.866905] [drm] radeon: 2 quad pipes, 1 z
> > > > > > > > > pipes initialized. [ 4.872945] [drm] PCIE GART of 512M
> > > > > > > > > enabled (table at
> > > > > > > > > 0x0000000035A00000).
> > > > > > > > > [ 4.873213] radeon 0000:01:05.0: WB enabled
> > > > > > > > > [ 4.873301] radeon 0000:01:05.0: fence driver on ring 0
> > > > > > > > > use gpu addr 0x0000000080000000 and cpu addr 0xf592c000
> > > > > > > > > [ 4.874929] [drm] Supports vblank timestamp caching Rev
> > > > > > > > > 1 (10.10.2010). [ 4.874988] [drm] Driver supports
> > > > > > > > > precise vblank timestamp query. [ 4.875055] [drm]
> > > > > > > > > radeon: irq initialized. [ 4.875119] [drm] Loading R300
> > > > > > > > > Microcode [ 4.962083] ohci_hcd: USB 1.1 'Open' Host
> > > > > > > > > Controller (OHCI) Driver [ 5.088150] ohci-pci: OHCI PCI
> > > > > > > > > platform driver [ 5.141799] [drm] radeon: ring at
> > > > > > > > > 0x0000000080001000 [ 5.141883] [drm] ring test succeeded
> > > > > > > > > in 2 usecs
> > > > > > > > > [ 5.142064] spurious 8259A interrupt: IRQ7.
> > > > > > > > > [ 5.142073] [drm] ib test succeeded in 0 usecs
> > > > > > > > > [ 5.142317] [drm] Panel ID String: LPL
> > > > > > > > > [ 5.142370] [drm] Panel Size 1280x800
> > > > > > > > > [ 5.166305] [drm] radeon legacy LVDS backlight
> > > > > > > > > initialized [ 5.166358] [drm] Radeon Display Connectors
> > > > > > > > > [ 5.166408] [drm] Connector 0:
> > > > > > > > > [ 5.166458] [drm] VGA-1
> > > > > > > > > [ 5.166509] [drm] DDC: 0x68 0x68 0x68 0x68 0x68 0x68
> > > > > > > > > 0x68 0x68 [ 5.166560] [drm] Encoders:
> > > > > > > > > [ 5.166610] [drm] CRT1: INTERNAL_DAC2
> > > > > > > > > [ 5.166660] [drm] Connector 1:
> > > > > > > > > [ 5.166710] [drm] LVDS-1
> > > > > > > > > [ 5.166760] [drm] DDC: 0x198 0x198 0x19c 0x19c 0x1a0
> > > > > > > > > 0x1a0 0x1a4 0x1a4 [ 5.166812] [drm] Encoders:
> > > > > > > > > [ 5.166862] [drm] LCD1: INTERNAL_LVDS
> > > > > > > > > [ 5.426968] [drm] fb mappable at 0xC0040000
> > > > > > > > > [ 5.427026] [drm] vram apper at 0xC0000000
> > > > > > > > > [ 5.427076] [drm] size 4096000
> > > > > > > > > [ 5.427126] [drm] fb depth is 24
> > > > > > > > > [ 5.427176] [drm] pitch is 5120
> > > > > > > > > [ 5.427388] radeon 0000:01:05.0: fb0: radeondrmfb frame
> > > > > > > > > buffer device [ 5.427442] radeon 0000:01:05.0:
> > > > > > > > > registered panic notifier [ 5.427501] [drm] Initialized
> > > > > > > > > radeon 2.34.0 20080528 for 0000:01:05.0 on minor 0
> > > > > > > > >
> > > > > > > > > --
> > > > > > > > > Ondrej Zary
> > > > > > >
> > > > > > > --
> > > > > > > Ondrej Zary
> > >
> > > --
> > > Ondrej Zary
> >
> > --
> > To unsubscribe from this list: send the line "unsubscribe linux-kernel"
> > in the body of a message to [email protected]
> > More majordomo info at http://vger.kernel.org/majordomo-info.html
> > Please read the FAQ at http://www.tux.org/lkml/


--
Ondrej Zary

2013-08-26 21:23:33

by Ondrej Zary

[permalink] [raw]
Subject: Re: Asus F5RL laptop unable to resume from S3 because of radeon module



On Monday 26 August 2013 00:01:11 Ondrej Zary wrote:
> On Sunday 25 August 2013 19:12:32 Ondrej Zary wrote:
> > On Sunday 25 August 2013 16:51:06 Deucher, Alexander wrote:
> > > > -----Original Message-----
> > > > From: Ondrej Zary [mailto:[email protected]]
> > > > Sent: Friday, August 23, 2013 1:55 PM
> > > > To: Deucher, Alexander
> > > > Cc: Kernel development list
> > > > Subject: Re: Asus F5RL laptop unable to resume from S3 because of
> > > > radeon module
> > > >
> > > > On Friday 23 August 2013 00:08:33 Ondrej Zary wrote:
> > > > > On Thursday 22 August 2013 22:56:03 Ondrej Zary wrote:
> > > > > > On Thursday 22 August 2013 22:24:17 Deucher, Alexander wrote:
> > > > > > > > -----Original Message-----
> > > > > > > > From: Ondrej Zary [mailto:[email protected]]
> > > > > > > > Sent: Thursday, August 22, 2013 4:00 PM
> > > > > > > > To: Deucher, Alexander
> > > > > > > > Cc: Kernel development list
> > > > > > > > Subject: Re: Asus F5RL laptop unable to resume from S3
> > > > > > > > because of radeon module
> > > > > > > >
> > > > > > > > On Thursday 22 August 2013 21:49:41 Deucher, Alexander wrote:
> > > > > > > > > > -----Original Message-----
> > > > > > > > > > From: Ondrej Zary [mailto:[email protected]]
> > > > > > > > > > Sent: Thursday, August 22, 2013 2:18 PM
> > > > > > > > > > To: Kernel development list
> > > > > > > > > > Cc: Deucher, Alexander
> > > > > > > > > > Subject: Asus F5RL laptop unable to resume from S3
> > > > > > > > > > because of radeon module
> > > > > > > > > >
> > > > > > > > > > Hello,
> > > > > > > > > > resume from suspend-to-RAM (S3) on Asus F5RL laptop does
> > > > > > > > > > not work. According to many reports found by Google, it
> > > > > > > > > > was always been that and there
> > > > > > > > > > is no fix or workaround.
> > > > > > > > >
> > > > > > > > > Make sure your kernel has this patch:
> > > > > > > > > http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.
> > > > > > > > >gi t/ comm it /? id=c
> > > > > > > > > ef1d00cd56f600121ad121875655ad410a001b8
> > > > > > > >
> > > > > > > > Just tried latest git (3.11-rc6+) and the problem persists.
> > > > > > >
> > > > > > > You might try adding a quirk for your system in
> > > > > > > radeon_combios_asic_init() in radeon_combios.c. You can try
> > > >
> > > > something
> > > >
> > > > > > > like this for testing:
> > > > > > >
> > > > > > > diff --git a/drivers/gpu/drm/radeon/radeon_combios.c
> > > > > > > b/drivers/gpu/drm/radeon/radeon_combios.c index
> > > > > > > 68ce360..0419a2c
> > > >
> > > > 100644
> > > >
> > > > > > > --- a/drivers/gpu/drm/radeon/radeon_combios.c
> > > > > > > +++ b/drivers/gpu/drm/radeon/radeon_combios.c
> > > > > > > @@ -3398,6 +3398,8 @@ void radeon_combios_asic_init(struct
> > > >
> > > > drm_device
> > > >
> > > > > > > *dev) rdev->pdev->subsystem_device == 0x30ae)
> > > > > > > return;
> > > > > > >
> > > > > > > + return;
> > > > > > > +
> > > > > > > /* DYN CLK 1 */
> > > > > > > table = combios_get_table_offset(dev,
> > > >
> > > > COMBIOS_DYN_CLK_1_TABLE);
> > > >
> > > > > > > if (table)
> > > > > > >
> > > > > > > If that doesn't work, you'll probably have to track down where
> > > > > > > it's hanging during resume, or compare registers before and
> > > > > > > after resume
> > > >
> > > > to
> > > >
> > > > > > > see if it's some particular state that's causing a problem.
> > > > > >
> > > > > > No change.
> > > > > >
> > > > > > Inserted "return -1;" before radeon_device_init() to
> > > > > > radeon_driver_load_kms() - driver fails to load and resume works.
> > > > > > Moved it (and changed to "r = -1; goto out;") a bit down before
> > > > > > radeon_modeset_init() - driver fails to load and resume stopped
> > > >
> > > > working.
> > > >
> > > > > Going deeper... it works before rs400_startup() and does not work
> > > > > after that. Will continue later.
> > > >
> > > > Tracked the problem down to rs400_gart_enable(). When this "Disable
> > > > AGP mode"
> > > > code is commented out, the machine resumes fine:
> > > >
> > > > if ((rdev->family == CHIP_RS690) || (rdev->family ==
> > > > CHIP_RS740)) { WREG32_MC(RS480_MC_MISC_CNTL,
> > > > (RS480_GART_INDEX_REG_EN |
> > > > RS690_BLOCK_GFX_D3_EN)); } else {
> > > > WREG32_MC(RS480_MC_MISC_CNTL, RS480_GART_INDEX_REG_EN);
> > > > }
> > >
> > > Does the driver work properly after resume with that part commented out
> > > or does it just avoid the hang?
> >
> > Console seems to work fine, haven't tested X, 3D or video.
>
> Testing it right now - everything seems to work. X, accelerated video
> (mplayer), 3D (glxgears). Both before and after suspend.
> That code does something with GART so maybe I should test something like
> OpenArena (have to download it first).

OpenArena works fine with the code commented out. Both before and after
suspend.

> > > Alex
> > >
> > > > > > > Alex
> > > > > > >
> > > > > > > > > Alex
> > > > > > > > >
> > > > > > > > > > Did some tests:
> > > > > > > > > >
> > > > > > > > > > radeon module loaded (usual state):
> > > > > > > > > > After "echo mem>/sys/power/state", the laptop suspends
> > > >
> > > > correctly
> > > >
> > > > > > > > (power
> > > > > > > >
> > > > > > > > > > LED
> > > > > > > > > > blinks). When power button is pressed, power LED goes on
> > > > > > > > > > and that's all. No more activity, machine is frozen
> > > > > > > > > > completely.
> > > > > > > > > >
> > > > > > > > > > radeon module not loaded at all:
> > > > > > > > > > Laptop resumes correctly (keyboard LED work, network
> > > > > > > > > > works),
> > > >
> > > > only
> > > >
> > > > > > > > > > the
> > > > > > > >
> > > > > > > > LCD
> > > > > > > >
> > > > > > > > > > is
> > > > > > > > > > blank (obviously). Loading radeon module now initializes
> > > > > > > > > > the card properly: LCD goes on and console works.
> > > > > > > > > >
> > > > > > > > > > radeon module loaded (but fbcon module not loaded) and
> > > > > > > > > > then
> > > > > > > >
> > > > > > > > unloaded:
> > > > > > > > > > Machine freezes the same way as when the module is
> > > > > > > > > > loaded.
> > > > > > > > > >
> > > > > > > > > > So it looks like the radeon module does some
> > > > > > > > > > initialization that prevents resume from working.
> > > > > > > > > >
> > > > > > > > > > Hibernation works fine.
> > > > > > > > > >
> > > > > > > > > > Any ideas what to test or how to debug this?
> > > > > > > > > >
> > > > > > > > > > Details:
> > > > > > > > > > 01:05.0 VGA compatible controller [0300]: Advanced Micro
> > > >
> > > > Devices,
> > > >
> > > > > > > > > > Inc. [AMD/ATI] RC410M [Mobility Radeon Xpress 200M]
> > > >
> > > > [1002:5a62]
> > > >
> > > > > > > > > > (prog-if
> > > > > > > >
> > > > > > > > 00
> > > > > > > >
> > > > > > > > > > [VGA controller])
> > > > > > > > > > Subsystem: ASUSTeK Computer Inc. Device
> > > > > > > > > > [1043:1402] Flags: bus master, 66MHz, medium devsel,
> > > > > > > > > > latency 64, IRQ 10 Memory at c0000000 (32-bit,
> > > > > > > > > > prefetchable) [size=256M] I/O ports at 9800 [size=256]
> > > > > > > > > > Memory at fa8f0000 (32-bit, non-prefetchable)
> > > > > > > > > > [size=64K] Expansion ROM at fa8c0000 [disabled]
> > > > > > > > > > [size=128K] Capabilities: [50] Power Management version 2
> > > > > > > > > > Capabilities: [80] MSI: Enable- Count=1/1 Maskable-
> > > > > > > > > > 64bit- Kernel driver in use: radeon
> > > > > > > > > >
> > > > > > > > > > [ 4.836009] [drm] radeon kernel modesetting enabled.
> > > > > > > > > > [ 4.837169] [drm] initializing kernel modesetting
> > > > > > > > > > (RS400 0x1002:0x5A62 0x1043:0x1402).
> > > > > > > > > > [ 4.837251] [drm] register mmio base: 0xFA8F0000
> > > > > > > > > > [ 4.837302] [drm] register mmio size: 65536
> > > > > > > > > > [ 4.837570] [drm] Generation 2 PCI interface, using
> > > > > > > > > > max accessible memory [ 4.837653] radeon 0000:01:05.0:
> > > > > > > > > > VRAM:
> > > >
> > > > 128M
> > > >
> > > > > > > > 0x0000000078000000
> > > > > > > >
> > > > > > > > > > - 0x000000007FFFFFFF (128M used)
> > > > > > > > > > [ 4.837714] radeon 0000:01:05.0: GTT: 512M
> > > > > > > > > > 0x0000000080000000 - 0x000000009FFFFFFF
> > > > > > > > > > [ 4.837787] [drm] Detected VRAM RAM=128M, BAR=256M
> > > > > > > > > > [ 4.837839] [drm] RAM width 128bits DDR
> > > > > > > > > > [ 4.839854] [TTM] Zone kernel: Available graphics
> > > > > > > > > > memory: 444588 kiB [ 4.839907] [TTM] Zone highmem:
> > > > > > > > > > Available graphics memory: 972784
> > > > > > > >
> > > > > > > > kiB
> > > > > > > >
> > > > > > > > > > [ 4.839959] [TTM] Initializing pool allocator
> > > > > > > > > > [ 4.840042] [drm] radeon: 128M of VRAM memory ready
> > > > > > > > > > [ 4.840094] [drm] radeon: 512M of GTT memory ready.
> > > > > > > > > > [ 4.840160] [drm] GART: num cpu pages 131072, num gpu
> > > > > > > > > > pages 131072 [ 4.866905] [drm] radeon: 2 quad pipes, 1
> > > > > > > > > > z pipes initialized. [ 4.872945] [drm] PCIE GART of
> > > > > > > > > > 512M enabled (table at
> > > > > > > > > > 0x0000000035A00000).
> > > > > > > > > > [ 4.873213] radeon 0000:01:05.0: WB enabled
> > > > > > > > > > [ 4.873301] radeon 0000:01:05.0: fence driver on ring
> > > > > > > > > > 0 use gpu addr 0x0000000080000000 and cpu addr 0xf592c000
> > > > > > > > > > [ 4.874929] [drm] Supports vblank timestamp caching
> > > > > > > > > > Rev 1 (10.10.2010). [ 4.874988] [drm] Driver supports
> > > > > > > > > > precise vblank timestamp query. [ 4.875055] [drm]
> > > > > > > > > > radeon: irq initialized. [ 4.875119] [drm] Loading
> > > > > > > > > > R300 Microcode [ 4.962083] ohci_hcd: USB 1.1 'Open'
> > > > > > > > > > Host Controller (OHCI) Driver [ 5.088150] ohci-pci:
> > > > > > > > > > OHCI PCI platform driver [ 5.141799] [drm] radeon:
> > > > > > > > > > ring at 0x0000000080001000 [ 5.141883] [drm] ring test
> > > > > > > > > > succeeded in 2 usecs
> > > > > > > > > > [ 5.142064] spurious 8259A interrupt: IRQ7.
> > > > > > > > > > [ 5.142073] [drm] ib test succeeded in 0 usecs
> > > > > > > > > > [ 5.142317] [drm] Panel ID String: LPL
> > > > > > > > > > [ 5.142370] [drm] Panel Size 1280x800
> > > > > > > > > > [ 5.166305] [drm] radeon legacy LVDS backlight
> > > > > > > > > > initialized [ 5.166358] [drm] Radeon Display
> > > > > > > > > > Connectors [ 5.166408] [drm] Connector 0:
> > > > > > > > > > [ 5.166458] [drm] VGA-1
> > > > > > > > > > [ 5.166509] [drm] DDC: 0x68 0x68 0x68 0x68 0x68 0x68
> > > > > > > > > > 0x68 0x68 [ 5.166560] [drm] Encoders:
> > > > > > > > > > [ 5.166610] [drm] CRT1: INTERNAL_DAC2
> > > > > > > > > > [ 5.166660] [drm] Connector 1:
> > > > > > > > > > [ 5.166710] [drm] LVDS-1
> > > > > > > > > > [ 5.166760] [drm] DDC: 0x198 0x198 0x19c 0x19c 0x1a0
> > > > > > > > > > 0x1a0 0x1a4 0x1a4 [ 5.166812] [drm] Encoders:
> > > > > > > > > > [ 5.166862] [drm] LCD1: INTERNAL_LVDS
> > > > > > > > > > [ 5.426968] [drm] fb mappable at 0xC0040000
> > > > > > > > > > [ 5.427026] [drm] vram apper at 0xC0000000
> > > > > > > > > > [ 5.427076] [drm] size 4096000
> > > > > > > > > > [ 5.427126] [drm] fb depth is 24
> > > > > > > > > > [ 5.427176] [drm] pitch is 5120
> > > > > > > > > > [ 5.427388] radeon 0000:01:05.0: fb0: radeondrmfb
> > > > > > > > > > frame buffer device [ 5.427442] radeon 0000:01:05.0:
> > > > > > > > > > registered panic notifier [ 5.427501] [drm]
> > > > > > > > > > Initialized radeon 2.34.0 20080528 for 0000:01:05.0 on
> > > > > > > > > > minor 0
> > > > > > > > > >
> > > > > > > > > > --
> > > > > > > > > > Ondrej Zary
> > > > > > > >
> > > > > > > > --
> > > > > > > > Ondrej Zary
> > > >
> > > > --
> > > > Ondrej Zary
> > >
> > > --
> > > To unsubscribe from this list: send the line "unsubscribe linux-kernel"
> > > in the body of a message to [email protected]
> > > More majordomo info at http://vger.kernel.org/majordomo-info.html
> > > Please read the FAQ at http://www.tux.org/lkml/


--
Ondrej Zary

2013-08-26 21:55:40

by Deucher, Alexander

[permalink] [raw]
Subject: RE: Asus F5RL laptop unable to resume from S3 because of radeon module

> -----Original Message-----
> From: Ondrej Zary [mailto:[email protected]]
> Sent: Monday, August 26, 2013 5:23 PM
> To: Deucher, Alexander
> Cc: Kernel development list
> Subject: Re: Asus F5RL laptop unable to resume from S3 because of radeon
> module
>
>
>
> On Monday 26 August 2013 00:01:11 Ondrej Zary wrote:
> > On Sunday 25 August 2013 19:12:32 Ondrej Zary wrote:
> > > On Sunday 25 August 2013 16:51:06 Deucher, Alexander wrote:
> > > > > -----Original Message-----
> > > > > From: Ondrej Zary [mailto:[email protected]]
> > > > > Sent: Friday, August 23, 2013 1:55 PM
> > > > > To: Deucher, Alexander
> > > > > Cc: Kernel development list
> > > > > Subject: Re: Asus F5RL laptop unable to resume from S3 because of
> > > > > radeon module
> > > > >
> > > > > On Friday 23 August 2013 00:08:33 Ondrej Zary wrote:
> > > > > > On Thursday 22 August 2013 22:56:03 Ondrej Zary wrote:
> > > > > > > On Thursday 22 August 2013 22:24:17 Deucher, Alexander wrote:
> > > > > > > > > -----Original Message-----
> > > > > > > > > From: Ondrej Zary [mailto:[email protected]]
> > > > > > > > > Sent: Thursday, August 22, 2013 4:00 PM
> > > > > > > > > To: Deucher, Alexander
> > > > > > > > > Cc: Kernel development list
> > > > > > > > > Subject: Re: Asus F5RL laptop unable to resume from S3
> > > > > > > > > because of radeon module
> > > > > > > > >
> > > > > > > > > On Thursday 22 August 2013 21:49:41 Deucher, Alexander
> wrote:
> > > > > > > > > > > -----Original Message-----
> > > > > > > > > > > From: Ondrej Zary [mailto:[email protected]]
> > > > > > > > > > > Sent: Thursday, August 22, 2013 2:18 PM
> > > > > > > > > > > To: Kernel development list
> > > > > > > > > > > Cc: Deucher, Alexander
> > > > > > > > > > > Subject: Asus F5RL laptop unable to resume from S3
> > > > > > > > > > > because of radeon module
> > > > > > > > > > >
> > > > > > > > > > > Hello,
> > > > > > > > > > > resume from suspend-to-RAM (S3) on Asus F5RL laptop
> does
> > > > > > > > > > > not work. According to many reports found by Google, it
> > > > > > > > > > > was always been that and there
> > > > > > > > > > > is no fix or workaround.
> > > > > > > > > >
> > > > > > > > > > Make sure your kernel has this patch:
> > > > > > > > > > http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.
> > > > > > > > > >gi t/ comm it /? id=c
> > > > > > > > > > ef1d00cd56f600121ad121875655ad410a001b8
> > > > > > > > >
> > > > > > > > > Just tried latest git (3.11-rc6+) and the problem persists.
> > > > > > > >
> > > > > > > > You might try adding a quirk for your system in
> > > > > > > > radeon_combios_asic_init() in radeon_combios.c. You can try
> > > > >
> > > > > something
> > > > >
> > > > > > > > like this for testing:
> > > > > > > >
> > > > > > > > diff --git a/drivers/gpu/drm/radeon/radeon_combios.c
> > > > > > > > b/drivers/gpu/drm/radeon/radeon_combios.c index
> > > > > > > > 68ce360..0419a2c
> > > > >
> > > > > 100644
> > > > >
> > > > > > > > --- a/drivers/gpu/drm/radeon/radeon_combios.c
> > > > > > > > +++ b/drivers/gpu/drm/radeon/radeon_combios.c
> > > > > > > > @@ -3398,6 +3398,8 @@ void radeon_combios_asic_init(struct
> > > > >
> > > > > drm_device
> > > > >
> > > > > > > > *dev) rdev->pdev->subsystem_device == 0x30ae)
> > > > > > > > return;
> > > > > > > >
> > > > > > > > + return;
> > > > > > > > +
> > > > > > > > /* DYN CLK 1 */
> > > > > > > > table = combios_get_table_offset(dev,
> > > > >
> > > > > COMBIOS_DYN_CLK_1_TABLE);
> > > > >
> > > > > > > > if (table)
> > > > > > > >
> > > > > > > > If that doesn't work, you'll probably have to track down where
> > > > > > > > it's hanging during resume, or compare registers before and
> > > > > > > > after resume
> > > > >
> > > > > to
> > > > >
> > > > > > > > see if it's some particular state that's causing a problem.
> > > > > > >
> > > > > > > No change.
> > > > > > >
> > > > > > > Inserted "return -1;" before radeon_device_init() to
> > > > > > > radeon_driver_load_kms() - driver fails to load and resume works.
> > > > > > > Moved it (and changed to "r = -1; goto out;") a bit down before
> > > > > > > radeon_modeset_init() - driver fails to load and resume stopped
> > > > >
> > > > > working.
> > > > >
> > > > > > Going deeper... it works before rs400_startup() and does not work
> > > > > > after that. Will continue later.
> > > > >
> > > > > Tracked the problem down to rs400_gart_enable(). When this
> "Disable
> > > > > AGP mode"
> > > > > code is commented out, the machine resumes fine:
> > > > >
> > > > > if ((rdev->family == CHIP_RS690) || (rdev->family ==
> > > > > CHIP_RS740)) { WREG32_MC(RS480_MC_MISC_CNTL,
> > > > > (RS480_GART_INDEX_REG_EN |
> > > > > RS690_BLOCK_GFX_D3_EN)); } else {
> > > > > WREG32_MC(RS480_MC_MISC_CNTL,
> RS480_GART_INDEX_REG_EN);
> > > > > }
> > > >
> > > > Does the driver work properly after resume with that part commented
> out
> > > > or does it just avoid the hang?
> > >
> > > Console seems to work fine, haven't tested X, 3D or video.
> >
> > Testing it right now - everything seems to work. X, accelerated video
> > (mplayer), 3D (glxgears). Both before and after suspend.
> > That code does something with GART so maybe I should test something
> like
> > OpenArena (have to download it first).
>
> OpenArena works fine with the code commented out. Both before and after
> suspend.

Does the attached patch also work? I suspect we should be RMWing the register rather than only setting that bit.

Alex

>
> > > > Alex
> > > >
> > > > > > > > Alex
> > > > > > > >
> > > > > > > > > > Alex
> > > > > > > > > >
> > > > > > > > > > > Did some tests:
> > > > > > > > > > >
> > > > > > > > > > > radeon module loaded (usual state):
> > > > > > > > > > > After "echo mem>/sys/power/state", the laptop suspends
> > > > >
> > > > > correctly
> > > > >
> > > > > > > > > (power
> > > > > > > > >
> > > > > > > > > > > LED
> > > > > > > > > > > blinks). When power button is pressed, power LED goes on
> > > > > > > > > > > and that's all. No more activity, machine is frozen
> > > > > > > > > > > completely.
> > > > > > > > > > >
> > > > > > > > > > > radeon module not loaded at all:
> > > > > > > > > > > Laptop resumes correctly (keyboard LED work, network
> > > > > > > > > > > works),
> > > > >
> > > > > only
> > > > >
> > > > > > > > > > > the
> > > > > > > > >
> > > > > > > > > LCD
> > > > > > > > >
> > > > > > > > > > > is
> > > > > > > > > > > blank (obviously). Loading radeon module now initializes
> > > > > > > > > > > the card properly: LCD goes on and console works.
> > > > > > > > > > >
> > > > > > > > > > > radeon module loaded (but fbcon module not loaded) and
> > > > > > > > > > > then
> > > > > > > > >
> > > > > > > > > unloaded:
> > > > > > > > > > > Machine freezes the same way as when the module is
> > > > > > > > > > > loaded.
> > > > > > > > > > >
> > > > > > > > > > > So it looks like the radeon module does some
> > > > > > > > > > > initialization that prevents resume from working.
> > > > > > > > > > >
> > > > > > > > > > > Hibernation works fine.
> > > > > > > > > > >
> > > > > > > > > > > Any ideas what to test or how to debug this?
> > > > > > > > > > >
> > > > > > > > > > > Details:
> > > > > > > > > > > 01:05.0 VGA compatible controller [0300]: Advanced Micro
> > > > >
> > > > > Devices,
> > > > >
> > > > > > > > > > > Inc. [AMD/ATI] RC410M [Mobility Radeon Xpress 200M]
> > > > >
> > > > > [1002:5a62]
> > > > >
> > > > > > > > > > > (prog-if
> > > > > > > > >
> > > > > > > > > 00
> > > > > > > > >
> > > > > > > > > > > [VGA controller])
> > > > > > > > > > > Subsystem: ASUSTeK Computer Inc. Device
> > > > > > > > > > > [1043:1402] Flags: bus master, 66MHz, medium devsel,
> > > > > > > > > > > latency 64, IRQ 10 Memory at c0000000 (32-bit,
> > > > > > > > > > > prefetchable) [size=256M] I/O ports at 9800 [size=256]
> > > > > > > > > > > Memory at fa8f0000 (32-bit, non-prefetchable)
> > > > > > > > > > > [size=64K] Expansion ROM at fa8c0000 [disabled]
> > > > > > > > > > > [size=128K] Capabilities: [50] Power Management version 2
> > > > > > > > > > > Capabilities: [80] MSI: Enable- Count=1/1 Maskable-
> > > > > > > > > > > 64bit- Kernel driver in use: radeon
> > > > > > > > > > >
> > > > > > > > > > > [ 4.836009] [drm] radeon kernel modesetting enabled.
> > > > > > > > > > > [ 4.837169] [drm] initializing kernel modesetting
> > > > > > > > > > > (RS400 0x1002:0x5A62 0x1043:0x1402).
> > > > > > > > > > > [ 4.837251] [drm] register mmio base: 0xFA8F0000
> > > > > > > > > > > [ 4.837302] [drm] register mmio size: 65536
> > > > > > > > > > > [ 4.837570] [drm] Generation 2 PCI interface, using
> > > > > > > > > > > max accessible memory [ 4.837653] radeon 0000:01:05.0:
> > > > > > > > > > > VRAM:
> > > > >
> > > > > 128M
> > > > >
> > > > > > > > > 0x0000000078000000
> > > > > > > > >
> > > > > > > > > > > - 0x000000007FFFFFFF (128M used)
> > > > > > > > > > > [ 4.837714] radeon 0000:01:05.0: GTT: 512M
> > > > > > > > > > > 0x0000000080000000 - 0x000000009FFFFFFF
> > > > > > > > > > > [ 4.837787] [drm] Detected VRAM RAM=128M,
> BAR=256M
> > > > > > > > > > > [ 4.837839] [drm] RAM width 128bits DDR
> > > > > > > > > > > [ 4.839854] [TTM] Zone kernel: Available graphics
> > > > > > > > > > > memory: 444588 kiB [ 4.839907] [TTM] Zone highmem:
> > > > > > > > > > > Available graphics memory: 972784
> > > > > > > > >
> > > > > > > > > kiB
> > > > > > > > >
> > > > > > > > > > > [ 4.839959] [TTM] Initializing pool allocator
> > > > > > > > > > > [ 4.840042] [drm] radeon: 128M of VRAM memory ready
> > > > > > > > > > > [ 4.840094] [drm] radeon: 512M of GTT memory ready.
> > > > > > > > > > > [ 4.840160] [drm] GART: num cpu pages 131072, num gpu
> > > > > > > > > > > pages 131072 [ 4.866905] [drm] radeon: 2 quad pipes, 1
> > > > > > > > > > > z pipes initialized. [ 4.872945] [drm] PCIE GART of
> > > > > > > > > > > 512M enabled (table at
> > > > > > > > > > > 0x0000000035A00000).
> > > > > > > > > > > [ 4.873213] radeon 0000:01:05.0: WB enabled
> > > > > > > > > > > [ 4.873301] radeon 0000:01:05.0: fence driver on ring
> > > > > > > > > > > 0 use gpu addr 0x0000000080000000 and cpu addr
> 0xf592c000
> > > > > > > > > > > [ 4.874929] [drm] Supports vblank timestamp caching
> > > > > > > > > > > Rev 1 (10.10.2010). [ 4.874988] [drm] Driver supports
> > > > > > > > > > > precise vblank timestamp query. [ 4.875055] [drm]
> > > > > > > > > > > radeon: irq initialized. [ 4.875119] [drm] Loading
> > > > > > > > > > > R300 Microcode [ 4.962083] ohci_hcd: USB 1.1 'Open'
> > > > > > > > > > > Host Controller (OHCI) Driver [ 5.088150] ohci-pci:
> > > > > > > > > > > OHCI PCI platform driver [ 5.141799] [drm] radeon:
> > > > > > > > > > > ring at 0x0000000080001000 [ 5.141883] [drm] ring test
> > > > > > > > > > > succeeded in 2 usecs
> > > > > > > > > > > [ 5.142064] spurious 8259A interrupt: IRQ7.
> > > > > > > > > > > [ 5.142073] [drm] ib test succeeded in 0 usecs
> > > > > > > > > > > [ 5.142317] [drm] Panel ID String: LPL
> > > > > > > > > > > [ 5.142370] [drm] Panel Size 1280x800
> > > > > > > > > > > [ 5.166305] [drm] radeon legacy LVDS backlight
> > > > > > > > > > > initialized [ 5.166358] [drm] Radeon Display
> > > > > > > > > > > Connectors [ 5.166408] [drm] Connector 0:
> > > > > > > > > > > [ 5.166458] [drm] VGA-1
> > > > > > > > > > > [ 5.166509] [drm] DDC: 0x68 0x68 0x68 0x68 0x68 0x68
> > > > > > > > > > > 0x68 0x68 [ 5.166560] [drm] Encoders:
> > > > > > > > > > > [ 5.166610] [drm] CRT1: INTERNAL_DAC2
> > > > > > > > > > > [ 5.166660] [drm] Connector 1:
> > > > > > > > > > > [ 5.166710] [drm] LVDS-1
> > > > > > > > > > > [ 5.166760] [drm] DDC: 0x198 0x198 0x19c 0x19c 0x1a0
> > > > > > > > > > > 0x1a0 0x1a4 0x1a4 [ 5.166812] [drm] Encoders:
> > > > > > > > > > > [ 5.166862] [drm] LCD1: INTERNAL_LVDS
> > > > > > > > > > > [ 5.426968] [drm] fb mappable at 0xC0040000
> > > > > > > > > > > [ 5.427026] [drm] vram apper at 0xC0000000
> > > > > > > > > > > [ 5.427076] [drm] size 4096000
> > > > > > > > > > > [ 5.427126] [drm] fb depth is 24
> > > > > > > > > > > [ 5.427176] [drm] pitch is 5120
> > > > > > > > > > > [ 5.427388] radeon 0000:01:05.0: fb0: radeondrmfb
> > > > > > > > > > > frame buffer device [ 5.427442] radeon 0000:01:05.0:
> > > > > > > > > > > registered panic notifier [ 5.427501] [drm]
> > > > > > > > > > > Initialized radeon 2.34.0 20080528 for 0000:01:05.0 on
> > > > > > > > > > > minor 0
> > > > > > > > > > >
> > > > > > > > > > > --
> > > > > > > > > > > Ondrej Zary
> > > > > > > > >
> > > > > > > > > --
> > > > > > > > > Ondrej Zary
> > > > >
> > > > > --
> > > > > Ondrej Zary
> > > >
> > > > --
> > > > To unsubscribe from this list: send the line "unsubscribe linux-kernel"
> > > > in the body of a message to [email protected]
> > > > More majordomo info at http://vger.kernel.org/majordomo-info.html
> > > > Please read the FAQ at http://www.tux.org/lkml/
>
>
> --
> Ondrej Zary


Attachments:
0001-drm-radeon-fix-resume-on-some-rs4xx-boards-v2.patch (1.66 kB)
0001-drm-radeon-fix-resume-on-some-rs4xx-boards-v2.patch

2013-08-27 18:59:25

by Ondrej Zary

[permalink] [raw]
Subject: Re: Asus F5RL laptop unable to resume from S3 because of radeon module

On Monday 26 August 2013 23:55:27 Deucher, Alexander wrote:
> > -----Original Message-----
> > From: Ondrej Zary [mailto:[email protected]]
> > Sent: Monday, August 26, 2013 5:23 PM
> > To: Deucher, Alexander
> > Cc: Kernel development list
> > Subject: Re: Asus F5RL laptop unable to resume from S3 because of radeon
> > module
> >
> > On Monday 26 August 2013 00:01:11 Ondrej Zary wrote:
> > > On Sunday 25 August 2013 19:12:32 Ondrej Zary wrote:
> > > > On Sunday 25 August 2013 16:51:06 Deucher, Alexander wrote:
> > > > > > -----Original Message-----
> > > > > > From: Ondrej Zary [mailto:[email protected]]
> > > > > > Sent: Friday, August 23, 2013 1:55 PM
> > > > > > To: Deucher, Alexander
> > > > > > Cc: Kernel development list
> > > > > > Subject: Re: Asus F5RL laptop unable to resume from S3 because of
> > > > > > radeon module
> > > > > >
> > > > > > On Friday 23 August 2013 00:08:33 Ondrej Zary wrote:
> > > > > > > On Thursday 22 August 2013 22:56:03 Ondrej Zary wrote:
> > > > > > > > On Thursday 22 August 2013 22:24:17 Deucher, Alexander wrote:
> > > > > > > > > > -----Original Message-----
> > > > > > > > > > From: Ondrej Zary [mailto:[email protected]]
> > > > > > > > > > Sent: Thursday, August 22, 2013 4:00 PM
> > > > > > > > > > To: Deucher, Alexander
> > > > > > > > > > Cc: Kernel development list
> > > > > > > > > > Subject: Re: Asus F5RL laptop unable to resume from S3
> > > > > > > > > > because of radeon module
> > > > > > > > > >
> > > > > > > > > > On Thursday 22 August 2013 21:49:41 Deucher, Alexander
> >
> > wrote:
> > > > > > > > > > > > -----Original Message-----
> > > > > > > > > > > > From: Ondrej Zary [mailto:[email protected]]
> > > > > > > > > > > > Sent: Thursday, August 22, 2013 2:18 PM
> > > > > > > > > > > > To: Kernel development list
> > > > > > > > > > > > Cc: Deucher, Alexander
> > > > > > > > > > > > Subject: Asus F5RL laptop unable to resume from S3
> > > > > > > > > > > > because of radeon module
> > > > > > > > > > > >
> > > > > > > > > > > > Hello,
> > > > > > > > > > > > resume from suspend-to-RAM (S3) on Asus F5RL laptop
> >
> > does
> >
> > > > > > > > > > > > not work. According to many reports found by Google,
> > > > > > > > > > > > it was always been that and there
> > > > > > > > > > > > is no fix or workaround.
> > > > > > > > > > >
> > > > > > > > > > > Make sure your kernel has this patch:
> > > > > > > > > > > http://git.kernel.org/cgit/linux/kernel/git/torvalds/li
> > > > > > > > > > >nux. gi t/ comm it /? id=c
> > > > > > > > > > > ef1d00cd56f600121ad121875655ad410a001b8
> > > > > > > > > >
> > > > > > > > > > Just tried latest git (3.11-rc6+) and the problem
> > > > > > > > > > persists.
> > > > > > > > >
> > > > > > > > > You might try adding a quirk for your system in
> > > > > > > > > radeon_combios_asic_init() in radeon_combios.c. You can
> > > > > > > > > try
> > > > > >
> > > > > > something
> > > > > >
> > > > > > > > > like this for testing:
> > > > > > > > >
> > > > > > > > > diff --git a/drivers/gpu/drm/radeon/radeon_combios.c
> > > > > > > > > b/drivers/gpu/drm/radeon/radeon_combios.c index
> > > > > > > > > 68ce360..0419a2c
> > > > > >
> > > > > > 100644
> > > > > >
> > > > > > > > > --- a/drivers/gpu/drm/radeon/radeon_combios.c
> > > > > > > > > +++ b/drivers/gpu/drm/radeon/radeon_combios.c
> > > > > > > > > @@ -3398,6 +3398,8 @@ void radeon_combios_asic_init(struct
> > > > > >
> > > > > > drm_device
> > > > > >
> > > > > > > > > *dev) rdev->pdev->subsystem_device == 0x30ae)
> > > > > > > > > return;
> > > > > > > > >
> > > > > > > > > + return;
> > > > > > > > > +
> > > > > > > > > /* DYN CLK 1 */
> > > > > > > > > table = combios_get_table_offset(dev,
> > > > > >
> > > > > > COMBIOS_DYN_CLK_1_TABLE);
> > > > > >
> > > > > > > > > if (table)
> > > > > > > > >
> > > > > > > > > If that doesn't work, you'll probably have to track down
> > > > > > > > > where it's hanging during resume, or compare registers
> > > > > > > > > before and after resume
> > > > > >
> > > > > > to
> > > > > >
> > > > > > > > > see if it's some particular state that's causing a problem.
> > > > > > > >
> > > > > > > > No change.
> > > > > > > >
> > > > > > > > Inserted "return -1;" before radeon_device_init() to
> > > > > > > > radeon_driver_load_kms() - driver fails to load and resume
> > > > > > > > works. Moved it (and changed to "r = -1; goto out;") a bit
> > > > > > > > down before radeon_modeset_init() - driver fails to load and
> > > > > > > > resume stopped
> > > > > >
> > > > > > working.
> > > > > >
> > > > > > > Going deeper... it works before rs400_startup() and does not
> > > > > > > work after that. Will continue later.
> > > > > >
> > > > > > Tracked the problem down to rs400_gart_enable(). When this
> >
> > "Disable
> >
> > > > > > AGP mode"
> > > > > > code is commented out, the machine resumes fine:
> > > > > >
> > > > > > if ((rdev->family == CHIP_RS690) || (rdev->family ==
> > > > > > CHIP_RS740)) { WREG32_MC(RS480_MC_MISC_CNTL,
> > > > > > (RS480_GART_INDEX_REG_EN |
> > > > > > RS690_BLOCK_GFX_D3_EN)); } else {
> > > > > > WREG32_MC(RS480_MC_MISC_CNTL,
> >
> > RS480_GART_INDEX_REG_EN);
> >
> > > > > > }
> > > > >
> > > > > Does the driver work properly after resume with that part commented
> >
> > out
> >
> > > > > or does it just avoid the hang?
> > > >
> > > > Console seems to work fine, haven't tested X, 3D or video.
> > >
> > > Testing it right now - everything seems to work. X, accelerated video
> > > (mplayer), 3D (glxgears). Both before and after suspend.
> > > That code does something with GART so maybe I should test something
> >
> > like
> >
> > > OpenArena (have to download it first).
> >
> > OpenArena works fine with the code commented out. Both before and after
> > suspend.
>
> Does the attached patch also work? I suspect we should be RMWing the
> register rather than only setting that bit.

Great, this patch works fine!

BTW. Value of the RS480_MC_MISC_CNTL register (before we change it) is
0x3381100 on this system. Most of the bits are not documented in AMD register
guide so they're probably reserved.

> Alex
>
> > > > > Alex
> > > > >
> > > > > > > > > Alex
> > > > > > > > >
> > > > > > > > > > > Alex
> > > > > > > > > > >
> > > > > > > > > > > > Did some tests:
> > > > > > > > > > > >
> > > > > > > > > > > > radeon module loaded (usual state):
> > > > > > > > > > > > After "echo mem>/sys/power/state", the laptop
> > > > > > > > > > > > suspends
> > > > > >
> > > > > > correctly
> > > > > >
> > > > > > > > > > (power
> > > > > > > > > >
> > > > > > > > > > > > LED
> > > > > > > > > > > > blinks). When power button is pressed, power LED goes
> > > > > > > > > > > > on and that's all. No more activity, machine is
> > > > > > > > > > > > frozen completely.
> > > > > > > > > > > >
> > > > > > > > > > > > radeon module not loaded at all:
> > > > > > > > > > > > Laptop resumes correctly (keyboard LED work, network
> > > > > > > > > > > > works),
> > > > > >
> > > > > > only
> > > > > >
> > > > > > > > > > > > the
> > > > > > > > > >
> > > > > > > > > > LCD
> > > > > > > > > >
> > > > > > > > > > > > is
> > > > > > > > > > > > blank (obviously). Loading radeon module now
> > > > > > > > > > > > initializes the card properly: LCD goes on and
> > > > > > > > > > > > console works.
> > > > > > > > > > > >
> > > > > > > > > > > > radeon module loaded (but fbcon module not loaded)
> > > > > > > > > > > > and then
> > > > > > > > > >
> > > > > > > > > > unloaded:
> > > > > > > > > > > > Machine freezes the same way as when the module is
> > > > > > > > > > > > loaded.
> > > > > > > > > > > >
> > > > > > > > > > > > So it looks like the radeon module does some
> > > > > > > > > > > > initialization that prevents resume from working.
> > > > > > > > > > > >
> > > > > > > > > > > > Hibernation works fine.
> > > > > > > > > > > >
> > > > > > > > > > > > Any ideas what to test or how to debug this?
> > > > > > > > > > > >
> > > > > > > > > > > > Details:
> > > > > > > > > > > > 01:05.0 VGA compatible controller [0300]: Advanced
> > > > > > > > > > > > Micro
> > > > > >
> > > > > > Devices,
> > > > > >
> > > > > > > > > > > > Inc. [AMD/ATI] RC410M [Mobility Radeon Xpress 200M]
> > > > > >
> > > > > > [1002:5a62]
> > > > > >
> > > > > > > > > > > > (prog-if
> > > > > > > > > >
> > > > > > > > > > 00
> > > > > > > > > >
> > > > > > > > > > > > [VGA controller])
> > > > > > > > > > > > Subsystem: ASUSTeK Computer Inc. Device
> > > > > > > > > > > > [1043:1402] Flags: bus master, 66MHz, medium devsel,
> > > > > > > > > > > > latency 64, IRQ 10 Memory at c0000000 (32-bit,
> > > > > > > > > > > > prefetchable) [size=256M] I/O ports at 9800
> > > > > > > > > > > > [size=256] Memory at fa8f0000 (32-bit,
> > > > > > > > > > > > non-prefetchable) [size=64K] Expansion ROM at
> > > > > > > > > > > > fa8c0000 [disabled] [size=128K] Capabilities: [50]
> > > > > > > > > > > > Power Management version 2 Capabilities: [80] MSI:
> > > > > > > > > > > > Enable- Count=1/1 Maskable- 64bit- Kernel driver in
> > > > > > > > > > > > use: radeon
> > > > > > > > > > > >
> > > > > > > > > > > > [ 4.836009] [drm] radeon kernel modesetting
> > > > > > > > > > > > enabled. [ 4.837169] [drm] initializing kernel
> > > > > > > > > > > > modesetting (RS400 0x1002:0x5A62 0x1043:0x1402).
> > > > > > > > > > > > [ 4.837251] [drm] register mmio base: 0xFA8F0000
> > > > > > > > > > > > [ 4.837302] [drm] register mmio size: 65536
> > > > > > > > > > > > [ 4.837570] [drm] Generation 2 PCI interface,
> > > > > > > > > > > > using max accessible memory [ 4.837653] radeon
> > > > > > > > > > > > 0000:01:05.0: VRAM:
> > > > > >
> > > > > > 128M
> > > > > >
> > > > > > > > > > 0x0000000078000000
> > > > > > > > > >
> > > > > > > > > > > > - 0x000000007FFFFFFF (128M used)
> > > > > > > > > > > > [ 4.837714] radeon 0000:01:05.0: GTT: 512M
> > > > > > > > > > > > 0x0000000080000000 - 0x000000009FFFFFFF
> > > > > > > > > > > > [ 4.837787] [drm] Detected VRAM RAM=128M,
> >
> > BAR=256M
> >
> > > > > > > > > > > > [ 4.837839] [drm] RAM width 128bits DDR
> > > > > > > > > > > > [ 4.839854] [TTM] Zone kernel: Available graphics
> > > > > > > > > > > > memory: 444588 kiB [ 4.839907] [TTM] Zone highmem:
> > > > > > > > > > > > Available graphics memory: 972784
> > > > > > > > > >
> > > > > > > > > > kiB
> > > > > > > > > >
> > > > > > > > > > > > [ 4.839959] [TTM] Initializing pool allocator
> > > > > > > > > > > > [ 4.840042] [drm] radeon: 128M of VRAM memory
> > > > > > > > > > > > ready [ 4.840094] [drm] radeon: 512M of GTT memory
> > > > > > > > > > > > ready. [ 4.840160] [drm] GART: num cpu pages
> > > > > > > > > > > > 131072, num gpu pages 131072 [ 4.866905] [drm]
> > > > > > > > > > > > radeon: 2 quad pipes, 1 z pipes initialized. [
> > > > > > > > > > > > 4.872945] [drm] PCIE GART of 512M enabled (table at
> > > > > > > > > > > > 0x0000000035A00000).
> > > > > > > > > > > > [ 4.873213] radeon 0000:01:05.0: WB enabled
> > > > > > > > > > > > [ 4.873301] radeon 0000:01:05.0: fence driver on
> > > > > > > > > > > > ring 0 use gpu addr 0x0000000080000000 and cpu addr
> >
> > 0xf592c000
> >
> > > > > > > > > > > > [ 4.874929] [drm] Supports vblank timestamp
> > > > > > > > > > > > caching Rev 1 (10.10.2010). [ 4.874988] [drm]
> > > > > > > > > > > > Driver supports precise vblank timestamp query. [
> > > > > > > > > > > > 4.875055] [drm] radeon: irq initialized. [
> > > > > > > > > > > > 4.875119] [drm] Loading R300 Microcode [ 4.962083]
> > > > > > > > > > > > ohci_hcd: USB 1.1 'Open' Host Controller (OHCI)
> > > > > > > > > > > > Driver [ 5.088150] ohci-pci: OHCI PCI platform
> > > > > > > > > > > > driver [ 5.141799] [drm] radeon: ring at
> > > > > > > > > > > > 0x0000000080001000 [ 5.141883] [drm] ring test
> > > > > > > > > > > > succeeded in 2 usecs
> > > > > > > > > > > > [ 5.142064] spurious 8259A interrupt: IRQ7.
> > > > > > > > > > > > [ 5.142073] [drm] ib test succeeded in 0 usecs
> > > > > > > > > > > > [ 5.142317] [drm] Panel ID String: LPL
> > > > > > > > > > > > [ 5.142370] [drm] Panel Size 1280x800
> > > > > > > > > > > > [ 5.166305] [drm] radeon legacy LVDS backlight
> > > > > > > > > > > > initialized [ 5.166358] [drm] Radeon Display
> > > > > > > > > > > > Connectors [ 5.166408] [drm] Connector 0:
> > > > > > > > > > > > [ 5.166458] [drm] VGA-1
> > > > > > > > > > > > [ 5.166509] [drm] DDC: 0x68 0x68 0x68 0x68 0x68
> > > > > > > > > > > > 0x68 0x68 0x68 [ 5.166560] [drm] Encoders:
> > > > > > > > > > > > [ 5.166610] [drm] CRT1: INTERNAL_DAC2
> > > > > > > > > > > > [ 5.166660] [drm] Connector 1:
> > > > > > > > > > > > [ 5.166710] [drm] LVDS-1
> > > > > > > > > > > > [ 5.166760] [drm] DDC: 0x198 0x198 0x19c 0x19c
> > > > > > > > > > > > 0x1a0 0x1a0 0x1a4 0x1a4 [ 5.166812] [drm]
> > > > > > > > > > > > Encoders: [ 5.166862] [drm] LCD1:
> > > > > > > > > > > > INTERNAL_LVDS [ 5.426968] [drm] fb mappable at
> > > > > > > > > > > > 0xC0040000 [ 5.427026] [drm] vram apper at
> > > > > > > > > > > > 0xC0000000 [ 5.427076] [drm] size 4096000
> > > > > > > > > > > > [ 5.427126] [drm] fb depth is 24
> > > > > > > > > > > > [ 5.427176] [drm] pitch is 5120
> > > > > > > > > > > > [ 5.427388] radeon 0000:01:05.0: fb0: radeondrmfb
> > > > > > > > > > > > frame buffer device [ 5.427442] radeon
> > > > > > > > > > > > 0000:01:05.0: registered panic notifier [
> > > > > > > > > > > > 5.427501] [drm] Initialized radeon 2.34.0 20080528
> > > > > > > > > > > > for 0000:01:05.0 on minor 0
> > > > > > > > > > > >
> > > > > > > > > > > > --
> > > > > > > > > > > > Ondrej Zary
> > > > > > > > > >
> > > > > > > > > > --
> > > > > > > > > > Ondrej Zary
> > > > > >
> > > > > > --
> > > > > > Ondrej Zary
> > > > >
> > > > > --
> > > > > To unsubscribe from this list: send the line "unsubscribe
> > > > > linux-kernel" in the body of a message to [email protected]
> > > > > More majordomo info at http://vger.kernel.org/majordomo-info.html
> > > > > Please read the FAQ at http://www.tux.org/lkml/
> >
> > --
> > Ondrej Zary


--
Ondrej Zary