summaryrefslogtreecommitdiff
path: root/src/lib/ecore_drm2/ecore_drm2.c
diff options
context:
space:
mode:
authorDerek Foreman <derekf@osg.samsung.com>2017-07-21 15:48:40 -0500
committerDerek Foreman <derekf@osg.samsung.com>2017-08-09 14:56:58 -0500
commit8ff59b2c55a58331625b6d997918e64eddc84b10 (patch)
tree85a9d9398281b1aad159517e8e9bdee2c0adc3b8 /src/lib/ecore_drm2/ecore_drm2.c
parentbe0af0ed00148c55e1eb519444ea48201677badb (diff)
ecore_drm2: Pass Ecore_Drm2_Device instead of fd to most functions
Intended to simplify the upcoming commit that merges device find and device open into a single function that returns a device. The fd is something callers shouldn't really need to get their hands on, right now there are still a few places where it's needed, but those will be gone soon too.
Diffstat (limited to 'src/lib/ecore_drm2/ecore_drm2.c')
-rw-r--r--src/lib/ecore_drm2/ecore_drm2.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lib/ecore_drm2/ecore_drm2.c b/src/lib/ecore_drm2/ecore_drm2.c
index 526ea4a..a4ab720 100644
--- a/src/lib/ecore_drm2/ecore_drm2.c
+++ b/src/lib/ecore_drm2/ecore_drm2.c
@@ -219,16 +219,16 @@ ecore_drm2_shutdown(void)
219} 219}
220 220
221EAPI int 221EAPI int
222ecore_drm2_event_handle(int fd, Ecore_Drm2_Context *drmctx) 222ecore_drm2_event_handle(Ecore_Drm2_Device *dev, Ecore_Drm2_Context *drmctx)
223{ 223{
224 drmEventContext ctx; 224 drmEventContext ctx;
225 225
226 EINA_SAFETY_ON_TRUE_RETURN_VAL((fd < 0), -1); 226 EINA_SAFETY_ON_NULL_RETURN_VAL(dev, -1);
227 227
228 memset(&ctx, 0, sizeof(ctx)); 228 memset(&ctx, 0, sizeof(ctx));
229 ctx.version = 2; 229 ctx.version = 2;
230 ctx.page_flip_handler = drmctx->page_flip_handler; 230 ctx.page_flip_handler = drmctx->page_flip_handler;
231 ctx.vblank_handler = drmctx->vblank_handler; 231 ctx.vblank_handler = drmctx->vblank_handler;
232 232
233 return sym_drmHandleEvent(fd, &ctx); 233 return sym_drmHandleEvent(dev->fd, &ctx);
234} 234}