summaryrefslogtreecommitdiff
path: root/src/radeon_display.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/radeon_display.c')
-rw-r--r--src/radeon_display.c25
1 files changed, 25 insertions, 0 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;
+}