sna: Set supported rotations on virtual outputs
authorChris Wilson <chris@chris-wilson.co.uk>
Wed, 20 Nov 2013 18:50:40 +0000 (18:50 +0000)
committerChris Wilson <chris@chris-wilson.co.uk>
Thu, 21 Nov 2013 10:07:00 +0000 (10:07 +0000)
As the virtual outputs are created later, they do not get automatically
populated with RR properties and we must do that instantiation
ourselves.

Reported-by: Kirill Müller <mail@kirill-mueller.de>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=71846
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
src/sna/sna.h
src/sna/sna_display_fake.c
src/sna/sna_driver.c

index f26c827..6474d11 100644 (file)
@@ -1020,4 +1020,7 @@ static inline void sigtrap_put(void)
        --sigtrap;
 }
 
+#define RR_Rotate_All (RR_Rotate_0 | RR_Rotate_90 | RR_Rotate_180 | RR_Rotate_270)
+#define RR_Reflect_All (RR_Reflect_X | RR_Reflect_Y)
+
 #endif /* _SNA_H */
index fd1419b..29426b7 100644 (file)
@@ -299,6 +299,9 @@ static bool add_fake_output(struct sna *sna, bool late)
                            !RROutputSetClones(output->randr_output, clones, j))
                                goto err;
                }
+
+               RRCrtcSetRotations(crtc->randr_crtc,
+                                  RR_Rotate_All | RR_Reflect_All);
        } else {
                mask = (1 << ++sna->mode.num_fake) - 1;
                output->possible_crtcs = mask << sna->mode.num_real_crtc;
index 805ae05..1832cd8 100644 (file)
@@ -1037,9 +1037,7 @@ sna_screen_init(SCREEN_INIT_ARGS_DECL)
        if (!xf86CrtcScreenInit(screen))
                return FALSE;
 
-       xf86RandR12SetRotations(screen,
-                               RR_Rotate_0 | RR_Rotate_90 | RR_Rotate_180 | RR_Rotate_270 |
-                               RR_Reflect_X | RR_Reflect_Y);
+       xf86RandR12SetRotations(screen, RR_Rotate_All | RR_Reflect_All);
        xf86RandR12SetTransformSupport(screen, TRUE);
 
        if (!miCreateDefColormap(screen))