[PATCH xserver 3/6] modesetting: add DRI2 page flip support

2016-08-17 Thread Qiang Yu
Signed-off-by: Qiang Yu --- hw/xfree86/drivers/modesetting/dri2.c | 260 -- 1 file changed, 251 insertions(+), 9 deletions(-) diff --git a/hw/xfree86/drivers/modesetting/dri2.c b/hw/xfree86/drivers/modesetting/dri2.c index 83cb3e0..11e0e6f 100644 --- a/hw/xfree86

Re: [PATCH xserver 3/6] modesetting: add DRI2 page flip support

2016-08-18 Thread Michel Dänzer
On 17/08/16 07:29 PM, Qiang Yu wrote: > > +static void > +ms_dri2_flip_free(struct ms_crtc_pageflip *flip) > +{ > +struct ms_flipdata *flipdata = flip->flipdata; > + > +free(flip); > +if (--flipdata->flip_count > 0) > +return; > +free(flipdata); > +} > + > +static void > +m

Re: [PATCH xserver 3/6] modesetting: add DRI2 page flip support

2016-08-19 Thread Yu, Qiang
> +static Bool > +can_exchange(ScrnInfoPtr scrn, DrawablePtr draw, > + DRI2BufferPtr front, DRI2BufferPtr back) > +{ [...] > +if (!update_front(draw, front)) > +return FALSE; I know you just copied this from -ati/amdgpu, but: I don't think can_exchange should call update_f

Re: [PATCH xserver 3/6] modesetting: add DRI2 page flip support

2016-08-19 Thread Michel Dänzer
On 19/08/16 04:06 PM, Yu, Qiang wrote: > >>> +static Bool >>> +can_exchange(ScrnInfoPtr scrn, DrawablePtr draw, >>> + DRI2BufferPtr front, DRI2BufferPtr back) >>> +{ >> >> [...] >> >>> +if (!update_front(draw, front)) >>> +return FALSE; >> >> I know you just copied this fro

Re: [PATCH xserver 3/6] modesetting: add DRI2 page flip support

2016-08-19 Thread Yu, Qiang
>>> +/* Post damage on the front buffer so that listeners, such >>> + * as DisplayLink know take a copy and shove it over the USB. >>> + * also for sw cursors. >>> + */ >> >> SW cursors cannot work correctly with page flipping. For that reason, >> xf86-video-ati/amdgpu disable page

Re: [PATCH xserver 3/6] modesetting: add DRI2 page flip support

2016-08-19 Thread Michel Dänzer
On 19/08/16 04:48 PM, Yu, Qiang wrote: > > +/* Post damage on the front buffer so that listeners, such > + * as DisplayLink know take a copy and shove it over the USB. > + * also for sw cursors. > + */ SW cursors cannot work correctly with page flipping. F