drm/nouveau/fbcon: fix suspend/resume fbcon
Subsystems (3)
PATCH 1/1 drm/nouveau/fbcon: fix suspend/resume fbcon
Current code disables fbcon acceleration before fbcon is suspended, leading to corrupted console after resume from s2disk. In a similar fashion we must make sure that fbcon acceleration is enabled before we revive the console.
With this patch s2disk works correctly on my MacBookPro6,2 with GT216 [GeForce GT 330M]
hibernate:
kernel: nouveau [ DRM] suspending fbcon...
kernel: nouveau [ DRM] suspending display...
kernel: nouveau [ DRM] unpinning framebuffer(s)...
kernel: nouveau [ DRM] evicting buffers...
kernel: nouveau [ DRM] waiting for kernel channels to go idle...
kernel: nouveau [ DRM] suspending client object trees...
kernel: nouveau [ DRM] suspending kernel object tree...
resume:
kernel: nouveau [ DRM] re-enabling device...
kernel: nouveau [ DRM] resuming kernel object tree...
kernel: nouveau [ VBIOS][0000:01:00.0] running init tables
kernel: nouveau [ DRM] resuming client object trees...
kernel: nouveau [ DRM] resuming display...
kernel: nouveau E[ PFB][0000:01:00.0] trapped write at 0x00007fe000 on channel 0x0000fee0 [unknown] BAR/PFIFO_WRITE/FB reason: PAGE_NOT_PRESENT
kernel: nouveau E[ PFB][0000:01:00.0] trapped write at 0x00007fe000 on channel 0x0000fee0 [unknown] BAR/PFIFO_WRITE/FB reason: PAGE_NOT_PRESENT
kernel: nouveau E[ PFB][0000:01:00.0] trapped write at 0x00007fe240 on channel 0x0000fee0 [unknown] BAR/PFIFO_WRITE/FB reason: PAGE_NOT_PRESENT
kernel: nouveau E[ PFB][0000:01:00.0] trapped write at 0x00007fe400 on channel 0x0000fee0 [unknown] BAR/PFIFO_WRITE/FB reason: PAGE_NOT_PRESENT
http://lists.freedesktop.org/archives/nouveau/2013-October/014656.html
--- drivers/gpu/drm/nouveau/nouveau_fbcon.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/gpu/drm/nouveau/nouveau_fbcon.c +4 -4
@@ -513,11 +513,11 @@ void nouveau_fbcon_set_suspend(struct drm_device *dev, int state) {struct nouveau_drm *drm =nouveau_drm (dev);console_lock (); -if (state ==0 ) -nouveau_fbcon_save_disable_accel (dev); -fb_set_suspend (drm->fbcon->helper.fbdev, state); -if (state ==1 ) +if (state ==FBINFO_STATE_RUNNING )nouveau_fbcon_restore_accel (dev); +fb_set_suspend (drm->fbcon->helper.fbdev, state); +if (state ==FBINFO_STATE_SUSPENDED ) +nouveau_fbcon_save_disable_accel (dev);console_unlock (); }
Signature · 1 line
1.7.10.4
Quoted 27 lines · Christoph Rudorff
Current code disables fbcon acceleration before fbcon is suspended, leading to corrupted console after resume from s2disk. In a similar fashion we must make sure that fbcon acceleration is enabled before we revive the console.
With this patch s2disk works correctly on my MacBookPro6,2 with GT216 [GeForce GT 330M]
hibernate:
kernel: nouveau [ DRM] suspending fbcon...
kernel: nouveau [ DRM] suspending display...
kernel: nouveau [ DRM] unpinning framebuffer(s)...
kernel: nouveau [ DRM] evicting buffers...
kernel: nouveau [ DRM] waiting for kernel channels to go idle...
kernel: nouveau [ DRM] suspending client object trees...
kernel: nouveau [ DRM] suspending kernel object tree...
resume:
kernel: nouveau [ DRM] re-enabling device...
kernel: nouveau [ DRM] resuming kernel object tree...
kernel: nouveau [ VBIOS][0000:01:00.0] running init tables
kernel: nouveau [ DRM] resuming client object trees...
kernel: nouveau [ DRM] resuming display...
kernel: nouveau E[ PFB][0000:01:00.0] trapped write at0x00007fe000on channel0x0000fee0[unknown] BAR/PFIFO_WRITE/FB reason:PAGE_NOT_PRESENT
kernel: nouveau E[ PFB][0000:01:00.0] trapped write at0x00007fe000on channel0x0000fee0[unknown] BAR/PFIFO_WRITE/FB reason:PAGE_NOT_PRESENT
kernel: nouveau E[ PFB][0000:01:00.0] trapped write at0x00007fe240on channel0x0000fee0[unknown] BAR/PFIFO_WRITE/FB reason:PAGE_NOT_PRESENT
kernel: nouveau E[ PFB][0000:01:00.0] trapped write at0x00007fe400on channel0x0000fee0[unknown] BAR/PFIFO_WRITE/FB reason:PAGE_NOT_PRESENT
Quoted 4 lines
http://lists.freedesktop.org/archives/nouveau/2013-October/014656.html
--- drivers/gpu/drm/nouveau/nouveau_fbcon.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
<formletter>
This is not the correct way to submit patches for inclusion in the stable kernel tree. Please read Documentation/stable_kernel_rules.txt for how to do this properly.
</formletter>
Quoted 33 lines · Greg KH
Quoted 27 lines · Christoph Rudorff
Current code disables fbcon acceleration before fbcon is suspended, leading to corrupted console after resume from s2disk. In a similar fashion we must make sure that fbcon acceleration is enabled before we revive the console.
With this patch s2disk works correctly on my MacBookPro6,2 with GT216 [GeForce GT 330M]
hibernate:
kernel: nouveau [ DRM] suspending fbcon...
kernel: nouveau [ DRM] suspending display...
kernel: nouveau [ DRM] unpinning framebuffer(s)...
kernel: nouveau [ DRM] evicting buffers...
kernel: nouveau [ DRM] waiting for kernel channels to go idle...
kernel: nouveau [ DRM] suspending client object trees...
kernel: nouveau [ DRM] suspending kernel object tree...
resume:
kernel: nouveau [ DRM] re-enabling device...
kernel: nouveau [ DRM] resuming kernel object tree...
kernel: nouveau [ VBIOS][0000:01:00.0] running init tables
kernel: nouveau [ DRM] resuming client object trees...
kernel: nouveau [ DRM] resuming display...
kernel: nouveau E[ PFB][0000:01:00.0] trapped write at0x00007fe000on channel0x0000fee0[unknown] BAR/PFIFO_WRITE/FB reason:PAGE_NOT_PRESENT
kernel: nouveau E[ PFB][0000:01:00.0] trapped write at0x00007fe000on channel0x0000fee0[unknown] BAR/PFIFO_WRITE/FB reason:PAGE_NOT_PRESENT
kernel: nouveau E[ PFB][0000:01:00.0] trapped write at0x00007fe240on channel0x0000fee0[unknown] BAR/PFIFO_WRITE/FB reason:PAGE_NOT_PRESENT
kernel: nouveau E[ PFB][0000:01:00.0] trapped write at0x00007fe400on channel0x0000fee0[unknown] BAR/PFIFO_WRITE/FB reason:PAGE_NOT_PRESENTQuoted 4 lines
http://lists.freedesktop.org/archives/nouveau/2013-October/014656.html
--- drivers/gpu/drm/nouveau/nouveau_fbcon.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
Quoted 7 lines
<formletter>
This is not the correct way to submit patches for inclusion in the stable kernel tree. Please read
Documentation/stable_kernel_rules.txtfor how to do this properly.</formletter>
Sorry,
I've been asked to cc it.
chris
Quoted 40 lines · Christoph Rudorff
Quoted 39 lines · Greg KH
Quoted 27 lines · Christoph Rudorff
Current code disables fbcon acceleration before fbcon is suspended, leading to corrupted console after resume from s2disk. In a similar fashion we must make sure that fbcon acceleration is enabled before we revive the console.
With this patch s2disk works correctly on my MacBookPro6,2 with GT216 [GeForce GT 330M]
hibernate:
kernel: nouveau [ DRM] suspending fbcon...
kernel: nouveau [ DRM] suspending display...
kernel: nouveau [ DRM] unpinning framebuffer(s)...
kernel: nouveau [ DRM] evicting buffers...
kernel: nouveau [ DRM] waiting for kernel channels to go idle...
kernel: nouveau [ DRM] suspending client object trees...
kernel: nouveau [ DRM] suspending kernel object tree...
resume:
kernel: nouveau [ DRM] re-enabling device...
kernel: nouveau [ DRM] resuming kernel object tree...
kernel: nouveau [ VBIOS][0000:01:00.0] running init tables
kernel: nouveau [ DRM] resuming client object trees...
kernel: nouveau [ DRM] resuming display...
kernel: nouveau E[ PFB][0000:01:00.0] trapped write at0x00007fe000on channel0x0000fee0[unknown] BAR/PFIFO_WRITE/FB reason:PAGE_NOT_PRESENT
kernel: nouveau E[ PFB][0000:01:00.0] trapped write at0x00007fe000on channel0x0000fee0[unknown] BAR/PFIFO_WRITE/FB reason:PAGE_NOT_PRESENT
kernel: nouveau E[ PFB][0000:01:00.0] trapped write at0x00007fe240on channel0x0000fee0[unknown] BAR/PFIFO_WRITE/FB reason:PAGE_NOT_PRESENT
kernel: nouveau E[ PFB][0000:01:00.0] trapped write at0x00007fe400on channel0x0000fee0[unknown] BAR/PFIFO_WRITE/FB reason:PAGE_NOT_PRESENTQuoted 4 lines
http://lists.freedesktop.org/archives/nouveau/2013-October/014656.html
--- drivers/gpu/drm/nouveau/nouveau_fbcon.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)<formletter>
This is not the correct way to submit patches for inclusion in the stable kernel tree. Please read
Documentation/stable_kernel_rules.txtfor how to do this properly.
Quoted 8 lines
Quoted 1 line
</formletter>
Sorry,
I've been asked to cc it.
chris
Dropping Greg and stable@kernel
Hi Chris,
Maybe I should have been more explicit previously, namely
* Add Signed-off-by: tag
* (Optional?) Prepend the ML link with appropriate tag
* Add Cc: <stable@kernel...> # branch which should include this You can use git send-email --suppress-cc=bodycc (to avoid sending a copy to stable at first instance)
* Possibly a bit or two more (check out the Greg's pointer)
Cheers,
Emil