Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix USB cable connection related issues in display blanking policy #236

Merged
merged 6 commits into from Jan 23, 2015
Merged

Fix USB cable connection related issues in display blanking policy #236

merged 6 commits into from Jan 23, 2015

Conversation

spiiroin
Copy link
Contributor

No description provided.

Add compositor available datapipe and update it from display plugin.
Many datapipes have their content managed by plugins. This makes
the initial state evaluation depend on the plugin load order and
just installing change notifiers might result in missing the
first changes.

The tklock module has array based datapipe binding helpers that
use idle callback to ensure that the datapipe state after mce
startup is fed to notification callbacks.

Move the array based binding utilities to datapipe module and make
available for all mce modules.
Having separate function calls for installing and removing each datapipe
listener makes it hard to see if every listener that is installed is
also removed. Also there are no quarantees that initial state guesses
made in display plugin match the state that has been reached at the time
when display plugin is loaded.

Use array based datapipe binding utilities for installing and removing
callbacks. The datapipe states are fed to callbacks after mce mainloop
reaches idle.
Spotting changes in verbose startup logging is difficult when mce must
be stopped manually.

Add auto-exit feature that by default makes mce exit 5 seconds after
mainloop reaches idle.
There are multitudes of local dbus service tracking variants scattered
around mce code base.

The lipstick state is needed by tklock core module and provided by
in theory optional display plugin.

Move the name owner tracking implemented in display plugin to mce-dbus
so that it can be used as common implementation for tracking all dbus
services that are essential for mce operation. Initially use it for
tracking availability of lipstick and compositor service.
@philippedeswert
Copy link
Contributor

LGTM

There is logic in mce to process charging state separately from usb
cable connect state, but since the legacy logic for detecting does
not work charging status has been used for things that should depend
on cable connect. This delays things like turning on display to show
usb mode selection dialog and makes it hard to decide how long the
display should be kept on. And turning on display when mce starts
up while usb cable is already attached can cause problems during 1st
boot if the display state restoration occurs close to starting up of
the startup wizard.

Use usb mode provided by usb_moded to determine usb cable state. The
usb_moded tracking logic is derived from the implentation used in dsme.
Both mce and dsme use LGPL v2.1 license.

Use separate display on rules for charging and cable connect changes.

Do not turn on the display when cable is removed / charging stops.

Do not turn on the display if usb cable is already connected when
mce is started.

Fix glitches in display state handling and automatic brightness
tuning during mce startup.

[mce] Fix USB cable connection related issues in display blanking policy. Fixes JB#25788
spiiroin added a commit that referenced this pull request Jan 23, 2015
Fix USB cable connection related issues in display blanking policy
@spiiroin spiiroin merged commit 91e72d5 into nemomobile:master Jan 23, 2015
@spiiroin spiiroin deleted the jb25788_usb_mode branch January 23, 2015 07:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants