}
ret =
- sym_drmModeAtomicCommit(output->fd, req, flags, NULL);
+ sym_drmModeAtomicCommit(output->fd, req, flags, output);
if (ret < 0) goto err;
/* clear any previous request */
res =
sym_drmModeAtomicCommit(output->fd, output->prep.atomic_req, flags,
- output->user_data);
+ output);
if (res < 0)
{
ERR("Failed Atomic Commit: %m");
static Eina_Bool bugged_about_bug = EINA_FALSE;
repeat = EINA_FALSE;
ret = sym_drmModePageFlip(fb->fd, output->crtc_id, fb->id,
- DRM_MODE_PAGE_FLIP_EVENT, output->user_data);
+ DRM_MODE_PAGE_FLIP_EVENT, output);
/* Some drivers (RPI - looking at you) are broken and produce
* flip events before they are ready for another flip, so be
* a little robust in the face of badness and try a few times
}
ret = sym_drmModeAtomicCommit(output->fd, req, DRM_MODE_ATOMIC_ALLOW_MODESET,
- output->user_data);
+ output);
if (ret < 0)
{
ERR("Failed to commit atomic Mode: %m");
if (res < 0) goto err;
res = sym_drmModeAtomicCommit(output->fd, req, flags,
- output->user_data);
+ output);
if (res < 0)
goto err;
else
_cb_pageflip(int fd EINA_UNUSED, unsigned int frame EINA_UNUSED, unsigned int sec, unsigned int usec, void *data)
{
Ecore_Evas *ee;
+ Ecore_Drm2_Output *output;
Ecore_Evas_Engine_Drm_Data *edata;
int ret;
- ee = data;
+ output = data;
+
+ ee = ecore_drm2_output_user_data_get(output);
+ if (!ee) return;
+
edata = ee->engine.data;
- ret = ecore_drm2_fb_flip_complete(edata->output);
+ ret = ecore_drm2_fb_flip_complete(output);
if (edata->ticking)
{
int x, y, w, h;
double t = (double)sec + ((double)usec / 1000000);
- ecore_drm2_output_info_get(edata->output, &x, &y, &w, &h, NULL);
+ ecore_drm2_output_info_get(output, &x, &y, &w, &h, NULL);
if (!edata->once) t = ecore_time_get();
ecore_evas_animator_tick(ee, &(Eina_Rectangle){x, y, w, h},
t - edata->offset);
}
else if (ret)
- ecore_drm2_fb_flip(NULL, edata->output);
+ ecore_drm2_fb_flip(NULL, output);
}
static void