From 6ffa23b8fe9641299746b53d1de0519822d4d087 Mon Sep 17 00:00:00 2001 From: Thomas Hellstrom Date: Thu, 22 Jul 2010 02:05:35 +0200 Subject: st/xorg vmwgfx/xorg: Add a pre-init customizer callback Add a customizer callback just before initial config setting, so that the customizer code can initialize the mode validator using the drm file-descriptor. Signed-off-by: Thomas Hellstrom --- src/gallium/targets/xorg-vmwgfx/vmw_screen.c | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) (limited to 'src/gallium/targets/xorg-vmwgfx') diff --git a/src/gallium/targets/xorg-vmwgfx/vmw_screen.c b/src/gallium/targets/xorg-vmwgfx/vmw_screen.c index 64934d53f68..514c3f12088 100644 --- a/src/gallium/targets/xorg-vmwgfx/vmw_screen.c +++ b/src/gallium/targets/xorg-vmwgfx/vmw_screen.c @@ -111,13 +111,22 @@ vmw_context_no_throttle(CustomizerPtr cust, } static Bool -vmw_screen_init(CustomizerPtr cust, int fd) +vmw_pre_init(CustomizerPtr cust, int fd) { struct vmw_customizer *vmw = vmw_customizer(cust); - drmVersionPtr ver; vmw->fd = fd; - ver = drmGetVersion(fd); + + return TRUE; +} + +static Bool +vmw_screen_init(CustomizerPtr cust) +{ + struct vmw_customizer *vmw = vmw_customizer(cust); + drmVersionPtr ver; + + ver = drmGetVersion(vmw->fd); if (ver == NULL || (ver->version_major == 1 && ver->version_minor < 1)) { cust->swap_throttling = TRUE; @@ -199,6 +208,7 @@ vmw_screen_pre_init(ScrnInfoPtr pScrn, int flags) cust = &vmw->base; + cust->winsys_pre_init = vmw_pre_init; cust->winsys_screen_init = vmw_screen_init; cust->winsys_screen_close = vmw_screen_close; cust->winsys_enter_vt = vmw_screen_enter_vt; -- cgit v1.2.3