[PATCH v3 xserver 3/4] modesetting: move common page flip handle to pageflip.c
Michel Dänzer
michel at daenzer.net
Mon Aug 22 07:59:02 UTC 2016
On 22/08/16 12:53 PM, Qiang Yu wrote:
> The common page flip handle framework can be shared with DRI2
> page flip.
>
> Signed-off-by: Qiang Yu <Qiang.Yu at amd.com>
[...]
> diff --git a/hw/xfree86/drivers/modesetting/present.c b/hw/xfree86/drivers/modesetting/present.c
> index 18c82cd..deee1f1 100644
> --- a/hw/xfree86/drivers/modesetting/present.c
> +++ b/hw/xfree86/drivers/modesetting/present.c
> @@ -192,77 +192,30 @@ ms_present_flush(WindowPtr window)
> #ifdef GLAMOR
>
> /**
> - * Free an ms_crtc_pageflip.
> - *
> - * Drops the reference count on the flipdata.
> - */
> -static void
> -ms_present_flip_free(struct ms_crtc_pageflip *flip)
> -{
> - struct ms_flipdata *flipdata = flip->flipdata;
> -
> - free(flip);
> - if (--flipdata->flip_count > 0)
> - return;
> - free(flipdata);
> -}
> -
> -/**
> - * Callback for the DRM event queue when a single flip has completed
> - *
> - * Once the flip has been completed on all pipes, notify the
> + * Callback for the flip has been completed on all pipes, notify the
> * extension code telling it when that happened
Sticking to the existing comment style, maybe something like:
/**
* Callback for the DRM event queue when a flip has completed on all pipes
*
* Notify the extension code
*/
> /*
> - * Callback for the DRM queue abort code. A flip has been aborted.
> + * Callback for the flip has been aborted.
> */
I'd leave this comment unchanged.
> static void
> ms_present_flip_abort(void *data)
> {
> - struct ms_crtc_pageflip *flip = data;
> - struct ms_flipdata *flipdata = flip->flipdata;
> -
> - DebugPresent(("\t\tms:fa %lld c %d\n", (long long) flipdata->event->event_id, flipdata->flip_count));
Please preserve this DebugPresent call (minus flipdata->flip_count).
With that (and the copy & paste issue Daniel Martin pointed out fixed,
patches 3 & 4 are
Reviewed-by: Michel Dänzer <michel.daenzer at amd.com>
--
Earthling Michel Dänzer | http://www.amd.com
Libre software enthusiast | Mesa and X developer
More information about the xorg-devel
mailing list