fix the problem which is not shared information when it changed static 47/248747/2
authordyamy-lee <dyamy.lee@samsung.com>
Wed, 2 Dec 2020 04:49:43 +0000 (13:49 +0900)
committerdyamy-lee <dyamy.lee@samsung.com>
Wed, 2 Dec 2020 05:36:39 +0000 (14:36 +0900)
Change-Id: I4c743ab7e936602660af135aac898d003b605dee

rw-update-ani-wearable/rw-update-ani_new.c
rw-update-ani-wearable/rw-update_new_fb.h
rw-update-ani-wearable/rw-update_new_fb_cairo.c
rw-update-ani-wearable/rw-update_new_tdm_display.c

index 94e6e4dc3dabbf087d195c7dcdd9734f284c2c95..b955742085b449759e4d7d2bb8d33c97e53078d4 100644 (file)
@@ -51,7 +51,7 @@
 #define CHG_ENV_BATT_STATUS "/sys/class/power_supply/battery/status"
 
 static FbInfo fbi;
-static common_disp s_disp;
+static common_disp *s_disp;
 
 static pthread_t keyevent_thread;
 
@@ -327,8 +327,9 @@ static int wait_ani_main_solis(void)
                _DEBUG_EXCEPTION("read_degree failed, ret = [%d]", ret);
 #endif
        /* open display interface */
-       if (fb_open(&fbi) < 0) {
-               _DEBUG_EXCEPTION("fb_open failed");
+       s_disp = fb_open(&fbi);
+       if(!s_disp){
+               _DEBUG_EXCEPTION("fb_open failed!");
                goto main_err_exit;
        }
 
@@ -339,7 +340,7 @@ static int wait_ani_main_solis(void)
 
        _DEBUG_LOG("charging-animation main function called.");
 
-       chg_common_lcd_on(&s_disp);
+       chg_common_lcd_on(s_disp);
 
        ret = pthread_create(&keyevent_thread, NULL, event_monitor_process, (void*)&event_cnt);
        if (ret < 0) {
index 0b69381740551db6e3f5d6f0e92a8ca026461019..b541eaa050c8d828aef819ab42055286e9d9a2e5 100644 (file)
@@ -18,6 +18,8 @@
 #ifndef __CHG_FB_H__
 #define __CHG_FB_H__
 
+#include "rw-update_new_common_display.h"
+
 typedef enum _CHG_SLEEP_TYPE {
        CHG_SLEEP_TYPE_NORMAL,
        CHG_SLEEP_TYPE_EFFECT,
@@ -35,7 +37,7 @@ typedef struct _FbInfo {
        int full_flag;
 } FbInfo;
 
-extern int fb_open(FbInfo *fbi);
+extern common_disp* fb_open(FbInfo *fbi);
 extern void fb_close(FbInfo *fbi);
 extern int fb_display(FbInfo *fbi);
 extern void fb_clear_screen(FbInfo *fbi, unsigned int color);
index c4a5ec6b536a682824a962d93f4e5a35d3286902..ed24012e722fe0b0cf9965d0b715a34ad2d03b71 100644 (file)
 #ifdef CAIRO_LIB
 #include "rw-update_new_cairo.h"
 #endif
-#include "rw-update_new_common_display.h"
 
 static common_disp s_disp;
 
 /*-----------------------------------------------------------------------------
   fb_open()
  ----------------------------------------------------------------------------*/
-int fb_open(FbInfo *fbi)
+common_disp* fb_open(FbInfo *fbi)
 {
        _FUNC_ENTER;
 
@@ -43,7 +42,7 @@ int fb_open(FbInfo *fbi)
        if (chg_common_display_init(&s_disp)) {
                _DEBUG_EXCEPTION("chg_common_display_init fail!!");
                _FUNC_EXIT;
-               return -1;
+               return NULL;
        }
 
        fbi->buf[FRONT_BUFFER] = s_disp.buffer[FRONT_BUFFER];
@@ -54,7 +53,7 @@ int fb_open(FbInfo *fbi)
        fbi->sz = s_disp.buffer_size;
 
        _FUNC_EXIT;
-       return 0;
+       return &s_disp;
 }
 
 /*-----------------------------------------------------------------------------
index 183ba12623abe9947a942fd0517b9ac110bfb0d7..53cca0259c04e2746df254fcf297c7fd6fe0371d 100644 (file)
@@ -443,6 +443,7 @@ void chg_common_lcd_on(common_disp *st_disp)
        /* SET DPMS ON */
        _DEBUG_LOG("DPMS ON!\n");
        tdm_output_set_dpms(st_disp->output, TDM_OUTPUT_DPMS_ON);
+       _DEBUG_LOG("mode:wh[%d %d] \n", st_disp->width, st_disp->height);
 
        _FUNC_EXIT;
        return;