there is a case of accessing the display handle before the wayland init is completed.
e.g., __splash_screen_create_image()
This patch increases the priority of the __init_wl() call to reduce this problem.
Change-Id: I8b2bdb2e50a218894d6b9e951793e4b5aa4e957a
Signed-off-by: Changgyu Choi <changyu.choi@samsung.com>
return -1;
user_list = g_list_append(user_list, user);
- sid = g_idle_add_full(G_PRIORITY_HIGH, __login_default_user,
- NULL, NULL);
+ sid = g_idle_add_full(AMD_PRIORITY_90,
+ __login_default_user, NULL, NULL);
if (sid == 0) {
_E("g_idle_add_full() is failed");
exit(-1);
#include <tzplatform_config.h>
typedef enum {
- AMD_G_PRIORITY_HIGH = -90,
- AMD_G_PRIORITY_MID = -60
+ AMD_PRIORITY_90 = -90,
+ AMD_PRIORITY_80 = -80,
+ AMD_PRIORITY_70 = -70
} amd_priority_e;
#ifdef __cplusplus
#include <stdbool.h>
typedef enum {
- AMD_API_G_PRIORITY_HIGH = -90,
- AMD_API_G_PRIORITY_MID = -60
+ AMD_API_PRIORITY_80 = -80,
+ AMD_API_PRIORITY_70 = -70
} amd_api_priority_e;
#ifdef __cplusplus
auto& requests = item->GetRequests();
requests.remove_if([this](RequestPtr& req) -> bool {
req->UnsetTimer();
- PushRequest(std::move(req), AMD_G_PRIORITY_MID);
+ PushRequest(std::move(req), AMD_PRIORITY_70);
return true;
});
}
if (req->GetTargetUID() == uid) {
req->UnsetTimer();
- PushRequest(std::move(req), AMD_G_PRIORITY_MID);
+ PushRequest(std::move(req), AMD_PRIORITY_70);
return true;
}
}
if (IsCpuBoostingHighLevel(request->GetPid())) {
- g_idle_add_full(AMD_API_G_PRIORITY_HIGH, ResponseCb, response, nullptr);
+ g_idle_add_full(AMD_API_PRIORITY_80, ResponseCb, response, nullptr);
} else {
- g_idle_add_full(AMD_API_G_PRIORITY_MID, ResponseCb, response, nullptr);
+ g_idle_add_full(AMD_API_PRIORITY_70, ResponseCb, response, nullptr);
}
} while (true);
#define PATH_RUN_WAYLAND "/run/wayland-0"
#define PATH_RUN_WMREADY "/run/.wm_ready"
#define PATH_RUN "/run"
-static gint AMD_G_PRIORITY_MID = -60;
struct file_monitor_s {
bool wl_ready;
g_source_add_poll(__wl_source.gsource, __wl_source.gfd);
g_source_set_callback(__wl_source.gsource, NULL,
__wl_source.display, NULL);
- g_source_set_priority(__wl_source.gsource, AMD_G_PRIORITY_MID);
+ g_source_set_priority(__wl_source.gsource, AMD_API_PRIORITY_70);
g_source_attach(__wl_source.gsource, NULL);
return 0;
}
if (__file_monitor.wm_ready && __file_monitor.wl_ready) {
- g_idle_add(__init_wl, NULL);
+ g_idle_add_full(G_PRIORITY_HIGH, __init_wl, NULL, NULL);
__file_monitor.handle = NULL;
return false;
}
}
if (__file_monitor.wl_ready && __file_monitor.wm_ready) {
- g_idle_add(__init_wl, NULL);
+ g_idle_add_full(G_PRIORITY_HIGH, __init_wl, NULL, NULL);
return 0;
}
{
_D("wayland core init");
- g_idle_add(__idle_cb, NULL);
+ g_idle_add_full(G_PRIORITY_HIGH, __idle_cb, NULL, NULL);
return 0;
}