Re: [Mesa-dev] [PATCH 13/14] vl/dri3: implement functions for get and set timestamp

2016-05-11 Thread Leo Liu
Hi Axel, Just clarify something you might got misunderstand on vl implementation perspective. >The present extension has something exactly to set the target ust for the presentation: PresentOptionUST >Unfortunately, while it is in the spec it looks like the option is totally ignored, and t

Re: [Mesa-dev] [PATCH 13/14] vl/dri3: implement functions for get and set timestamp

2016-05-11 Thread Leo Liu
On 05/11/2016 05:37 PM, Axel Davy wrote: On 11/05/2016 23:31, Leo Liu wrote: On 05/11/2016 05:18 PM, Axel Davy wrote: On 11/05/2016 23:08, Leo Liu wrote: scrn->next_msc = ((int64_t)stamp - scrn->last_ust + scrn->ns_frame/2) / + scrn->ns_frame + scrn->last_msc; Coul

Re: [Mesa-dev] [PATCH 13/14] vl/dri3: implement functions for get and set timestamp

2016-05-11 Thread Axel Davy
On 11/05/2016 23:31, Leo Liu wrote: On 05/11/2016 05:18 PM, Axel Davy wrote: On 11/05/2016 23:08, Leo Liu wrote: scrn->next_msc = ((int64_t)stamp - scrn->last_ust + scrn->ns_frame/2) / + scrn->ns_frame + scrn->last_msc; Could you explain this calculation ? ns_frame i

Re: [Mesa-dev] [PATCH 13/14] vl/dri3: implement functions for get and set timestamp

2016-05-11 Thread Leo Liu
On 05/11/2016 05:18 PM, Axel Davy wrote: On 11/05/2016 23:08, Leo Liu wrote: scrn->next_msc = ((int64_t)stamp - scrn->last_ust + scrn->ns_frame/2) / + scrn->ns_frame + scrn->last_msc; Could you explain this calculation ? ns_frame is the time for vsync in ns. last_ust

Re: [Mesa-dev] [PATCH 13/14] vl/dri3: implement functions for get and set timestamp

2016-05-11 Thread Axel Davy
On 11/05/2016 23:08, Leo Liu wrote: scrn->next_msc = ((int64_t)stamp - scrn->last_ust + scrn->ns_frame/2) / + scrn->ns_frame + scrn->last_msc; Could you explain this calculation ? I think it may get issues if ns_frame is wrong. For example for some reason (app hidden fo

Re: [Mesa-dev] [PATCH 13/14] vl/dri3: implement functions for get and set timestamp

2016-05-11 Thread Leo Liu
On 05/11/2016 04:16 PM, Axel Davy wrote: Hi, The present extension has something exactly to set the target ust for the presentation: PresentOptionUST Unfortunately, while it is in the spec it looks like the option is totally ignored, and thus it will be totally buggy (you are supposed to

Re: [Mesa-dev] [PATCH 13/14] vl/dri3: implement functions for get and set timestamp

2016-05-11 Thread Axel Davy
Hi, The present extension has something exactly to set the target ust for the presentation: PresentOptionUST Unfortunately, while it is in the spec it looks like the option is totally ignored, and thus it will be totally buggy (you are supposed to pass ust instead of msc...). However Prese

[Mesa-dev] [PATCH 13/14] vl/dri3: implement functions for get and set timestamp

2016-05-11 Thread Leo Liu
Signed-off-by: Leo Liu --- src/gallium/auxiliary/vl/vl_winsys_dri3.c | 59 +++ 1 file changed, 53 insertions(+), 6 deletions(-) diff --git a/src/gallium/auxiliary/vl/vl_winsys_dri3.c b/src/gallium/auxiliary/vl/vl_winsys_dri3.c index f917e4b..d8e8319 100644 --- a/src/