int current_fb;
Ecore_Drm_Fb *current, *next;
Ecore_Drm_Fb *dumb[2];
+
+ drmEventContext drm_ctx;
+
+ Eina_Bool active : 1;
};
struct _Ecore_Drm_Event_Activate
EAPI void ecore_drm_device_window_set(Ecore_Drm_Device *dev, unsigned int window);
EAPI const char *ecore_drm_device_name_get(Ecore_Drm_Device *dev);
+EAPI void ecore_drm_device_fb_set(Ecore_Drm_Device *dev, Ecore_Drm_Fb *fb);
+
/**
* Setup an Ecore_Drm_Device for software rendering
*
_ecore_drm_device_cb_event(void *data, Ecore_Fd_Handler *hdlr EINA_UNUSED)
{
Ecore_Drm_Device *dev;
- drmEventContext ctx;
if (!(dev = data)) return ECORE_CALLBACK_RENEW;
DBG("Drm Device Event");
- memset(&ctx, 0, sizeof(ctx));
-
- ctx.version = DRM_EVENT_CONTEXT_VERSION;
- ctx.page_flip_handler = _ecore_drm_device_cb_page_flip;
- ctx.vblank_handler = _ecore_drm_device_cb_vblank;
-
- drmHandleEvent(dev->drm.fd, &ctx);
+ drmHandleEvent(dev->drm.fd, &dev->drm_ctx);
return ECORE_CALLBACK_RENEW;
}
return EINA_FALSE;
}
+ memset(&dev->drm_ctx, 0, sizeof(dev->drm_ctx));
+ dev->drm_ctx.version = DRM_EVENT_CONTEXT_VERSION;
+ dev->drm_ctx.page_flip_handler = _ecore_drm_device_cb_page_flip;
+ dev->drm_ctx.vblank_handler = _ecore_drm_device_cb_vblank;
+
events = (EEZE_UDEV_EVENT_ADD | EEZE_UDEV_EVENT_REMOVE |
EEZE_UDEV_EVENT_CHANGE);