summaryrefslogtreecommitdiff
path: root/src/radeon_textured_videofuncs.c
diff options
context:
space:
mode:
authorAlex Deucher <alexdeucher@gmail.com>2009-10-13 12:27:52 -0400
committerAlex Deucher <alexdeucher@gmail.com>2009-10-13 12:27:52 -0400
commit255ac8d54e3dc12e579e05edb41b40946a00eab8 (patch)
treeaccd1c1b5252943680a1958374901e8c2a366da9 /src/radeon_textured_videofuncs.c
parent801d900add4731f3c424ebb780ad2dbd7a1c6a25 (diff)
radeon: add XV_CRTC attribute for textured video
This attribute allows the user to override which crtc is synced with when XV_VSYNC is enabled. This is useful for clone modes where the user can might want to override the default.
Diffstat (limited to 'src/radeon_textured_videofuncs.c')
-rw-r--r--src/radeon_textured_videofuncs.c56
1 files changed, 36 insertions, 20 deletions
diff --git a/src/radeon_textured_videofuncs.c b/src/radeon_textured_videofuncs.c
index 8b55efcb..c7d9b028 100644
--- a/src/radeon_textured_videofuncs.c
+++ b/src/radeon_textured_videofuncs.c
@@ -351,11 +351,15 @@ FUNC_NAME(RADEONDisplayTexturedVideo)(ScrnInfoPtr pScrn, RADEONPortPrivPtr pPriv
FINISH_ACCEL();
if (pPriv->vsync) {
- xf86CrtcPtr crtc = radeon_xv_pick_best_crtc(pScrn,
- pPriv->drw_x,
- pPriv->drw_x + pPriv->dst_w,
- pPriv->drw_y,
- pPriv->drw_y + pPriv->dst_h);
+ xf86CrtcPtr crtc;
+ if (pPriv->desired_crtc)
+ crtc = pPriv->desired_crtc;
+ else
+ crtc = radeon_xv_pick_best_crtc(pScrn,
+ pPriv->drw_x,
+ pPriv->drw_x + pPriv->dst_w,
+ pPriv->drw_y,
+ pPriv->drw_y + pPriv->dst_h);
if (crtc)
FUNC_NAME(RADEONWaitForVLine)(pScrn, pPixmap,
crtc,
@@ -910,11 +914,15 @@ FUNC_NAME(R200DisplayTexturedVideo)(ScrnInfoPtr pScrn, RADEONPortPrivPtr pPriv)
FINISH_ACCEL();
if (pPriv->vsync) {
- xf86CrtcPtr crtc = radeon_xv_pick_best_crtc(pScrn,
- pPriv->drw_x,
- pPriv->drw_x + pPriv->dst_w,
- pPriv->drw_y,
- pPriv->drw_y + pPriv->dst_h);
+ xf86CrtcPtr crtc;
+ if (pPriv->desired_crtc)
+ crtc = pPriv->desired_crtc;
+ else
+ crtc = radeon_xv_pick_best_crtc(pScrn,
+ pPriv->drw_x,
+ pPriv->drw_x + pPriv->dst_w,
+ pPriv->drw_y,
+ pPriv->drw_y + pPriv->dst_h);
if (crtc)
FUNC_NAME(RADEONWaitForVLine)(pScrn, pPixmap,
crtc,
@@ -2282,11 +2290,15 @@ FUNC_NAME(R300DisplayTexturedVideo)(ScrnInfoPtr pScrn, RADEONPortPrivPtr pPriv)
FINISH_ACCEL();
if (pPriv->vsync) {
- xf86CrtcPtr crtc = radeon_xv_pick_best_crtc(pScrn,
- pPriv->drw_x,
- pPriv->drw_x + pPriv->dst_w,
- pPriv->drw_y,
- pPriv->drw_y + pPriv->dst_h);
+ xf86CrtcPtr crtc;
+ if (pPriv->desired_crtc)
+ crtc = pPriv->desired_crtc;
+ else
+ crtc = radeon_xv_pick_best_crtc(pScrn,
+ pPriv->drw_x,
+ pPriv->drw_x + pPriv->dst_w,
+ pPriv->drw_y,
+ pPriv->drw_y + pPriv->dst_h);
if (crtc)
FUNC_NAME(RADEONWaitForVLine)(pScrn, pPixmap,
crtc,
@@ -3857,11 +3869,15 @@ FUNC_NAME(R500DisplayTexturedVideo)(ScrnInfoPtr pScrn, RADEONPortPrivPtr pPriv)
FINISH_ACCEL();
if (pPriv->vsync) {
- xf86CrtcPtr crtc = radeon_xv_pick_best_crtc(pScrn,
- pPriv->drw_x,
- pPriv->drw_x + pPriv->dst_w,
- pPriv->drw_y,
- pPriv->drw_y + pPriv->dst_h);
+ xf86CrtcPtr crtc;
+ if (pPriv->desired_crtc)
+ crtc = pPriv->desired_crtc;
+ else
+ crtc = radeon_xv_pick_best_crtc(pScrn,
+ pPriv->drw_x,
+ pPriv->drw_x + pPriv->dst_w,
+ pPriv->drw_y,
+ pPriv->drw_y + pPriv->dst_h);
if (crtc)
FUNC_NAME(RADEONWaitForVLine)(pScrn, pPixmap,
crtc,