summaryrefslogtreecommitdiff
path: root/xserver/hw/xfree86
diff options
context:
space:
mode:
authorMatthieu Herrb <matthieu@cvs.openbsd.org>2015-11-07 16:48:54 +0000
committerMatthieu Herrb <matthieu@cvs.openbsd.org>2015-11-07 16:48:54 +0000
commit6c07b8ab53c2bbf0feb0afbbe98b33171c7b7872 (patch)
tree35eb85f0db40ffe6e6614d780b3de61b93edb3bc /xserver/hw/xfree86
parentf4e01ac5608a8dfd9a4ee2f7aa43d28cc1710d81 (diff)
Update to xserver 1.17.4.
tested by naddy@
Diffstat (limited to 'xserver/hw/xfree86')
-rw-r--r--xserver/hw/xfree86/dri2/dri2ext.c14
-rw-r--r--xserver/hw/xfree86/dri2/pci_ids/radeonsi_pci_ids.h28
-rw-r--r--xserver/hw/xfree86/modes/xf86EdidModes.c2
-rw-r--r--xserver/hw/xfree86/modes/xf86RandR12.c13
-rw-r--r--xserver/hw/xfree86/os-support/linux/lnx_init.c22
-rw-r--r--xserver/hw/xfree86/os-support/shared/sigio.c2
-rw-r--r--xserver/hw/xfree86/os-support/xf86_OSlib.h4
-rw-r--r--xserver/hw/xfree86/x86emu/debug.c6
8 files changed, 61 insertions, 30 deletions
diff --git a/xserver/hw/xfree86/dri2/dri2ext.c b/xserver/hw/xfree86/dri2/dri2ext.c
index 221ec530b..520b7cfb8 100644
--- a/xserver/hw/xfree86/dri2/dri2ext.c
+++ b/xserver/hw/xfree86/dri2/dri2ext.c
@@ -269,9 +269,11 @@ ProcDRI2GetBuffers(ClientPtr client)
int status, width, height, count;
unsigned int *attachments;
- REQUEST_FIXED_SIZE(xDRI2GetBuffersReq, stuff->count * 4);
- if (stuff->count > (INT_MAX / 4))
+ REQUEST_AT_LEAST_SIZE(xDRI2GetBuffersReq);
+ /* stuff->count is a count of CARD32 attachments that follows */
+ if (stuff->count > (INT_MAX / sizeof(CARD32)))
return BadLength;
+ REQUEST_FIXED_SIZE(xDRI2GetBuffersReq, stuff->count * sizeof(CARD32));
if (!validDrawable(client, stuff->drawable, DixReadAccess | DixWriteAccess,
&pDrawable, &status))
@@ -297,7 +299,13 @@ ProcDRI2GetBuffersWithFormat(ClientPtr client)
int status, width, height, count;
unsigned int *attachments;
- REQUEST_FIXED_SIZE(xDRI2GetBuffersReq, stuff->count * (2 * 4));
+ REQUEST_AT_LEAST_SIZE(xDRI2GetBuffersReq);
+ /* stuff->count is a count of pairs of CARD32s (attachments & formats)
+ that follows */
+ if (stuff->count > (INT_MAX / (2 * sizeof(CARD32))))
+ return BadLength;
+ REQUEST_FIXED_SIZE(xDRI2GetBuffersReq,
+ stuff->count * (2 * sizeof(CARD32)));
if (!validDrawable(client, stuff->drawable, DixReadAccess | DixWriteAccess,
&pDrawable, &status))
return status;
diff --git a/xserver/hw/xfree86/dri2/pci_ids/radeonsi_pci_ids.h b/xserver/hw/xfree86/dri2/pci_ids/radeonsi_pci_ids.h
index 571e8633f..bcf15a186 100644
--- a/xserver/hw/xfree86/dri2/pci_ids/radeonsi_pci_ids.h
+++ b/xserver/hw/xfree86/dri2/pci_ids/radeonsi_pci_ids.h
@@ -63,6 +63,7 @@ CHIPSET(0x6608, OLAND_6608, OLAND)
CHIPSET(0x6610, OLAND_6610, OLAND)
CHIPSET(0x6611, OLAND_6611, OLAND)
CHIPSET(0x6613, OLAND_6613, OLAND)
+CHIPSET(0x6617, OLAND_6617, OLAND)
CHIPSET(0x6620, OLAND_6620, OLAND)
CHIPSET(0x6621, OLAND_6621, OLAND)
CHIPSET(0x6623, OLAND_6623, OLAND)
@@ -85,6 +86,7 @@ CHIPSET(0x6651, BONAIRE_6651, BONAIRE)
CHIPSET(0x6658, BONAIRE_6658, BONAIRE)
CHIPSET(0x665C, BONAIRE_665C, BONAIRE)
CHIPSET(0x665D, BONAIRE_665D, BONAIRE)
+CHIPSET(0x665F, BONAIRE_665F, BONAIRE)
CHIPSET(0x9830, KABINI_9830, KABINI)
CHIPSET(0x9831, KABINI_9831, KABINI)
@@ -155,3 +157,29 @@ CHIPSET(0x67B8, HAWAII_67B8, HAWAII)
CHIPSET(0x67B9, HAWAII_67B9, HAWAII)
CHIPSET(0x67BA, HAWAII_67BA, HAWAII)
CHIPSET(0x67BE, HAWAII_67BE, HAWAII)
+
+CHIPSET(0x6900, ICELAND_, ICELAND)
+CHIPSET(0x6901, ICELAND_, ICELAND)
+CHIPSET(0x6902, ICELAND_, ICELAND)
+CHIPSET(0x6903, ICELAND_, ICELAND)
+CHIPSET(0x6907, ICELAND_, ICELAND)
+
+CHIPSET(0x6920, TONGA_, TONGA)
+CHIPSET(0x6921, TONGA_, TONGA)
+CHIPSET(0x6928, TONGA_, TONGA)
+CHIPSET(0x6929, TONGA_, TONGA)
+CHIPSET(0x692B, TONGA_, TONGA)
+CHIPSET(0x692F, TONGA_, TONGA)
+CHIPSET(0x6930, TONGA_, TONGA)
+CHIPSET(0x6938, TONGA_, TONGA)
+CHIPSET(0x6939, TONGA_, TONGA)
+
+CHIPSET(0x9870, CARRIZO_, CARRIZO)
+CHIPSET(0x9874, CARRIZO_, CARRIZO)
+CHIPSET(0x9875, CARRIZO_, CARRIZO)
+CHIPSET(0x9876, CARRIZO_, CARRIZO)
+CHIPSET(0x9877, CARRIZO_, CARRIZO)
+
+CHIPSET(0x7300, FIJI_, FIJI)
+
+CHIPSET(0x98E4, STONEY_, STONEY)
diff --git a/xserver/hw/xfree86/modes/xf86EdidModes.c b/xserver/hw/xfree86/modes/xf86EdidModes.c
index 6fb0f9b92..f24294ee3 100644
--- a/xserver/hw/xfree86/modes/xf86EdidModes.c
+++ b/xserver/hw/xfree86/modes/xf86EdidModes.c
@@ -713,7 +713,7 @@ static const struct {
{1600, 1200, 75, 0},
{1600, 1200, 85, 0},
{1792, 1344, 60, 0},
- {1792, 1344, 85, 0},
+ {1792, 1344, 75, 0},
{1856, 1392, 60, 0},
{1856, 1392, 75, 0},
{1920, 1200, 60, 1},
diff --git a/xserver/hw/xfree86/modes/xf86RandR12.c b/xserver/hw/xfree86/modes/xf86RandR12.c
index 3e4d7011b..81b679dda 100644
--- a/xserver/hw/xfree86/modes/xf86RandR12.c
+++ b/xserver/hw/xfree86/modes/xf86RandR12.c
@@ -683,11 +683,9 @@ xf86RandR12ScreenSetSize(ScreenPtr pScreen,
Bool ret = FALSE;
int c;
- if (xf86RandR12Key) {
- if (randrp->virtualX == -1 || randrp->virtualY == -1) {
- randrp->virtualX = pScrn->virtualX;
- randrp->virtualY = pScrn->virtualY;
- }
+ if (randrp->virtualX == -1 || randrp->virtualY == -1) {
+ randrp->virtualX = pScrn->virtualX;
+ randrp->virtualY = pScrn->virtualY;
}
if (pRoot && pScrn->vtSema)
(*pScrn->EnableDisableFBAccess) (pScrn, FALSE);
@@ -730,7 +728,7 @@ xf86RandR12ScreenSetSize(ScreenPtr pScreen,
if (pRoot && pScrn->vtSema)
(*pScrn->EnableDisableFBAccess) (pScrn, TRUE);
#if RANDR_12_INTERFACE
- if (xf86RandR12Key && pScreen->root && ret)
+ if (pScreen->root && ret)
RRScreenSizeNotify(pScreen);
#endif
return ret;
@@ -827,9 +825,6 @@ xf86RandR12CreateScreenResources(ScreenPtr pScreen)
xf86ReconfigureLayout();
}
- if (xf86RandR12Key == NULL)
- return TRUE;
-
if (randrp->virtualX == -1 || randrp->virtualY == -1) {
randrp->virtualX = pScrn->virtualX;
randrp->virtualY = pScrn->virtualY;
diff --git a/xserver/hw/xfree86/os-support/linux/lnx_init.c b/xserver/hw/xfree86/os-support/linux/lnx_init.c
index 94853070d..4acaf33d1 100644
--- a/xserver/hw/xfree86/os-support/linux/lnx_init.c
+++ b/xserver/hw/xfree86/os-support/linux/lnx_init.c
@@ -62,18 +62,24 @@ drain_console(int fd, void *closure)
}
}
-static void
+static int
switch_to(int vt, const char *from)
{
int ret;
SYSCALL(ret = ioctl(xf86Info.consoleFd, VT_ACTIVATE, vt));
- if (ret < 0)
- FatalError("%s: VT_ACTIVATE failed: %s\n", from, strerror(errno));
+ if (ret < 0) {
+ xf86Msg(X_WARNING, "%s: VT_ACTIVATE failed: %s\n", from, strerror(errno));
+ return 0;
+ }
SYSCALL(ret = ioctl(xf86Info.consoleFd, VT_WAITACTIVE, vt));
- if (ret < 0)
- FatalError("%s: VT_WAITACTIVE failed: %s\n", from, strerror(errno));
+ if (ret < 0) {
+ xf86Msg(X_WARNING, "%s: VT_WAITACTIVE failed: %s\n", from, strerror(errno));
+ return 0;
+ }
+
+ return 1;
}
#pragma GCC diagnostic push
@@ -208,7 +214,8 @@ xf86OpenConsole(void)
/*
* now get the VT. This _must_ succeed, or else fail completely.
*/
- switch_to(xf86Info.vtno, "xf86OpenConsole");
+ if (!switch_to(xf86Info.vtno, "xf86OpenConsole"))
+ FatalError("xf86OpenConsole: Switching VT failed\n");
SYSCALL(ret = ioctl(xf86Info.consoleFd, VT_GETMODE, &VT));
if (ret < 0)
@@ -269,7 +276,8 @@ xf86OpenConsole(void)
else { /* serverGeneration != 1 */
if (!xf86Info.ShareVTs && xf86Info.autoVTSwitch) {
/* now get the VT */
- switch_to(xf86Info.vtno, "xf86OpenConsole");
+ if (!switch_to(xf86Info.vtno, "xf86OpenConsole"))
+ FatalError("xf86OpenConsole: Switching VT failed\n");
}
}
}
diff --git a/xserver/hw/xfree86/os-support/shared/sigio.c b/xserver/hw/xfree86/os-support/shared/sigio.c
index 45949f7a3..c746d02fc 100644
--- a/xserver/hw/xfree86/os-support/shared/sigio.c
+++ b/xserver/hw/xfree86/os-support/shared/sigio.c
@@ -178,7 +178,7 @@ xf86InstallSIGIOHandler(int fd, void (*f) (int, void *), void *closure)
}
sigemptyset(&sa.sa_mask);
sigaddset(&sa.sa_mask, SIGIO);
- sa.sa_flags = 0;
+ sa.sa_flags = SA_RESTART;
sa.sa_handler = xf86SIGIO;
sigaction(SIGIO, &sa, &osa);
xf86SigIOFuncs[i].fd = fd;
diff --git a/xserver/hw/xfree86/os-support/xf86_OSlib.h b/xserver/hw/xfree86/os-support/xf86_OSlib.h
index 6190fe6a0..95c3a7365 100644
--- a/xserver/hw/xfree86/os-support/xf86_OSlib.h
+++ b/xserver/hw/xfree86/os-support/xf86_OSlib.h
@@ -183,11 +183,7 @@ extern _X_HIDDEN char xf86SolarisFbDev[PATH_MAX];
#include <sys/types.h>
#include <assert.h>
-#ifdef __linux__
-#include <termio.h>
-#else /* __GLIBC__ */
#include <termios.h>
-#endif
#ifdef __sparc__
#include <sys/param.h>
#endif
diff --git a/xserver/hw/xfree86/x86emu/debug.c b/xserver/hw/xfree86/x86emu/debug.c
index cbea9947f..72a06ffb8 100644
--- a/xserver/hw/xfree86/x86emu/debug.c
+++ b/xserver/hw/xfree86/x86emu/debug.c
@@ -233,9 +233,7 @@ X86EMU_dump_memory(u16 seg, u16 off, u32 amt)
u32 start = off & 0xfffffff0;
u32 end = (off + 16) & 0xfffffff0;
u32 i;
- u32 current;
- current = start;
while (end <= off + amt) {
printk("%04x:%04x ", seg, start);
for (i = start; i < off; i++)
@@ -261,8 +259,6 @@ x86emu_single_step(void)
static int breakpoint;
static int noDecode = 1;
- char *p;
-
if (DEBUG_BREAK()) {
if (M.x86.saved_ip != breakpoint) {
return;
@@ -279,7 +275,7 @@ x86emu_single_step(void)
offset = M.x86.saved_ip;
while (!done) {
printk("-");
- p = fgets(s, 1023, stdin);
+ (void)fgets(s, 1023, stdin);
cmd = parse_line(s, ps, &ntok);
switch (cmd) {
case 'u':