From: Changyeon Lee Date: Tue, 25 Feb 2025 08:57:59 +0000 (+0900) Subject: tdm_monitor: Remove option for tdm_layer X-Git-Tag: accepted/tizen/unified/20250307.020013~4 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=0cda440d6fc37b89a79771e345959d03a8075d02;p=platform%2Fcore%2Fuifw%2Flibtdm.git tdm_monitor: Remove option for tdm_layer tdm_layer is deprecated Change-Id: Icc9e55a3e588fb7fe66356039afa75b979c72166 --- diff --git a/src/tdm_config.h b/src/tdm_config.h index a32cac73..7b9ef263 100644 --- a/src/tdm_config.h +++ b/src/tdm_config.h @@ -128,7 +128,7 @@ tdm_config_set_string(const char *key, const char *value); */ #define TDM_CONFIG_KEY_DEBUG_MODULE "debug:module" -/* debugging dump list. [none,current,all,layer,pp,capture,window] +/* debugging dump list. [none,current,all,pp,capture,window] * default: none * ex) layer,capture */ diff --git a/src/tdm_display.c b/src/tdm_display.c index 9133bc67..437b98c9 100644 --- a/src/tdm_display.c +++ b/src/tdm_display.c @@ -112,36 +112,23 @@ _tdm_display_enable_dump_current(tdm_private_display *private_display, char *pat LIST_FOR_EACH_ENTRY(b, &private_display->module_list, link) { LIST_FOR_EACH_ENTRY(o, &b->output_list, link) { - if (o->caps.capabilities & TDM_OUTPUT_CAPABILITY_HWC) { - tdm_private_hwc *private_hwc = NULL; - tdm_private_hwc_window *w = NULL; - int index = 0; - private_hwc = o->private_hwc; - if (private_hwc->display_target_buffer) { - char str[TDM_PATH_LEN]; - snprintf(str, TDM_PATH_LEN, "window_%d_target", private_hwc->index); - tdm_helper_dump_buffer_str(private_hwc->display_target_buffer, path, str); - } - LIST_FOR_EACH_ENTRY(w, &private_hwc->hwc_window_list, link) { - char str[TDM_PATH_LEN]; - if (!w->display_buffer) - continue; - if (w->composition_type != TDM_HWC_WIN_COMPOSITION_DEVICE) - continue; - snprintf(str, TDM_PATH_LEN, "window_%d_%d", private_hwc->index, index++); - tdm_helper_dump_buffer_str(w->display_buffer, path, str); - } - } else { - tdm_private_layer *l = NULL; - LIST_FOR_EACH_ENTRY(l, &o->layer_list, link) { - char str[TDM_PATH_LEN]; - if (l->usable || l->caps.capabilities & TDM_LAYER_CAPABILITY_VIDEO) - continue; - if (!l->showing_buffer) - continue; - snprintf(str, TDM_PATH_LEN, "layer_%d_%d", o->index, l->index); - tdm_helper_dump_buffer_str(l->showing_buffer->buffer, path, str); - } + tdm_private_hwc *private_hwc = NULL; + tdm_private_hwc_window *w = NULL; + int index = 0; + private_hwc = o->private_hwc; + if (private_hwc->display_target_buffer) { + char str[TDM_PATH_LEN]; + snprintf(str, TDM_PATH_LEN, "window_%d_target", private_hwc->index); + tdm_helper_dump_buffer_str(private_hwc->display_target_buffer, path, str); + } + LIST_FOR_EACH_ENTRY(w, &private_hwc->hwc_window_list, link) { + char str[TDM_PATH_LEN]; + if (!w->display_buffer) + continue; + if (w->composition_type != TDM_HWC_WIN_COMPOSITION_DEVICE) + continue; + snprintf(str, TDM_PATH_LEN, "window_%d_%d", private_hwc->index, index++); + tdm_helper_dump_buffer_str(w->display_buffer, path, str); } } } @@ -198,8 +185,6 @@ tdm_display_enable_dump(tdm_private_display *private_display, const char *dump_s if (!strncmp(arg, "all", 3)) { tdm_debug_dump = 0xFFFFFFFF; goto done; - } else if (!strncmp(arg, "layer", 5)) { - tdm_debug_dump |= TDM_DUMP_FLAG_LAYER; } else if (!strncmp(arg, "pp", 2)) { tdm_debug_dump |= TDM_DUMP_FLAG_PP; } else if (!strncmp(arg, "capture", 7)) { @@ -332,8 +317,6 @@ tdm_display_enable_ttrace(tdm_private_display *private_display, const char *ttra tdm_ttrace_module |= TDM_TTRACE_SERVER_VBLANK; else if (!strncmp(arg, "vblank", 6)) tdm_ttrace_module |= TDM_TTRACE_VBLANK; - else if (!strncmp(arg, "layer", 5)) - tdm_ttrace_module |= TDM_TTRACE_LAYER; else if (!strncmp(arg, "pp", 2)) tdm_ttrace_module |= TDM_TTRACE_PP; else if (!strncmp(arg, "capture", 7)) diff --git a/src/tdm_helper.c b/src/tdm_helper.c index 0d07631d..7c186142 100644 --- a/src/tdm_helper.c +++ b/src/tdm_helper.c @@ -753,16 +753,13 @@ _tdm_helper_get_backend_information(tdm_private_module *private_module, char *re { tdm_backend_module *module_data; tdm_func_output *func_output; - tdm_func_layer *func_layer; tdm_private_output *private_output = NULL; - tdm_private_layer *private_layer = NULL; tdm_private_pp *private_pp = NULL; tdm_private_capture *private_capture = NULL; tdm_error ret; int i; func_output = &private_module->func_output; - func_layer = &private_module->func_layer; /* module information */ module_data = private_module->module_data; @@ -865,112 +862,6 @@ _tdm_helper_get_backend_information(tdm_private_module *private_module, char *re TDM_SNPRINTF(reply, len, "(no output)\n"); TDM_SNPRINTF(reply, len, "\n"); - /* layer information */ - TDM_SNPRINTF(reply, len, "['%s' backend layer information]\n", module_data ? module_data->name : "hal-tdm"); - TDM_SNPRINTF(reply, len, "-----------------------------------------------------------------------\n"); - TDM_SNPRINTF(reply, len, "idx output zpos buf format size crop geometry transform\n"); - TDM_SNPRINTF(reply, len, "-----------------------------------------------------------------------\n"); - LIST_FOR_EACH_ENTRY(private_output, &private_module->output_list, link) { - if (private_output->caps.capabilities & TDM_OUTPUT_CAPABILITY_HWC) { - TDM_SNPRINTF(reply, len, "(no layer), hwc mode on\n"); - continue; - } - -/* LCOV_EXCL_START */ - LIST_FOR_EACH_ENTRY(private_layer, &private_output->layer_list, link) { - if (!private_layer->usable) { - tdm_info_layer info; - unsigned int format; - tdm_size size; - - TDM_DBG_RETURN_VAL_IF_FAIL(func_layer->layer_get_info, reply); - memset(&info, 0, sizeof info); - ret = func_layer->layer_get_info(private_layer->layer_backend, &info); - TDM_DBG_RETURN_VAL_IF_FAIL(ret == TDM_ERROR_NONE, reply); - - if (!private_layer->showing_buffer) - continue; - - size.h = tbm_surface_get_width(private_layer->showing_buffer->buffer); - size.v = tbm_surface_get_height(private_layer->showing_buffer->buffer); - - if (info.src_config.format) - format = info.src_config.format; - else - format = tbm_surface_get_format(private_layer->showing_buffer->buffer); - - TDM_SNPRINTF(reply, len, "%d %d %d %p %c%c%c%c %ux%u %ux%u+%u+%u %ux%u+%u+%u %s\n", - private_layer->index, - private_output->index, - private_layer->caps.zpos, - private_layer->showing_buffer->buffer, FOURCC_STR(format), size.h, size.v, - info.src_config.pos.w, info.src_config.pos.h, info.src_config.pos.x, info.src_config.pos.y, - info.dst_pos.w, info.dst_pos.h, info.dst_pos.x, info.dst_pos.y, - tdm_transform_str(info.transform)); - } else { - TDM_SNPRINTF(reply, len, "%d %d %d -\n", - private_layer->index, - private_output->index, - private_layer->caps.zpos); - } - - TDM_SNPRINTF(reply, len, "\tcaps\t: "); - tdm_layer_caps_str(private_layer->caps.capabilities, &reply, len); - TDM_SNPRINTF(reply, len, "\n"); - - TDM_SNPRINTF(reply, len, "\tformats\t: "); - if (private_layer->caps.format_count > 0) { - const char *sep = ""; - for (i = 0; i < private_layer->caps.format_count; i++) { - if (private_layer->caps.formats[i] == 0) - continue; - TDM_SNPRINTF(reply, len, "%s%c%c%c%c", sep, FOURCC_STR(private_layer->caps.formats[i])); - sep = ","; - } - TDM_SNPRINTF(reply, len, "\n"); - } - - TDM_SNPRINTF(reply, len, "\t%u properties:\n", private_layer->caps.prop_count); - if (private_layer->caps.prop_count > 0) { - TDM_SNPRINTF(reply, len, "\t\tname\ttype\tidx\tvalue\n"); - for (i = 0; i < private_layer->caps.prop_count; i++) { - tdm_value value; - TDM_DBG_RETURN_VAL_IF_FAIL(func_layer->layer_get_property, reply); - ret = func_layer->layer_get_property(private_layer->layer_backend, - private_layer->caps.props[i].id, - &value); - TDM_DBG_RETURN_VAL_IF_FAIL(ret == TDM_ERROR_NONE, reply); - TDM_SNPRINTF(reply, len, "\t\t%s\t%s\t%u\t", - private_layer->caps.props[i].name, - tdm_value_type_str(private_output->caps.props[i].type), - private_layer->caps.props[i].id); - switch (private_layer->caps.props[i].type) { - case TDM_VALUE_TYPE_PTR: - TDM_SNPRINTF(reply, len, "%p\n", value.ptr); - break; - case TDM_VALUE_TYPE_INT32: - TDM_SNPRINTF(reply, len, "%d\n", value.s32); - break; - case TDM_VALUE_TYPE_INT64: - TDM_SNPRINTF(reply, len, "%"PRId64"\n", value.s64); - break; - case TDM_VALUE_TYPE_UINT64: - TDM_SNPRINTF(reply, len, "%"PRIu64"\n", value.u64); - break; - case TDM_VALUE_TYPE_UINT32: - default: - TDM_SNPRINTF(reply, len, "%u\n", value.u32); - break; - } - } - } -/* LCOV_EXCL_STOP */ - } - } - if (LIST_IS_EMPTY(&private_module->output_list)) - TDM_SNPRINTF(reply, len, "(no layer)\n"); - TDM_SNPRINTF(reply, len, "\n"); - if (private_module->capabilities & TDM_DISPLAY_CAPABILITY_PP) { const char *sep = ""; TDM_SNPRINTF(reply, len, "['%s' backend PP information]\n", module_data ? module_data->name : "hal-tdm"); diff --git a/src/tdm_monitor_server.c b/src/tdm_monitor_server.c index cbba77f6..3f005de0 100644 --- a/src/tdm_monitor_server.c +++ b/src/tdm_monitor_server.c @@ -308,8 +308,7 @@ static void _tdm_monitor_server_prop(unsigned int pid, char *cwd, int argc, char *argv[], char *reply, int *len, tdm_display *dpy) { tdm_output *output; - tdm_output *layer = NULL; - int output_idx, layer_idx = -1; + int output_idx; int cnt, i, done = 0; tdm_value value; char temp[TDM_PATH_LEN]; @@ -328,11 +327,6 @@ _tdm_monitor_server_prop(unsigned int pid, char *cwd, int argc, char *argv[], ch arg = temp; output_idx = strtol(arg, &end, 10); - if (*end == ',') { - arg = end + 1; - layer_idx = strtol(arg, &end, 10); - } - if (*end != ':') { TDM_SNPRINTF(reply, len, "failed: no prop_name\n"); return; @@ -360,34 +354,15 @@ _tdm_monitor_server_prop(unsigned int pid, char *cwd, int argc, char *argv[], ch output = tdm_display_get_output(dpy, output_idx, &ret); TDM_DBG_RETURN_IF_FAIL(ret == TDM_ERROR_NONE && output != NULL); - if (layer_idx != -1) { - layer = tdm_output_get_layer(output, layer_idx, &ret); - TDM_DBG_RETURN_IF_FAIL(ret == TDM_ERROR_NONE && layer != NULL); - } - - if (layer) { - ret = tdm_layer_get_available_properties(layer, &props, &cnt); - TDM_DBG_RETURN_IF_FAIL(ret == TDM_ERROR_NONE); - - for (i = 0; i < cnt; i++) { - if (!strncmp(props[i].name, prop_name, TDM_NAME_LEN)) { - ret = tdm_layer_set_property(layer, props[i].id, value); - TDM_DBG_RETURN_IF_FAIL(ret == TDM_ERROR_NONE); - done = 1; - break; - } - } - } else { - ret = tdm_output_get_available_properties(output, &props, &cnt); - TDM_DBG_RETURN_IF_FAIL(ret == TDM_ERROR_NONE); + ret = tdm_output_get_available_properties(output, &props, &cnt); + TDM_DBG_RETURN_IF_FAIL(ret == TDM_ERROR_NONE); - for (i = 0; i < cnt; i++) { - if (!strncmp(props[i].name, prop_name, TDM_NAME_LEN)) { - ret = tdm_output_set_property(output, props[i].id, value); - TDM_DBG_RETURN_IF_FAIL(ret == TDM_ERROR_NONE); - done = 1; - break; - } + for (i = 0; i < cnt; i++) { + if (!strncmp(props[i].name, prop_name, TDM_NAME_LEN)) { + ret = tdm_output_set_property(output, props[i].id, value); + TDM_DBG_RETURN_IF_FAIL(ret == TDM_ERROR_NONE); + done = 1; + break; } } @@ -408,63 +383,6 @@ _tdm_monitor_server_dump(unsigned int pid, char *cwd, int argc, char *argv[], ch tdm_display_enable_dump(dpy, (const char*)argv[2], reply, len); } -static void -_tdm_monitor_server_punch(unsigned int pid, char *cwd, int argc, char *argv[], char *reply, int *len, tdm_display *dpy) -{ - char *arg, *end; - unsigned int output_id, layer_id; - tdm_output *output; - tdm_layer *layer; - tbm_surface_h buffer; - - arg = argv[2]; - - output_id = strtol(arg, &end, 10); - output = tdm_display_get_output(dpy, output_id, NULL); - if (!output) { - TDM_SNPRINTF(reply, len, "not found output\n"); - return; - } - if (*end != ',') { - TDM_SNPRINTF(reply, len, "not found ','\n"); - return; - } - - arg = end + 1; - layer_id = strtol(arg, &end, 10); - layer = tdm_output_get_layer(output, layer_id, NULL); - if (!layer) { - TDM_SNPRINTF(reply, len, "not found layer\n"); - return; - } - - buffer = tdm_layer_get_displaying_buffer(layer, NULL); - if (!buffer) { - TDM_SNPRINTF(reply, len, "not found buffer\n"); - return; - } - - if (*end == ':') { - tdm_pos pos = {0,}; - - arg = end + 1; - pos.w = strtol(arg, &end, 10); - TDM_EXIT_IF_FAIL(*end == 'x'); - arg = end + 1; - pos.h = strtol(arg, &end, 10); - if (*end == '+') { - arg = end + 1; - pos.x = strtol(arg, &end, 10); - TDM_EXIT_IF_FAIL(*end == '+'); - arg = end + 1; - pos.y = strtol(arg, &end, 10); - } - - tdm_helper_clear_buffer_pos(buffer, &pos); - } else - tdm_helper_clear_buffer(buffer); -} - static struct { const char *opt; void (*func)(unsigned int pid, char *cwd, int argc, char *argv[], char *reply, int *len, tdm_display *dpy); @@ -474,7 +392,7 @@ static struct { } option_proc[] = { { "info", _tdm_monitor_server_query, - "show tdm output, layer information", NULL, NULL + "show tdm output information", NULL, NULL }, { "trace", _tdm_monitor_server_protocol_trace, @@ -490,7 +408,7 @@ static struct { }, { "ttrace", _tdm_monitor_server_ttrace, - "enable/disable ttrace (module: none,vsync,client_vblank,server_vblank,vblank,layer,pp,capture,hwc,all", + "enable/disable ttrace (module: none,vsync,client_vblank,server_vblank,vblank,pp,capture,hwc,all", "[@]", NULL }, @@ -532,25 +450,19 @@ static struct { }, { "prop", _tdm_monitor_server_prop, - "set the property of a output or a layer", + "set the property of a output", "[,]:,", NULL }, { "dump", _tdm_monitor_server_dump, - "dump buffers (type: none, window, layer, pp, capture, current)\n" - "\t\t window, layer, pp, capture - start to dump buffers of window, layer, pp, capture\n" - "\t\t none - stop to dump buffers\n" - "\t\t current - dump the current buffer of all layers", + "dump buffers (type: none, window, pp, capture, current)\n" + "\t\t window, , pp, capture - start to dump buffers of window, pp, capture\n" + "\t\t none - stop to dump buffers\n" + "\t\t current - dump the current buffer of window", "[,[,...]][@]", NULL }, - { - "punch", _tdm_monitor_server_punch, - "punch a layer", - ",[:x[++]]", - NULL - }, }; static void