[PATCH] present: Query the right CRTC to use each time

Keith Packard keithp at keithp.com
Mon Jun 2 13:04:39 PDT 2014


Chris Wilson <chris at chris-wilson.co.uk> writes:

> As the CRTCs may be reconfigured between each invocation, we can not
> assume that the previous CRTC we used last time will still be valid for
> this call.

Is this a problem with CRTCs that are deleted? If so, hooking crtc
destruction would be pretty easy.

> diff --git a/present/present.c b/present/present.c
> index e35de94..d1bb9d4 100644
> --- a/present/present.c
> +++ b/present/present.c
> @@ -673,15 +673,8 @@ present_pixmap(WindowPtr window,
>  
>      if (!screen_priv || !screen_priv->info)
>          target_crtc = NULL;
> -    else if (!target_crtc) {
> -        /* Update the CRTC if we have a pixmap or we don't have a CRTC
> -         */
> -        if (!pixmap)
> -            target_crtc = window_priv->crtc;
> -
> -        if (!target_crtc)
> -            target_crtc = present_get_crtc(window);
> -    }
> +    else if (!target_crtc)
> +        target_crtc = present_get_crtc(window);

This only changes the behavior for notify_msc, and what we want there is
to continue using the same CRTC that the last swap used so that the
values are reasonable. All presents with a pixmap will continue to call
present_get_crtc each time.

-- 
keith.packard at intel.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 810 bytes
Desc: not available
URL: <http://lists.x.org/archives/xorg-devel/attachments/20140602/316848aa/attachment.sig>


More information about the xorg-devel mailing list