Apply changed boot mode get API 59/272459/1 accepted/tizen/6.5/unified/20220321.141253 submit/tizen_6.5/20220317.053139
authorJunkyeong, Kim <jk0430.kim@samsung.com>
Thu, 17 Mar 2022 05:41:35 +0000 (14:41 +0900)
committerJunkyeong, Kim <jk0430.kim@samsung.com>
Thu, 17 Mar 2022 05:41:38 +0000 (14:41 +0900)
Change-Id: I20c11c36f48eb03519c9369cac981cab87ebbb05
Signed-off-by: Junkyeong, Kim <jk0430.kim@samsung.com>
src/bin/e_comp_screen.c
src/bin/e_output.c
src/bin/e_plane.c

index 410b8ecc4229ca3099c0e4ec3c05fabed6c1697b..d31a44fe8eacc086d69c0edf12ffa8d4eb390aa2 100644 (file)
@@ -1,7 +1,7 @@
 #include "e.h"
 #include "Eeze.h"
 #include <tizen-extension-server-protocol.h>
-#include <device/booting-internal.h>
+#include <device/board-internal.h>
 #include <tbm_drm_helper.h>
 #include <gbm.h>
 
@@ -697,6 +697,8 @@ _e_comp_screen_init_outputs(E_Comp_Screen *e_comp_screen)
    Eina_Bool scale_updated = EINA_FALSE;
    Eina_Bool connection_check = EINA_FALSE;
    tdm_error err = TDM_ERROR_NONE;
+   char bootmode[32];
+   int ret;
 
    /* init e_output */
    if (!e_output_init())
@@ -781,7 +783,12 @@ _e_comp_screen_init_outputs(E_Comp_Screen *e_comp_screen)
         e_main_ts_end("\tE_Output Mode Apply Done");
 
         e_main_ts_begin("\tE_Output Set DPMS ON");
-        if (device_get_reboot_mode() != SILENT_BOOT)
+        ret = device_board_get_boot_mode(bootmode, sizeof(bootmode));
+        if (!ret && !e_util_strcmp(bootmode, "silent"))
+          {
+             INF("silent reboot. do not set dpms");
+          }
+        else
           {
              if (!e_output_dpms_set(output, E_OUTPUT_DPMS_ON))
                {
@@ -790,8 +797,7 @@ _e_comp_screen_init_outputs(E_Comp_Screen *e_comp_screen)
                   goto fail;
                }
           }
-        else
-          INF("silent reboot. do not set dpms");
+
         e_main_ts_end("\tE_Output Set DPMS ON Done");
 
         e_main_ts_begin("\tE_Output Hwc Setup");
index 39512d8fbf88942a9fe78c72dd8a076ed7b061dc..9e08414a871af2dd6dda590297a9791db9889537 100644 (file)
@@ -1,5 +1,5 @@
 #include "e.h"
-#include <device/booting-internal.h>
+#include <device/board-internal.h>
 
 #define EOERR(f, output, x...)                                   \
    do                                                            \
@@ -734,6 +734,8 @@ static void
 _e_output_primary_update(E_Output *output)
 {
    Eina_Bool ret;
+   char bootmode[32];
+   int retval;
 
    e_output_update(output);
 
@@ -760,7 +762,13 @@ _e_output_primary_update(E_Output *output)
 
         output->fake_config = EINA_FALSE;
 
-        if (device_get_reboot_mode() != SILENT_BOOT)
+        retval = device_board_get_boot_mode(bootmode, sizeof(bootmode));
+        if (!retval && !e_util_strcmp(bootmode, "silent"))
+          {
+             output->dpms = E_OUTPUT_DPMS_OFF;
+             EOINF("silent boot. do not set dpms", output);
+          }
+        else
           {
              ret = e_output_dpms_set(output, E_OUTPUT_DPMS_ON);
              if (ret == EINA_FALSE)
@@ -769,11 +777,6 @@ _e_output_primary_update(E_Output *output)
                   return;
                }
           }
-        else
-          {
-             output->dpms = E_OUTPUT_DPMS_OFF;
-             EOINF("silent boot. do not set dpms", output);
-          }
 
         e_output_size_get(output, &w, &h);
         if (output->e_comp_screen->rotation == 90 || output->e_comp_screen->rotation == 270)
index cb75496af4b7d80378d938226cc758950fbdbe7c..80d17e08d1bb9ad01d5841be2fcb50d35d71b78d 100644 (file)
@@ -1,5 +1,5 @@
 #include "e.h"
-#include <device/booting-internal.h>
+#include <device/board-internal.h>
 
 # include <tdm.h>
 # include <tdm_helper.h>
@@ -568,6 +568,8 @@ _e_plane_surface_from_ecore_evas_acquire(E_Plane *plane)
    tbm_surface_h tsurface = NULL;
    tbm_surface_queue_h tqueue = NULL;
    E_Output *output = plane->output;
+   char bootmode[32];
+   int ret;
 
    renderer = plane->renderer;
    EINA_SAFETY_ON_NULL_RETURN_VAL(renderer, NULL);
@@ -587,13 +589,16 @@ _e_plane_surface_from_ecore_evas_acquire(E_Plane *plane)
           }
 
         /* dpms on at the first */
-        if (device_get_reboot_mode() != SILENT_BOOT)
+        ret = device_board_get_boot_mode(bootmode, sizeof(bootmode));
+        if (!ret && !e_util_strcmp(bootmode, "silent"))
+          {
+             INF("silent boot. do not set dpms.");
+          }
+        else
           {
              if (!e_output_dpms_set(output, E_OUTPUT_DPMS_ON))
                WRN("fail to set the dpms on.");
           }
-        else
-          INF("silent boot. do not set dpms.");
      }
 
    /* aquire */