diff options
author | Alex Deucher <alex@botch2.(none)> | 2007-09-22 18:31:51 -0400 |
---|---|---|
committer | Alex Deucher <alex@botch2.(none)> | 2007-09-22 18:31:51 -0400 |
commit | d5cf268be2c9b3e320d7101f5213f7d5609b6308 (patch) | |
tree | 672151d3a2491c106c87339b4bb0832f50c26a05 /src/radeon_video.c | |
parent | 8aca0ca6be7122e0ece20985a1862553a1b225c0 (diff) |
RADEON: Fix crash when Xv window is outside of either crtc
Diffstat (limited to 'src/radeon_video.c')
-rw-r--r-- | src/radeon_video.c | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/src/radeon_video.c b/src/radeon_video.c index 271f7fe..dca9695 100644 --- a/src/radeon_video.c +++ b/src/radeon_video.c @@ -2907,6 +2907,15 @@ RADEONPutImage( clipBoxes, width, height)) return Success; + if (!crtc) { + if (pPriv->videoStatus & CLIENT_VIDEO_ON) { + unsigned char *RADEONMMIO = info->MMIO; + OUTREG(RADEON_OV0_SCALE_CNTL, 0); + pPriv->videoStatus &= ~CLIENT_VIDEO_ON; + } + return Success; + } + dstBox.x1 -= crtc->x; dstBox.x2 -= crtc->x; dstBox.y1 -= crtc->y; @@ -3285,6 +3294,15 @@ RADEONDisplaySurface( surface->width, surface->height)) return Success; + if (!crtc) { + if (pPriv->isOn) { + unsigned char *RADEONMMIO = info->MMIO; + OUTREG(RADEON_OV0_SCALE_CNTL, 0); + pPriv->isOn = FALSE; + } + return Success; + } + dstBox.x1 -= crtc->x; dstBox.x2 -= crtc->x; dstBox.y1 -= crtc->y; @@ -3419,6 +3437,15 @@ RADEONPutVideo( clipBoxes, width, height)) return Success; + if (!crtc) { + if (pPriv->videoStatus & CLIENT_VIDEO_ON) { + unsigned char *RADEONMMIO = info->MMIO; + OUTREG(RADEON_OV0_SCALE_CNTL, 0); + pPriv->videoStatus &= ~CLIENT_VIDEO_ON; + } + return Success; + } + dstBox.x1 -= crtc->x; dstBox.x2 -= crtc->x; dstBox.y1 -= crtc->y; |