summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDaniel Vetter <daniel.vetter@ffwll.ch>2010-03-09 15:23:02 +0100
committerDaniel Vetter <daniel.vetter@ffwll.ch>2010-04-08 11:22:22 +0200
commit411cdcb6fcb60085191cf712aba1e0977f145256 (patch)
tree0363e403883fd30d92fd086b8d8d0dd688f32324 /src
parentb666e3e29f22894f43a8e9f7f3d1b950d431c42d (diff)
XvMC: init driver in one function call
No point splitting this up. Gets rid of two #ifdef INTEL_XVMC blocks in i830_video.c. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'src')
-rw-r--r--src/i830_hwmc.c15
-rw-r--r--src/i830_hwmc.h3
-rw-r--r--src/i830_video.c12
3 files changed, 6 insertions, 24 deletions
diff --git a/src/i830_hwmc.c b/src/i830_hwmc.c
index 3baf5e37..9155fa2c 100644
--- a/src/i830_hwmc.c
+++ b/src/i830_hwmc.c
@@ -52,10 +52,12 @@ static Bool intel_xvmc_set_driver(struct intel_xvmc_driver *d)
/* check chip type and load xvmc driver */
/* This must be first called! */
-Bool intel_xvmc_probe(ScrnInfoPtr scrn)
+Bool intel_xvmc_adaptor_init(ScreenPtr pScreen)
{
+ ScrnInfoPtr scrn = xf86Screens[pScreen->myNum];
intel_screen_private *intel = intel_get_screen_private(scrn);
Bool ret = FALSE;
+ char buf[64];
if (!intel->XvMCEnabled)
return FALSE;
@@ -75,17 +77,6 @@ Bool intel_xvmc_probe(ScrnInfoPtr scrn)
ErrorF("Your chipset doesn't support XvMC.\n");
return FALSE;
}
- return TRUE;
-}
-
-Bool intel_xvmc_screen_init(ScreenPtr pScreen)
-{
- ScrnInfoPtr scrn = xf86Screens[pScreen->myNum];
- intel_screen_private *intel = intel_get_screen_private(scrn);
- char buf[64];
-
- if (!xvmc_driver)
- return FALSE;
if (xf86XvMCScreenInit(pScreen, 1, &xvmc_driver->adaptor)) {
xf86DrvMsg(scrn->scrnIndex, X_INFO,
diff --git a/src/i830_hwmc.h b/src/i830_hwmc.h
index 1063938d..b54d9a85 100644
--- a/src/i830_hwmc.h
+++ b/src/i830_hwmc.h
@@ -104,8 +104,7 @@ extern struct intel_xvmc_driver i915_xvmc_driver;
extern struct intel_xvmc_driver i965_xvmc_driver;
extern struct intel_xvmc_driver vld_xvmc_driver;
-extern Bool intel_xvmc_probe(ScrnInfoPtr);
-extern Bool intel_xvmc_screen_init(ScreenPtr);
+extern Bool intel_xvmc_adaptor_init(ScreenPtr);
#endif
#endif
diff --git a/src/i830_video.c b/src/i830_video.c
index 0e8799d3..a131cb14 100644
--- a/src/i830_video.c
+++ b/src/i830_video.c
@@ -344,9 +344,6 @@ void I830InitVideo(ScreenPtr screen)
XF86VideoAdaptorPtr *adaptors, *newAdaptors = NULL;
XF86VideoAdaptorPtr overlayAdaptor = NULL, texturedAdaptor = NULL;
int num_adaptors;
-#ifdef INTEL_XVMC
- Bool xvmc_status = FALSE;
-#endif
num_adaptors = xf86XVListGenericAdaptors(scrn, &adaptors);
/* Give our adaptor list enough space for the overlay and/or texture video
@@ -404,11 +401,6 @@ void I830InitVideo(ScreenPtr screen)
if (overlayAdaptor && !intel->XvPreferOverlay)
adaptors[num_adaptors++] = overlayAdaptor;
-#ifdef INTEL_XVMC
- if (intel_xvmc_probe(scrn))
- xvmc_status = TRUE;
-#endif
-
if (num_adaptors) {
xf86XVScreenInit(screen, adaptors, num_adaptors);
} else {
@@ -418,8 +410,8 @@ void I830InitVideo(ScreenPtr screen)
}
#ifdef INTEL_XVMC
- if (xvmc_status && texturedAdaptor)
- intel_xvmc_screen_init(screen);
+ if (texturedAdaptor)
+ intel_xvmc_adaptor_init(screen);
#endif
xfree(adaptors);
}