summaryrefslogtreecommitdiff
path: root/src/drmmode_display.c
diff options
context:
space:
mode:
authorCarl Worth <cworth@cworth.org>2009-04-29 14:43:56 -0700
committerKeith Packard <keithp@keithp.com>2009-05-14 17:01:53 -0700
commit128c1c3b7d57b157604788f82bf9fd389839068f (patch)
tree0c2b2d9ed8073dc3d8ecc0864bdb3ae212382905 /src/drmmode_display.c
parent2572fcc6196aff7a2f1095d211fd85d8668647ca (diff)
Use libdrm to lookup pipe for tear-free sync of XV
Previously, the code was trying to examine a driver_private field, but those fields are only set by the userland-modesetting code so would fail in the case of KMS. This fixes bug #21076: [945GME] [KMS] XV_SYNC_TO_VBLANK does not prevent tearing of xv video https://bugs.freedesktop.org/show_bug.cgi?id=21076
Diffstat (limited to 'src/drmmode_display.c')
-rw-r--r--src/drmmode_display.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/drmmode_display.c b/src/drmmode_display.c
index 15ffc29c..7df7b6fb 100644
--- a/src/drmmode_display.c
+++ b/src/drmmode_display.c
@@ -920,3 +920,11 @@ Bool drmmode_pre_init(ScrnInfoPtr pScrn, int fd, int cpp)
return TRUE;
}
+
+int
+drmmode_get_pipe_from_crtc_id(drm_intel_bufmgr *bufmgr, xf86CrtcPtr crtc)
+{
+ drmmode_crtc_private_ptr drmmode_crtc = crtc->driver_private;
+
+ return drm_intel_get_pipe_from_crtc_id (bufmgr, drmmode_crtc->mode_crtc->crtc_id);
+}