Pick up fixes from git
This commit is contained in:
parent
28496c93d4
commit
4b53f71fc7
@ -0,0 +1,69 @@
|
||||
From 8b328d4ee3873bc0a7a34f2cb9d301827244b98c Mon Sep 17 00:00:00 2001
|
||||
From: Aaron Plattner <aplattner@nvidia.com>
|
||||
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 <aplattner@nvidia.com>
|
||||
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
|
||||
Reviewed-by: Colin Harrison <colin.harrison at virgin.net>
|
||||
Signed-off-by: Keith Packard <keithp@keithp.com>
|
||||
---
|
||||
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
|
||||
|
@ -0,0 +1,56 @@
|
||||
From 6703a7c7cf1a349c137e247a0c8eb462ff7b07be Mon Sep 17 00:00:00 2001
|
||||
From: Keith Packard <keithp@keithp.com>
|
||||
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 <keithp@keithp.com>
|
||||
Reviewed-by: Dave Airlie <airlied@redhat.com>
|
||||
---
|
||||
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
|
||||
|
@ -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 <ajax@redhat.com> 1.13.99.901-2
|
||||
- Pick up fixes from git
|
||||
|
||||
* Wed Jan 09 2013 Adam Jackson <ajax@redhat.com> 1.13.99.901-1
|
||||
- xserver 1.14RC1
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user