[RFC] state machine for display control

Kristian Høgsberg krh at bitplanet.net
Fri Feb 24 08:56:51 PST 2012


On Fri, Feb 24, 2012 at 11:08 AM, Tiago Vignatti
<tiago.vignatti at intel.com> wrote:
> Hi,
>
> Following is the kinda of cleanup I found worth before actually implement the
> drm routines for backlight control and DPMS. Please comment on!

Hi Tiago,

We are looking to add dpms and backlight support to weston, so let's
do that first.  We don't need to refactor the timer or screenlocking
code right now, we need to extend compositor-drm.c with code to
control dpms and backlight.  We need a couple of new weston_output
vfuncs to control that and we can hook the backlight control up to a
keyboard binding in shell.c (similar to what Scott did for the zoom)
and the dpms off needs to happen here:

--- a/src/shell.c
+++ b/src/shell.c
@@ -1293,8 +1293,10 @@ lock(struct weston_shell *base)
        struct shell_surface *shsurf;
        uint32_t time;

-       if (shell->locked)
+       if (shell->locked) {
+               fprintf(stderr, "dpms off here\n");
                return;
+       }

        shell->locked = true;

thanks,
Kristian

> Thanks,
>
>
> Tiago Vignatti (7):
>  gitignore: update it
>  shell: remove unused code from screensaver
>  compositor: activity happens in core scope only
>  compositor: split timing related code on its own file and scope
>  compositor: make screensaver idle time shell specific
>  shell: use a more suggestive name
>  compositor: implement a state machine for display control
>
>  clients/.gitignore       |    2 +-
>  src/Makefile.am          |    2 +
>  src/compositor.c         |   43 ++---------------
>  src/compositor.h         |   13 +++--
>  src/shell.c              |   62 ++++++++++++++++++------
>  src/timer.c              |  120 ++++++++++++++++++++++++++++++++++++++++++++++
>  src/timer.h              |   45 +++++++++++++++++
>  weston-desktop-shell.ini |    4 +-
>  8 files changed, 229 insertions(+), 62 deletions(-)
>  create mode 100644 src/timer.c
>  create mode 100644 src/timer.h
>
> --
> 1.7.5.4
>
> _______________________________________________
> wayland-devel mailing list
> wayland-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/wayland-devel


More information about the wayland-devel mailing list