Make crtc_notify wrap/unwrap code do nothing unless mode code is inuse
Drivers not using the new hw/xfree86/modes code would crash in DRI due to that code trying to monitor CRTC changes. Signed-off-by: Keith Packard <keithp@keithp.com>
This commit is contained in:
parent
fff00df94d
commit
ea309e4745
|
@ -3116,6 +3116,8 @@ xf86_crtc_clip_video_helper(ScrnInfoPtr pScrn,
|
|||
|
||||
xf86_crtc_notify_proc_ptr
|
||||
xf86_wrap_crtc_notify (ScreenPtr screen, xf86_crtc_notify_proc_ptr new)
|
||||
{
|
||||
if (xf86CrtcConfigPrivateIndex != -1)
|
||||
{
|
||||
ScrnInfoPtr scrn = xf86Screens[screen->myNum];
|
||||
xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(scrn);
|
||||
|
@ -3125,15 +3127,20 @@ xf86_wrap_crtc_notify (ScreenPtr screen, xf86_crtc_notify_proc_ptr new)
|
|||
config->xf86_crtc_notify = new;
|
||||
return old;
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void
|
||||
xf86_unwrap_crtc_notify(ScreenPtr screen, xf86_crtc_notify_proc_ptr old)
|
||||
{
|
||||
if (xf86CrtcConfigPrivateIndex != -1)
|
||||
{
|
||||
ScrnInfoPtr scrn = xf86Screens[screen->myNum];
|
||||
xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(scrn);
|
||||
|
||||
config->xf86_crtc_notify = old;
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
xf86_crtc_notify(ScreenPtr screen)
|
||||
|
|
Loading…
Reference in New Issue