i915: video questions.
Krzysztof Halasa
khc at pm.waw.pl
Sat Jul 24 05:04:55 PDT 2010
Hi,
I wonder how should I do the "video sync" on i915+ hw properly. Should I
expect Xvideo (with XV_SYNC_TO_VBLANK activated) to actually sync to the
vertical refresh (i.e., Xvideo wouldn't be playing more frames than
Vsync), or should it only eliminate the tearing problems (screen data
not altered when displayed)?
For now, XV_SYNC_TO_VBLANK means the processing is halted with
MI_WAIT_FOR_PIPEx_SCAN_LINE_WINDOW. This IMHO means multiple frames can
be processed (= displayed) as long as the CRTC is scanning outside the
video window region. It doesn't mean there will be exactly a single
video frame displayed for a single CRTC output frame.
This is great for e.g. games, but not exactly for video. Should it stay
this way?
Also, there is this DRM_IOCTL_WAIT_VBLANK which can be used to wait for
actual Vsync IRQ. Should I use this for doing Xvideo - refresh sync?
The problem is this approach requires messing with /dev/dri*, perhaps
a Xvideo-only solution is better? DRM_IOCTL_WAIT_VBLANK can be used with
GLX applications, though.
Perhaps we should create a different Xvideo attribute for the actual
tearing avoidance (or just forget the attribute and always avoid the
tearing with MI_WAIT_FOR_PIPEx_SCAN_LINE_WINDOW)? Then the
XV_SYNC_TO_VBLANK could be used for syncing (using IRQ?) with the actual
vblank.
Opinions?
--
Krzysztof Halasa
More information about the xorg
mailing list