+ outputs = _tdm_display_get_ordered_outputs(private_module, &count);
+
+ if (count > 0)
+ TDM_GOTO_IF_FAIL(outputs != NULL, failed_update);
+
+ for (i = 0; i < count; i++) {
+ ret = tdm_display_update_output(private_module, outputs[i]);
+ if (ret != TDM_ERROR_NONE)
+ goto failed_update;
+ output_count++;
+ }
+ }
+
+ /* At least, the output count should be greater than 0 to ensure tdm_vblank works.
+ * So we will create a dummy output when backends don't have any output.
+ * Without destroying a tdm_output object, this dummy output will be replaced with
+ * a virtual output which is created in runtime.
+ */
+ if (output_count == 0) {
+ tdm_output **outputs;
+ int i, count = 0;
+
+ TDM_INFO("loading a %s backend", TDM_DUMMY_MODULE);
+ ret = _tdm_display_load_module_with_file(private_display, TDM_DUMMY_MODULE);
+ TDM_GOTO_IF_FAIL(ret == TDM_ERROR_NONE, failed_update);
+ TDM_GOTO_IF_FAIL(private_display->dummy_module != NULL, failed_update);
+
+ private_module = private_display->dummy_module;