xorg_crtc_init(pScrn);
xorg_output_init(pScrn);
+ if (cust && cust->winsys_pre_init && !cust->winsys_pre_init(cust, ms->fd))
+ return FALSE;
+
if (!xf86InitialConfiguration(pScrn, TRUE)) {
xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "No valid modes.\n");
return FALSE;
ms->debug_fallback = xf86ReturnOptValBool(ms->Options, OPTION_DEBUG_FALLBACK, ms->accelerate_2d);
if (cust && cust->winsys_screen_init)
- cust->winsys_screen_init(cust, ms->fd);
+ cust->winsys_screen_init(cust);
ms->swapThrottling = cust ? cust->swap_throttling : TRUE;
from_st = xf86GetOptValBool(ms->Options, OPTION_THROTTLE_SWAP,
Bool dirty_throttling;
Bool swap_throttling;
Bool no_3d;
- Bool (*winsys_screen_init)(struct _CustomizerRec *cust, int fd);
+ Bool (*winsys_pre_init) (struct _CustomizerRec *cust, int fd);
+ Bool (*winsys_screen_init)(struct _CustomizerRec *cust);
Bool (*winsys_screen_close)(struct _CustomizerRec *cust);
Bool (*winsys_enter_vt)(struct _CustomizerRec *cust);
Bool (*winsys_leave_vt)(struct _CustomizerRec *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;
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;