TBM_FORMAT_YUV420
};
+const char *
+_comp_to_str(tdm_hwc_window_composition composition_type)
+{
+ if (composition_type == TDM_HWC_WIN_COMPOSITION_CLIENT)
+ return "CLIENT";
+ else if (composition_type == TDM_HWC_WIN_COMPOSITION_DEVICE)
+ return "DEVICE";
+ else if (composition_type == TDM_HWC_WIN_COMPOSITION_CURSOR)
+ return "CURSOR";
+ else if (composition_type == TDM_HWC_WIN_COMPOSITION_VIDEO)
+ return "VIDEO";
+ else if (composition_type == TDM_HWC_WIN_COMPOSITION_NONE)
+ return "SKIP";
+
+ return "unknown";
+}
+
+static void
+_print_validate_result(tdm_sprd_hwc_data *hwc_data, tdm_hwc_window **composited_wnds, uint32_t num_wnds)
+{
+ tdm_sprd_hwc_window_data *hwc_window_data = NULL;
+ int i;
+
+ for (i = 0; i < num_wnds; i++) {
+ hwc_window_data = composited_wnds[i];
+ switch (hwc_window_data->validated_type) {
+ case TDM_HWC_WIN_COMPOSITION_CLIENT:
+ TDM_DBG(" window(%p) %s -> %s : lzpos(%d) on TARGET WINDOW", hwc_window_data,
+ _comp_to_str(hwc_window_data->client_type),
+ _comp_to_str(hwc_window_data->validated_type),
+ hwc_data->target_hwc_window->zpos);
+ break;
+ case TDM_HWC_WIN_COMPOSITION_DEVICE:
+ case TDM_HWC_WIN_COMPOSITION_VIDEO:
+ case TDM_HWC_WIN_COMPOSITION_CURSOR:
+ case TDM_HWC_WIN_COMPOSITION_NONE:
+ TDM_DBG(" window(%p) %s -> %s : lzpos(%d)", hwc_window_data,
+ _comp_to_str(hwc_window_data->client_type),
+ _comp_to_str(hwc_window_data->validated_type),
+ hwc_window_data->zpos);
+ break;
+ default:
+ break;
+ }
+ }
+}
+
static int
_sprd_hwc_window_is_reserved_buffer(tdm_sprd_hwc_window_data *hwc_window_data) {
tbm_bo bo = NULL;
*num_types = _sprd_output_get_changed_number(hwc_data);
+ /* print the result */
+ _print_validate_result(hwc_data, composited_wnds, num_wnds);
+
return TDM_ERROR_NONE;
}