[CFT] radeon_suspend/resume patch
Lawrence Stewart
lstewart at freebsd.org
Mon Jun 25 15:37:41 UTC 2012
On 06/26/12 00:06, Mitsuru IWASAKI wrote:
> Hi,
>
> I created the patches for drm/radeon in order to restore the graphic
> state on resuming (ported from NetBSD code).
>
> http://people.freebsd.org/~iwasaki/acpi/drm-radeon_suspend-20120623.diff
>
> Unfortunately, I don't have the machine to test the patches.
> Can anyone test this?
root at lstewart1# sysctl hw.acpi.supported_sleep_state
hw.acpi.supported_sleep_state: S3 S4 S5
root at lstewart1# kenv smbios.system.product ; kenv smbios.bios.version
HP Z400 Workstation
786G3 v03.54
root at lstewart1# dmesg | grep drm
drm0: <ATI Radeon X1300/X1550> on vgapci0
info: [drm] MSI enabled 1 message(s)
info: [drm] Initialized radeon 1.31.0 20080613
info: [drm] Setting GART location based on new memory map
info: [drm] Loading R500 Microcode
info: [drm] Num pipes: 1
info: [drm] writeback test succeeded in 1 usecs
root at lstewart1# kldstat
Id Refs Address Size Name
1 38 0xffffffff80200000 1317428 kernel
3 3 0xffffffff8151e000 4f068 vboxdrv.ko
4 1 0xffffffff81612000 134393 zfs.ko
5 1 0xffffffff81747000 2f96 opensolaris.ko
6 1 0xffffffff8174a000 3dfa linprocfs.ko
7 1 0xffffffff8174e000 1f38a linux.ko
8 2 0xffffffff8176e000 2931 vboxnetflt.ko
9 2 0xffffffff81771000 87b2 netgraph.ko
10 1 0xffffffff8177a000 1579 ng_ether.ko
11 1 0xffffffff8177c000 3f8a vboxnetadp.ko
12 1 0xffffffff81780000 a9bb fuse.ko
13 1 0xffffffff8178b000 64939 radeon.ko
14 1 0xffffffff817f0000 13531 drm.ko
root at lstewart1# cd /usr/src/
root at lstewart1# svn info
Path: .
Working Copy Root Path: /usr/src
URL: http://svn.freebsd.org/base/stable/9
Repository Root: http://svn.freebsd.org/base
Repository UUID: ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Revision: 237154
Node Kind: directory
Schedule: normal
Last Changed Author: kib
Last Changed Rev: 237150
Last Changed Date: 2012-06-16 09:07:51 +1000 (Sat, 16 Jun 2012)
root at lstewart1# cd /usr/src/sys/dev/drm
root at lstewart1# patch -p0 < ../../../drm-radeon_suspend-20120623.diff
Hmm... Looks like a unified diff to me...
The text leading up to this was:
--------------------------
|Index: drmP.h
|===================================================================
|RCS file: /home/ncvs/src/sys/dev/drm/drmP.h,v
|retrieving revision 1.47.2.1
|diff -u -r1.47.2.1 drmP.h
|--- drmP.h 23 Sep 2011 00:51:37 -0000 1.47.2.1
|+++ drmP.h 22 Jun 2012 22:23:29 -0000
--------------------------
Patching file drmP.h using Plan A...
Hunk #1 succeeded at 731.
Hmm... The next patch looks like a unified diff to me...
The text leading up to this was:
--------------------------
|Index: drm_fops.c
|===================================================================
|RCS file: /home/ncvs/src/sys/dev/drm/drm_fops.c,v
|retrieving revision 1.8.2.1
|diff -u -r1.8.2.1 drm_fops.c
|--- drm_fops.c 23 Sep 2011 00:51:37 -0000 1.8.2.1
|+++ drm_fops.c 22 Jun 2012 22:22:10 -0000
--------------------------
Patching file drm_fops.c using Plan A...
Hunk #1 succeeded at 39.
Hmm... The next patch looks like a unified diff to me...
The text leading up to this was:
--------------------------
|Index: radeon_drv.c
|===================================================================
|RCS file: /home/ncvs/src/sys/dev/drm/radeon_drv.c,v
|retrieving revision 1.20.4.1
|diff -u -r1.20.4.1 radeon_drv.c
|--- radeon_drv.c 23 Sep 2011 00:51:37 -0000 1.20.4.1
|+++ radeon_drv.c 22 Jun 2012 22:34:07 -0000
--------------------------
Patching file radeon_drv.c using Plan A...
Hunk #1 succeeded at 99.
Hunk #2 succeeded at 145.
done
root at lstewart1# cd /usr/src
root at lstewart1# make -s -j12 -DNO_CLEAN buildkernel
--------------------------------------------------------------
>>> Kernel build for GENERIC started on Tue Jun 26 00:56:24 EST 2012
--------------------------------------------------------------
===> GENERIC
[...]
--------------------------------------------------------------
>>> Kernel build for GENERIC completed on Tue Jun 26 00:57:29 EST 2012
--------------------------------------------------------------
root at lstewart1# make -s installkernel
--------------------------------------------------------------
>>> Installing kernel GENERIC
--------------------------------------------------------------
[...]
root at lstewart1# shutdown -r now
I rebooted into X with Fluxbox as my window manager. Ran "sudo acpiconf
-s3" from an xterm. Machine correctly went to sleep. I waiting 30s and
then pressed the power button. Machine came back, loaded X up correctly
and everything kept working. Amazing!
I've been looking forward to working S3 support on my desktop for over
12 months now. Thank you very much for your work!
Cheers,
Lawrence
More information about the freebsd-mobile
mailing list