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)
Feb 19 2024, 5:24 AM
Unknown Object (File)
Dec 31 2023, 1:23 AM
Unknown Object (File)
Dec 27 2023, 6:03 PM
Unknown Object (File)
Dec 19 2023, 10:34 PM
Unknown Object (File)
Oct 28 2023, 11:39 PM
Unknown Object (File)
Oct 27 2023, 6:15 PM
Unknown Object (File)
Sep 25 2023, 10:13 PM
Unknown Object (File)
Sep 25 2023, 9:58 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