hdmi: remove display control 30/273030/2
authorYoungjae Cho <y0.cho@samsung.com>
Wed, 30 Mar 2022 01:28:05 +0000 (18:28 -0700)
committerHyotaek Shim <hyotaek.shim@samsung.com>
Mon, 4 Apr 2022 05:18:48 +0000 (05:18 +0000)
Controlling display from hdmi will be more discussed as multi-display
concept would be introduced. Therefore, remove old fashioned display
control policy.

Change-Id: Iecd28b73491d6fcb565183196d2c9291720db23a
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
src/extcon/hdmi.c

index 943f767..56ffea6 100644 (file)
@@ -34,7 +34,6 @@
 #define HDMI_NUMBER_MAX        (64)                                    // max number of supported hdmi
 
 static struct dd_bitmap *bm_hdmi;
-static struct display_plugin *disp_plgn;
 static struct extcon_ops hdmi_extcon_ops;
 
 static void hdmi_send_broadcast(int status)
@@ -110,8 +109,6 @@ static int hdmi_update(const char *index, int status)
        }
 
        _I("Hdmi changed");
-       if (disp_plgn->pm_change_internal)
-               disp_plgn->pm_change_internal(INTERNAL_LOCK_HDMI, LCD_NORMAL);
 
        if (!index)
                update_all_hdmi_bitmap(status);
@@ -132,35 +129,6 @@ static int hdmi_update(const char *index, int status)
        hdmi_extcon_ops.status = hdmi_status;
        hdmi_send_broadcast(hdmi_status);
 
-       if (hdmi_status == HDMI_CONNECTED) {
-               if (disp_plgn->pm_lock_internal)
-                       disp_plgn->pm_lock_internal(INTERNAL_LOCK_HDMI, LCD_DIM, STAY_CUR_STATE, 0);
-       } else {
-               if (disp_plgn->pm_unlock_internal)
-                       disp_plgn->pm_unlock_internal(INTERNAL_LOCK_HDMI, LCD_DIM, PM_SLEEP_MARGIN);
-       }
-
-       return 0;
-}
-
-static int display_changed(void *data)
-{
-       enum state_t state;
-       int hdmi;
-
-       if (!data)
-               return 0;
-
-       state = *(int *)data;
-       if (state != S_NORMAL)
-               return 0;
-
-       hdmi = hdmi_extcon_ops.status;
-       if (hdmi == 0) {
-               if (disp_plgn->pm_lock_internal)
-                       disp_plgn->pm_lock_internal(INTERNAL_LOCK_HDMI, LCD_DIM, STAY_CUR_STATE, 0);
-               _I("Hdmi is connected. Dim lock is on.");
-       }
        return 0;
 }
 
@@ -187,8 +155,6 @@ static void hdmi_init(void *data)
 {
        int ret;
 
-       register_notifier(DEVICE_NOTIFIER_LCD, display_changed);
-
        ret = gdbus_add_object(NULL, DEVICED_PATH_SYSNOTI, &dbus_interface);
        if (ret < 0)
                _E("Failed to init dbus method: %d", ret);
@@ -198,8 +164,6 @@ static void hdmi_init(void *data)
 
 static void hdmi_exit(void *data)
 {
-       unregister_notifier(DEVICE_NOTIFIER_LCD, display_changed);
-
        deinit_bitmap(bm_hdmi);
 }
 
@@ -211,10 +175,3 @@ static struct extcon_ops hdmi_extcon_ops = {
 };
 
 EXTCON_OPS_REGISTER(hdmi_extcon_ops)
-
-static void __CONSTRUCTOR__ initialize(void)
-{
-       disp_plgn = get_var_display_plugin();
-       if (!disp_plgn)
-               _E("Failed to get display plugin variable.");
-}