@@ -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 
30703069static  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
30883075static  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