/* output mode */
Eina_List *mode_list;
int gl;
+
+ /* pending_commit */
+ Eina_List *pending_commit_list;
} E_Info_Client;
typedef struct _E_Win_Info
const char *name;
} E_Info_Output_Mode;
+typedef struct _E_Pending_Commit_Info
+{
+ unsigned int plane;
+ int zpos;
+ unsigned int data;
+ unsigned int tsurface;
+} E_Pending_Commit_Info;
+
#define VALUE_TYPE_FOR_TOPVWINS "uuisiiiiibbiibbbiis"
#define VALUE_TYPE_REQUEST_RESLIST "ui"
#define VALUE_TYPE_REPLY_RESLIST "ssi"
#define VALUE_TYPE_FOR_INPUTDEV "ssi"
+#define VALUE_TYPE_FOR_PENDING_COMMIT "uiuu"
static E_Info_Client e_info_client;
printf("Error Check Args: enlightenment_info -hwc [1: on, 0: off]\n");
}
+
+static void
+_e_info_client_proc_show_plane_state(int argc, char **argv)
+{
+ if (!_e_info_client_eldbus_message("show_plane_state", NULL))
+ return;
+
+ printf("e20 print planes state with eina_log\n");
+}
+
+static E_Pending_Commit_Info *
+_e_pending_commit_info_new(unsigned int plane, int zpos, unsigned int data, unsigned int tsurface)
+{
+ E_Pending_Commit_Info *pending_commit = NULL;
+
+ pending_commit = E_NEW(E_Pending_Commit_Info, 1);
+ EINA_SAFETY_ON_NULL_RETURN_VAL(pending_commit, NULL);
+
+ pending_commit->plane = plane;
+ pending_commit->zpos = zpos;
+ pending_commit->data = data;
+ pending_commit->tsurface = tsurface;
+
+ return pending_commit;
+}
+
+static void
+_e_pending_commit_info_free(E_Pending_Commit_Info *pending_commit)
+{
+ E_FREE(pending_commit);
+}
+
+static void
+_cb_pending_commit_info_get(const Eldbus_Message *msg)
+{
+ const char *name = NULL, *text = NULL;
+ Eldbus_Message_Iter *array, *eldbus_msg;
+ Eina_Bool res;
+
+ res = eldbus_message_error_get(msg, &name, &text);
+ EINA_SAFETY_ON_TRUE_GOTO(res, finish);
+
+ res = eldbus_message_arguments_get(msg, "a("VALUE_TYPE_FOR_PENDING_COMMIT")", &array);
+ EINA_SAFETY_ON_FALSE_GOTO(res, finish);
+
+ while (eldbus_message_iter_get_and_next(array, 'r', &eldbus_msg))
+ {
+ E_Pending_Commit_Info *pending_commit = NULL;
+ unsigned int plane, tsurface, data;
+ int zpos;
+ res = eldbus_message_iter_arguments_get(eldbus_msg,
+ VALUE_TYPE_FOR_PENDING_COMMIT,
+ &plane,
+ &zpos,
+ &data,
+ &tsurface);
+ if (!res)
+ {
+ printf("Failed to get pending_commit info\n");
+ continue;
+ }
+
+ pending_commit = _e_pending_commit_info_new(plane, zpos, data, tsurface);
+ if (!pending_commit) continue;
+
+ e_info_client.pending_commit_list = eina_list_append(e_info_client.pending_commit_list, pending_commit);
+ }
+
+finish:
+ if ((name) || (text))
+ {
+ printf("errname:%s errmsg:%s\n", name, text);
+ }
+}
+
+static void
+_e_info_client_proc_show_pending_commit(int argc, char **argv)
+{
+ Eina_List *l;
+ int i = 0;
+ E_Pending_Commit_Info *pending_commit;
+
+ if (!_e_info_client_eldbus_message("show_pending_commit", _cb_pending_commit_info_get))
+ return;
+
+ printf("----------------------------[ pending commit ]-----------------------------------\n");
+ printf(" No Plane Zpos Data tsurface\n");
+ printf("---------------------------------------------------------------------------------\n");
+
+ if (!e_info_client.pending_commit_list)
+ {
+ printf("no peding commit\n");
+ return;
+ }
+
+ EINA_LIST_FOREACH(e_info_client.pending_commit_list, l, pending_commit)
+ {
+ i++;
+ printf("%3d %12p %5d %12p %12p\n",
+ i,
+ (void *)pending_commit->plane,
+ pending_commit->zpos,
+ (void *)pending_commit->data,
+ (void *)pending_commit->tsurface);
+ }
+
+ E_FREE_LIST(e_info_client.pending_commit_list, _e_pending_commit_info_free);
+}
#endif
static void
"On/Off the hw composite",
_e_info_client_proc_hwc
},
+ {
+ "show_plane_state",
+ NULL,
+ "show state of plane",
+ _e_info_client_proc_show_plane_state
+ },
+ {
+ "show_pending_commit",
+ NULL,
+ "show state of pending commit",
+ _e_info_client_proc_show_pending_commit
+ },
#endif
{
"keymap", NULL,
#define VALUE_TYPE_REQUEST_RESLIST "ui"
#define VALUE_TYPE_REPLY_RESLIST "ssi"
#define VALUE_TYPE_FOR_INPUTDEV "ssi"
+#define VALUE_TYPE_FOR_PENDING_COMMIT "uiuu"
static E_Info_Transform *_e_info_transform_new(E_Client *ec, int id, int enable, int x, int y, int sx, int sy, int degree, int background);
static E_Info_Transform *_e_info_transform_find(E_Client *ec, int id);
return reply;
}
+static Eldbus_Message *
+e_info_server_cb_show_plane_state(const Eldbus_Service_Interface *iface EINA_UNUSED, const Eldbus_Message *msg)
+{
+ Eina_List *output_l, *plane_l;
+ E_Comp_Screen *e_comp_screen = NULL;
+ E_Output *output = NULL;
+ E_Plane *plane = NULL;
+ Eldbus_Message *reply = eldbus_message_method_return_new(msg);
+
+ e_comp_screen = e_comp->e_comp_screen;
+
+ EINA_LIST_FOREACH(e_comp_screen->outputs, output_l, output)
+ {
+ if (!output) continue;
+
+ EINA_LIST_FOREACH(output->planes, plane_l, plane)
+ {
+ if (!plane) continue;
+
+ e_plane_show_state(plane);
+ }
+ }
+
+ return reply;
+}
+
+static void
+_msg_show_pending_commit_append(Eldbus_Message_Iter *iter)
+{
+ Eina_List *output_l, *plane_l, *data_l;
+ Eldbus_Message_Iter *array_of_pending_commit;
+ E_Comp_Screen *e_comp_screen = NULL;
+ E_Output *output = NULL;
+ E_Plane *plane = NULL;
+ E_Plane_Commit_Data *data = NULL;
+
+ eldbus_message_iter_arguments_append(iter, "a("VALUE_TYPE_FOR_PENDING_COMMIT")", &array_of_pending_commit);
+
+ e_comp_screen = e_comp->e_comp_screen;
+
+ EINA_LIST_FOREACH(e_comp_screen->outputs, output_l, output)
+ {
+ if (!output) continue;
+
+ EINA_LIST_FOREACH(output->planes, plane_l, plane)
+ {
+ if (!plane) continue;
+
+ EINA_LIST_FOREACH(plane->pending_commit_data_list, data_l, data)
+ {
+ Eldbus_Message_Iter* struct_of_pending_commit;
+
+ if (!data) continue;
+
+ eldbus_message_iter_arguments_append(array_of_pending_commit, "("VALUE_TYPE_FOR_PENDING_COMMIT")", &struct_of_pending_commit);
+
+ eldbus_message_iter_arguments_append
+ (struct_of_pending_commit, VALUE_TYPE_FOR_PENDING_COMMIT,
+ (unsigned int)plane,
+ plane->zpos,
+ (unsigned int)data,
+ (unsigned int)data->tsurface);
+
+ eldbus_message_iter_container_close(array_of_pending_commit, struct_of_pending_commit);
+ }
+ }
+ }
+
+ eldbus_message_iter_container_close(iter, array_of_pending_commit);
+}
+
+static Eldbus_Message *
+e_info_server_cb_show_pending_commit(const Eldbus_Service_Interface *iface EINA_UNUSED, const Eldbus_Message *msg)
+{
+ Eldbus_Message *reply = eldbus_message_method_return_new(msg);
+
+ _msg_show_pending_commit_append(eldbus_message_iter_get(reply));
+
+ return reply;
+}
#endif
static Eldbus_Message *
#ifdef ENABLE_HWC_MULTI
{ "hwc_trace_message", ELDBUS_ARGS({"i", "hwc_trace_message"}), NULL, e_info_server_cb_hwc_trace_message, 0},
{ "hwc", ELDBUS_ARGS({"i", "hwc"}), NULL, e_info_server_cb_hwc, 0},
+ { "show_plane_state", NULL, NULL, e_info_server_cb_show_plane_state, 0},
+ { "show_pending_commit", NULL, ELDBUS_ARGS({"a("VALUE_TYPE_FOR_PENDING_COMMIT")", "array of pending commit"}), e_info_server_cb_show_pending_commit, 0},
#endif
{ "get_keymap", NULL, ELDBUS_ARGS({"hi", "keymap fd"}), _e_info_server_cb_keymap_info_get, 0},
{ "effect_control", ELDBUS_ARGS({"i", "effect_control"}), NULL, e_info_server_cb_effect_control, 0},
ELOGF("E_PLANE", "Commit Plane(%p) tsurface(%p) tqueue(%p) data(%p)",
NULL, NULL, plane, data->tsurface, plane->renderer ? plane->renderer->tqueue : NULL, data);
+ plane->pending_commit_data_list = eina_list_append(plane->pending_commit_data_list, data);
+
error = tdm_layer_commit(plane->tlayer, _e_plane_commit_hanler, data);
if (error != TDM_ERROR_NONE)
{
plane->displaying_buffer_tsurface = NULL;
}
+ plane->pending_commit_data_list = eina_list_remove(plane->pending_commit_data_list, data);
free(data);
return;
}
}
tbm_surface_internal_unref(tsurface);
+ plane->pending_commit_data_list = eina_list_remove(plane->pending_commit_data_list, data);
free(data);
}
return EINA_FALSE;
}
+
+EINTERN void
+e_plane_show_state(E_Plane *plane)
+{
+ EINA_SAFETY_ON_NULL_RETURN(plane);
+
+ ELOGF("E_PLANE", "Plane(%p) zpos(%d) ec(%p) display tsurface(%p)",
+ NULL, NULL, plane, plane->zpos, plane->ec, plane->displaying_buffer_tsurface);
+
+ if (plane->renderer)
+ e_plane_renderer_show_state(plane->renderer);
+}
\ No newline at end of file
unsigned int buffer_flags;
Eina_Bool pending_commit;
+ Eina_List *pending_commit_data_list;
Eina_Bool need_to_unset_commit;
/* true if plane's ec is set or unset.
EINTERN void e_plane_hwc_trace_debug(Eina_Bool onoff);
EINTERN Eina_Bool e_plane_render(E_Plane *plane);
EINTERN Eina_Bool e_plane_commit(E_Plane *plane);
+EINTERN void e_plane_show_state(E_Plane *plane);
E_API Eina_Bool e_plane_type_set(E_Plane *plane, E_Plane_Type type);
E_API E_Plane_Type e_plane_type_get(E_Plane *plane);
renderer_trace_debug = onoff;
INF("Renderer: hwc trace_debug is %s", onoff?"ON":"OFF");
}
+
+EINTERN void
+e_plane_renderer_show_state(E_Plane_Renderer *renderer)
+{
+ tbm_surface_h tmp_tsurface = NULL;
+ Eina_List *l = NULL;
+ E_Plane_Renderer_Client *renderer_client = NULL;
+
+ EINA_SAFETY_ON_NULL_RETURN(renderer);
+
+ ELOGF("E_PLANE_RENDERER", "Renderer(%p) Plane(%p) ec(%p) state(%d) mode_chage_age(%d)",
+ NULL, NULL, renderer, renderer->plane, renderer->ec, renderer->state, renderer->mode_change_age);
+
+ EINA_LIST_FOREACH(renderer->disp_surfaces, l, tmp_tsurface)
+ {
+ if (!tmp_tsurface) continue;
+
+ ELOGF("E_PLANE_RENDERER", "Dispay Surfaces tsurface(%p)", NULL, NULL, tmp_tsurface);
+ }
+
+ ELOGF("E_PLANE_RENDERER", "Displaying tsurface(%p)", NULL, NULL, renderer->displaying_tsurface);
+ ELOGF("E_PLANE_RENDERER", "Previous tsurface(%p)", NULL, NULL, renderer->previous_tsurface);
+
+ EINA_LIST_FOREACH(renderer->exported_surfaces, l, tmp_tsurface)
+ {
+ if (!tmp_tsurface) continue;
+
+ ELOGF("E_PLANE_RENDERER", "Exported tsurface(%p)", NULL, NULL, tmp_tsurface);
+ }
+
+ EINA_LIST_FOREACH(renderer->released_surfaces, l, tmp_tsurface)
+ {
+ if (!tmp_tsurface) continue;
+
+ ELOGF("E_PLANE_RENDERER", "Released tsurface(%p)", NULL, NULL, tmp_tsurface);
+ }
+
+ if (renderer->ec)
+ {
+ renderer_client = e_plane_renderer_client_get(renderer->ec);
+ EINA_SAFETY_ON_NULL_RETURN(renderer_client);
+
+ EINA_LIST_FOREACH(renderer_client->exported_surfaces, l, tmp_tsurface)
+ {
+ if (!tmp_tsurface) continue;
+
+ ELOGF("E_PLANE_RENDERER", "Client ec(%p) exported tsurface(%p)", NULL, NULL, renderer->ec, tmp_tsurface);
+ }
+ }
+}
EINTERN Eina_Bool e_plane_renderer_ec_valid_check(E_Plane_Renderer *renderer, E_Client *ec);
EINTERN void e_plane_renderer_hwc_trace_debug(Eina_Bool onoff);
+EINTERN void e_plane_renderer_show_state(E_Plane_Renderer *renderer);
#endif
#endif