Page MenuHomeFreeBSD

vt(4): Use power_{suspend,resume} event handlers to implement suspend/resume
ClosedPublic

Authored by dumbbell on Oct 23 2014, 10:44 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Dec 9, 1:02 AM
Unknown Object (File)
Nov 24 2024, 10:21 PM
Unknown Object (File)
Nov 20 2024, 10:05 PM
Unknown Object (File)
Nov 19 2024, 7:19 PM
Unknown Object (File)
Nov 15 2024, 2:19 AM
Unknown Object (File)
Nov 7 2024, 4:53 PM
Unknown Object (File)
Nov 7 2024, 1:21 AM
Unknown Object (File)
Oct 26 2024, 7:18 PM
Subscribers
None

Details

Summary

The goal is to avoid that the vt(4) resume happens before the video display is resumed. The original patch was provided by Andriy Gapon.

This new patch registers the handlers in vt_upgrade(). This is done once, thanks to the VDF_ASYNC flag. I abused this flag because it was already abused by the keyboard allocation. The event handlers then call the backend if it provides callbacks for suspend/resume.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

dumbbell retitled this revision from to vt(4): Use power_{suspend,resume} event handlers to implement suspend/resume.
dumbbell updated this object.
dumbbell edited the test plan for this revision. (Show Details)
dumbbell added reviewers: avg, nwhitehorn, ray, emaste.

I've also came to conclusion that for vt switching to do its intended job reliably vt_suspend() should not only request the switch but also wait until it is completed. Waiting was scary to do from the bus suspend context, but should be okay in the power_suspend context.

dumbbell edited edge metadata.

Changes:

  • Wait for window switch in the suspend path (patch from Andriy Gapon)

Changes:

  • Try to remove modification to kern_cons.c

Was someone able to test this patch? My computer doesn't suspend/resume, so can't do it myself.

The change looks good to me and, as far as my testing goes, it works as well.

avg edited edge metadata.
This revision is now accepted and ready to land.Nov 21 2014, 10:49 AM