return ECORE_CALLBACK_RENEW;
}
#endif
-
+#ifndef HAVE_TDM
static void
_ecore_drm_device_cb_output_event(const char *device EINA_UNUSED, Eeze_Udev_Event event EINA_UNUSED, void *data, Eeze_Udev_Watch *watch EINA_UNUSED)
{
if (!(dev = data)) return;
_ecore_drm_outputs_update(dev);
}
-
+#endif
struct xkb_context *
_ecore_drm_device_cached_context_get(enum xkb_context_flags flags)
{
ecore_drm_device_open(Ecore_Drm_Device *dev)
{
#ifdef HAVE_TDM
- int events = 0;
+ /*int events = 0;*/
/* check for valid device */
if ((!dev) || (!dev->drm.name)) return EINA_FALSE;
TRACE_EFL_END();
return EINA_FALSE;
}
-
+#if 0
events = (EEZE_UDEV_EVENT_ADD | EEZE_UDEV_EVENT_REMOVE |
EEZE_UDEV_EVENT_CHANGE);
dev->watch =
eeze_udev_watch_add(EEZE_UDEV_TYPE_DRM, events,
_ecore_drm_device_cb_output_event, dev);
-
+#endif
TRACE_EFL_END();
return EINA_TRUE;
if ((!dev) || (!dev->drm.name)) return EINA_FALSE;
/* DRM device node is needed immediately to keep going. */
- dev->drm.fd =
+ dev->drm.fd =
_ecore_drm_launcher_device_open_no_pending(dev->drm.name, O_RDWR);
if (dev->drm.fd < 0) return EINA_FALSE;
dev->min_height = 0;
dev->max_width = UINT32_MAX;
dev->max_height = UINT32_MAX;
-
+#if 0
for (i = 0; i < count; i++)
{
if (!(output = _ecore_drm_display_output_create(dev, i, x, y, EINA_FALSE)))
x += output->current_mode->width;
}
-
+#else
+ /* create only main output when init */
+ output = _ecore_drm_display_output_create(dev, 0, x, y, EINA_FALSE);
+#endif
ret = EINA_TRUE;
if (eina_list_count(dev->outputs) < 1)
ret = EINA_FALSE;
hal_display = dev->hal_display;
+ err = tdm_display_update(hal_display->display);
+ EINA_SAFETY_ON_FALSE_RETURN(err == TDM_ERROR_NONE);
+
err = tdm_display_get_output_count(hal_display->display, &count);
EINA_SAFETY_ON_FALSE_RETURN(err == TDM_ERROR_NONE);
for (i = 0; i < count; i++)
{
tdm_output_conn_status status = TDM_OUTPUT_CONN_STATUS_DISCONNECTED;
+ tdm_output_type type = TDM_OUTPUT_TYPE_Unknown;
tdm_output *tdm_output_obj;
tdm_output_obj = tdm_display_get_output(hal_display->display, i, &err);
err = tdm_output_get_conn_status(tdm_output_obj, &status);
EINA_SAFETY_ON_FALSE_RETURN(err == TDM_ERROR_NONE);
+ err = tdm_output_get_output_type(tdm_output_obj, &type);
+ EINA_SAFETY_ON_FALSE_RETURN(err == TDM_ERROR_NONE);
+
+ DBG("%s output type:%d, status:%d", __func__, type, status);
+
if (status == TDM_OUTPUT_CONN_STATUS_DISCONNECTED)
{
if (output)