present: Clear target_crtc if driver lacks Present support

If the driver doesn't have the necessary hooks for Present, then the
target_crtc needs to be set to NULL to make sure the extension uses
the present_fake code.

Signed-off-by: Keith Packard <keithp@keithp.com>
Tested-by: Fredrik Höglund <fredrik@kde.org>
Reviewed-by: Adam Jackson <ajax@redhat.com>
This commit is contained in:
Keith Packard 2013-11-26 12:06:57 -08:00
parent 3dd5bfe540
commit 4aa77378de

View File

@ -594,7 +594,9 @@ present_pixmap(WindowPtr window,
if (!window_priv)
return BadAlloc;
if (!target_crtc) {
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)