summaryrefslogtreecommitdiffstats
path: root/src/gallium/state_trackers
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/state_trackers
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/state_trackers')
-rw-r--r--src/gallium/state_trackers/xorg/xorg_driver.c5
-rw-r--r--src/gallium/state_trackers/xorg/xorg_tracker.h3
2 files changed, 6 insertions, 2 deletions
diff --git a/src/gallium/state_trackers/xorg/xorg_driver.c b/src/gallium/state_trackers/xorg/xorg_driver.c
index 5056bf417c1..bae4e7cf254 100644
--- a/src/gallium/state_trackers/xorg/xorg_driver.c
+++ b/src/gallium/state_trackers/xorg/xorg_driver.c
@@ -480,6 +480,9 @@ drv_pre_init(ScrnInfoPtr pScrn, int flags)
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;
@@ -739,7 +742,7 @@ drv_screen_init(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
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,
diff --git a/src/gallium/state_trackers/xorg/xorg_tracker.h b/src/gallium/state_trackers/xorg/xorg_tracker.h
index aab470b46c5..814a0cd11a9 100644
--- a/src/gallium/state_trackers/xorg/xorg_tracker.h
+++ b/src/gallium/state_trackers/xorg/xorg_tracker.h
@@ -76,7 +76,8 @@ typedef struct _CustomizerRec
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);