summaryrefslogtreecommitdiff
path: root/src/i830_video.c
diff options
context:
space:
mode:
authorDave Airlie <airlied@optimus.(none)>2007-10-17 16:35:29 +1000
committerDave Airlie <airlied@optimus.(none)>2007-10-17 16:35:29 +1000
commitc824c45e72908b5b3fa832fec91c7b47f305180c (patch)
tree2be4e53c4aad91ffa44117f49d9a219be31e4321 /src/i830_video.c
parentaa88d23e615e7f154cf850927a0a7bb9fbb0d2f9 (diff)
intel: make block handler hook happen no matter what video is in use
This shouldn't make a difference now, but for upcoming EXA/batch changes it will be more useful
Diffstat (limited to 'src/i830_video.c')
-rw-r--r--src/i830_video.c24
1 files changed, 10 insertions, 14 deletions
diff --git a/src/i830_video.c b/src/i830_video.c
index 8c2d804a..255444be 100644
--- a/src/i830_video.c
+++ b/src/i830_video.c
@@ -105,8 +105,6 @@ static int I830QueryImageAttributesOverlay(ScrnInfoPtr, int, unsigned short *,
static int I830QueryImageAttributesTextured(ScrnInfoPtr, int, unsigned short *,
unsigned short *, int *, int *);
-static void I830BlockHandler(int, pointer, pointer, pointer);
-
#define MAKE_ATOM(a) MakeAtom(a, sizeof(a) - 1, TRUE)
static Atom xvBrightness, xvContrast, xvSaturation, xvColorKey, xvPipe, xvDoubleBuffer;
@@ -866,9 +864,6 @@ I830SetupImageVideoOverlay(ScreenPtr pScreen)
*/
pPriv->overlayOK = TRUE;
- pI830->BlockHandler = pScreen->BlockHandler;
- pScreen->BlockHandler = I830BlockHandler;
-
xvColorKey = MAKE_ATOM("XV_COLORKEY");
xvBrightness = MAKE_ATOM("XV_BRIGHTNESS");
xvContrast = MAKE_ATOM("XV_CONTRAST");
@@ -2536,20 +2531,22 @@ I830QueryImageAttributesTextured(ScrnInfoPtr pScrn,
return I830QueryImageAttributes(pScrn, id, w, h, pitches, offsets, TRUE);
}
-static void
-I830BlockHandler(int i,
- pointer blockData, pointer pTimeout, pointer pReadmask)
+void
+I830VideoBlockHandler(int i, pointer blockData, pointer pTimeout,
+ pointer pReadmask)
{
- ScreenPtr pScreen = screenInfo.screens[i];
ScrnInfoPtr pScrn = xf86Screens[i];
I830Ptr pI830 = I830PTR(pScrn);
- I830PortPrivPtr pPriv = GET_PORT_PRIVATE(pScrn);
+ I830PortPrivPtr pPriv;
- pScreen->BlockHandler = pI830->BlockHandler;
+ if (pI830->adaptor == NULL)
+ return;
- (*pScreen->BlockHandler) (i, blockData, pTimeout, pReadmask);
+ /* No overlay scaler on the 965. */
+ if (IS_I965G(pI830))
+ return;
- pScreen->BlockHandler = I830BlockHandler;
+ pPriv = GET_PORT_PRIVATE(pScrn);
if (pPriv->videoStatus & TIMER_MASK) {
#if 1
@@ -2778,7 +2775,6 @@ I830DisplaySurface(XF86SurfacePtr surface,
UpdateCurrentTime();
pI830Priv->videoStatus = FREE_TIMER;
pI830Priv->freeTime = currentTime.milliseconds + FREE_DELAY;
- pScrn->pScreen->BlockHandler = I830BlockHandler;
}
return Success;