summaryrefslogtreecommitdiff
path: root/src/radeon_video.c
diff options
context:
space:
mode:
authorAlex Deucher <alexdeucher@gmail.com>2009-04-07 11:33:44 -0400
committerAlex Deucher <alexdeucher@gmail.com>2009-04-07 11:33:44 -0400
commit8ec27be3c8043a6ddc816b0b1480dd19f8d73832 (patch)
tree874ab0e78533f123a9743dc301e15395e1c66048 /src/radeon_video.c
parentf8c7d6a6162196a743f6885ecaf63ba50de1722a (diff)
radeon: fix Xv vsync for multi-head
Diffstat (limited to 'src/radeon_video.c')
-rw-r--r--src/radeon_video.c17
1 files changed, 7 insertions, 10 deletions
diff --git a/src/radeon_video.c b/src/radeon_video.c
index 42aa0361..6314eb18 100644
--- a/src/radeon_video.c
+++ b/src/radeon_video.c
@@ -135,15 +135,14 @@ radeon_box_area(BoxPtr box)
return (int) (box->x2 - box->x1) * (int) (box->y2 - box->y1);
}
-int
-radeon_covering_crtc_num(ScrnInfoPtr pScrn,
- int x1, int x2, int y1, int y2,
- xf86CrtcPtr desired)
+xf86CrtcPtr
+radeon_xv_pick_best_crtc(ScrnInfoPtr pScrn,
+ int x1, int x2, int y1, int y2)
{
xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(pScrn);
- int coverage, best_coverage;
- int c, best_crtc = 0;
+ int coverage, best_coverage, c;
BoxRec box, crtc_box, cover_box;
+ xf86CrtcPtr best_crtc = NULL;
box.x1 = x1;
box.x2 = x2;
@@ -155,10 +154,8 @@ radeon_covering_crtc_num(ScrnInfoPtr pScrn,
radeon_crtc_box(crtc, &crtc_box);
radeon_box_intersect(&cover_box, &crtc_box, &box);
coverage = radeon_box_area(&cover_box);
- if (coverage && crtc == desired) {
- return c;
- } else if (coverage > best_coverage) {
- best_crtc = c;
+ if (coverage > best_coverage) {
+ best_crtc = crtc;
best_coverage = coverage;
}
}