xorg-server: Changes to 'ubuntu-trusty'
debian/changelog | 7
debian/patches/disable-rotation-transform-gpuscreens.patch | 35 +--
debian/patches/rotation-slaved-crtc-bounds.patch | 122 +++++++++++++
debian/patches/series | 1
4 files changed, 142 insertions(+), 23 deletions(-)
New commits:
commit f3d6ff4350e55b52a766687f776af20a5faf0ba5
Author: Maarten Lankhorst <maarten.lankhorst@ubuntu.com>
Date: Mon Nov 3 12:24:01 2014 +0100
bump changelog
* Re-enable support for rotation and transforms on gpu-screens with support.
- Allows re-enabling intel SNA rotation after fixing it. (LP: #1386620)
* Fix black screen when using qemu with cirrus vga. (LP: #1386620)
diff --git a/debian/changelog b/debian/changelog
index 9e2495e..a8f1ea6 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,8 +1,13 @@
-xorg-server (2:1.15.1-0ubuntu2.2) UNRELEASED; urgency=low
+xorg-server (2:1.15.1-0ubuntu2.2) UNRELEASED; urgency=medium
[ Laércio de Sousa ]
* Backport support for logind-based multiseat back to trusty. (LP: #1209008)
+ [ Maarten Lankhorst ]
+ * Re-enable support for rotation and transforms on gpu-screens with support.
+ - Allows re-enabling intel SNA rotation after fixing it. (LP: #1386620)
+ * Fix black screen when using qemu with cirrus vga. (LP: #1386620)
+
-- Maarten Lankhorst <maarten.lankhorst@ubuntu.com> Tue, 30 Sep 2014 12:46:12 +0200
xorg-server (2:1.15.1-0ubuntu2.1) trusty-proposed; urgency=medium
diff --git a/debian/patches/disable-rotation-transform-gpuscreens.patch b/debian/patches/disable-rotation-transform-gpuscreens.patch
index 9da6c65..9f95572 100644
--- a/debian/patches/disable-rotation-transform-gpuscreens.patch
+++ b/debian/patches/disable-rotation-transform-gpuscreens.patch
@@ -1,22 +1,13 @@
---- a/hw/xfree86/modes/xf86RandR12.c
-+++ b/hw/xfree86/modes/xf86RandR12.c
-@@ -932,6 +932,9 @@
- if (xf86RandR12Key == NULL)
- return;
-
-+ if (pScreen->isGPU)
-+ rotations = RR_Rotate_0;
-+
- randrp = XF86RANDRINFO(pScreen);
- #if RANDR_12_INTERFACE
- for (c = 0; c < config->num_crtc; c++) {
-@@ -954,6 +957,9 @@
- xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(pScrn);
- #endif
-
-+ if (pScreen->isGPU)
-+ transforms = FALSE;
-+
- if (xf86RandR12Key == NULL)
- return;
-
+diff --git a/hw/xfree86/modes/xf86Crtc.c b/hw/xfree86/modes/xf86Crtc.c
+index a441fd1..9147a26 100644
+--- a/hw/xfree86/modes/xf86Crtc.c
++++ b/hw/xfree86/modes/xf86Crtc.c
+@@ -778,7 +778,7 @@ xf86CrtcScreenInit(ScreenPtr screen)
+ if (!crtc->funcs->shadow_allocate || !crtc->funcs->shadow_create)
+ break;
+ }
+- if (c == config->num_crtc) {
++ if (c == config->num_crtc && !screen->isGPU) {
+ xf86RandR12SetRotations(screen, RR_Rotate_0 | RR_Rotate_90 |
+ RR_Rotate_180 | RR_Rotate_270 |
+ RR_Reflect_X | RR_Reflect_Y);
diff --git a/debian/patches/rotation-slaved-crtc-bounds.patch b/debian/patches/rotation-slaved-crtc-bounds.patch
new file mode 100644
index 0000000..4c8345a
--- /dev/null
+++ b/debian/patches/rotation-slaved-crtc-bounds.patch
@@ -0,0 +1,122 @@
+From: Chris Wilson <chris@chris-wilson.co.uk>
+To: xorg-devel@lists.x.org
+Subject: [PATCH 2/3] randr: Consider rotation of slaved crtcs when computing bounds
+Date: Wed, 23 Jul 2014 12:35:14 +0100
+
+When creating a pixmap to cover a rotated slaved CRTC, we need to
+consider its rotated size as that is the area that it occupies in the
+framebuffer. The slave is then responsible for mapping the copy of the
+framebuffer onto the rotated scanout - which can be the usual RandR
+shadow composite method.
+
+Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
+Cc: Dave Airlie <airlied@redhat.com>
+Cc: Maarten Lankhorst <maarten.lankhorst@canonical.com>
+---
+ randr/rrcrtc.c | 56 ++++++++++++++++++++++++++++++++++++--------------------
+ 1 file changed, 36 insertions(+), 20 deletions(-)
+
+--- a/randr/rrcrtc.c
++++ b/randr/rrcrtc.c
+@@ -273,27 +273,43 @@
+ return FALSE;
+ }
+
+-static void
+-crtc_bounds(RRCrtcPtr crtc, int *left, int *right, int *top, int *bottom)
++static int mode_height(const RRModeRec *mode, Rotation rotation)
+ {
+- *left = crtc->x;
+- *top = crtc->y;
+-
+- switch (crtc->rotation) {
++ switch (rotation & 0xf) {
+ case RR_Rotate_0:
+ case RR_Rotate_180:
++ return mode->mode.height;
++ case RR_Rotate_90:
++ case RR_Rotate_270:
++ return mode->mode.width;
+ default:
+- *right = crtc->x + crtc->mode->mode.width;
+- *bottom = crtc->y + crtc->mode->mode.height;
+- return;
++ return 0;
++ }
++}
++
++static int mode_width(const RRModeRec *mode, Rotation rotation)
++{
++ switch (rotation & 0xf) {
++ case RR_Rotate_0:
++ case RR_Rotate_180:
++ return mode->mode.width;
+ case RR_Rotate_90:
+ case RR_Rotate_270:
+- *right = crtc->x + crtc->mode->mode.height;
+- *bottom = crtc->y + crtc->mode->mode.width;
+- return;
++ return mode->mode.height;
++ default:
++ return 0;
+ }
+ }
+
++static void
++crtc_bounds(RRCrtcPtr crtc, int *left, int *right, int *top, int *bottom)
++{
++ *left = crtc->x;
++ *top = crtc->y;
++ *right = crtc->x + mode_width(crtc->mode, crtc->rotation);
++ *bottom = crtc->y + mode_height(crtc->mode, crtc->rotation);
++}
++
+ /* overlapping counts as adjacent */
+ static Bool
+ crtcs_adjacent(const RRCrtcPtr a, const RRCrtcPtr b)
+@@ -466,9 +482,9 @@
+ if (!pScrPriv->crtcs[c]->mode)
+ continue;
+ newbox.x1 = pScrPriv->crtcs[c]->x;
+- newbox.x2 = pScrPriv->crtcs[c]->x + pScrPriv->crtcs[c]->mode->mode.width;
++ newbox.x2 = pScrPriv->crtcs[c]->x + mode_width(pScrPriv->crtcs[c]->mode, pScrPriv->crtcs[c]->rotation);
+ newbox.y1 = pScrPriv->crtcs[c]->y;
+- newbox.y2 = pScrPriv->crtcs[c]->y + pScrPriv->crtcs[c]->mode->mode.height;
++ newbox.y2 = pScrPriv->crtcs[c]->y + mode_height(pScrPriv->crtcs[c]->mode, pScrPriv->crtcs[c]->rotation);
+ }
+ RegionInit(&new_crtc_region, &newbox, 1);
+ RegionUnion(&total_region, &total_region, &new_crtc_region);
+@@ -487,9 +503,9 @@
+ if (!pScrPriv->crtcs[c]->mode)
+ continue;
+ newbox.x1 = pScrPriv->crtcs[c]->x;
+- newbox.x2 = pScrPriv->crtcs[c]->x + pScrPriv->crtcs[c]->mode->mode.width;
++ newbox.x2 = pScrPriv->crtcs[c]->x + mode_width(pScrPriv->crtcs[c]->mode, pScrPriv->crtcs[c]->rotation);
+ newbox.y1 = pScrPriv->crtcs[c]->y;
+- newbox.y2 = pScrPriv->crtcs[c]->y + pScrPriv->crtcs[c]->mode->mode.height;
++ newbox.y2 = pScrPriv->crtcs[c]->y + mode_height(pScrPriv->crtcs[c]->mode, pScrPriv->crtcs[c]->rotation);
+ }
+ RegionInit(&new_crtc_region, &newbox, 1);
+ RegionUnion(&total_region, &total_region, &new_crtc_region);
+@@ -544,8 +560,8 @@
+ int width = 0, height = 0;
+
+ if (mode) {
+- width = mode->mode.width;
+- height = mode->mode.height;
++ width = mode_width(mode, rotation);
++ height = mode_height(mode, rotation);
+ }
+ ErrorF("have a master to look out for\n");
+ ret = rrCheckPixmapBounding(master, crtc,
+@@ -1672,8 +1688,8 @@
+ changed = FALSE;
+ if (crtc->mode && crtc->x == pDrawable->x &&
+ crtc->y == pDrawable->y &&
+- crtc->mode->mode.width == pDrawable->width &&
+- crtc->mode->mode.height == pDrawable->height)
++ mode_width(crtc->mode, crtc->rotation) == pDrawable->width &&
++ mode_height(crtc->mode, crtc->rotation) == pDrawable->height)
+ size_fits = TRUE;
+
+ /* is the pixmap already set? */
diff --git a/debian/patches/series b/debian/patches/series
index 5cc0272..a378325 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -60,3 +60,4 @@ xfree86_allow_fallback_to_pci_bus_probe_for_non_seat0.patch
xfree86_keep_non_seat0_from_touching_vts.patch
xfree86_add_matchseat_key_to_xorg_conf.patch
xfree86_add_matchseat_key_description_to_xorg_conf_man.patch
+rotation-slaved-crtc-bounds.patch
Reply to: