[Intel-gfx] xf86-video-intel: src/xvmc/intel_xvmc.c
Zou, Nanhai
nanhai.zou at intel.com
Thu Dec 18 09:26:01 CET 2008
>-----Original Message-----
>From: Wang, Zhenyu Z
>Sent: 2008年12月18日 16:07
>To: Zou, Nanhai
>Cc: intel-gfx
>Subject: Re: xf86-video-intel: src/xvmc/intel_xvmc.c
>
>On 2008.12.17 13:55:41 +0800, Nan hai Zou wrote:
>>
>> src/xvmc/intel_xvmc.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> New commits:
>> commit 555eea5411cf8c725df5f1b4cb80198fa6a1225b
>> Author: Zou Nan hai <nanhai.zou at intel.com>
>> Date: Wed Dec 17 13:55:07 2008 +0800
>>
>> wait vblank before render to fix tearing
>>
>> diff --git a/src/xvmc/intel_xvmc.c b/src/xvmc/intel_xvmc.c
>> index dbde22f..c197e35 100644
>> --- a/src/xvmc/intel_xvmc.c
>> +++ b/src/xvmc/intel_xvmc.c
>> @@ -757,7 +757,7 @@ _X_EXPORT Status XvMCPutSurface(Display
>*display,XvMCSurface *surface,
>> }
>> intel_surf->last_draw = draw;
>> /* fill intel_surf->data */
>> - if (0)
>> + if (1)
>> {
>> drmVBlank vbl;
>> vbl.request.type = DRM_VBLANK_RELATIVE;
>
>This is broken as no care is taken for vblank pipes (e.g I have to
>add DRM_VBLANK_SECONDARY for my GM965 LVDS on pipe B).
>As XvMC uses Xv port for video playback, we should just fix
>Xv port for vblank sync. My suggest is to add a Xv port attribute
>for texture video, that can flip vblank wait on or off. Or we
>might steal some idea from radeon driver. But doing this in XvMC
>lib is wrong to me anyway.
>
Wait in server context is not a good idea, either busy wait or sleep, user experience will not be good when server stall for vblank.
So let's do it in client context.
I don't think we need an option here, no user will be unhappy if we sync video render for him, unless we are rendering to a pixmap, we can detect this in later patch.
I don't like to confuse user with more and more options.
I have an original patch to do that with vblank_swap, unfortunately I found vblank ioctl was deleted in recent drm.
Zou Nan hai
>Please send non-trivial patches to intel-gfx at lists.freedesktop.org
>before you pushing for review. Thanks.
>
>--
>Open Source Technology Center, Intel ltd.
>
>$gpg --keyserver wwwkeys.pgp.net --recv-keys 4D781827
More information about the Intel-gfx
mailing list