xorg-server: Changes to 'upstream-unstable'
hw/dmx/glxProxy/glxcmds.c | 6 ++--
hw/dmx/glxProxy/glxcmdsswap.c | 2 -
hw/kdrive/ephyr/ephyrdriext.c | 2 -
hw/xfree86/dixmods/extmod/xf86dga2.c | 46 +++++++++++++++++------------------
hw/xfree86/modes/xf86RandR12.c | 10 +++++++
5 files changed, 38 insertions(+), 28 deletions(-)
New commits:
commit 6f7f3e2b799984e1b8aade89726dc226fc0b89ac
Author: Cyril Brulebois <kibi@debian.org>
Date: Wed Dec 1 14:12:55 2010 +0100
Fix screen number checks.
screenInfo.numScreens is not a valid screen number, they go from 0 to
numScreens - 1.
Signed-off-by: Cyril Brulebois <kibi@debian.org>
Reviewed-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
(cherry picked from commit 279ef1ffd787dba2f0d5056849b9cb15d36aa3eb)
diff --git a/hw/dmx/glxProxy/glxcmds.c b/hw/dmx/glxProxy/glxcmds.c
index 31fd431..d790b71 100644
--- a/hw/dmx/glxProxy/glxcmds.c
+++ b/hw/dmx/glxProxy/glxcmds.c
@@ -1536,7 +1536,7 @@ int __glXGetVisualConfigs(__GLXclientState *cl, GLbyte *pc)
int i, p;
screen = req->screen;
- if (screen > screenInfo.numScreens) {
+ if (screen >= screenInfo.numScreens) {
/* The client library must send a valid screen number. */
client->errorValue = screen;
return BadValue;
@@ -2685,7 +2685,7 @@ int __glXGetFBConfigs(__GLXclientState *cl, GLbyte *pc)
int numFBConfigs, i, p;
__GLXscreenInfo *pGlxScreen;
- if (screen > screenInfo.numScreens) {
+ if (screen >= screenInfo.numScreens) {
/* The client library must send a valid screen number. */
client->errorValue = screen;
return BadValue;
@@ -3106,7 +3106,7 @@ int __glXCreatePbuffer(__GLXclientState *cl, GLbyte *pc)
/*
** Look up screen and FBConfig.
*/
- if (screen > screenInfo.numScreens) {
+ if (screen >= screenInfo.numScreens) {
/* The client library must send a valid screen number. */
client->errorValue = screen;
return BadValue;
diff --git a/hw/dmx/glxProxy/glxcmdsswap.c b/hw/dmx/glxProxy/glxcmdsswap.c
index b3720f6..780ca42 100644
--- a/hw/dmx/glxProxy/glxcmdsswap.c
+++ b/hw/dmx/glxProxy/glxcmdsswap.c
@@ -251,7 +251,7 @@ int __glXSwapGetVisualConfigs(__GLXclientState *cl, GLbyte *pc)
__GLX_SWAP_INT(&req->screen);
screen = req->screen;
- if (screen > screenInfo.numScreens) {
+ if (screen >= screenInfo.numScreens) {
/* The client library must send a valid screen number. */
client->errorValue = screen;
return BadValue;
diff --git a/hw/kdrive/ephyr/ephyrdriext.c b/hw/kdrive/ephyr/ephyrdriext.c
index 231b098..9f38908 100644
--- a/hw/kdrive/ephyr/ephyrdriext.c
+++ b/hw/kdrive/ephyr/ephyrdriext.c
@@ -470,7 +470,7 @@ EphyrDuplicateVisual (unsigned int a_screen,
int i=0 ;
EPHYR_LOG ("enter\n") ;
- if (a_screen > screenInfo.numScreens) {
+ if (a_screen >= screenInfo.numScreens) {
EPHYR_LOG_ERROR ("bad screen number\n") ;
goto out;
}
commit bcab9213fbafa3091d2f5c831bb668cacaec5f8b
Author: Julien Cristau <jcristau@debian.org>
Date: Tue Nov 30 17:23:10 2010 +0100
DGA: fix screen number check
screenInfo.numScreens is not a valid screen number, they go from 0 to
numScreens - 1.
Signed-off-by: Julien Cristau <jcristau@debian.org>
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
(cherry picked from commit 8684543021b9b1aa165b1bc69bc58685cb5942c1)
diff --git a/hw/xfree86/dixmods/extmod/xf86dga2.c b/hw/xfree86/dixmods/extmod/xf86dga2.c
index 5367bcc..3742c2b 100644
--- a/hw/xfree86/dixmods/extmod/xf86dga2.c
+++ b/hw/xfree86/dixmods/extmod/xf86dga2.c
@@ -139,7 +139,7 @@ ProcXDGAOpenFramebuffer(ClientPtr client)
char *deviceName;
int nameSize;
- if (stuff->screen > screenInfo.numScreens)
+ if (stuff->screen >= screenInfo.numScreens)
return BadValue;
if (!DGAAvailable(stuff->screen))
@@ -173,7 +173,7 @@ ProcXDGACloseFramebuffer(ClientPtr client)
{
REQUEST(xXDGACloseFramebufferReq);
- if (stuff->screen > screenInfo.numScreens)
+ if (stuff->screen >= screenInfo.numScreens)
return BadValue;
if (!DGAAvailable(stuff->screen))
@@ -195,7 +195,7 @@ ProcXDGAQueryModes(ClientPtr client)
xXDGAModeInfo info;
XDGAModePtr mode;
- if (stuff->screen > screenInfo.numScreens)
+ if (stuff->screen >= screenInfo.numScreens)
return BadValue;
REQUEST_SIZE_MATCH(xXDGAQueryModesReq);
@@ -313,7 +313,7 @@ ProcXDGASetMode(ClientPtr client)
PixmapPtr pPix;
int size;
- if (stuff->screen > screenInfo.numScreens)
+ if (stuff->screen >= screenInfo.numScreens)
return BadValue;
REQUEST_SIZE_MATCH(xXDGASetModeReq);
@@ -402,7 +402,7 @@ ProcXDGASetViewport(ClientPtr client)
{
REQUEST(xXDGASetViewportReq);
- if (stuff->screen > screenInfo.numScreens)
+ if (stuff->screen >= screenInfo.numScreens)
return BadValue;
if(DGAClients[stuff->screen] != client)
@@ -422,7 +422,7 @@ ProcXDGAInstallColormap(ClientPtr client)
int rc;
REQUEST(xXDGAInstallColormapReq);
- if (stuff->screen > screenInfo.numScreens)
+ if (stuff->screen >= screenInfo.numScreens)
return BadValue;
if(DGAClients[stuff->screen] != client)
@@ -448,7 +448,7 @@ ProcXDGASelectInput(ClientPtr client)
{
REQUEST(xXDGASelectInputReq);
- if (stuff->screen > screenInfo.numScreens)
+ if (stuff->screen >= screenInfo.numScreens)
return BadValue;
if(DGAClients[stuff->screen] != client)
@@ -468,7 +468,7 @@ ProcXDGAFillRectangle(ClientPtr client)
{
REQUEST(xXDGAFillRectangleReq);
- if (stuff->screen > screenInfo.numScreens)
+ if (stuff->screen >= screenInfo.numScreens)
return BadValue;
if(DGAClients[stuff->screen] != client)
@@ -488,7 +488,7 @@ ProcXDGACopyArea(ClientPtr client)
{
REQUEST(xXDGACopyAreaReq);
- if (stuff->screen > screenInfo.numScreens)
+ if (stuff->screen >= screenInfo.numScreens)
return BadValue;
if(DGAClients[stuff->screen] != client)
@@ -509,7 +509,7 @@ ProcXDGACopyTransparentArea(ClientPtr client)
{
REQUEST(xXDGACopyTransparentAreaReq);
- if (stuff->screen > screenInfo.numScreens)
+ if (stuff->screen >= screenInfo.numScreens)
return BadValue;
if(DGAClients[stuff->screen] != client)
@@ -531,7 +531,7 @@ ProcXDGAGetViewportStatus(ClientPtr client)
REQUEST(xXDGAGetViewportStatusReq);
xXDGAGetViewportStatusReply rep;
- if (stuff->screen > screenInfo.numScreens)
+ if (stuff->screen >= screenInfo.numScreens)
return BadValue;
if(DGAClients[stuff->screen] != client)
@@ -554,7 +554,7 @@ ProcXDGASync(ClientPtr client)
REQUEST(xXDGASyncReq);
xXDGASyncReply rep;
- if (stuff->screen > screenInfo.numScreens)
+ if (stuff->screen >= screenInfo.numScreens)
return BadValue;
if(DGAClients[stuff->screen] != client)
@@ -599,7 +599,7 @@ ProcXDGAChangePixmapMode(ClientPtr client)
xXDGAChangePixmapModeReply rep;
int x, y;
- if (stuff->screen > screenInfo.numScreens)
+ if (stuff->screen >= screenInfo.numScreens)
return BadValue;
if(DGAClients[stuff->screen] != client)
@@ -630,7 +630,7 @@ ProcXDGACreateColormap(ClientPtr client)
REQUEST(xXDGACreateColormapReq);
int result;
- if (stuff->screen > screenInfo.numScreens)
+ if (stuff->screen >= screenInfo.numScreens)
return BadValue;
if(DGAClients[stuff->screen] != client)
@@ -677,7 +677,7 @@ ProcXF86DGAGetVideoLL(ClientPtr client)
int num, offset, flags;
char *name;
- if (stuff->screen > screenInfo.numScreens)
+ if (stuff->screen >= screenInfo.numScreens)
return BadValue;
REQUEST_SIZE_MATCH(xXF86DGAGetVideoLLReq);
@@ -715,7 +715,7 @@ ProcXF86DGADirectVideo(ClientPtr client)
XDGAModeRec mode;
REQUEST(xXF86DGADirectVideoReq);
- if (stuff->screen > screenInfo.numScreens)
+ if (stuff->screen >= screenInfo.numScreens)
return BadValue;
REQUEST_SIZE_MATCH(xXF86DGADirectVideoReq);
@@ -769,7 +769,7 @@ ProcXF86DGAGetViewPortSize(ClientPtr client)
REQUEST(xXF86DGAGetViewPortSizeReq);
xXF86DGAGetViewPortSizeReply rep;
- if (stuff->screen > screenInfo.numScreens)
+ if (stuff->screen >= screenInfo.numScreens)
return BadValue;
REQUEST_SIZE_MATCH(xXF86DGAGetViewPortSizeReq);
@@ -797,7 +797,7 @@ ProcXF86DGASetViewPort(ClientPtr client)
{
REQUEST(xXF86DGASetViewPortReq);
- if (stuff->screen > screenInfo.numScreens)
+ if (stuff->screen >= screenInfo.numScreens)
return BadValue;
if (DGAClients[stuff->screen] != client)
@@ -824,7 +824,7 @@ ProcXF86DGAGetVidPage(ClientPtr client)
REQUEST(xXF86DGAGetVidPageReq);
xXF86DGAGetVidPageReply rep;
- if (stuff->screen > screenInfo.numScreens)
+ if (stuff->screen >= screenInfo.numScreens)
return BadValue;
REQUEST_SIZE_MATCH(xXF86DGAGetVidPageReq);
@@ -843,7 +843,7 @@ ProcXF86DGASetVidPage(ClientPtr client)
{
REQUEST(xXF86DGASetVidPageReq);
- if (stuff->screen > screenInfo.numScreens)
+ if (stuff->screen >= screenInfo.numScreens)
return BadValue;
REQUEST_SIZE_MATCH(xXF86DGASetVidPageReq);
@@ -861,7 +861,7 @@ ProcXF86DGAInstallColormap(ClientPtr client)
int rc;
REQUEST(xXF86DGAInstallColormapReq);
- if (stuff->screen > screenInfo.numScreens)
+ if (stuff->screen >= screenInfo.numScreens)
return BadValue;
if (DGAClients[stuff->screen] != client)
@@ -888,7 +888,7 @@ ProcXF86DGAQueryDirectVideo(ClientPtr client)
REQUEST(xXF86DGAQueryDirectVideoReq);
xXF86DGAQueryDirectVideoReply rep;
- if (stuff->screen > screenInfo.numScreens)
+ if (stuff->screen >= screenInfo.numScreens)
return BadValue;
REQUEST_SIZE_MATCH(xXF86DGAQueryDirectVideoReq);
@@ -910,7 +910,7 @@ ProcXF86DGAViewPortChanged(ClientPtr client)
REQUEST(xXF86DGAViewPortChangedReq);
xXF86DGAViewPortChangedReply rep;
- if (stuff->screen > screenInfo.numScreens)
+ if (stuff->screen >= screenInfo.numScreens)
return BadValue;
if (DGAClients[stuff->screen] != client)
commit f86265529b1506a3946d6e3d6fed77a6702108b1
Author: Bill Nottingham <notting@redhat.com>
Date: Mon Nov 15 11:25:14 2010 +1000
xfree86: store the screen's gamma information on init.
This fixes a gamma issue on vt switch observed with KDM. VT switching away
and back would result in a black screen. Avoid this by storing the current
gamma information on init.
https://bugzilla.redhat.com/show_bug.cgi?id=533217
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
(cherry picked from commit 566d09a5cd6452ee2e05e23d2205e7c3aa31f0da)
diff --git a/hw/xfree86/modes/xf86RandR12.c b/hw/xfree86/modes/xf86RandR12.c
index 07482ec..52eba24 100644
--- a/hw/xfree86/modes/xf86RandR12.c
+++ b/hw/xfree86/modes/xf86RandR12.c
@@ -1800,6 +1800,7 @@ xf86RandR12Init12 (ScreenPtr pScreen)
ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
rrScrPrivPtr rp = rrGetScrPriv(pScreen);
XF86RandRInfoPtr randrp = XF86RANDRINFO(pScreen);
+ int i;
rp->rrGetInfo = xf86RandR12GetInfo12;
rp->rrScreenSetSize = xf86RandR12ScreenSetSize;
@@ -1829,6 +1830,9 @@ xf86RandR12Init12 (ScreenPtr pScreen)
*/
if (!xf86RandR12SetInfo12 (pScreen))
return FALSE;
+ for (i = 0; i < rp->numCrtcs; i++) {
+ xf86RandR12CrtcGetGamma(pScreen, rp->crtcs[i]);
+ }
return TRUE;
}
commit 333a6355917c552132e1dd3a2aa066c5b7e70566
Author: Adam Jackson <ajax@redhat.com>
Date: Mon Nov 15 11:25:12 2010 +1000
xfree86: apply gamma settings on EnterVT.
When entering the VT, re-apply the saved gamma settings for each screen.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
(cherry picked from commit c050aa2f5fa6a7ff8ce4f91def14ca44f799f067)
diff --git a/hw/xfree86/modes/xf86RandR12.c b/hw/xfree86/modes/xf86RandR12.c
index 9325e9b..07482ec 100644
--- a/hw/xfree86/modes/xf86RandR12.c
+++ b/hw/xfree86/modes/xf86RandR12.c
@@ -1774,6 +1774,7 @@ xf86RandR12EnterVT (int screen_index, int flags)
ScreenPtr pScreen = screenInfo.screens[screen_index];
ScrnInfoPtr pScrn = xf86Screens[screen_index];
XF86RandRInfoPtr randrp = XF86RANDRINFO(pScreen);
+ rrScrPrivPtr rp = rrGetScrPriv(pScreen);
Bool ret;
if (randrp->orig_EnterVT) {
@@ -1785,6 +1786,11 @@ xf86RandR12EnterVT (int screen_index, int flags)
return FALSE;
}
+ /* reload gamma */
+ int i;
+ for (i = 0; i < rp->numCrtcs; i++)
+ xf86RandR12CrtcSetGamma(pScreen, rp->crtcs[i]);
+
return RRGetInfo (pScreen, TRUE); /* force a re-probe of outputs and notify clients about changes */
}
Reply to: