[PATCH 5/7] present: Clear target_crtc if driver lacks Present support

Keith Packard keithp at keithp.com
Wed Dec 4 10:10:53 PST 2013


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 at keithp.com>
Tested-by: Fredrik Höglund <fredrik at kde.org>
---
 present/present.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/present/present.c b/present/present.c
index 76e12ed..3fd5e8b 100644
--- a/present/present.c
+++ b/present/present.c
@@ -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)
-- 
1.8.4.4



More information about the xorg-devel mailing list