[meego-packaging] [meego-commits] 16419: Changes to Trunk:Testing/mce
Zhu, Peter J
peter.j.zhu at intel.com
Mon Apr 18 05:55:15 PDT 2011
Any diff than attached sr except adding dsme as run time dependency?
You know, attached sr didn't fix claimed bugs in changelog at all.
Peter
> -----Original Message-----
> From: meego-commits-bounces at meego.com
> [mailto:meego-commits-bounces at meego.com] On Behalf Of Tapio Rantala
> Sent: Monday, April 18, 2011 8:36 PM
> To: meego-commits at meego.com
> Subject: [meego-commits] 16419: Changes to Trunk:Testing/mce
>
> Hi,
> I have made the following changes to mce in project Trunk:Testing. Please
> review and accept ASAP.
>
> Thank You,
> Tapio Rantala
>
> [This message was auto-generated]
>
> ---
>
> Request #16419:
>
> submit: devel:systemsw/mce(r22) -> Trunk:Testing/mce
>
>
> Message:
> * Mon Apr 18 2011 Mika Laitio <ext-mika.laitio at nokia.com> 1.10.92-8
> - (BMC#16313) Added dependency from mce to dsme because mce fails to
> start
> if dsme is not running.
> * Thu Apr 07 2011 Mika Laitio <ext-mika.laitio at nokia.com> 1.10.92-7
> - (BMC#15233) Added MCE_DISPLAY_TOGGLE value to mce.h and and
> send TOGGLE request from the power button keypreses in the event-input.c.
> Added also the code to meegodisplay.c to handle these display toggle
> requests.
> * Wed Apr 06 2011 Mika Laitio <ext-mika.laitio at nokia.com> 1.10.92-6
> - (BMC#14738) Additional fix. Sometimes the screen got invoked couple of
> seconds after blanking it even thought there were not any user activity.
> This was caused by the code in event-input.c which suspended the event
> reading for a while in certain situations after sending the activity
> event. I removed the suspend code and instead use the input events time
> as a filter so that only one activity event is send in maximum on each
> second from the touchscreen events.
> * Mon Apr 04 2011 Mika Laitio <ext-mika.laitio at nokia.com> 1.10.92-5
> - (BMC#14738) Add new displaymeego module which simplifies the display
> blanking
> code that was used in display module by removing all dimming related
> functionality that's not needed and had problems.
> - Drop previously used display-module-disabled patch
>
> State: new 2011-04-18T05:35:47 tapioran
> Comment: None
>
>
>
> changes files:
> --------------
> --- mce.changes
> +++ mce.changes
> @@ -0,0 +1,24 @@
> +* Mon Apr 18 2011 Mika Laitio <ext-mika.laitio at nokia.com> 1.10.92-8
> +- (BMC#16313) Added dependency from mce to dsme because mce fails to
> start
> + if dsme is not running.
> +
> +* Thu Apr 07 2011 Mika Laitio <ext-mika.laitio at nokia.com> 1.10.92-7
> +- (BMC#15233) Added MCE_DISPLAY_TOGGLE value to mce.h and and
> + send TOGGLE request from the power button keypreses in the
> event-input.c.
> + Added also the code to meegodisplay.c to handle these display toggle
> requests.
> +
> +* Wed Apr 06 2011 Mika Laitio <ext-mika.laitio at nokia.com> 1.10.92-6
> +- (BMC#14738) Additional fix. Sometimes the screen got invoked couple of
> + seconds after blanking it even thought there were not any user activity.
> + This was caused by the code in event-input.c which suspended the event
> + reading for a while in certain situations after sending the activity
> + event. I removed the suspend code and instead use the input events time
> + as a filter so that only one activity event is send in maximum on each
> + second from the touchscreen events.
> +
> +* Mon Apr 04 2011 Mika Laitio <ext-mika.laitio at nokia.com> 1.10.92-5
> +- (BMC#14738) Add new displaymeego module which simplifies the display
> blanking
> + code that was used in display module by removing all dimming related
> + functionality that's not needed and had problems.
> +- Drop previously used display-module-disabled patch
> +
>
> old:
> ----
> mce-1.10.92-display-module-disabled.patch
>
> new:
> ----
> mce-1.10.92-add-and-enable-displaymeego-module.patch
> mce-1.10.92-fix-delay-when-processing-touchscreen-events.patch
> mce-1.10.92-pwr-btn-fix-for-display-blank-and-unblank.patch
>
> spec files:
> -----------
> --- mce.spec
> +++ mce.spec
> @@ -1,6 +1,6 @@
> Name: mce
> Version: 1.10.92
> -Release: 4
> +Release: 8
> Summary: Mode Control Entity for Nokia mobile computers
> Group: System/System Control
> License: LGPLv2
> @@ -9,9 +9,11 @@
> Patch0: %{name}-1.10.90-no-ownership.patch
> Patch1: %{name}-1.10.90-include-i2c-fix.patch
> Patch2: %{name}-1.10.90-no-werror.patch
> -Patch3: %{name}-1.10.92-display-module-disabled.patch
> +Patch3: %{name}-1.10.92-add-and-enable-displaymeego-module.patch
> Patch4: %{name}-1.10.92-silent-fd-close.patch
> Patch5: %{name}-1.10.92-pwr-button-event-name.patch
> +Patch6: %{name}-1.10.92-fix-delay-when-processing-touchscreen-events.p
> atch
> +Patch7: %{name}-1.10.92-pwr-btn-fix-for-display-blank-and-unblank.patch
>
> BuildRequires: pkgconfig(dbus-1) >= 1.0.2
> BuildRequires: pkgconfig(dbus-glib-1)
> @@ -22,6 +24,8 @@
> BuildRequires: kernel-headers >= 2.6.32
> BuildRequires: libi2c-devel
>
> +Requires: dsme
> +
> %description
> This package contains the Mode Control Entity which provides
> mode management features. This is a daemon that is the backend
> @@ -44,6 +48,8 @@
> %patch3 -p1
> %patch4 -p1
> %patch5 -p1
> +%patch6 -p1
> +%patch7 -p1
>
> %build
> make %{?_smp_mflags}
>
> other changes:
> --------------
>
> ++++++ mce-1.10.92-add-and-enable-displaymeego-module.patch (new)
> --- mce-1.10.92-add-and-enable-displaymeego-module.patch
> +++ mce-1.10.92-add-and-enable-displaymeego-module.patch
> +diff -Naur mce-1.10.92-orig/Makefile mce-1.10.92/Makefile
> +--- mce-1.10.92-orig/Makefile 2011-04-04 16:50:15.565700083 +0300
> ++++ mce-1.10.92/Makefile 2011-04-04 16:53:14.415705138 +0300
> +@@ -46,6 +46,7 @@
> + $(MODULE_DIR)/libalarm.so \
> + $(MODULE_DIR)/libbattery.so \
> + $(MODULE_DIR)/libdisplay.so \
> ++ $(MODULE_DIR)/libdisplaymeego.so \
> + $(MODULE_DIR)/libled.so \
> + $(MODULE_DIR)/libcallstate.so \
> + $(MODULE_DIR)/libaudiorouting.so \
> +diff -Naur mce-1.10.92-orig/mce.ini mce-1.10.92/mce.ini
> +--- mce-1.10.92-orig/mce.ini 2011-01-28 12:06:22.000000000 +0200
> ++++ mce-1.10.92/mce.ini 2011-04-04 16:54:19.618697589 +0300
> +@@ -11,7 +11,7 @@
> + #
> + # List of modules to load
> + # Note: the name should not include the "lib"-prefix
> +-Modules=radiostates;display;keypad;led;battery;filter-brightness-als;inactivi
> ty;alarm;callstate;audiorouting;proximity;powersavemode
> ++Modules=radiostates;displaymeego;keypad;led;battery;filter-brightness-als;
> inactivity;alarm;callstate;audiorouting;proximity;powersavemode
> +
> +
> + [HomeKey]
> +diff -Naur mce-1.10.92-orig/modules/displaymeego.c
> mce-1.10.92/modules/displaymeego.c
> +--- mce-1.10.92-orig/modules/displaymeego.c 1970-01-01
> 02:00:00.000000000 +0200
> ++++ mce-1.10.92/modules/displaymeego.c 2011-04-04 16:52:47.013700069
> +0300
> +@@ -0,0 +1,1958 @@
> ++/**
> ++ * @file display.c
> ++ * Display module -- this implements display handling for MCE
> ++ * <p>
> ++ * Copyright © 2007-2010 Nokia Corporation and/or its subsidiary(-ies).
> ++ * <p>
> ++ * @author David Weinehall <david.weinehall at nokia.com>
> ++ *
> ++ * mce is free software; you can redistribute it and/or modify
> ++ * it under the terms of the GNU Lesser General Public License
> ++ * version 2.1 as published by the Free Software Foundation.
> ++ *
> ++ * mce is distributed in the hope that it will be useful,
> ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
> ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
> GNU
> ++ * Lesser General Public License for more details.
> ++ *
> ++ * You should have received a copy of the GNU Lesser General Public
> ++ * License along with mce. If not, see <http://www.gnu.org/licenses/>.
> ++ */
> ++#include <glib.h>
> ++#include <gmodule.h>
> ++#include <glib/gstdio.h> /* g_access() */
> ++
> ++#include <errno.h> /* errno */
> ++#include <fcntl.h> /* open() */
> ++#include <stdio.h> /* O_RDWR */
> ++#include <string.h> /* strcmp() */
> ++#include <unistd.h> /* close() */
> ++#include <linux/fb.h> /* FBIOBLANK,
> ++ * FB_BLANK_POWERDOWN,
> ++ * FB_BLANK_UNBLANK
> ++ */
> ++#include <sys/ioctl.h> /* ioctl() */
> ++
> ++#include <mce/mode-names.h> /* MCE_CABC_MODE_OFF,
> ++ * MCE_CABC_MODE_UI,
> ++ * MCE_CABC_MODE_STILL_IMAGE,
> ++ * MCE_CABC_MODE_MOVING_IMAGE,
> ++ * MCE_DISPLAY_ON_STRING,
> ++ * MCE_DISPLAY_DIM_STRING,
> ++ * MCE_DISPLAY_OFF_STRING
> ++ */
> ++
> ++#include "mce.h" /* display_state_t,
> ++ * charger_state_pipe,
> ++ * display_state_pipe,
> ++ * display_brightness_pipe,
> ++ * inactivity_timeout_pipe,
> ++ * led_pattern_deactivate_pipe,
> ++ * submode_pipe,
> ++ * system_state_pipe,
> ++ * device_inactive_pipe
> ++ */
> ++#include "displaymeego.h"
> ++
> ++#include "mce-io.h" /* mce_read_string_from_file(),
> ++ * mce_read_number_string_from_file(),
> ++ * mce_write_number_string_to_file()
> ++ */
> ++#include "mce-lib.h" /* strstr_delim(),
> ++ * mce_translate_string_to_int_with_default(),
> ++ * mce_translation_t
> ++ */
> ++#include "mce-log.h" /* mce_log(), LL_* */
> ++#include "mce-conf.h" /* mce_conf_get_int(),
> ++ * mce_conf_get_string()
> ++ */
> ++#include "mce-dbus.h" /* Direct:
> ++ * ---
> ++ * mce_dbus_handler_add(),
> ++ * dbus_send_message(),
> ++ * dbus_new_method_reply(),
> ++ * dbus_new_signal(),
> ++ * dbus_message_append_args(),
> ++ * dbus_message_get_no_reply(),
> ++ * dbus_message_unref(),
> ++ * DBusMessage,
> ++ * DBUS_MESSAGE_TYPE_METHOD_CALL,
> ++ * DBUS_MESSAGE_TYPE_SIGNAL,
> ++ * DBUS_TYPE_STRING,
> ++ * DBUS_TYPE_INVALID,
> ++ * dbus_bool_t
> ++ *
> ++ * Indirect:
> ++ * ---
> ++ * MCE_SIGNAL_IF,
> ++ * MCE_SIGNAL_PATH,
> ++ * MCE_REQUEST_IF,
> ++ * MCE_DISPLAY_STATUS_GET,
> ++ * MCE_DISPLAY_ON_REQ,
> ++ * MCE_DISPLAY_DIM_REQ,
> ++ * MCE_DISPLAY_OFF_REQ,
> ++ * MCE_PREVENT_BLANK_REQ,
> ++ * MCE_CABC_MODE_GET,
> ++ * MCE_CABC_MODE_REQ
> ++ */
> ++#include "mce-gconf.h" /* mce_gconf_get_int(),
> ++ * mce_gconf_get_bool(),
> ++ * mce_gconf_notifier_add(),
> ++ * gconf_entry_get_key(),
> ++ * gconf_value_get_int(),
> ++ * gconf_value_get_bool(),
> ++ * GConfClient, GConfEntry, GConfValue
> ++ */
> ++#include "datapipe.h" /* datapipe_get_gint(),
> ++ * execute_datapipe(),
> ++ * append_output_trigger_to_datapipe(),
> ++ * remove_output_trigger_from_datapipe()
> ++ */
> ++
> ++/* These defines are taken from devicelock.h, but slightly modified */
> ++#ifndef DEVICELOCK_H
> ++/** Devicelock D-Bus service */
> ++#define DEVLOCK_SERVICE "com.nokia.devicelock"
> ++
> ++/** Devicelock D-Bus service */
> ++#define DEVLOCK_PATH "/request"
> ++
> ++/** Set devicelock state */
> ++#define DEVLOCK_SET "setState"
> ++
> ++// after blanking DISPLAY there comes sometimes activity events from
> event-input /dev/input2 that
> ++// could turn the DISPLAY again on.
> ++#define DISPLAY_UNBLANK_INACTIVITY_FILTER_SECONDS 1
> ++
> ++/** Enumeration of the valid locks on the device */
> ++enum LockType {
> ++ /** TouchAndKeyboard -- The touch screen and keypad lock */
> ++ TouchAndKeyboard = 0,
> ++ /** Device -- The device lock, password protected lock screen */
> ++ Device
> ++};
> ++
> ++/** Enumeration of the valid states that a lock can be in */
> ++enum LockState {
> ++ /** Unlocked - The lock is unlocked */
> ++ Unlocked = 0,
> ++ /** Locked - The lock is being used */
> ++ Locked,
> ++ /** Configuration - Open the locks configuration settings */
> ++ Configuration,
> ++/** WipeMMC - Secure wipe of the device */
> ++ WipeMMC,
> ++ /** Inhibit - Stop the lock ui(s) from being displayed */
> ++ Inhibit,
> ++ /** Undefined - Lock state is unknown or the lock does not exist */
> ++ Undefined
> ++};
> ++#endif /* DEVICELOCK_H */
> ++
> ++// XXX: remove
> ++#ifndef MCE_DISPLAY_LOW_POWER_MODE_REQ
> ++#define MCE_DISPLAY_LOW_POWER_MODE_REQ
> "req_display_state_low_power"
> ++#endif
> ++
> ++/** Module name */
> ++#define MODULE_NAME "displayblank"
> ++
> ++//#define log_debug(a, b...) printf(a, ## b);
> ++#define log_debug(a, b...)
> ++//#define log_debug(a, b...) mce_log(LL_ERR, a, ## b);
> ++
> ++/** Functionality provided by this module */
> ++static const gchar *const provides[] = { MODULE_NAME, NULL };
> ++
> ++/** Module information */
> ++G_MODULE_EXPORT module_info_struct module_info = {
> ++ /** Name of the module */
> ++ .name = MODULE_NAME,
> ++ /** Module provides */
> (1939 more lines skipped)
>
> ++++++ mce-1.10.92-fix-delay-when-processing-touchscreen-events.patch
> (new)
> --- mce-1.10.92-fix-delay-when-processing-touchscreen-events.patch
> +++ mce-1.10.92-fix-delay-when-processing-touchscreen-events.patch
> +From abfb66e4336816c8470cc0803de5e60e275d7b29 Mon Sep 17 00:00:00
> 2001
> +From: Mika Laitio <lamikr at pilppa.org>
> +Date: Wed, 6 Apr 2011 20:06:24 +0300
> +Subject: [PATCH 2/2] fix delay when processing touchscreen events
> +
> +BMC#14738, additional fix. Sometimes the screen got invoked couple of
> +seconds after blanking it even thought there were not any user activity.
> +This was caused by the code in event-input.c which suspended the event
> +reading for a while in certain situations after sending the activity
> +event. I removed the suspend code and instead use the input events time
> +as a filter so that only one activity event is send in maximum on each
> +second from the touchscreen events.
> +
> +Signed-off-by: Mika Laitio <lamikr at pilppa.org>
> +---
> + event-input.c | 66 +++++++++++++--------------------------------------------
> + 1 files changed, 15 insertions(+), 51 deletions(-)
> +
> +diff --git a/event-input.c b/event-input.c
> +index fce0728..c5ea85e 100644
> +--- a/event-input.c
> ++++ b/event-input.c
> +@@ -110,6 +110,8 @@ static gboolean gpio_key_disable_exists = FALSE;
> +
> + static void update_inputdevices(const gchar *device, gboolean add);
> +
> ++static time_t prev_handled_touchscreen_activity_seconds = 0;
> ++
> + /**
> + * Enable the specified GPIO key
> + * non-existing or already enabled keys are silently ignored
> +@@ -237,27 +239,6 @@ static void unregister_io_monitor(gpointer
> io_monitor, gpointer user_data)
> + }
> +
> + /**
> +- * Timeout function for touchscreen I/O monitor reprogramming
> +- *
> +- * @param data Unused
> +- * @return Always returns FALSE, to disable the timeout
> +- */
> +-static gboolean touchscreen_io_monitor_timeout_cb(gpointer data)
> +-{
> +- (void)data;
> +-
> +- touchscreen_io_monitor_timeout_cb_id = 0;
> +-
> +- /* Resume I/O monitors */
> +- if (touchscreen_dev_list != NULL) {
> +- g_slist_foreach(touchscreen_dev_list,
> +- (GFunc)resume_io_monitor, NULL);
> +- }
> +-
> +- return FALSE;
> +-}
> +-
> +-/**
> + * Cancel timeout for touchscreen I/O monitor reprogramming
> + */
> + static void cancel_touchscreen_io_monitor_timeout(void)
> +@@ -269,19 +250,6 @@ static void
> cancel_touchscreen_io_monitor_timeout(void)
> + }
> +
> + /**
> +- * Setup timeout for touchscreen I/O monitor reprogramming
> +- */
> +-static void setup_touchscreen_io_monitor_timeout(void)
> +-{
> +- cancel_touchscreen_io_monitor_timeout();
> +-
> +- /* Setup new timeout */
> +- touchscreen_io_monitor_timeout_cb_id =
> +- g_timeout_add_seconds(MONITORING_DELAY,
> +- touchscreen_io_monitor_timeout_cb, NULL);
> +-}
> +-
> +-/**
> + * I/O monitor callback for the touchscreen
> + *
> + * @param data The new data
> +@@ -289,9 +257,9 @@ static void
> setup_touchscreen_io_monitor_timeout(void)
> + */
> + static void touchscreen_cb(gpointer data, gsize bytes_read)
> + {
> +- display_state_t display_state = datapipe_get_gint(display_state_pipe);
> + submode_t submode = mce_get_submode_int32();
> + struct input_event *ev;
> ++ time_t time_now;
> +
> + ev = data;
> +
> +@@ -305,26 +273,22 @@ static void touchscreen_cb(gpointer data, gsize
> bytes_read)
> + goto EXIT;
> + }
> +
> ++ /* ignore all other tousch screen events except the first one happened at
> same second */
> ++ if ((ev->time.tv_sec - prev_handled_touchscreen_activity_seconds) == 0) {
> ++ goto EXIT;
> ++ }
> ++ prev_handled_touchscreen_activity_seconds = ev->time.tv_sec;
> ++
> ++ time(&time_now);
> ++ if ((time_now - ev->time.tv_sec) > 2) {
> ++ // ignore events that are more than 2 seconds old
> ++ goto EXIT;
> ++ }
> ++
> + /* Generate activity */
> + (void)execute_datapipe(&device_inactive_pipe,
> GINT_TO_POINTER(FALSE),
> + USE_INDATA, CACHE_INDATA);
> +
> +- /* If the display is on/dim and visual tklock is active
> +- * or autorelock isn't active, suspend I/O monitors
> +- */
> +- if (((display_state == MCE_DISPLAY_ON) ||
> +- (display_state == MCE_DISPLAY_DIM)) &&
> +- (((submode & MCE_VISUAL_TKLOCK_SUBMODE) != 0) ||
> +- ((submode & MCE_AUTORELOCK_SUBMODE) == 0))) {
> +- if (touchscreen_dev_list != NULL) {
> +- g_slist_foreach(touchscreen_dev_list,
> +- (GFunc)suspend_io_monitor, NULL);
> +- }
> +-
> +- /* Setup a timeout I/O monitor reprogramming */
> +- setup_touchscreen_io_monitor_timeout();
> +- }
> +-
> + /* Ignore non-pressure events */
> + if (((ev->type != EV_ABS) || (ev->code != ABS_PRESSURE)) &&
> + ((ev->type != EV_KEY) || (ev->code != BTN_TOUCH))) {
> +--
> +1.7.1
> +
>
> ++++++ mce-1.10.92-pwr-btn-fix-for-display-blank-and-unblank.patch (new)
> --- mce-1.10.92-pwr-btn-fix-for-display-blank-and-unblank.patch
> +++ mce-1.10.92-pwr-btn-fix-for-display-blank-and-unblank.patch
> +From e5d34a846136f0e1a9b152fdeba103a62ccf0945 Mon Sep 17 00:00:00
> 2001
> +From: Mika Laitio <lamikr at pilppa.org>
> +Date: Thu, 7 Apr 2011 10:26:20 +0300
> +Subject: [PATCH 3/3] pwr-btn fix for display blank/unblank.
> +
> +Signed-off-by: Mika Laitio <lamikr at pilppa.org>
> +---
> + event-input.c | 45
> +++++++++++++++++++++++++++------------------
> + mce.h | 3 ++-
> + modules/displaymeego.c | 12 ++++++++++--
> + 3 files changed, 39 insertions(+), 21 deletions(-)
> +
> +diff --git a/event-input.c b/event-input.c
> +index c5ea85e..c65d3ba 100644
> +--- a/event-input.c
> ++++ b/event-input.c
> +@@ -273,7 +273,7 @@ static void touchscreen_cb(gpointer data, gsize
> bytes_read)
> + goto EXIT;
> + }
> +
> +- /* ignore all other tousch screen events except the first one happened at
> same second */
> ++ /* ignore all other touch screen events except the first one happened at
> same second */
> + if ((ev->time.tv_sec - prev_handled_touchscreen_activity_seconds) == 0) {
> + goto EXIT;
> + }
> +@@ -284,7 +284,6 @@ static void touchscreen_cb(gpointer data, gsize
> bytes_read)
> + // ignore events that are more than 2 seconds old
> + goto EXIT;
> + }
> +-
> + /* Generate activity */
> + (void)execute_datapipe(&device_inactive_pipe,
> GINT_TO_POINTER(FALSE),
> + USE_INDATA, CACHE_INDATA);
> +@@ -379,22 +378,32 @@ static void keypress_cb(gpointer data, gsize
> bytes_read)
> + USE_INDATA, CACHE_INDATA);
> + }
> +
> +- /* For now there's no reason to cache the keypress
> +- *
> +- * If the event eater is active, and this is the press,
> +- * don't send anything; never eat releases, otherwise
> +- * the release event for a [power] press might get lost
> +- * and the device shut down... Not good(tm)
> +- *
> +- * Also, don't send repeat events, and don't send
> +- * keypress events for the focus and screenlock keys
> +- */
> +- if ((ev->code != KEY_CAMERA_FOCUS) &&
> +- (ev->code != KEY_SCREENLOCK) &&
> +- ((((submode & MCE_EVEATER_SUBMODE) == 0) &&
> +- (ev->value == 1)) || (ev->value == 0))) {
> +- (void)execute_datapipe(&keypress_pipe, &ev,
> +- USE_INDATA, DONT_CACHE_INDATA);
> ++ if (ev->code == KEY_POWER) {
> ++ if (ev->value == 1) {
> ++ (void)execute_datapipe(&display_state_pipe,
> ++
> GINT_TO_POINTER(MCE_DISPLAY_TOGGLE),
> ++ USE_INDATA,
> ++ CACHE_INDATA);
> ++ }
> ++ }
> ++ else {
> ++ /* For now there's no reason to cache the keypress
> ++ *
> ++ * If the event eater is active, and this is the press,
> ++ * don't send anything; never eat releases, otherwise
> ++ * the release event for a [power] press might get lost
> ++ * and the device shut down... Not good(tm)
> ++ *
> ++ * Also, don't send repeat events, and don't send
> ++ * keypress events for the focus and screenlock keys
> ++ */
> ++ if ((ev->code != KEY_CAMERA_FOCUS) &&
> ++ (ev->code != KEY_SCREENLOCK) &&
> ++ ((((submode & MCE_EVEATER_SUBMODE) == 0) &&
> ++ (ev->value == 1)) || (ev->value == 0))) {
> ++ (void)execute_datapipe(&keypress_pipe, &ev,
> ++ USE_INDATA, DONT_CACHE_INDATA);
> ++ }
> + }
> + }
> +
> +diff --git a/mce.h b/mce.h
> +index 561a224..bdadf00 100644
> +--- a/mce.h
> ++++ b/mce.h
> +@@ -175,7 +175,8 @@ typedef enum {
> + MCE_DISPLAY_OFF = 0, /**< Display is off */
> + MCE_DISPLAY_LOW_POWER = 1, /**< Display is in low power mode */
> + MCE_DISPLAY_DIM = 2, /**< Display is dimmed */
> +- MCE_DISPLAY_ON = 3 /**< Display is on */
> ++ MCE_DISPLAY_ON = 3, /**< Display is on */
> ++ MCE_DISPLAY_TOGGLE = 4 /**< Display is on */
> + } display_state_t;
> +
> + /** Cover state */
> +diff --git a/modules/displaymeego.c b/modules/displaymeego.c
> +index 865225d..f486382 100644
> +--- a/modules/displaymeego.c
> ++++ b/modules/displaymeego.c
> +@@ -642,7 +642,6 @@ static void cancel_blank_timeout(void)
> + static void setup_blank_timeout(void)
> + {
> + cancel_blank_timeout();
> +-
> + log_debug("blanking_inhibited: %d, disp_blank_timeout: %d\n",
> blanking_inhibited, disp_blank_timeout);
> + if (blanking_inhibited == FALSE) {
> + /* Setup new timeout */
> +@@ -1480,6 +1479,16 @@ static void display_state_trigger(gconstpointer
> data)
> + submode_t submode = mce_get_submode_int32();
> +
> + log_debug("display_state: %d\n", display_state);
> ++ if (display_state == MCE_DISPLAY_TOGGLE) {
> ++ if (cached_display_state == MCE_DISPLAY_ON) {
> ++ display_state = MCE_DISPLAY_OFF;
> ++ log_debug("togling display,
> cached_display_state: %d,new_display_state: %d\n", cached_display_state,
> display_state);
> ++ }
> ++ else {
> ++ display_state = MCE_DISPLAY_ON;
> ++ log_debug("togling display,
> cached_display_state: %d,new_display_state: %d\n", cached_display_state,
> display_state);
> ++ }
> ++ }
> + switch (display_state) {
> + case MCE_DISPLAY_OFF:
> + case MCE_DISPLAY_DIM:
> +@@ -1514,7 +1523,6 @@ static void display_state_trigger(gconstpointer
> data)
> + * since the pipe contains the new value
> + */
> + send_display_status(NULL);
> +-
> + /* Update the cached value */
> + cached_display_state = display_state;
> + }
> +--
> +1.7.1
> +
>
> ++++++ deleted files:
> --- mce-1.10.92-display-module-disabled.patch
>
> _______________________________________________
> MeeGo-commits mailing list
> MeeGo-commits at meego.com
> http://lists.meego.com/listinfo/meego-commits
-------------- next part --------------
An embedded message was scrubbed...
From: Tapio Rantala <no_reply at build.meego.com>
Subject: [meego-commits] 16312: Changes to Trunk:Testing/mce
Date: Fri, 15 Apr 2011 19:27:07 +0800
Size: 38876
URL: <http://lists.meego.com/pipermail/meego-packaging/attachments/20110418/184223a1/attachment-0001.mht>
More information about the MeeGo-packaging
mailing list