From 4b53f71fc7d17feeb8a1509b45503a7408f0d658 Mon Sep 17 00:00:00 2001 From: Adam Jackson Date: Jan 10 2013 04:25:55 +0000 Subject: Pick up fixes from git --- diff --git a/0001-dix-Make-small-bitfields-that-store-enums-unsigned.patch b/0001-dix-Make-small-bitfields-that-store-enums-unsigned.patch new file mode 100644 index 0000000..39ac550 --- /dev/null +++ b/0001-dix-Make-small-bitfields-that-store-enums-unsigned.patch @@ -0,0 +1,69 @@ +From 8b328d4ee3873bc0a7a34f2cb9d301827244b98c Mon Sep 17 00:00:00 2001 +From: Aaron Plattner +Date: Fri, 21 Dec 2012 07:37:33 -0800 +Subject: [PATCH 1/2] dix: Make small bitfields that store enums unsigned + +Commit 31bf81772e146af79b0c456aae2159eba8b0280f changed the clientState field +from a signed int to a signed int 2-bit bitfield. The ClientState enum that is +expected to be assigned to this field has four values: ClientStateInitial (0), +ClientStateRunning (1), ClientStateRetained (2), and ClientStateGone (3). +However, because this bitfield is signed, ClientStateRetained becomes -2 when +assigned, and ClientStateGone becomes -1. This causes warnings: + + test.c:54:10: error: case label value exceeds maximum value for type [-Werror] + test.c:55:10: error: case label value exceeds maximum value for type [-Werror] + +The code here is a switch statement: + + 53 switch (client->clientState) { + 54 case ClientStateGone: + 55 case ClientStateRetained: + 56 [...] + 57 break; + 58 + 59 default: + 60 [...] + 61 break; + 62 } + +It also causes bizarre problems like this: + + client->clientState = ClientStateGone; + assert(client->clientState == ClientStateGone); // this assert fails + +Also change the signedness of nearby bitfields to match. + +Signed-off-by: Aaron Plattner +Reviewed-by: Alex Deucher +Reviewed-by: Colin Harrison +Signed-off-by: Keith Packard +--- + include/dixstruct.h | 12 ++++++------ + 1 file changed, 6 insertions(+), 6 deletions(-) + +diff --git a/include/dixstruct.h b/include/dixstruct.h +index c1236f5..6784819 100644 +--- a/include/dixstruct.h ++++ b/include/dixstruct.h +@@ -90,12 +90,12 @@ typedef struct _Client { + Mask clientAsMask; + short index; + unsigned char majorOp, minorOp; +- int swapped:1; +- int local:1; +- int big_requests:1; /* supports large requests */ +- int clientGone:1; +- int closeDownMode:2; +- int clientState:2; ++ unsigned int swapped:1; ++ unsigned int local:1; ++ unsigned int big_requests:1; /* supports large requests */ ++ unsigned int clientGone:1; ++ unsigned int closeDownMode:2; ++ unsigned int clientState:2; + char smart_priority; + short noClientException; /* this client died or needs to be killed */ + int priority; +-- +1.8.0.2 + diff --git a/0002-hw-xfree86-Require-only-one-working-CRTC-to-start-th.patch b/0002-hw-xfree86-Require-only-one-working-CRTC-to-start-th.patch new file mode 100644 index 0000000..4d53b07 --- /dev/null +++ b/0002-hw-xfree86-Require-only-one-working-CRTC-to-start-th.patch @@ -0,0 +1,56 @@ +From 6703a7c7cf1a349c137e247a0c8eb462ff7b07be Mon Sep 17 00:00:00 2001 +From: Keith Packard +Date: Tue, 8 Jan 2013 20:24:32 -0800 +Subject: [PATCH 2/2] hw/xfree86: Require only one working CRTC to start the + server. + +Instead of requiring every mode set to complete successfully, start up +as long as at least one CRTC is working. This avoids failures when one +or more CRTCs can't start due to mode setting conflicts. + +Signed-off-by: Keith Packard +Reviewed-by: Dave Airlie +--- + hw/xfree86/modes/xf86Crtc.c | 15 +++++++++++---- + 1 file changed, 11 insertions(+), 4 deletions(-) + +diff --git a/hw/xfree86/modes/xf86Crtc.c b/hw/xfree86/modes/xf86Crtc.c +index 13251cf..b3ded5a 100644 +--- a/hw/xfree86/modes/xf86Crtc.c ++++ b/hw/xfree86/modes/xf86Crtc.c +@@ -2605,6 +2605,7 @@ xf86SetDesiredModes(ScrnInfoPtr scrn) + xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(scrn); + xf86CrtcPtr crtc = config->crtc[0]; + int c; ++ int enabled = 0; + + /* A driver with this hook will take care of this */ + if (!crtc->funcs->set_mode_major) { +@@ -2655,14 +2656,20 @@ xf86SetDesiredModes(ScrnInfoPtr scrn) + transform = &crtc->desiredTransform; + else + transform = NULL; +- if (!xf86CrtcSetModeTransform ++ if (xf86CrtcSetModeTransform + (crtc, &crtc->desiredMode, crtc->desiredRotation, transform, +- crtc->desiredX, crtc->desiredY)) +- return FALSE; ++ crtc->desiredX, crtc->desiredY)) { ++ ++enabled; ++ } else { ++ for (o = 0; o < config->num_output; o++) ++ if (config->output[o]->crtc == crtc) ++ config->output[o]->crtc = NULL; ++ crtc->enabled = FALSE; ++ } + } + + xf86DisableUnusedFunctions(scrn); +- return TRUE; ++ return enabled != 0; + } + + /** +-- +1.8.0.2 + diff --git a/xorg-x11-server.spec b/xorg-x11-server.spec index 08facd6..64baa59 100644 --- a/xorg-x11-server.spec +++ b/xorg-x11-server.spec @@ -42,7 +42,7 @@ Summary: X.Org X11 X server Name: xorg-x11-server Version: 1.13.99.901 -Release: 1%{?gitdate:.%{gitdate}}%{dist} +Release: 2%{?gitdate:.%{gitdate}}%{dist} URL: http://www.x.org License: MIT Group: User Interface/X @@ -110,6 +110,11 @@ Patch7066: 0001-xf86crtc-don-t-use-display-for-vx-vy-for-gpu-screens.patch # autoconfig: send events Patch7067: 0001-autoconfig-fixup-tell-changed-so-randr-clients-can-t.patch +# sync with git +Patch7070: 0001-dix-Make-small-bitfields-that-store-enums-unsigned.patch +Patch7071: 0002-hw-xfree86-Require-only-one-working-CRTC-to-start-th.patch + + %global moduledir %{_libdir}/xorg/modules %global drimoduledir %{_libdir}/dri %global sdkdir %{_includedir}/xorg @@ -582,6 +587,9 @@ rm -rf $RPM_BUILD_ROOT %{xserver_source_dir} %changelog +* Wed Jan 09 2013 Adam Jackson 1.13.99.901-2 +- Pick up fixes from git + * Wed Jan 09 2013 Adam Jackson 1.13.99.901-1 - xserver 1.14RC1