display: Add plugin-api for loading display config from plugin 24/297724/2
authorYoungjae Cho <y0.cho@samsung.com>
Wed, 23 Aug 2023 08:12:52 +0000 (17:12 +0900)
committerChanwoo Choi <cw00.choi@samsung.com>
Wed, 23 Aug 2023 10:50:01 +0000 (10:50 +0000)
It coexists with the previous way, that is, loading configuration via
display_plugin_device_ops->probe(). This is because it is still being
used by mobile/wearable profile and they currently not be separated
into plugin backend. Only when the result of probe() hasn't loaded
display config, where a plugin backend has completely separated into
dedicated backend repository, the plugin-api underatakes what should
have done by the probe().

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

index 89c34d0571a8686833553c1b1527ec3e5c62a910..39efce27fd1f4c18b86a799bfea4afc2ddb69c05 100644 (file)
@@ -22,6 +22,7 @@
 #include <libsyscommon/resource-manager.h>
 #include <system/syscommon-plugin-deviced-power-interface.h>
 #include <system/syscommon-plugin-deviced-common-interface.h>
+#include <system/syscommon-plugin-deviced-display.h>
 #include <shared/devices.h>
 
 #include "core/udev.h"
@@ -499,6 +500,12 @@ static int display_probe(void *data)
        if (ret < 0)
                return ret;
 
+       if (!g_display_plugin.config) {
+               ret = syscommon_plugin_deviced_display_load_config(&g_display_plugin.config);
+               if (ret < 0)
+                       return ret;
+       }
+
        /**
         * load display hal backend
         * if there is no display shared library,