diff options
author | Dave Airlie <airlied@linux.ie> | 2007-01-22 21:09:53 +1100 |
---|---|---|
committer | Dave Airlie <airlied@linux.ie> | 2007-01-22 21:09:53 +1100 |
commit | e29a32d711553fcb4ca9928122ac285fe0b0c1a7 (patch) | |
tree | b6e3c199ffc50d6ed9fff0939859b09584c5bab5 /src | |
parent | aa9d04ba94a3cd60b248231da517e2817591fc69 (diff) |
add back overlay CRTC chooser this may not work yet
Diffstat (limited to 'src')
-rw-r--r-- | src/radeon_display.c | 25 | ||||
-rw-r--r-- | src/radeon_video.c | 9 |
2 files changed, 28 insertions, 6 deletions
diff --git a/src/radeon_display.c b/src/radeon_display.c index 98faf4cf..a02167a4 100644 --- a/src/radeon_display.c +++ b/src/radeon_display.c @@ -2753,3 +2753,28 @@ RADEONDisableUnusedFunctions(ScrnInfoPtr pScrn) } } + +void +RADEONChooseOverlayCRTC(ScrnInfoPtr pScrn, BoxPtr dstBox) +{ + xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(pScrn); + RADEONInfoPtr info = RADEONPTR(pScrn); + int c; + int highx = 0, highy = 0; + int crtc_num; + + for (c = 0; c < xf86_config->num_crtc; c++) + { + xf86CrtcPtr crtc = xf86_config->crtc[c]; + if (!crtc->enabled) + continue; + + if ((dstBox->x1 >= crtc->x) && (dstBox->y1 >= crtc->y)) + crtc_num = c; + } + + if (crtc_num == 1) + info->OverlayOnCRTC2 = TRUE; + else + info->OverlayOnCRTC2 = FALSE; +} diff --git a/src/radeon_video.c b/src/radeon_video.c index f8f29af2..95755928 100644 --- a/src/radeon_video.c +++ b/src/radeon_video.c @@ -2749,8 +2749,7 @@ RADEONPutImage( dstBox.y1 = drw_y; dstBox.y2 = drw_y + drw_h; - // if (info->MergedFB) -// RADEONChooseOverlayCRTC(pScrn, &dstBox); + RADEONChooseOverlayCRTC(pScrn, &dstBox); if(!xf86XVClipVideoHelper(&dstBox, &xa, &xb, &ya, &yb, clipBoxes, width, height)) @@ -3112,8 +3111,7 @@ RADEONDisplaySurface( dstBox.y1 = drw_y; dstBox.y2 = drw_y + drw_h; - //if (info->MergedFB) - // RADEONChooseOverlayCRTC(pScrn, &dstBox); + RADEONChooseOverlayCRTC(pScrn, &dstBox); if (!xf86XVClipVideoHelper(&dstBox, &xa, &xb, &ya, &yb, clipBoxes, surface->width, surface->height)) @@ -3253,8 +3251,7 @@ RADEONPutVideo( else vbi_line_width = 2000; /* might need adjustment */ - //if (info->MergedFB) - // RADEONChooseOverlayCRTC(pScrn, &dstBox); + RADEONChooseOverlayCRTC(pScrn, &dstBox); if(!xf86XVClipVideoHelper(&dstBox, &xa, &xb, &ya, &yb, clipBoxes, width, height)) return Success; |