summaryrefslogtreecommitdiffstats
path: root/src/gallium/targets/xorg-vmwgfx
diff options
context:
space:
mode:
authorThomas Hellstrom <[email protected]>2010-07-22 02:05:35 +0200
committerThomas Hellstrom <[email protected]>2010-07-23 04:48:32 +0200
commit6ffa23b8fe9641299746b53d1de0519822d4d087 (patch)
tree95bf0a0a072a4bd232c1c9be1d6719a27167f698 /src/gallium/targets/xorg-vmwgfx
parenta7a126bdfa386a4be9dd1f7bac1825edb7ff3fcd (diff)
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 <[email protected]>
Diffstat (limited to 'src/gallium/targets/xorg-vmwgfx')
-rw-r--r--src/gallium/targets/xorg-vmwgfx/vmw_screen.c16
1 files changed, 13 insertions, 3 deletions
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;