display: Add image effect and panel mode functions 82/36782/4
authorJiyoung Yun <jy910.yun@samsung.com>
Fri, 13 Mar 2015 10:46:09 +0000 (19:46 +0900)
committerJiyoung Yun <jy910.yun@samsung.com>
Mon, 16 Mar 2015 06:30:00 +0000 (15:30 +0900)
Image effect and panel mode can be mixed.
So I provides each api and enums.
It depends on the display hardware,
if some mode can't support in your hardware,
you can return -ENOTSUP error.

Change-Id: Ib59c5f6c79ff1edd05fc09261c303555043d862c
Signed-off-by: Jiyoung Yun <jy910.yun@samsung.com>
hw/display.h

index a2938cc..a913d39 100644 (file)
@@ -30,7 +30,7 @@
 /**
  * The version of this device
  */
-#define DISPLAY_HARDWARE_DEVICE_VERSION        MAKE_VERSION(0,1)
+#define DISPLAY_HARDWARE_DEVICE_VERSION        MAKE_VERSION(0,2)
 
 enum display_state {
        DISPLAY_ON,       /* In use */
@@ -39,6 +39,26 @@ enum display_state {
        DISPLAY_OFF,      /* Shut off, awaiting activity */
 };
 
+enum display_image_effect {
+       DISPLAY_IMAGE_EFFECT_STANDARD,     /* No effect */
+       DISPLAY_IMAGE_EFFECT_NEGATIVE,     /* Total inversion */
+       DISPLAY_IMAGE_EFFECT_GRAYSCALE,    /* Shades of gray and no color */
+       DISPLAY_IMAGE_EFFECT_PICTURE,      /* Picture effect */
+       DISPLAY_IMAGE_EFFECT_VIDEO,        /* Video effect */
+       DISPLAY_IMAGE_EFFECT_MOVIE,        /* Movie effect */
+       DISPLAY_IMAGE_EFFECT_BROWSER,      /* Browser effect */
+       DISPLAY_IMAGE_EFFECT_WARM,         /* Warm effect */
+       DISPLAY_IMAGE_EFFECT_COLD,         /* Cold effect */
+       DISPLAY_IMAGE_EFFECT_NATURAL,      /* Natural effect */
+};
+
+enum display_panel_mode {
+       DISPLAY_PANEL_MODE_STANDARD,      /* Standard mode */
+       DISPLAY_PANEL_MODE_OUTDOOR,       /* Outdoor mode */
+       DISPLAY_PANEL_MODE_CONTENTS,      /* Contents adaptive brightness control mode */
+       DISPLAY_PANEL_MODE_LOWPOWER,      /* Low power mode */
+};
+
 struct display_device {
        struct hw_common common;
 
@@ -49,6 +69,14 @@ struct display_device {
        /* Control display state */
        int (*get_state)(enum display_state *state);
        int (*set_state)(enum display_state state);
+
+       /* Control image effect */
+       int (*get_image_effect)(enum display_image_effect *effect);
+       int (*set_image_effect)(enum display_image_effect effect);
+
+       /* Control panel mode mode */
+       int (*get_panel_mode)(enum display_panel_mode *mode);
+       int (*set_panel_mode)(enum display_panel_mode mode);
 };
 
 #endif