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)
Sun, Nov 24, 10:21 PM
Unknown Object (File)
Wed, Nov 20, 10:05 PM
Unknown Object (File)
Tue, Nov 19, 7:19 PM
Unknown Object (File)
Fri, Nov 15, 2:19 AM
Unknown Object (File)
Thu, Nov 7, 4:53 PM
Unknown Object (File)
Thu, Nov 7, 1:21 AM
Unknown Object (File)
Oct 26 2024, 7:18 PM
Unknown Object (File)
Oct 16 2024, 10:01 AM
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