Power Management In IOFramebuffer Subclasses

9 views
Skip to first unread message

Mike Crawford

unread,
Sep 1, 2017, 7:48:35 PM9/1/17
to darwin-drivers
I'm working on an IOFramebuffer subclass, that is a somewhat improved
version of IOProxyFramebuffer from the open source IOProxyVideoFamily.

I'm not having any luck adding power management to it.

Power Management in IOProxyVideoCard and IOProxyVideoHead now works
OK, but if I call registerPowerDriver() in IOProxyFramebuffer's
start() there is a kernel panic in
IOFramebuffer::powerStateWillChangeTo().

Apple's open source release for 10.12.5 hasn't happened yet, so I'm
not really able to determine what's taking place in
powerStateWillChangeTo().

If I comment off the call to registerPowerDriver(), the panic goes
away but awakening from system sleep doesn't wake the display. The
mouse is also frozen.

However the Mac is not crashed as I can ssh into it.

I expect that the display waking problem, as well as the mouse freeze
will go away if I can get the power management right but at this point
I am at a loss as to what to do.

Thanks for any insight you can give me. -- MIke

Mike Crawford mdcra...@gmail.com

Seeking Beta Testers for Warp Life for iOS
http://www.warplife.com/beta-testing
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-drivers mailing list (Darwin-...@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/darwin-drivers/darwin-drivers-garchive-96018%40googlegroups.com

This email sent to darwin-drivers...@googlegroups.com

Mike Crawford

unread,
Sep 8, 2017, 3:24:51 PM9/8/17
to darwin-drivers
My problem was that the IOFramebuffer base class does not initialize a
certain pointer until its open() function is called.

Calling registerPowerDriver results in the use of the FBLOCK macros in
IOFramebuffer.cpp. The macro expands to:

frame buffer->__private->controller->workLoop->closeGate()

If one calls registerPowerDriver in their driver's start() function,
controller will be NULL. It gets initialized in
IOFramebuffer->open().

I'm not clear whether I should init power management in my
IOFramebuffer subclass' open() function, or in its enableController()
function, but if it makes a difference it should be easy to discover.

Your Unindicted Co-Conspirator,

Misha
Reply all
Reply to author
Forward
0 new messages