Skip to content

Commit 16a07ae

Browse files
metuxjosephcrowell
authored andcommitted
drop HAVE_NOTIFY_FD
It's always set, so no need to ifdef on it. Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
1 parent d65f27c commit 16a07ae

File tree

2 files changed

+0
-27
lines changed

2 files changed

+0
-27
lines changed

src/compat-api.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,6 @@
2626
#ifndef COMPAT_API_H
2727
#define COMPAT_API_H
2828

29-
#define HAVE_NOTIFY_FD 1
30-
3129
#define BLOCKHANDLER_ARGS_DECL ScreenPtr pScreen, void* pTimeout
3230
#define BLOCKHANDLER_ARGS pScreen, pTimeout
3331

src/drmmode_display.c

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -3066,24 +3066,11 @@ drmmode_flip_handler(xf86CrtcPtr crtc, uint32_t frame, uint64_t usec, void *even
30663066
}
30673067
}
30683068

3069-
#if HAVE_NOTIFY_FD
30703069
static void drmmode_notify_fd(int fd, int notify, void *data)
30713070
{
30723071
drmmode_ptr drmmode = data;
30733072
amdgpu_drm_handle_event(fd, &drmmode->event_context);
30743073
}
3075-
#else
3076-
static void drm_wakeup_handler(void* data, int err, void* p)
3077-
{
3078-
drmmode_ptr drmmode = data;
3079-
AMDGPUEntPtr pAMDGPUEnt = AMDGPUEntPriv(drmmode->scrn);
3080-
fd_set *read_mask = p;
3081-
3082-
if (err >= 0 && FD_ISSET(pAMDGPUEnt->fd, read_mask)) {
3083-
amdgpu_drm_handle_event(pAMDGPUEnt->fd, &drmmode->event_context);
3084-
}
3085-
}
3086-
#endif
30873074

30883075
static Bool drmmode_probe_page_flip_target(AMDGPUEntPtr pAMDGPUEnt)
30893076
{
@@ -3315,13 +3302,7 @@ void drmmode_init(ScrnInfoPtr pScrn, drmmode_ptr drmmode)
33153302

33163303
info->drmmode_inited = TRUE;
33173304
if (pAMDGPUEnt->fd_wakeup_registered != serverGeneration) {
3318-
#if HAVE_NOTIFY_FD
33193305
SetNotifyFd(pAMDGPUEnt->fd, drmmode_notify_fd, X_NOTIFY_READ, drmmode);
3320-
#else
3321-
AddGeneralSocket(pAMDGPUEnt->fd);
3322-
RegisterBlockAndWakeupHandlers((BlockHandlerProcPtr) NoopDDA,
3323-
drm_wakeup_handler, drmmode);
3324-
#endif
33253306
pAMDGPUEnt->fd_wakeup_registered = serverGeneration;
33263307
pAMDGPUEnt->fd_wakeup_ref = 1;
33273308
} else
@@ -3343,13 +3324,7 @@ void drmmode_fini(ScrnInfoPtr pScrn, drmmode_ptr drmmode)
33433324

33443325
if (pAMDGPUEnt->fd_wakeup_registered == serverGeneration &&
33453326
!--pAMDGPUEnt->fd_wakeup_ref) {
3346-
#if HAVE_NOTIFY_FD
33473327
RemoveNotifyFd(pAMDGPUEnt->fd);
3348-
#else
3349-
RemoveGeneralSocket(pAMDGPUEnt->fd);
3350-
RemoveBlockAndWakeupHandlers((BlockHandlerProcPtr) NoopDDA,
3351-
drm_wakeup_handler, drmmode);
3352-
#endif
33533328
}
33543329
}
33553330

0 commit comments

Comments
 (0)