Re: xscope fixes
On Tue, Dec 07, 2021 at 10:47:35AM -0800, Alan Coopersmith wrote: > On 12/6/21 11:59 PM, Thomas Klausner wrote: > > When updating the pkgsrc patches to 1.4.2, I noticed quite a lot of > > warnings. > > Here are patches that remove most. > > Thanks - since we've switched from email to gitlab for patch submission, I've > converted these to a merge request at: > https://gitlab.freedesktop.org/xorg/app/xscope/-/merge_requests/5 Oh, I didn't know that. Thanks. I'll take a closer look at that for future fixes. > > ../fd.c: In function ‘MainLoop’: > > ../fd.c:432:1: warning: function might be candidate for attribute > > ‘noreturn’ [-Wsuggest-attribute=noreturn] > >432 | MainLoop(void) > >| ^~~~ > > > > is unfixed since I could mark it _X_NORETURN but then I'd have to remove > > the "return 0" at the end too -- is tha tok? > > I think so. Ok, the attached patch fixes this one as well. Thomas >From 81edca0ce82cc81b997d47e8f42be59649bba149 Mon Sep 17 00:00:00 2001 From: Thomas Klausner Date: Tue, 7 Dec 2021 20:47:21 +0100 Subject: [PATCH:xscope] Mark MainLoop as _X_NORETURN. --- fd.c | 1 - fd.h | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/fd.c b/fd.c index 8ccdada..9a85f89 100644 --- a/fd.c +++ b/fd.c @@ -520,5 +520,4 @@ MainLoop(void) } } } -return 0; } diff --git a/fd.h b/fd.h index a3ddbce..c317aa4 100644 --- a/fd.h +++ b/fd.h @@ -98,7 +98,7 @@ extern FD AcceptConnection(FD ConnectionSocket); extern FD MakeConnection(const char *server, short port, int report, XtransConnInfo * trans_conn); -extern int MainLoop(void); +extern int MainLoop(void) _X_NORETURN; #ifdef USE_XTRANS extern XtransConnInfo GetXTransConnInfo(FD fd); -- 2.34.1
[PATCH:xscope 2/6] Match format strings with arguments.
--- fd.c| 12 ++-- print_wcp.c | 10 +- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/fd.c b/fd.c index d07d3a3..8ccdada 100644 --- a/fd.c +++ b/fd.c @@ -452,10 +452,10 @@ MainLoop(void) debug(128, (stderr, "select %d, rfds = %#lx, wfds = %#lx, RD=%#lx, BRD=%#lx, WD=%#lx\n", - HighestFD + 1, __XFDS_BITS(, 0), __XFDS_BITS(, 0), - __XFDS_BITS(, 0), - __XFDS_BITS(, 0), - __XFDS_BITS(, 0))); + HighestFD + 1, (unsigned long)__XFDS_BITS(, 0), (unsigned long)__XFDS_BITS(, 0), + (unsigned long)__XFDS_BITS(, 0), + (unsigned long)__XFDS_BITS(, 0), + (unsigned long)__XFDS_BITS(, 0))); if (Interrupt || (!XFD_ANYSET() && !XFD_ANYSET())) { ReadCommands(); @@ -467,8 +467,8 @@ MainLoop(void) debug(128, (stderr, "select nfds = %d, rfds = %#lx, wfds = %#lx, xfds = %#lx\n", - nfds, __XFDS_BITS(, 0), __XFDS_BITS(, 0), - __XFDS_BITS(, 0))); + nfds, (unsigned long)__XFDS_BITS(, 0), (unsigned long)__XFDS_BITS(, 0), + (unsigned long)__XFDS_BITS(, 0))); if (nfds < 0) { if (errno == EINTR) diff --git a/print_wcp.c b/print_wcp.c index f8b5506..df5527b 100644 --- a/print_wcp.c +++ b/print_wcp.c @@ -70,7 +70,7 @@ WcpAnalyzeImage1RLL(const char *buf, int len, int width, int height) while (!error && height--) { x = 0; if (Verbose > 2) -fprintf(stdout, "%s %9d %9d:", Leader, y, (char *) data - buf); +fprintf(stdout, "%s %9d %9ld:", Leader, y, (char *) data - buf); NextByte(byte); if (Verbose > 2) fprintf(stdout, " %2x", byte); @@ -100,7 +100,7 @@ WcpAnalyzeImage1RLL(const char *buf, int len, int width, int height) y++; } if (error) -fprintf(stdout, "%s%20s: %d, %d %d\n", Leader, error, +fprintf(stdout, "%s%20s: %d, %d %ld\n", Leader, error, x, y - 1, (char *) data - buf); } @@ -177,7 +177,7 @@ WcpAnalyzeImageNLRU(const char *buf, int len, int width, int height, int bytes) while (!error && height--) { x = 0; if (Verbose > 2) -fprintf(stdout, "%s %9d %9d:", Leader, y, (char *) data - buf); +fprintf(stdout, "%s %9d %9ld:", Leader, y, (char *) data - buf); NextByte(byte); if (Verbose > 2) fprintf(stdout, " %2x", byte); @@ -217,7 +217,7 @@ WcpAnalyzeImageNLRU(const char *buf, int len, int width, int height, int bytes) break; } x += run; -fprintf(stdout, " %3ld:%0*x", run, bytes * 2, pix); +fprintf(stdout, " %3ld:%0*lx", run, bytes * 2, pix); } break; } @@ -226,7 +226,7 @@ WcpAnalyzeImageNLRU(const char *buf, int len, int width, int height, int bytes) y++; } if (error) -fprintf(stdout, "%s%20s: %d, %d %d\n", Leader, error, +fprintf(stdout, "%s%20s: %d, %d %ld\n", Leader, error, x, y - 1, (char *) data - buf); } -- 2.34.1
[PATCH:xscope 5/6] Increase buffer length to avoid truncation.
--- scope.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scope.c b/scope.c index 6028eab..88fae33 100644 --- a/scope.c +++ b/scope.c @@ -1273,7 +1273,7 @@ ConnectToServer(Boolean report) if (port == ScopePort && ((ServerHostName[0] == '\0') || strcmp(ServerHostName, ScopeHost) == 0)) { -char error_message[100]; +char error_message[300]; snprintf(error_message, sizeof(error_message), "Trying to attach to myself: %s,%d\n", ServerHostName, port); -- 2.34.1
xscope fixes
When updating the pkgsrc patches to 1.4.2, I noticed quite a lot of warnings. Here are patches that remove most. ../fd.c: In function ‘MainLoop’: ../fd.c:432:1: warning: function might be candidate for attribute ‘noreturn’ [-Wsuggest-attribute=noreturn] 432 | MainLoop(void) | ^~~~ is unfixed since I could mark it _X_NORETURN but then I'd have to remove the "return 0" at the end too -- is tha tok?
[PATCH:xscope 4/6] Use correct argument type for ctype(3) functions.
--- scope.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/scope.c b/scope.c index 51e134d..6028eab 100644 --- a/scope.c +++ b/scope.c @@ -199,7 +199,7 @@ CMDStringToInt(char *s, int *v) else if (*s == '0') { sscanf(s, "%o", v); } -else if (isdigit(*s)) { +else if (isdigit(*(unsigned char *)s)) { sscanf(s, "%d", v); } else if (*s == '\'') { @@ -251,7 +251,7 @@ CMDSplitIntoWords(char *line, char **argv) argc = 0; while (*line) { -while (isspace(*line)) +while (isspace(*(unsigned char *)line)) line++; if (!*line) break; @@ -267,7 +267,7 @@ CMDSplitIntoWords(char *line, char **argv) else { *argv++ = line; argc++; -while (*line && !isspace(*line)) +while (*line && !isspace(*(unsigned char *)line)) line++; if (*line) *line++ = '\0'; @@ -1395,7 +1395,7 @@ DataFromRawFile(FD rawfd) in = FDinfo[rawfd].buffer; /* lines starting with space indicate change of sender */ -if (isspace(*in)) { +if (isspace(*(unsigned char *)in)) { /* If we already have data in buffer, process it */ if ((fd != -1) && (FDinfo[fd].bufcount > 0)) { debug(16, (stderr, "reporting %d bytes from: %s %s\n", @@ -1413,7 +1413,7 @@ DataFromRawFile(FD rawfd) } else { /* Need to parse header to figure out which direction */ -while (isspace(*in)) { +while (isspace(*(unsigned char *)in)) { in++; } if (strncmp(in, "Client Connect (fd ", 19) == 0) { @@ -1448,7 +1448,7 @@ DataFromRawFile(FD rawfd) int clientid; in = n + 8; -if (isdigit(*in)) +if (isdigit(*(unsigned char *)in)) clientid = strtol(in, NULL, 10); else clientid = 1; @@ -1500,7 +1500,7 @@ DataFromRawFile(FD rawfd) n = strchr(in, ':'); if (n != NULL) in = n + 1; -while (isspace(*in)) +while (isspace(*(unsigned char *)in)) in++; } } -- 2.34.1
[PATCH:xscope 3/6] ifdef out unused static functions
--- printnas.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/printnas.c b/printnas.c index d2c5d17..a60cb46 100644 --- a/printnas.c +++ b/printnas.c @@ -138,6 +138,7 @@ PrintSuccessfulAudioSetUpReply(const unsigned char *buf) /* Error Printing procedures */ +#ifdef UNUSED static void AudioRequestError(const unsigned char *buf) { @@ -227,6 +228,7 @@ AudioImplementationError(const unsigned char *buf) PrintField(buf, 8, 2, CARD16, "minor opcode"); PrintField(buf, 10, 1, CARD8, "major opcode"); } +#endif /* */ /* */ -- 2.34.1
[PATCH:xscope 6/6] Add casts to fix signedness change warnings.
--- scope.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scope.c b/scope.c index 88fae33..c07274a 100644 --- a/scope.c +++ b/scope.c @@ -1384,15 +1384,15 @@ DataFromRawFile(FD rawfd) /* If we already read a line last time, process it first, else get the next line for processing */ if (FDinfo[rawfd].bufcount == 0) { -if (fgets(FDinfo[rawfd].buffer, BUFFER_SIZE, raw) == NULL) { +if (fgets((char *)FDinfo[rawfd].buffer, BUFFER_SIZE, raw) == NULL) { CloseConnection(rawfd); exit(0); } -FDinfo[rawfd].bufcount = strlen(FDinfo[rawfd].buffer); +FDinfo[rawfd].bufcount = strlen((char *)FDinfo[rawfd].buffer); debug(16, (stderr, "raw input = %s", FDinfo[rawfd].buffer)); } -in = FDinfo[rawfd].buffer; +in = (char *)FDinfo[rawfd].buffer; /* lines starting with space indicate change of sender */ if (isspace(*(unsigned char *)in)) { @@ -1480,7 +1480,7 @@ DataFromRawFile(FD rawfd) in = strstr(in, "(fd "); if (in == NULL) { warn("Did not find fd string in input entry"); -warn(FDinfo[rawfd].buffer); +warn((char *)FDinfo[rawfd].buffer); FDinfo[rawfd].bufcount = 0; continue; } -- 2.34.1
[PATCH:xscope 1/6] Remove/comment out unused variables.
--- decodenas.c| 2 +- print_randr.c | 12 ++-- print_render.c | 16 printnas.c | 17 + 4 files changed, 24 insertions(+), 23 deletions(-) diff --git a/decodenas.c b/decodenas.c index a9cc191..a28efaf 100644 --- a/decodenas.c +++ b/decodenas.c @@ -315,7 +315,7 @@ DecodeAudioReply(FD fd, const unsigned char *buf, long n) void DecodeAudioError(FD fd, const unsigned char *buf, long n) { -short Error = IByte([1]); +// short Error = IByte([1]); short Request = 0; short RequestMinor = 0; diff --git a/print_randr.c b/print_randr.c index 5eb3e63..3e39f80 100644 --- a/print_randr.c +++ b/print_randr.c @@ -80,9 +80,9 @@ RandrOldGetScreenInfo(FD fd, const unsigned char *buf) void RandrOldGetScreenInfoReply(FD fd, const unsigned char *buf) { -unsigned short nsize; -unsigned short nvg; -unsigned short ngvg; +// unsigned short nsize; +// unsigned short nvg; +// unsigned short ngvg; PrintField(RBf, 0, 1, REPLY, REPLYHEADER); /* RandrRequest reply */ PrintField(RBf, 1, 1, RANDRREPLY, RANDRREPLYHEADER); @@ -95,11 +95,11 @@ RandrOldGetScreenInfoReply(FD fd, const unsigned char *buf) PrintField(buf, 12, 4, TIMESTAMP, "timestamp"); PrintField(buf, 16, 4, TIMESTAMP, "config-timestamp"); PrintField(buf, 20, 2, CARD16, "num-visual-groups"); -nvg = IShort([20]); +// nvg = IShort([20]); PrintField(buf, 22, 2, CARD16, "num-groups-of-visual-groups"); -ngvg = IShort([22]); +// ngvg = IShort([22]); PrintField(buf, 24, 2, CARD16, "num-sizes"); -nsize = IShort([24]); +// nsize = IShort([24]); PrintField(buf, 26, 2, CARD16, "size-id"); PrintField(buf, 28, 2, CARD16, "visual-group-id"); PrintField(buf, 30, 2, CARD16, "rotation"); diff --git a/print_render.c b/print_render.c index 60db37f..cd834b9 100644 --- a/print_render.c +++ b/print_render.c @@ -75,11 +75,11 @@ RenderQueryPictFormats(FD fd, const unsigned char *buf) void RenderQueryPictFormatsReply(FD fd, const unsigned char *buf) { -long n; +// long n; long f; -long s; -long d; -long v; +// long s; +// long d; +// long v; PrintField(RBf, 0, 1, REPLY, REPLYHEADER); /* RenderRequest reply */ PrintField(RBf, 1, 1, RENDERREPLY, @@ -88,11 +88,11 @@ RenderQueryPictFormatsReply(FD fd, const unsigned char *buf) return; printfield(buf, 2, 2, CARD16, "sequence number"); printfield(buf, 4, 4, DVALUE4(0), "reply length"); -n = ILong([4]); +// n = ILong([4]); f = ILong([8]); -s = ILong([12]); -d = ILong([16]); -v = ILong([20]); +// s = ILong([12]); +// d = ILong([16]); +// v = ILong([20]); PrintList([32], (long) f, PICTFORMINFO, "pict-formats"); } diff --git a/printnas.c b/printnas.c index 3207277..d2c5d17 100644 --- a/printnas.c +++ b/printnas.c @@ -101,11 +101,13 @@ static void PrintSuccessfulAudioSetUpReply(const unsigned char *buf) { short v; -short n; -short m; +// short n; +// short m; if (NasVerbose < 1) return; +// m = IByte([28]); +// n = IByte([29]); PrintField(buf, 2, 2, CARD16, "protocol-major-version"); PrintField(buf, 4, 2, CARD16, "protocol-minor-version"); printfield(buf, 6, 2, DVALUE2(8 + 2 * n + (v + p + m) / 4), @@ -119,9 +121,7 @@ PrintSuccessfulAudioSetUpReply(const unsigned char *buf) v = IShort([24]); printfield(buf, 26, 2, CARD16, "maximum-request-length"); printfield(buf, 28, 1, CARD8, "max-tracks"); -m = IByte([28]); printfield(buf, 29, 1, DVALUE1(n), "number of audio formats"); -n = IByte([29]); PrintField(buf, 30, 1, CARD8, "number of element-types"); PrintField(buf, 31, 1, CARD8, "number of wave-forms"); PrintField(buf, 32, 1, CARD8, "number of actions"); @@ -323,7 +323,7 @@ AudioListDevices(const unsigned char *buf) void AudioListDevicesReply(const unsigned char *buf) { -long n; +// long n; PrintField(RBf, 0, 1, REPLY, REPLYHEADER); /* GetWindowAttributes */ if (NasVerbose < 1) @@ -332,7 +332,7 @@ AudioListDevicesReply(const unsigned char *buf) printfield(buf, 4, 4, CARD32, "reply length"); printfield(buf, 8, 4, CARD32, "num devices"); -n = ILong([8]); +// n = ILong([8]); } static long @@ -351,7 +351,7 @@ AuString(const unsigned char *buf) static void AuDeviceAttributes(const unsigned char *buf) { -int l; +// int l; printfield(buf, 0, 4, CARD32, "value mask"); printfield(buf, 4, 4, CARD32, "changeable mask"); @@ -362,7 +362,8 @@ AuDeviceAttributes(const unsigned char *buf) printfield(buf, 15, 1, CARD8, "num tracks"); printfield(buf, 16, 4, CARD32, "access"); -l = 20 + AuString([20]); +// l = 20 + AuString([20]); +(void)AuString([20]); } void -- 2.34.1
Re: xorgproto header installation conflicts
On Mon, Nov 25, 2019 at 02:57:49PM -0800, Alan Coopersmith wrote: > On 11/25/19 2:51 PM, Thomas Klausner wrote: > > Is libdmx still useful? > > If you ship Xdmx (i.e build the xserver package with --enable-dmx), then I > think > it is. If not, probably not, unless your users are connecting to Xdmx from > someone else. pkgsrc contained the library, but only xdpyinfo used it. Now it doesn't :) Thomas ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: https://lists.x.org/mailman/listinfo/xorg-devel
Re: xorgproto header installation conflicts
On Mon, Nov 25, 2019 at 10:27:18AM -0800, Alan Coopersmith wrote: > On 11/24/19 2:04 PM, Thomas Klausner wrote: > > Is anything else from this list effectively dead? > > > libXevie > > Also dropped from the Xserver in Xorg 1.6: > https://gitlab.freedesktop.org/xorg/xserver/commit/f4036f6ace5f770f0fe6a6e3dc3749051a81325a Thanks, I've removed this from pkgsrc. > > libXxf86dga > > We never shipped this in Solaris, since drm already existed when we > started shipping Xorg, and I don't remember ever hearing any complaints, > but I don't know if anything uses it. Quite a lot of packages still have a dependency on this, I'll have to check if they actually use it. > > libxkbui > > I think the long dead xorgcfg GUI was the only user of libxkbui. Thanks, also removed from pkgsrc. Is libdmx still useful? Thomas ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: https://lists.x.org/mailman/listinfo/xorg-devel
Re: xorgproto header installation conflicts
On Tue, Nov 19, 2019 at 11:44:11AM -0800, Alan Coopersmith wrote: > On 11/19/19 8:13 AM, Thomas Klausner wrote: > > One particular example: libXxf86misc is still used by 8 packages in > > pkgsrc, but the necessary xf86miscproto headers are not installed by > > xorgproto except with --enable-legacy. > > Do all those packages strongly require it? Or do they just need to drop > the dependency now? So I checked them and found that some did not actually use the code. The remaining three that had code to support libXxf86misc could live without it (xdpyinfo, xscreensaver, xset), so disabled it and removed the libXxf86misc library from pkgsrc. > > Why is xf86miscproto in the legacy set? > > Because the server side was removed 11 years ago: > https://gitlab.freedesktop.org/xorg/xserver/commit/22e64108ec63ba9891f8df237913ef9ca731 > > so any client support is unusable dead code, unless you're still running > an Xserver older than Xorg 1.6. Thanks for the hint! Is anything else from this list effectively dead? libAppleWM libFS libICE libSM libX11 libXScrnSaver libXau libXaw libXaw3d libXcomposite libXcursor libXdamage libXdmcp libXevie libXext libXfixes libXfont2 libXft libXi libXinerama libXmu libXpm libXpresent libXrandr libXrender libXres libXt libXtst libXv libXvMC libXxf86dga libXxf86misc libXxf86vm libdmx libdrm libxkbfile libxkbui Thanks, Thomas ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: https://lists.x.org/mailman/listinfo/xorg-devel
Re: xorgproto header installation conflicts
On Mon, Nov 18, 2019 at 02:59:40PM -0500, Adam Jackson wrote: > On Fri, 2019-11-15 at 11:08 +0100, Thomas Klausner wrote: > > Hi! > > > > I've updated pkgsrc to use xorgproto 2019.2, still installing the > > legacy headers with --enable-legacy, and we had to fix a couple > > conflicts: > > > > * XKBgeom.h is provided by libX11 1.6.9 > > * vlcXvMC.h is provided by libXvMC 1.0.12 > > > > I guess as long as they are installed by the other libraries, they > > should not be installed by xorgproto. Or should they be removed from > > the other libraries? > > If you're building xorgproto with --enable-legacy it's up to you to > handle the packaging conflict, presumably remove them manually in > either xorgproto xor in the libraries. If you wanted to a patch for the > libraries to detect which kind of xorgproto you had and handle it > gracefully there instead, point me at the merge request. ;) Let's try this from the other side: I only enabled the legacy modules because I still need them. One particular example: libXxf86misc is still used by 8 packages in pkgsrc, but the necessary xf86miscproto headers are not installed by xorgproto except with --enable-legacy. But when legacy is enabled, I also get headers that are moved to a different package and thus the conflicts. Why is xf86miscproto in the legacy set? Thomas ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: https://lists.x.org/mailman/listinfo/xorg-devel
xorgproto header installation conflicts
Hi! I've updated pkgsrc to use xorgproto 2019.2, still installing the legacy headers with --enable-legacy, and we had to fix a couple conflicts: * XKBgeom.h is provided by libX11 1.6.9 * vlcXvMC.h is provided by libXvMC 1.0.12 I guess as long as they are installed by the other libraries, they should not be installed by xorgproto. Or should they be removed from the other libraries? Thomas ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: https://lists.x.org/mailman/listinfo/xorg-devel
Re: X.Org modules which could use some help to release
Oh, forgot one diff, attached now. Thomas On Fri, Jul 19, 2019 at 11:26:06PM +0200, Thomas Klausner wrote: > On Mon, Jul 15, 2019 at 02:31:13PM -0700, Alan Coopersmith wrote: > > On 7/15/19 4:02 AM, Thomas Klausner wrote: > > > As a datapoint: > > > > Thanks for the info. > > > > > Of these, the following have packages in pkgsrc: > > > > > > libWindowsWM > > > > This is supposed to only be useful on Cygwin, but a Cygwin package search > > says they don't ship it, and it hasn't had a release since 2009, so I > > wonder if anyone uses it, or just keeps building it because no one ever > > said "stop". > > > > > libXTrap > > > > Similarly, this just seems like something build because they never knew > > what it was for - do they really have much software that adopted a > > proposed extension for X11R5, that's been deprecated since XTEST & > > RECORD came out in X11R6 in 1994? (Oh, hey, time to change 15 -> 25 in > > https://gitlab.freedesktop.org/xorg/lib/libxtrap/blob/master/README.md ) > > > > > rstart > > > > We dropped this with a note to use ssh X-forwarding instead. > > Thanks. I removed these three and xtrap from pkgsrc. > > > > and the following: > > > > > > beforelight > > No local changes. > > > > xf86-video-ark > > Adaptation to latest xorg-server. > > > > xf86-video-newport > > Bigger diff, see attachment. > > > > xf86-video-tga > > Adaptation to latest xorg-server. > > > > xf86-video-tseng > > Adaptation to latest xorg-server, and some small diffs. > > > > xf86-video-xgi > > Big diff, see attachment. > > > > xf86dga > > No local changes. > > > > xfwp > > No local changes. > > > > xvidtune > > No changes. > > > > are included in NetBSD's xsrc, probably some with patches. > > > > > > I can't tell if they are there for historic reasons or if anyone is > > > actually still using them. > > > > Well, NetBSD still claims to support some of the ancient platforms for > > those drivers, so they might be: > > > > - xf86-video-tga - DEC Alpha graphics, for mid-90's systems such as: > >https://en.wikipedia.org/wiki/DEC_Multia > > > > - xf86-video-newport - SGI MIPS workstation graphics: > >https://en.wikipedia.org/wiki/SGI_Indy#Graphics > > > > but those drivers don't seem to be getting all the API/ABI updates, and > > haven't had releases to make them compatible with any recent X server, > > so they'd have to be patching them to make them work. Perhaps NetBSD > > folks who support those platforms should become their maintainers? > > I usually can't even get NetBSD committers to send their diffs > upstream to you, so making them maintainer is even less likely to have > positive results. > > I don't know what the best solution is. > > Should we try getting the diffs merged? (See attachments, I can try to > group them in commits with messages if someone will apply them.) > > Cheers, > Thomas > mibstore.h and its miInitializeBackingStore() have been otherwise empty > since at least xorg-server 1.10. remove all reference to them as the > header is gone in xorg-server 1.18. > > Index: dist/src/ark_driver.c > === > RCS file: /cvsroot/xsrc/external/mit/xf86-video-ark/dist/src/ark_driver.c,v > retrieving revision 1.1.1.4 > retrieving revision 1.2 > diff -u -r1.1.1.4 -r1.2 > --- dist/src/ark_driver.c 23 Jul 2015 01:15:49 - 1.1.1.4 > +++ dist/src/ark_driver.c 16 Aug 2016 01:27:46 - 1.2 > @@ -39,7 +39,6 @@ > #include "compiler.h" > #include "mipointer.h" > #include "micmap.h" > -#include "mibstore.h" > #include "fb.h" > #include "ark.h" > > @@ -538,7 +537,6 @@ > > fbPictureInit (pScreen, 0, 0); > > - miInitializeBackingStore(pScreen); > xf86SetBackingStore(pScreen); > > if (!pARK->NoAccel) { > Index: dist/src/newport.h > === > RCS file: /cvsroot/xsrc/external/mit/xf86-video-newport/dist/src/newport.h,v > retrieving revision 1.1.1.2 > retrieving revision 1.4 > diff -u -r1.1.1.2 -r1.4 > --- dist/src/newport.h23 Jul 2015 01:15:59 - 1.1.1.2 > +++ dist/src/newport.h23 Jul 2015 01:19:16 - 1.4 > @@ -38,6 +38,7 @@ > /* reg
Re: X.Org modules which could use some help to release
On Mon, Jul 15, 2019 at 02:31:13PM -0700, Alan Coopersmith wrote: > On 7/15/19 4:02 AM, Thomas Klausner wrote: > > As a datapoint: > > Thanks for the info. > > > Of these, the following have packages in pkgsrc: > > > > libWindowsWM > > This is supposed to only be useful on Cygwin, but a Cygwin package search > says they don't ship it, and it hasn't had a release since 2009, so I > wonder if anyone uses it, or just keeps building it because no one ever > said "stop". > > > libXTrap > > Similarly, this just seems like something build because they never knew > what it was for - do they really have much software that adopted a > proposed extension for X11R5, that's been deprecated since XTEST & > RECORD came out in X11R6 in 1994? (Oh, hey, time to change 15 -> 25 in > https://gitlab.freedesktop.org/xorg/lib/libxtrap/blob/master/README.md ) > > > rstart > > We dropped this with a note to use ssh X-forwarding instead. Thanks. I removed these three and xtrap from pkgsrc. > > and the following: > > > > beforelight No local changes. > > xf86-video-ark Adaptation to latest xorg-server. > > xf86-video-newport Bigger diff, see attachment. > > xf86-video-tga Adaptation to latest xorg-server. > > xf86-video-tseng Adaptation to latest xorg-server, and some small diffs. > > xf86-video-xgi Big diff, see attachment. > > xf86dga No local changes. > > xfwp No local changes. > > xvidtune No changes. > > are included in NetBSD's xsrc, probably some with patches. > > > > I can't tell if they are there for historic reasons or if anyone is > > actually still using them. > > Well, NetBSD still claims to support some of the ancient platforms for > those drivers, so they might be: > > - xf86-video-tga - DEC Alpha graphics, for mid-90's systems such as: >https://en.wikipedia.org/wiki/DEC_Multia > > - xf86-video-newport - SGI MIPS workstation graphics: >https://en.wikipedia.org/wiki/SGI_Indy#Graphics > > but those drivers don't seem to be getting all the API/ABI updates, and > haven't had releases to make them compatible with any recent X server, > so they'd have to be patching them to make them work. Perhaps NetBSD > folks who support those platforms should become their maintainers? I usually can't even get NetBSD committers to send their diffs upstream to you, so making them maintainer is even less likely to have positive results. I don't know what the best solution is. Should we try getting the diffs merged? (See attachments, I can try to group them in commits with messages if someone will apply them.) Cheers, Thomas mibstore.h and its miInitializeBackingStore() have been otherwise empty since at least xorg-server 1.10. remove all reference to them as the header is gone in xorg-server 1.18. Index: dist/src/ark_driver.c === RCS file: /cvsroot/xsrc/external/mit/xf86-video-ark/dist/src/ark_driver.c,v retrieving revision 1.1.1.4 retrieving revision 1.2 diff -u -r1.1.1.4 -r1.2 --- dist/src/ark_driver.c 23 Jul 2015 01:15:49 - 1.1.1.4 +++ dist/src/ark_driver.c 16 Aug 2016 01:27:46 - 1.2 @@ -39,7 +39,6 @@ #include "compiler.h" #include "mipointer.h" #include "micmap.h" -#include "mibstore.h" #include "fb.h" #include "ark.h" @@ -538,7 +537,6 @@ fbPictureInit (pScreen, 0, 0); - miInitializeBackingStore(pScreen); xf86SetBackingStore(pScreen); if (!pARK->NoAccel) { Index: dist/src/newport.h === RCS file: /cvsroot/xsrc/external/mit/xf86-video-newport/dist/src/newport.h,v retrieving revision 1.1.1.2 retrieving revision 1.4 diff -u -r1.1.1.2 -r1.4 --- dist/src/newport.h 23 Jul 2015 01:15:59 - 1.1.1.2 +++ dist/src/newport.h 23 Jul 2015 01:19:16 - 1.4 @@ -38,6 +38,7 @@ /* register definitions of the Newport card */ #include "newport_regs.h" +#define NEWPORT_REGISTERS 0xf #define NEWPORT_BASE_ADDR0 0x1f0f #define NEWPORT_BASE_OFFSET 0x0040 #define NEWPORT_MAX_BOARDS 4 Index: dist/src/newport_cmap.c === RCS file: /cvsroot/xsrc/external/mit/xf86-video-newport/dist/src/newport_cmap.c,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- dist/src/newport_cmap.c 14 Feb 2009 03:04:46 - 1.1.1.1 +++ dist/src/newport_cmap.c 6 Oct 2009 20:28:14 - 1.2 @@ -71,7 +71,8 @@ } #endif for(i = 0; i < 256; i++) { - NewportCmapSetRGB(pNewport->pNewportRegs, i, pNewport->t
Re: X.Org modules which could use some help to release
On Sun, Jul 14, 2019 at 06:34:20PM -0700, Alan Coopersmith wrote: > These I skipped because we don't package them in Solaris and I don't know if > anyone else still uses them or they should just be archived now: > - app/beforelight > - app/fdclock > - app/mdm > - app/rstart > - app/scripts > - app/xf86dga > - app/xfwp > - app/xvidtune > - app/xcb-demo > - driver/xf86-video-ark > - driver/xf86-video-armsoc > - driver/xf86-video-impact > - driver/xf86-video-newport > - driver/xf86-video-nested (has never had a release?) > - driver/xf86-video-tga > - driver/xf86-video-tseng > - driver/xf86-video-xgi > - driver/xf86-video-xgixp > - lib/libWindowsWM > - lib/libXTrap > - util/gccmakedep > - util/install-check As a datapoint: Of these, the following have packages in pkgsrc: beforelight gccmakedep libWindowsWM libXTrap rstart xf86-video-ark xf86-video-newport xf86-video-tga xf86-video-tseng xf86-video-xgi xf86dga xfwp xvidtune and the following: beforelight xf86-video-ark xf86-video-newport xf86-video-tga xf86-video-tseng xf86-video-xgi xf86dga xfwp xvidtune are included in NetBSD's xsrc, probably some with patches. I can't tell if they are there for historic reasons or if anyone is actually still using them. Thomas ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: https://lists.x.org/mailman/listinfo/xorg-devel
Re: [ANNOUNCE] xorg-server 1.20.0
On Fri, May 11, 2018 at 11:28:23PM +0200, Thomas Klausner wrote: > I've updated the pkgsrc package, but now lots of drivers don't build. > > xf86-video-tseng-1.2.5: > xf86-video-sis-0.10.9: > xf86-video-s3virge-1.10.7: > xf86-video-r128-6.10.2: > xf86-video-ati-18.0.1: > xf86-video-amdgpu-18.0.1: > xf86-input-mouse-1.9.2: I've attached the patches we're using in pkgsrc for these now, perhaps it helps someone else. I'm not sure about the s3virge, savage, and tseng ones. Cheers, Thomas Modified files: Index: pkgsrc/x11/xf86-video-amdgpu/distinfo diff -u pkgsrc/x11/xf86-video-amdgpu/distinfo:1.11 pkgsrc/x11/xf86-video-amdgpu/distinfo:1.12 --- pkgsrc/x11/xf86-video-amdgpu/distinfo:1.11 Thu Mar 15 23:43:17 2018 +++ pkgsrc/x11/xf86-video-amdgpu/distinfo Sun May 20 07:15:21 2018 @@ -1,6 +1,7 @@ -$NetBSD: distinfo,v 1.11 2018/03/15 23:43:17 wiz Exp $ +$NetBSD: distinfo,v 1.12 2018/05/20 07:15:21 wiz Exp $ SHA1 (xf86-video-amdgpu-18.0.1.tar.bz2) = a9c7125eae9870f26afa5167d5683f8d5e1b43c0 RMD160 (xf86-video-amdgpu-18.0.1.tar.bz2) = b8ddf051c0a2e9a8f86eb27cc1aba3f529aeedf0 SHA512 (xf86-video-amdgpu-18.0.1.tar.bz2) = eb3b76240d4e5084d68b5063b5b19ad5f5bb1f93ea9929301d9e17a48ddc1cb713b76529cb93d133b3547fe78ae8a4455f6b15f6ddf88c29349f82bb1a0db1c4 Size (xf86-video-amdgpu-18.0.1.tar.bz2) = 414683 bytes +SHA1 (patch-configure) = 0434336e8b6fd83ebaa7b0a69f1fc5fbd2b89bf7 Added files: Index: pkgsrc/x11/xf86-video-amdgpu/patches/patch-configure diff -u /dev/null pkgsrc/x11/xf86-video-amdgpu/patches/patch-configure:1.1 --- /dev/null Sun May 20 07:15:21 2018 +++ pkgsrc/x11/xf86-video-amdgpu/patches/patch-configureSun May 20 07:15:21 2018 @@ -0,0 +1,27 @@ +$NetBSD: patch-configure,v 1.1 2018/05/20 07:15:21 wiz Exp $ + +Avoid redefinition of bswap macros. + +--- configure.orig 2018-03-15 15:40:33.0 + configure +@@ -20049,20 +20049,6 @@ $as_echo "$SYS_ENDIAN_BSWAP" >&6; } + $as_echo "#define USE_SYS_ENDIAN_H 1" >>confdefs.h + + +-cat >>confdefs.h <<_ACEOF +-#define bswap_16 ${BSWAP}16 +-_ACEOF +- +- +-cat >>confdefs.h <<_ACEOF +-#define bswap_32 ${BSWAP}32 +-_ACEOF +- +- +-cat >>confdefs.h <<_ACEOF +-#define bswap_64 ${BSWAP}64 +-_ACEOF +- + fi + fi + Modified files: Index: pkgsrc/x11/xf86-video-ati/distinfo diff -u pkgsrc/x11/xf86-video-ati/distinfo:1.33 pkgsrc/x11/xf86-video-ati/distinfo:1.34 --- pkgsrc/x11/xf86-video-ati/distinfo:1.33 Thu Mar 15 23:45:25 2018 +++ pkgsrc/x11/xf86-video-ati/distinfo Sun May 20 07:11:10 2018 @@ -1,6 +1,7 @@ -$NetBSD: distinfo,v 1.33 2018/03/15 23:45:25 wiz Exp $ +$NetBSD: distinfo,v 1.34 2018/05/20 07:11:10 wiz Exp $ SHA1 (xf86-video-ati-18.0.1.tar.bz2) = b5a0b6a2fa839d668a3fb90280fede95f0bc130d RMD160 (xf86-video-ati-18.0.1.tar.bz2) = 5a60d8a4c06a7d57f4c3f9e7e7ee29a1f0fe3ea7 SHA512 (xf86-video-ati-18.0.1.tar.bz2) = b468a78503a596bbf71a1b91b231ce1fa32908f619ff2dfe249352d046696a3641f2a9ff065e32545fff77100134b4b237591215e78ef885b6509d6b16112d14 Size (xf86-video-ati-18.0.1.tar.bz2) = 881457 bytes +SHA1 (patch-configure) = bdd1014b215af69c2bb837d36829e12e86eb5764 Added files: Index: pkgsrc/x11/xf86-video-ati/patches/patch-configure diff -u /dev/null pkgsrc/x11/xf86-video-ati/patches/patch-configure:1.1 --- /dev/null Sun May 20 07:11:10 2018 +++ pkgsrc/x11/xf86-video-ati/patches/patch-configure Sun May 20 07:11:10 2018 @@ -0,0 +1,27 @@ +$NetBSD: patch-configure,v 1.1 2018/05/20 07:11:10 wiz Exp $ + +Remove duplicate definitions - src/radeon.h defines these as well. + +--- configure.orig 2018-03-15 16:21:20.0 + configure +@@ -19933,20 +19933,6 @@ $as_echo "$SYS_ENDIAN_BSWAP" >&6; } + $as_echo "#define USE_SYS_ENDIAN_H 1" >>confdefs.h + + +-cat >>confdefs.h <<_ACEOF +-#define bswap_16 ${BSWAP}16 +-_ACEOF +- +- +-cat >>confdefs.h <<_ACEOF +-#define bswap_32 ${BSWAP}32 +-_ACEOF +- +- +-cat >>confdefs.h <<_ACEOF +-#define bswap_64 ${BSWAP}64 +-_ACEOF +- + fi + fi + Modified files: Index: pkgsrc/x11/xf86-input-mouse/distinfo diff -u pkgsrc/x11/xf86-input-mouse/distinfo:1.19 pkgsrc/x11/xf86-input-mouse/distinfo:1.20 --- pkgsrc/x11/xf86-input-mouse/distinfo:1.19 Thu Nov 17 08:06:52 2016 +++ pkgsrc/x11/xf86-input-mouse/distinfoSat May 12 12:16:00 2018 @@ -1,7 +1,8 @@ -$NetBSD: distinfo,v 1.19 2016/11/17 08:06:52 wiz Exp $ +$NetBSD: distinfo,v 1.20 2018/05/12 12:16:00 ryoon Exp $ SHA1 (xf86-input-mouse-1.9.2.tar.bz2) = d3a0839ad5a33665bb261a4fba33e3a6271817dc RMD160 (xf86-input-mouse-1.9.2.tar.bz2) = c7d68c0de19787ceda4e4307b113b6d74e0cb62d SHA512 (xf86-input-mouse-1.9.2.tar.bz2) = 30fdc4f699d434e2fb4a9f8d2f4f980538d646a6e4d2d572737fc5498c0bce0fb1ba080173ea0aa3480f574dde3f58d5a7ac837afdb29640ccb092b3f18ff209 Size (xf86-input-mouse-1.9.2.tar.bz2) = 377685 bytes +SHA1 (patch-src_mouse.c) = 0e593e5c805af8d0be04925a8
Re: maxHValue/maxVValue replacement?
On Fri, May 18, 2018 at 12:48:57PM -0400, Adam Jackson wrote: > On Fri, 2018-05-18 at 08:34 +0200, Thomas Klausner wrote: > > Some old drivers use maxHValue/maxVValue, which xorg-server-1.20.0 > > does not provide any longer. What is the proper replacement? > > The only two I was able to find were mach64: > > https://cgit.freedesktop.org/xorg/driver/xf86-video-mach64/commit/?id=e27785a3fbabc9f354c361b5058b0359b6d9b5ae > https://cgit.freedesktop.org/xorg/driver/xf86-video-mach64/commit/?id=5ae03dc9f4564de54df6427ed7e6e80e75a4179e > > And rendition: > > https://cgit.freedesktop.org/xorg/driver/xf86-video-rendition/commit/?id=70dd6c22b8af58c415ee142468d19dc8b428fffd > > I'll push out releases for those so there's something official to > build against 1.20. Thank you very much for these decidedly unboring releases ;) I think the following drivers are affected by the same problem: xf86-video-s3virge-1.10.7 xf86-video-savage-2.3.9 xf86-video-tseng-1.2.5 Can they please get maintenance releases as well? Thank you, Thomas ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: https://lists.x.org/mailman/listinfo/xorg-devel
maxHValue/maxVValue replacement?
Some old drivers use maxHValue/maxVValue, which xorg-server-1.20.0 does not provide any longer. What is the proper replacement? Thanks, Thomas ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: https://lists.x.org/mailman/listinfo/xorg-devel
Re: [ANNOUNCE] xorg-server 1.20.0
On Mon, May 14, 2018 at 02:23:48PM -0400, Adam Jackson wrote: > On Sat, 2018-05-12 at 07:48 +0200, Thomas Klausner wrote: > > On Fri, May 11, 2018 at 03:40:18PM -0700, Matt Turner wrote: > > > On Fri, May 11, 2018 at 2:28 PM, Thomas Klausner <w...@netbsd.org> wrote: > > > > xf86-video-intel-2.99.917: > > > > > > > > checking whether to include DRI1 support... no > > > > configure: error: DRI1 requested but prerequisites not found > > > > *** Error code 1 > > > > > > You probably just want to start using --disable-dri1 here. > > > > Thanks, that lets me progress to a different error: > > Your intel driver snapshot is a bit dated, I think: Is there a newer one? I'll gladly update to the latest packaged version. > > --- sna_accel.lo --- > > sna_accel.c:120:0: warning: "FontSetPrivate" redefined > > #define FontSetPrivate(font, idx, data) xfont2_font_set_private(font, idx, > > data) > > > > In file included from sna_accel.c:40:0: > > /scratch/x11/xf86-video-intel/work/.buildlink/include/X11/fonts/fontstruct.h:135:0: > > note: this is the location of the previous definition > > #define FontSetPrivate(pFont,n,ptr) ((n) > (pFont)->maxPrivate ? \ > > https://cgit.freedesktop.org/xorg/driver/xf86-video-intel/commit/?id=4eaab17aec8ea66428087065901324f56df9020e I already have that patch applied locally, that warning stays. > > sna_accel.c: In function 'sna_create_gc': > > sna_accel.c:16762:4: error: 'struct _GC' has no member named > > 'pRotatedPixmap' > > gc->pRotatedPixmap = 0; > > ^~ > > https://cgit.freedesktop.org/xorg/driver/xf86-video-intel/commit/?id=2452066b7771f120a1d03d9450c96565cf31de10 That fixes the build problem, thank you. > Those specific fixes could probably be cherry-picked to the version > you're trying to build, but it may be worthwhile to update to git > master anyway. I'm packaging for NetBSD, and we prefer to package tarballs, not git master. Perhaps someone can make a new release? 2.99.917 doesn't even compile against server version 1.19... Thanks, Thomas ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: https://lists.x.org/mailman/listinfo/xorg-devel
Re: [ANNOUNCE] xorg-server 1.20.0
On Fri, May 11, 2018 at 03:40:18PM -0700, Matt Turner wrote: > On Fri, May 11, 2018 at 2:28 PM, Thomas Klausner <w...@netbsd.org> wrote: > > xf86-video-intel-2.99.917: > > > > checking whether to include DRI1 support... no > > configure: error: DRI1 requested but prerequisites not found > > *** Error code 1 > > You probably just want to start using --disable-dri1 here. Thanks, that lets me progress to a different error: --- sna_accel.lo --- sna_accel.c:120:0: warning: "FontSetPrivate" redefined #define FontSetPrivate(font, idx, data) xfont2_font_set_private(font, idx, data) In file included from sna_accel.c:40:0: /scratch/x11/xf86-video-intel/work/.buildlink/include/X11/fonts/fontstruct.h:135:0: note: this is the location of the previous definition #define FontSetPrivate(pFont,n,ptr) ((n) > (pFont)->maxPrivate ? \ sna_accel.c: In function 'sna_poly_zero_line_blt': sna_accel.c:9133:11: warning: variable 'intersects' set but not used [-Wunused-but-set-variable] bool intersects; ^~ sna_accel.c:9033:7: warning: variable 'degenerate' set but not used [-Wunused-but-set-variable] bool degenerate = true; ^~ sna_accel.c: In function 'sna_create_gc': sna_accel.c:16762:4: error: 'struct _GC' has no member named 'pRotatedPixmap' gc->pRotatedPixmap = 0; ^~ sna_accel.c: In function 'sna_accel_post_damage': sna_accel.c:17390:7: warning: assignment from incompatible pointer type [-Wincompatible-pointer-types] src = dirty->src; ^ sna_accel.c: In function 'migrate_dirty_tracking': sna_accel.c:17637:18: warning: comparison of distinct pointer types lacks a cast if (dirty->src != old_front) ^~ sna_accel.c:17653:14: warning: assignment from incompatible pointer type [-Wincompatible-pointer-types] dirty->src = new_front; ^ Thomas ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: https://lists.x.org/mailman/listinfo/xorg-devel
Re: [ANNOUNCE] xorg-server 1.20.0
On Thu, May 10, 2018 at 12:42:24PM -0400, Adam Jackson wrote: > Lots of Present, DRI3 modifier, and buildsystem fixes. Thanks to > everyone who contributed to this release! I've updated the pkgsrc package, but now lots of drivers don't build. xf86-video-tseng-1.2.5: tseng_driver.c: In function 'TsengPreInit': tseng_driver.c:1041:10: error: 'struct _ScrnInfoRec' has no member named 'maxHValue' pScrn->maxHValue = Tseng_HMAX; ^~ tseng_driver.c:1042:10: error: 'struct _ScrnInfoRec' has no member named 'maxVValue' pScrn->maxVValue = Tseng_VMAX; ^~ tseng_driver.c:1136:17: error: 'struct _ScrnInfoRec' has no member named 'maxHValue' NULL, 32, pScrn->maxHValue, 8*pTseng->Bytesperpixel, /* H limits */ ^~ tseng_driver.c:1137:10: error: 'struct _ScrnInfoRec' has no member named 'maxVValue' 0, pScrn->maxVValue,/* V limits */ ^~ tseng_driver.c: In function 'TsengMapMem': tseng_driver.c:1659:19: warning: pointer targets in assignment differ in signedness [-Wpointer-sign] pTseng->MMioBase = pTseng->FbBase; ^ *** [tseng_driver.lo] Error code 1 xf86-video-sis-0.10.9: sis_driver.c: In function 'SiSPrintModes': sis_driver.c:2741:39: error: 'struct _ScrnInfoRec' has no member named 'virtualFrom'; did you mean 'virtualX'? xf86DrvMsg(pScrn->scrnIndex, pScrn->virtualFrom, "Virtual size is %dx%d " ^~ xf86-video-savage-2.3.9: savage_driver.c: In function 'SavagePreInit': savage_driver.c:1236:13: warning: implicit declaration of function 'xf86DisableRandR' [-Wimplicit-function-declaration] xf86DisableRandR(); ^~~~ savage_driver.c:2037:10: error: 'struct _ScrnInfoRec' has no member named 'maxHValue' pScrn->maxHValue = 2048 << 3; /* 11 bits of h_total 8-pixel units */ ^~ savage_driver.c:2038:10: error: 'struct _ScrnInfoRec' has no member named 'maxVValue' pScrn->maxVValue = 2048; /* 11 bits of v_total */ ^~ *** [savage_driver.lo] Error code 1 xf86-video-s3virge-1.10.7: CC s3v_driver.lo s3v_driver.c: In function 'S3VPreInit': s3v_driver.c:741:12: warning: assignment discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers] if ((s = xf86GetOptValString(ps3v->Options, OPTION_ROTATE))) { ^ s3v_driver.c:1215:8: error: 'struct _ScrnInfoRec' has no member named 'maxHValue' pScrn->maxHValue = 2048; ^~ s3v_driver.c:1216:8: error: 'struct _ScrnInfoRec' has no member named 'maxVValue' pScrn->maxVValue = 2048; ^~ xf86-video-rendition-4.2.6: rendition.c: In function 'renditionPreInit': rendition.c:723:20: warning: assignment discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers] if ((in_string = xf86GetOptValString(pRendition->Options, OPTION_ROTATE))){ ^ rendition.c:816:16: error: 'struct _ScrnInfoRec' has no member named 'maxHValue' pScreenInfo->maxHValue = MAX_HTOTAL; ^~ rendition.c:817:16: error: 'struct _ScrnInfoRec' has no member named 'maxVValue' pScreenInfo->maxVValue = MAX_VTOTAL; ^~ *** [rendition.lo] Error code 1 xf86-video-r128-6.10.2: In file included from /usr/include/amd64/ansi.h:39:0, from /usr/include/string.h:36, from r128_driver.c:65: ../config.h:103:18: error: expected declaration specifiers or '...' before '__builtin_constant_p' #define bswap_64 bswap64 ^ /scratch/x11/xf86-video-r128/work/.buildlink/include/xorg/misc.h:300:1: note: in expansion of macro 'bswap_64' bswap_64(uint64_t x) ^~~~ ../config.h:100:18: error: expected declaration specifiers or '...' before '__builtin_constant_p' #define bswap_32 bswap32 ^ /scratch/x11/xf86-video-r128/work/.buildlink/include/xorg/misc.h:319:1: note: in expansion of macro 'bswap_32' bswap_32(uint32_t x) ^~~~ ../config.h:97:18: error: expected declaration specifiers or '...' before '__builtin_constant_p' #define bswap_16 bswap16 ^ /scratch/x11/xf86-video-r128/work/.buildlink/include/xorg/misc.h:363:1: note: in expansion of macro 'bswap_16' bswap_16(uint16_t x) ^~~~ xf86-video-mach64-6.9.5: atipreinit.c: In function 'ATIPreInit': atipreinit.c:2255:16: error: 'struct _ScrnInfoRec' has no member named 'maxHValue' pScreenInfo->maxHValue = (MaxBits(CRTC_H_TOTAL) + 1) << 3; ^~ atipreinit.c:2268:20: error: 'struct _ScrnInfoRec' has no member named 'maxHValue' pScreenInfo->maxHValue >>= 1; ^~ atipreinit.c:2271:16: error: 'struct _ScrnInfoRec' has no member named 'maxVValue' pScreenInfo->maxVValue = MaxBits(CRTC_V_TOTAL) + 1; ^~ xf86-video-ati-18.0.1: In file included from /usr/include/amd64/ansi.h:39:0, from /usr/include/unistd.h:66, from ati.h:26, from atimodule.c:27:
Re: [ANNOUNCE] xorg-server 1.19.99.904
On Fri, Apr 20, 2018 at 11:07:04AM -0400, Adam Jackson wrote: > On Fri, 2018-04-20 at 08:18 +0200, Thomas Klausner wrote: > > > extern __attribute__((visibility("default"))) > > # 112 "../../dri3/dri3.h" 3 4 > > __uint32_t > > > > # 113 "../../dri3/dri3.h" > > drm_format_for_depth( > > > > > > > > I don't see the problem, do you? > > We're not expecting another #line expansion there. Thanks! We already had a patch for such a problem with pid_t in pkgsrc, and I've extended it to uint32_t, which fixes the problem for me. It's attached. Let me know if it can go in like this or what else we can do to fix this. Thanks, Thomas patch-hw_xfree86_sdksyms.sh Description: Bourne shell script ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: https://lists.x.org/mailman/listinfo/xorg-devel
Re: [ANNOUNCE] xorg-server 1.19.99.904
On Wed, Apr 18, 2018 at 10:13:36AM -0500, Jeff Smith wrote: > Here is something that may help in tracking down the cause of the > disappearing symbol. > 1: apply the following changes to sdksyms.sh > 2: re-run the build > (this will output what is being fed into awk from the pre-processor > into sdksyms.i) > 3: search for drm_format_for_depth in sdksyms.i > (if not found, search for dri3_send_open_reply instead) > 4: post the relevant section of sdksyms.i > > -${CPP:-cpp} "$@" sdksyms.c | ${AWK:-awk} -v topdir=$topdir ' > +${CPP:-cpp} "$@" sdksyms.c | tee sdksyms.i | ${AWK:-awk} -v topdir=$topdir ' Here's the requested data: typedef struct dri3_screen_info { # 88 "../../dri3/dri3.h" 3 4 __uint32_t # 88 "../../dri3/dri3.h" version; dri3_open_proc open; dri3_pixmap_from_fd_proc pixmap_from_fd; dri3_fd_from_pixmap_proc fd_from_pixmap; dri3_open_client_proc open_client; dri3_pixmap_from_fds_proc pixmap_from_fds; dri3_fds_from_pixmap_proc fds_from_pixmap; dri3_get_formats_proc get_formats; dri3_get_modifiers_proc get_modifiers; dri3_get_drawable_modifiers_proc get_drawable_modifiers; } dri3_screen_info_rec, *dri3_screen_info_ptr; extern __attribute__((visibility("default"))) Bool dri3_screen_init(ScreenPtr screen, const dri3_screen_info_rec *info); extern __attribute__((visibility("default"))) int dri3_send_open_reply(ClientPtr client, int fd); extern __attribute__((visibility("default"))) # 112 "../../dri3/dri3.h" 3 4 __uint32_t # 113 "../../dri3/dri3.h" drm_format_for_depth( # 113 "../../dri3/dri3.h" 3 4 __uint32_t # 113 "../../dri3/dri3.h" depth, # 113 "../../dri3/dri3.h" 3 4 __uint32_t # 113 "../../dri3/dri3.h" bpp); # 106 "sdksyms.c" 2 # 120 "sdksyms.c" I don't see the problem, do you? The whole .i file is available at http://danbala.tuwien.ac.at/~wiz/tmp/xdksyms.output.gz Thomas ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: https://lists.x.org/mailman/listinfo/xorg-devel
Re: [PATCH xserver] sdksyms: Skip empty symbols
On Wed, Apr 11, 2018 at 03:39:33PM -0400, Adam Jackson wrote: > Apparently on NetBSD we can hit failures like this: > > sdksyms.c:1773:15: error: expected expression before ',' token > (void *) &, /* > ../../dri3/dri3.h:110 */ > > I've been unable to reproduce that locally (even in a NetBSD vm), but > an obvious workaround might be to just notice empty symbol names and > ignore them rather than emit invalid C code. > > Cc: Thomas Klausner <w...@netbsd.org> > Signed-off-by: Adam Jackson <a...@redhat.com> > --- > hw/xfree86/sdksyms.sh | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) That patch fixes the problem for me, thank you! I had another local change to the file, it doesn't look related but perhaps it is; full patch attached. Looking at the package, I have more changes that are not integrated, I'll prepare a changeset later. Thanks, Thomas patch-hw_xfree86_sdksyms.sh Description: Bourne shell script ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: https://lists.x.org/mailman/listinfo/xorg-devel
Re: [ANNOUNCE] xorg-server 1.19.99.904
On Wed, Apr 11, 2018 at 04:24:02PM -0500, Jeff Smith wrote: > On Wed, Apr 11, 2018 at 2:44 AM, Thomas Klausner <w...@netbsd.org> wrote: > > I still see this build failure on NetBSD: > > > > sdksyms.c:1773:15: error: expected expression before ',' token > > (void *) &, /* > > ../../dri3/dri3.h:110 */ > >^ > > > > Thomas > > > > BTW, because of a line-numbering bug in sdksyms.sh, it is misreporting > the relevant header line as dri3.h:110, > when it should have reported dri3.h:113 (the line declaring > drm_format_for_depth). I'm limited in what I can > test at the moment, and haven't been able to reproduce or see a reason > why that line would be a problem. True, there seems to be a line numbering bug: (void *) _screen_init, /* ../../dri3/dri3.h:106 */ (void *) _send_open_reply, /* ../../dri3/dri3.h:108 */ (void *) &, /* ../../dri3/dri3.h:110 */ and in dri3/dri3.h: 106 extern _X_EXPORT Bool 107 dri3_screen_init(ScreenPtr screen, const dri3_screen_info_rec *info); 108 109 extern _X_EXPORT int 110 dri3_send_open_reply(ClientPtr client, int fd); 111 112 extern _X_EXPORT uint32_t 113 drm_format_for_depth(uint32_t depth, uint32_t bpp); > I wonder, is that the only line in sdksyms.c that came out like that, > or just the first? It's the only one. Thomas ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: https://lists.x.org/mailman/listinfo/xorg-devel
Re: [ANNOUNCE] xorg-server 1.19.99.904
I still see this build failure on NetBSD: sdksyms.c:1773:15: error: expected expression before ',' token (void *) &, /* ../../dri3/dri3.h:110 */ ^ Thomas On Tue, Apr 10, 2018 at 03:57:25PM -0400, Adam Jackson wrote: > Another batch of cleanups and fixes, mostly in glamor and DRI3. > > At this point the only outstanding major feature for 1.20 that hasn't > landed yet is EGLStreams support for Xwayland. The patches require some > minor rebasing to account for per-window flips in Present, I'll post > that momentarily I suppose. I'm honestly of two minds about merging it, > the deafening silence of review feedback has not been encouraging. > > Aaron Plattner (1): > xfree86: Restore newline before "X Protocol Version" string > > Adam Jackson (10): > gtf: Warning fix > dmx: Fix some snprintf warnings. > dmx: Fix a read-from-uninitialized warning > dmx: Clean up some argument parsing code > dmx: Silence a string truncation warning. > xkb: Silence some compiler warnings > mi: Hush an almost certainly bogus warning > dix: Hush an almost certainly bogus warning > xwayland: Silence a build warning if we can > xserver 1.20 RC4 > > Daniel Stone (10): > dri3: Use single-FD screen call for single-FD request > drmmode: Track if BO allocation used modifiers > glamor: Track if BO allocation used modifiers > glamor: Push make_exportable into callers > glamor: Reallocate pixmap storage without modifiers if necessary > glamor: Fall back to non-modifier allocations > glamor: Add fd_from_pixmap hook > modesetting: Don't reuse iterator in nested loop > dri3: Set stride and size for old clients > modesetting: Actually get framebuffer ID > > Emil Velikov (10): > dri3: annotate the dri3_screen_info data as const > xwayland: don't close() fds we don't own > dri3: annotate fds/strides/offsets arrays as const > dri3: simplify dri3_open() implementation > xwayland: zero num_modifiers from the start > glamor: zero num_modifiers from the start > dri3: check for ::get_drawable_modifiers failure > xwayland: zero num_formats from the start > glamor: zero num_formats from the start > dri3: rework format/modifier caching > > Jon Turney (1): > hw/xwin/glx: Allocate fbconfigs correctly > > Kyle Brenneman (1): > GLX: Fix a use after free error with the GLVND vendor handle. > > Louis-Francis Ratté-Boulianne (2): > modesetting: Use atomic modesetting to set DPMS mode > modesetting: Have consistent state when using atomic modesetting > > Mario Kleiner (1): > modesetting: Fix page flipping harder under DRI 3.2. > > Michal Srb (2): > glx: Do not call into Composite if it is disabled. > Xext: Fix memory leaks in hashtable. > > Peter Hutterer (1): > xfree86: drop KDSKBMUTE handling > > Samuel Thibault (1): > dix: always send focus event on grab change > > git tag: xorg-server-1.19.99.904 > > https://xorg.freedesktop.org/archive/individual/xserver/xorg-server-1.19.99.904.tar.bz2 > MD5: b7623726287e405ed03b9e27f0811f87 xorg-server-1.19.99.904.tar.bz2 > SHA1: 5bfe19ab814ab8b973c0c4b53547de4e951d3679 > xorg-server-1.19.99.904.tar.bz2 > SHA256: 0ec3bb260c3798964d413db4238485fca5cab774a9d279c04e5272202f8e58b8 > xorg-server-1.19.99.904.tar.bz2 > SHA512: > b9dccc777d0a30c6b40bddffe1f359dde4103539c6598f04bf8cf5f59e6770229221a199c1866b4eba0cf8d2d87fe878985bbd2e3c6ec5b65e3f16195ea8d57e > xorg-server-1.19.99.904.tar.bz2 > PGP: > https://xorg.freedesktop.org/archive/individual/xserver/xorg-server-1.19.99.904.tar.bz2.sig > > https://xorg.freedesktop.org/archive/individual/xserver/xorg-server-1.19.99.904.tar.gz > MD5: f5082147af9822ade469f808c420a121 xorg-server-1.19.99.904.tar.gz > SHA1: c481217424beb1e0f0d38d98dfc4c194a1631354 xorg-server-1.19.99.904.tar.gz > SHA256: f1fe5e27d0eab494a4eea11a075f8f6d3989c3683c22e0bdf5c060e57d351c0f > xorg-server-1.19.99.904.tar.gz > SHA512: > dad39ecc6f8a99a74191d542709d03a14415f1065f8f2c8c68ad87d3fb7c3392eaf3ff97d90827f53d2c16e0e5acbaaa0f3bf580f60615c3f35b40965f23 > xorg-server-1.19.99.904.tar.gz > PGP: > https://xorg.freedesktop.org/archive/individual/xserver/xorg-server-1.19.99.904.tar.gz.sig > > - ajax > ___ > xorg-announce mailing list > xorg-annou...@lists.x.org > https://lists.x.org/mailman/listinfo/xorg-announce ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: https://lists.x.org/mailman/listinfo/xorg-devel
Re: [ANNOUNCE] xorg-server 1.19.99.902
I see a new compilation error compared to the previous beta release (on NetBSD): gmake[4]: Entering directory '/scratch/wip/modular-xorg-server-devel/work/xorg-server-1.19.99.902/hw/xfree86' CC sdksyms.o sdksyms.c:1773:15: error: expected expression before ',' token (void *) &, /* ../../dri3/dri3.h:110 */ ^ Makefile:821: recipe for target 'sdksyms.o' failed Line 110 in dri3/dri3.h is dri3_send_open_reply(ClientPtr client, int fd); not sure what the connection to the error is. Thomas ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: https://lists.x.org/mailman/listinfo/xorg-devel
Re: [PATCH xserver 2/3] modesetting: Remove #ifdefs XF86_PDEV_SERVER_FD
On Wed, Mar 14, 2018 at 01:33:28PM -0700, Alan Coopersmith wrote: > On 03/14/18 01:01 PM, Thomas Klausner wrote: > > I see a build failure in xorg-server-1.19.99.901 on NetBSD. > > Looks like the same failure I saw on Solaris and sent in a patch > for to revert the removal of that #ifdef. > > https://patchwork.freedesktop.org/patch/207937/ This patch works for me, thank you. Thomas ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: https://lists.x.org/mailman/listinfo/xorg-devel
Re: [PATCH xserver 2/3] modesetting: Remove #ifdefs XF86_PDEV_SERVER_FD
I see a build failure in xorg-server-1.19.99.901 on NetBSD. GEN modesetting.4 driver.c: In function 'probe_hw': driver.c:247:38: error: dereferencing pointer to incomplete type 'struct xf86_platform_device' if (platform_dev && (platform_dev->flags & XF86_PDEV_SERVER_FD)) { ^~ driver.c:247:48: error: 'XF86_PDEV_SERVER_FD' undeclared (first use in this function) if (platform_dev && (platform_dev->flags & XF86_PDEV_SERVER_FD)) { ^~~ driver.c:247:48: note: each undeclared identifier is reported only once for each function it appears in driver.c:248:14: error: implicit declaration of function 'xf86_platform_device_odev_attributes' [-Werror=implicit-function-declaration] fd = xf86_platform_device_odev_attributes(platform_dev)->fd; ^~~~ driver.c:248:9: warning: nested extern declaration of 'xf86_platform_device_odev_attributes' [-Wnested-externs] fd = xf86_platform_device_odev_attributes(platform_dev)->fd; ^~ driver.c:248:64: error: invalid type argument of '->' (have 'int') fd = xf86_platform_device_odev_attributes(platform_dev)->fd; ^~ driver.c: In function 'FreeRec': driver.c:714:60: error: 'XF86_PDEV_SERVER_FD' undeclared (first use in this function) (ms->pEnt->location.id.plat->flags & XF86_PDEV_SERVER_FD))) ^~~ driver.c: In function 'msEnableSharedPixmapFlipping': driver.c:1171:19: warning: unused variable 'pEnt' [-Wunused-variable] EntityInfoPtr pEnt = ms->pEnt; ^~~~ driver.c: In function 'SetMaster': driver.c:1495:46: error: 'XF86_PDEV_SERVER_FD' undeclared (first use in this function) (ms->pEnt->location.id.plat->flags & XF86_PDEV_SERVER_FD)) ^~~ driver.c: In function 'LeaveVT': driver.c:1746:46: error: 'XF86_PDEV_SERVER_FD' undeclared (first use in this function) (ms->pEnt->location.id.plat->flags & XF86_PDEV_SERVER_FD)) ^~~ cc1: some warnings being treated as errors XF86_PDEV_SERVER_FD is defined in xf86platformBus.h, but that file is only included in hw/xfree86/drivers/modesetting/driver.c in an #ifdef: #ifdef XSERVER_PLATFORM_BUS #include "xf86platformBus.h" #endif but no similar define protects the macro's use. Thomas On Fri, Oct 20, 2017 at 10:05:34AM +0200, Daniel Martin wrote: > XF86_PDEV_SERVER_FD is defined since: > > commit 5fb641a29bfb4a33da964e1e9af523f3472015c6 > Author: Hans de Goede> Date: Mon Jan 13 12:03:46 2014 +0100 > > hotplug: Extend OdevAttributes for server-managed fd support > > ifdef'ing for it is a leftover from the external xf86-video-modesetting. > > Signed-off-by: Daniel Martin > --- > hw/xfree86/drivers/modesetting/driver.c | 10 -- > 1 file changed, 10 deletions(-) > > diff --git a/hw/xfree86/drivers/modesetting/driver.c > b/hw/xfree86/drivers/modesetting/driver.c > index 91d850427..380dbbe17 100644 > --- a/hw/xfree86/drivers/modesetting/driver.c > +++ b/hw/xfree86/drivers/modesetting/driver.c > @@ -244,14 +244,12 @@ probe_hw(const char *dev, struct xf86_platform_device > *platform_dev) > { > int fd; > > -#ifdef XF86_PDEV_SERVER_FD > if (platform_dev && (platform_dev->flags & XF86_PDEV_SERVER_FD)) { > fd = xf86_platform_device_odev_attributes(platform_dev)->fd; > if (fd == -1) > return FALSE; > return check_outputs(fd, NULL); > } > -#endif > > fd = open_hw(dev); > if (fd != -1) { > @@ -712,10 +710,8 @@ FreeRec(ScrnInfoPtr pScrn) > if (ms->pEnt->location.type == BUS_PCI) > ret = drmClose(ms->fd); > else > -#ifdef XF86_PDEV_SERVER_FD > if (!(ms->pEnt->location.type == BUS_PLATFORM && >(ms->pEnt->location.id.plat->flags & > XF86_PDEV_SERVER_FD))) > -#endif > ret = close(ms->fd); > (void) ret; > ms_ent->fd = 0; > @@ -828,13 +824,11 @@ ms_get_drm_master_fd(ScrnInfoPtr pScrn) > > #ifdef XSERVER_PLATFORM_BUS > if (pEnt->location.type == BUS_PLATFORM) { > -#ifdef XF86_PDEV_SERVER_FD > if (pEnt->location.id.plat->flags & XF86_PDEV_SERVER_FD) > ms->fd = > > xf86_platform_device_odev_attributes(pEnt->location.id.plat)-> > fd; > else > -#endif > { > char *path = > > xf86_platform_device_odev_attributes(pEnt->location.id.plat)-> > @@ -1496,11 +1490,9 @@ SetMaster(ScrnInfoPtr pScrn) > modesettingPtr ms = modesettingPTR(pScrn); > int ret; > >
[PATCH:xf86-input-joystick] Adapt to USB HID header changes on NetBSD-8.99.9.
From: Manuel Bouyer <bou...@netbsd.org> Signed-off-by: Thomas Klausner <w...@netbsd.org> --- configure.ac | 1 + src/backend_bsd.c | 3 +++ 2 files changed, 4 insertions(+) diff --git a/configure.ac b/configure.ac index 40475dc..4877f57 100644 --- a/configure.ac +++ b/configure.ac @@ -100,6 +100,7 @@ AC_CHECK_HEADERS([usbhid.h dev/usb/usbhid.h],, [bsd_backend=no], #include #endif ]]) +AC_CHECK_HEADERS([dev/hid/hid.h]) AC_CHECK_LIB([usbhid],[hid_get_item],, [bsd_backend=no]) AM_CONDITIONAL(BSD_BACKEND, [test "x$bsd_backend" = xyes]) if test "x$bsd_backend" = xyes; then diff --git a/src/backend_bsd.c b/src/backend_bsd.c index d8c6bac..302b057 100644 --- a/src/backend_bsd.c +++ b/src/backend_bsd.c @@ -44,6 +44,9 @@ #include #include #include +#ifdef HAVE_DEV_HID_HID_H +#include +#endif #ifdef HAVE_DEV_USB_USB_IOCTL_H #include #endif -- 2.15.1 ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: https://lists.x.org/mailman/listinfo/xorg-devel
Re: [ANNOUNCE] xorg-server 1.19.0
On Thu, Nov 17, 2016 at 09:55:01AM +1000, Peter Hutterer wrote: > On Wed, Nov 16, 2016 at 02:18:29PM +0100, Thomas Klausner wrote: > > The release breaks most currently existing graphics driver releases > > and two input driver releases (details below). > > yes, a driver released for an older X server is not guaranteed to work with > a newer x server. that's usually expected, we have to wait for a server > release before we can release the drivers (yes, pre-releases are possible, > but these are not the most interesting drivers). I agree for most of these, but wonder about the intel and qxl ones, which do have quite a bit of activity in git. > now that we have a server release, we can start releasing the drivers. I'll > be doing the input ones ove the next couple of days. Thank you for the releases! Thomas ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: https://lists.x.org/mailman/listinfo/xorg-devel
Re: [ANNOUNCE] xorg-server 1.19.0
On Wed, Nov 16, 2016 at 02:18:29PM +0100, Thomas Klausner wrote: > The release breaks most currently existing graphics driver releases > and two input driver releases (details below). Most of the drivers are fixed with one of two patches that I found in some of the repositories (by Adam Jackson), attached. Not intel nor qxl though. Are releases planned for those? Thomas commit 78d1138dd6e214a200ca66fa9e439ee3c9270ec8 Author: Adam Jackson <a...@redhat.com> Date: Tue Jul 19 10:03:56 2016 -0400 Adapt Block/WakeupHandler signature for ABI 23 Signed-off-by: Adam Jackson <a...@redhat.com> diff --git a/src/compat-api.h b/src/compat-api.h index 6bc946f..89976e4 100644 --- a/src/compat-api.h +++ b/src/compat-api.h @@ -75,8 +75,13 @@ #define SCREEN_INIT_ARGS_DECL ScreenPtr pScreen, int argc, char **argv +#if ABI_VIDEODRV_VERSION >= SET_ABI_VERSION(23, 0) +#define BLOCKHANDLER_ARGS_DECL ScreenPtr arg, pointer pTimeout +#define BLOCKHANDLER_ARGS arg, pTimeout +#else #define BLOCKHANDLER_ARGS_DECL ScreenPtr arg, pointer pTimeout, pointer pReadmask #define BLOCKHANDLER_ARGS arg, pTimeout, pReadmask +#endif #define CLOSE_SCREEN_ARGS_DECL ScreenPtr pScreen #define CLOSE_SCREEN_ARGS pScreen commit b99390efcb55d7d4a68e8c595119c1af4426fc0b Author: Adam Jackson <a...@redhat.com> Date: Tue Jul 19 10:03:56 2016 -0400 Adapt Block/WakeupHandler signature for ABI 23 Signed-off-by: Adam Jackson <a...@redhat.com> diff --git a/src/compat-api.h b/src/compat-api.h index 98ba435..44daea4 100644 --- a/src/compat-api.h +++ b/src/compat-api.h @@ -78,11 +78,19 @@ #define SCREEN_INIT_ARGS_DECL ScreenPtr pScreen, int argc, char **argv +#if ABI_VIDEODRV_VERSION >= SET_ABI_VERSION(23, 0) +#define BLOCKHANDLER_ARGS_DECL ScreenPtr arg, pointer pTimeout +#define BLOCKHANDLER_ARGS arg, pTimeout + +#define WAKEUPHANDLER_ARGS_DECL ScreenPtr arg, unsigned long result +#define WAKEUPHANDLER_ARGS arg, result +#else #define BLOCKHANDLER_ARGS_DECL ScreenPtr arg, pointer pTimeout, pointer pReadmask #define BLOCKHANDLER_ARGS arg, pTimeout, pReadmask #define WAKEUPHANDLER_ARGS_DECL ScreenPtr arg, unsigned long result, pointer read_mask #define WAKEUPHANDLER_ARGS arg, result, read_mask +#endif #define CLOSE_SCREEN_ARGS_DECL ScreenPtr pScreen #define CLOSE_SCREEN_ARGS pScreen ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: https://lists.x.org/mailman/listinfo/xorg-devel
Re: [ANNOUNCE] xorg-server 1.19.0
The release breaks most currently existing graphics driver releases and two input driver releases (details below). What is the proper fix? When are new releases planned? Thanks, Thomas chips: ct_driver.c: In function 'chipsBlockHandler': ct_driver.c:7477:5: error: too many arguments to function 'pScreen->BlockHandler' (*pScreen->BlockHandler) (BLOCKHANDLER_ARGS); ^ i740: i740_video.c: In function 'I740BlockHandler': i740_video.c:842:3: error: too many arguments to function 'pScreen->BlockHandler' (*pScreen->BlockHandler) (BLOCKHANDLER_ARGS); ^ qxl: uxa-damage.c: In function 'uxa_damage_chars': uxa-damage.c:947:5: error: implicit declaration of function 'QueryGlyphExtents' [-Werror=implicit-function-declaration] QueryGlyphExtents(font, charinfo, n, ); ^ r128: r128_driver.c:1550:5: error: too many arguments to function 'pScreen->BlockHandler' (*pScreen->BlockHandler) (BLOCKHANDLER_ARGS); ^ sis: sis_driver.c: In function 'SISBlockHandler': sis_driver.c:8257:5: error: too many arguments to function 'pScreen->BlockHandler' (*pScreen->BlockHandler) (BLOCKHANDLER_ARGS); ^ tdfx: tdfx_driver.c: In function 'TDFXBlockHandler': tdfx_driver.c:2668:5: error: too many arguments to function 'pScreen->BlockHandler' (*pScreen->BlockHandler) (BLOCKHANDLER_ARGS); ^ amdgpu: amdgpu_kms.c:522:2: error: too many arguments to function 'pScreen->BlockHandler' (*pScreen->BlockHandler) (BLOCKHANDLER_ARGS); ^ glint: glint_driver.c:3475:5: error: too many arguments to function 'pScreen->BlockHandler' (*pScreen->BlockHandler) (BLOCKHANDLER_ARGS); ^ savage: savage_dri.c: In function 'SAVAGEWakeupHandler': savage_dri.c:277:4: error: too many arguments to function 'psav->pDRIInfo->wrap.WakeupHandler' (*psav->pDRIInfo->wrap.WakeupHandler) (WAKEUPHANDLER_ARGS); ^ savage_dri.c: In function 'SAVAGEBlockHandler': savage_dri.c:321:4: error: too many arguments to function 'psav->pDRIInfo->wrap.BlockHandler' (*psav->pDRIInfo->wrap.BlockHandler) (BLOCKHANDLER_ARGS); ^ xgi: xgi_driver.c: In function 'XGIBlockHandler': xgi_driver.c:4503:5: error: too many arguments to function 'pScreen->BlockHandler' (*pScreen->BlockHandler) (BLOCKHANDLER_ARGS); ^ ati: radeon_kms.c:612:5: error: too many arguments to function 'pScreen->BlockHandler' (*pScreen->BlockHandler) (BLOCKHANDLER_ARGS); ^ intel: i810_video.c: In function 'I810BlockHandler': i810_video.c:1149:5: error: too many arguments to function 'screen->BlockHandler' (*screen->BlockHandler) (BLOCKHANDLER_ARGS); ^ mga: mga_driver.c: In function 'MGABlockHandler': mga_driver.c:4024:5: error: too many arguments to function 'pScreen->BlockHandler' (*pScreen->BlockHandler) (BLOCKHANDLER_ARGS); ^ nv: nv_driver.c: In function 'NVBlockHandler': nv_driver.c:1181:5: error: too many arguments to function 'pScreen->BlockHandler' (*pScreen->BlockHandler) (BLOCKHANDLER_ARGS); ^ siliconmotion: smi_video.c:2070:5: error: too many arguments to function 'pScreen->BlockHandler' (*pScreen->BlockHandler)(BLOCKHANDLER_ARGS); ^ trident: trident_driver.c: In function 'TRIDENTBlockHandler': trident_driver.c:617:5: error: too many arguments to function 'pScreen->BlockHandler' (*pScreen->BlockHandler) (BLOCKHANDLER_ARGS); ^ input-joystick: jstk.c: In function 'jstkReadProc': jstk.c:128:17: error: implicit declaration of function 'RemoveEnabledDevice' [-Werror=implicit-function-declaration] RemoveEnabledDevice(pInfo->fd); ^ jstk.c:128:17: warning: nested extern declaration of 'RemoveEnabledDevice' [-Wnested-externs] jstk.c: In function 'jstkDeviceControlProc': jstk.c:395:13: error: implicit declaration of function 'AddEnabledDevice' [-Werror=implicit-function-declaration] AddEnabledDevice(pInfo->fd); ^ input-keyboard: kbd.c: In function 'KbdProc': kbd.c:386:2: error: implicit declaration of function 'AddEnabledDevice' [-Werror=implicit-function-declaration] AddEnabledDevice(pInfo->fd); ^ kbd.c:386:2: warning: nested extern declaration of 'AddEnabledDevice' [-Wnested-externs] kbd.c:400:7: error: implicit declaration of function 'RemoveEnabledDevice' [-Werror=implicit-function-declaration] RemoveEnabledDevice(pInfo->fd); ^ - End forwarded message - ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: https://lists.x.org/mailman/listinfo/xorg-devel
Re: [PATCH xserver v2] Fix uninitialized variable warnings reported by clang
Hello Adam! > If it's not too much trouble, please use git-send-email --in-reply-to > for followup patches like this. Thanks, I didn't know about this. I'll use it in the future. And thanks for the macro fix, it looks good to me. Thomas On Tue, Jan 05, 2016 at 12:51:41PM -0500, Adam Jackson wrote: > From: Thomas Klausner <w...@netbsd.org> > > v2: Move initializing pos into the first clause of the for statement. We > have to keep this macro equivalent to a plain for statement from the > user's perspective, otherwise callers need to {} things to keep control > flow correct. [ajax] > > Signed-off-by: Thomas Klausner <w...@netbsd.org> > Acked-by: Michel Dänzer <michel.daen...@amd.com> > --- > include/list.h | 8 +--- > 1 file changed, 5 insertions(+), 3 deletions(-) > > diff --git a/include/list.h b/include/list.h > index 39f1985..3f0574d 100644 > --- a/include/list.h > +++ b/include/list.h > @@ -304,8 +304,9 @@ xorg_list_is_empty(struct xorg_list *head) > * @param member Member name of the struct xorg_list in the list elements. > * > */ > -#define xorg_list_for_each_entry(pos, head, member) > \ > -for (pos = __container_of((head)->next, pos, member);\ > +#define xorg_list_for_each_entry(pos, head, member) \ > +for (pos = NULL,\ > + pos = __container_of((head)->next, pos, member);\ >>member != (head);\ >pos = __container_of(pos->member.next, pos, member)) > > @@ -317,7 +318,8 @@ xorg_list_is_empty(struct xorg_list *head) > * See xorg_list_for_each_entry for more details. > */ > #define xorg_list_for_each_entry_safe(pos, tmp, head, member) > \ > -for (pos = __container_of((head)->next, pos, member),\ > +for (pos = NULL,\ > + pos = __container_of((head)->next, pos, member),\ >tmp = __container_of(pos->member.next, pos, member); \ >>member != (head);\ >pos = tmp, tmp = __container_of(pos->member.next, tmp, member)) > -- > 2.5.0 > ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
[PATCH:xserver] Fix uninitialized variable warnings reported by clang. (was Re: [PATCH:xf86-video-ati] Fix uninitialized variable warnings reported by clang.)
Like this? Thomas On Tue, Dec 15, 2015 at 05:25:49PM +0900, Michel Dänzer wrote: > On 12.12.2015 00:46, Thomas Klausner wrote: > > Signed-off-by: Thomas Klausner <w...@netbsd.org> > > --- > > src/radeon_drm_queue.c | 8 > > src/radeon_kms.c | 2 +- > > 2 files changed, 5 insertions(+), 5 deletions(-) > > > > diff --git a/src/radeon_drm_queue.c b/src/radeon_drm_queue.c > > index 5e54ef8..84d0509 100644 > > --- a/src/radeon_drm_queue.c > > +++ b/src/radeon_drm_queue.c > > @@ -59,7 +59,7 @@ radeon_drm_queue_handler(int fd, unsigned int frame, > > unsigned int sec, > > unsigned int usec, void *user_ptr) > > { > > struct radeon_drm_queue_entry *user_data = user_ptr; > > - struct radeon_drm_queue_entry *e, *tmp; > > + struct radeon_drm_queue_entry *e = NULL, *tmp; > > > > xorg_list_for_each_entry_safe(e, tmp, _drm_queue, list) { > > if (e == user_data) { > > @@ -119,7 +119,7 @@ radeon_drm_abort_one(struct radeon_drm_queue_entry *e) > > void > > radeon_drm_abort_client(ClientPtr client) > > { > > -struct radeon_drm_queue_entry *e, *tmp; > > +struct radeon_drm_queue_entry *e = NULL, *tmp; > > > > xorg_list_for_each_entry_safe(e, tmp, _drm_queue, list) { > > if (e->client == client) > > @@ -142,7 +142,7 @@ radeon_drm_abort_entry(struct radeon_drm_queue_entry > > *entry) > > void > > radeon_drm_abort_id(uint64_t id) > > { > > -struct radeon_drm_queue_entry *e, *tmp; > > +struct radeon_drm_queue_entry *e = NULL, *tmp; > > > > xorg_list_for_each_entry_safe(e, tmp, _drm_queue, list) { > > if (e->id == id) { > > @@ -170,7 +170,7 @@ radeon_drm_queue_init() > > void > > radeon_drm_queue_close(ScrnInfoPtr scrn) > > { > > -struct radeon_drm_queue_entry *e, *tmp; > > +struct radeon_drm_queue_entry *e = NULL, *tmp; > > > > xorg_list_for_each_entry_safe(e, tmp, _drm_queue, list) { > > if (e->scrn == scrn) > > diff --git a/src/radeon_kms.c b/src/radeon_kms.c > > index d459740..d6d17bc 100644 > > --- a/src/radeon_kms.c > > +++ b/src/radeon_kms.c > > @@ -303,7 +303,7 @@ static void > > radeon_dirty_update(ScreenPtr screen) > > { > > RegionPtr region; > > - PixmapDirtyUpdatePtr ent; > > + PixmapDirtyUpdatePtr ent = NULL; > > > > if (xorg_list_is_empty(>pixmap_dirty_list)) > > return; > > > > NAK. This needs to be fixed in the xorg_list_for_each(_safe) macros in > xserver's list.h. > > > -- > Earthling Michel Dänzer | http://www.amd.com > Libre software enthusiast | Mesa and X developer > >From 7fca2f2a3ffc86ff2b9abf7cd0e4c1e624338f01 Mon Sep 17 00:00:00 2001 From: Thomas Klausner <w...@netbsd.org> Date: Tue, 15 Dec 2015 11:03:39 +0100 Subject: [PATCH:xserver 3/3] Fix uninitialized variable warnings reported by clang. Signed-off-by: Thomas Klausner <w...@netbsd.org> --- include/list.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/list.h b/include/list.h index 39f1985..f41d418 100644 --- a/include/list.h +++ b/include/list.h @@ -317,6 +317,7 @@ xorg_list_is_empty(struct xorg_list *head) * See xorg_list_for_each_entry for more details. */ #define xorg_list_for_each_entry_safe(pos, tmp, head, member) \ +pos = NULL; \ for (pos = __container_of((head)->next, pos, member), \ tmp = __container_of(pos->member.next, pos, member); \ >member != (head);\ -- 2.6.4 ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
Re: [PATCH:xserver] Fix uninitialized variable warnings reported by clang. (was Re: [PATCH:xf86-video-ati] Fix uninitialized variable warnings reported by clang.)
On Wed, Dec 16, 2015 at 10:24:39AM +0900, Michel Dänzer wrote: > Yes, but the xorg_list_for_each_entry macro needs the same treatment. > With that, > > Acked-by: Michel Dänzer <michel.daen...@amd.com> Thanks, new version attached. Thomas >From c6452b3bc84e2995cb8ef7b45bc239c0393a5552 Mon Sep 17 00:00:00 2001 From: Thomas Klausner <w...@netbsd.org> Date: Tue, 15 Dec 2015 11:03:39 +0100 Subject: [PATCH:xserver 3/3] Fix uninitialized variable warnings reported by clang. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Thomas Klausner <w...@netbsd.org> Acked-by: Michel Dänzer <michel.daen...@amd.com> --- include/list.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/include/list.h b/include/list.h index 39f1985..1accf10 100644 --- a/include/list.h +++ b/include/list.h @@ -304,7 +304,8 @@ xorg_list_is_empty(struct xorg_list *head) * @param member Member name of the struct xorg_list in the list elements. * */ -#define xorg_list_for_each_entry(pos, head, member) \ +#define xorg_list_for_each_entry(pos, head, member)\ +pos = NULL; \ for (pos = __container_of((head)->next, pos, member); \ >member != (head);\ pos = __container_of(pos->member.next, pos, member)) @@ -317,6 +318,7 @@ xorg_list_is_empty(struct xorg_list *head) * See xorg_list_for_each_entry for more details. */ #define xorg_list_for_each_entry_safe(pos, tmp, head, member) \ +pos = NULL; \ for (pos = __container_of((head)->next, pos, member), \ tmp = __container_of(pos->member.next, pos, member); \ >member != (head);\ -- 2.6.4 ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
[PATCH:xf86-video-ati] Fix uninitialized variable warnings reported by clang.
Signed-off-by: Thomas Klausner <w...@netbsd.org> --- src/radeon_drm_queue.c | 8 src/radeon_kms.c | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/radeon_drm_queue.c b/src/radeon_drm_queue.c index 5e54ef8..84d0509 100644 --- a/src/radeon_drm_queue.c +++ b/src/radeon_drm_queue.c @@ -59,7 +59,7 @@ radeon_drm_queue_handler(int fd, unsigned int frame, unsigned int sec, unsigned int usec, void *user_ptr) { struct radeon_drm_queue_entry *user_data = user_ptr; - struct radeon_drm_queue_entry *e, *tmp; + struct radeon_drm_queue_entry *e = NULL, *tmp; xorg_list_for_each_entry_safe(e, tmp, _drm_queue, list) { if (e == user_data) { @@ -119,7 +119,7 @@ radeon_drm_abort_one(struct radeon_drm_queue_entry *e) void radeon_drm_abort_client(ClientPtr client) { -struct radeon_drm_queue_entry *e, *tmp; +struct radeon_drm_queue_entry *e = NULL, *tmp; xorg_list_for_each_entry_safe(e, tmp, _drm_queue, list) { if (e->client == client) @@ -142,7 +142,7 @@ radeon_drm_abort_entry(struct radeon_drm_queue_entry *entry) void radeon_drm_abort_id(uint64_t id) { -struct radeon_drm_queue_entry *e, *tmp; +struct radeon_drm_queue_entry *e = NULL, *tmp; xorg_list_for_each_entry_safe(e, tmp, _drm_queue, list) { if (e->id == id) { @@ -170,7 +170,7 @@ radeon_drm_queue_init() void radeon_drm_queue_close(ScrnInfoPtr scrn) { -struct radeon_drm_queue_entry *e, *tmp; +struct radeon_drm_queue_entry *e = NULL, *tmp; xorg_list_for_each_entry_safe(e, tmp, _drm_queue, list) { if (e->scrn == scrn) diff --git a/src/radeon_kms.c b/src/radeon_kms.c index d459740..d6d17bc 100644 --- a/src/radeon_kms.c +++ b/src/radeon_kms.c @@ -303,7 +303,7 @@ static void radeon_dirty_update(ScreenPtr screen) { RegionPtr region; - PixmapDirtyUpdatePtr ent; + PixmapDirtyUpdatePtr ent = NULL; if (xorg_list_is_empty(>pixmap_dirty_list)) return; -- 2.6.4 ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
[PATCH:xf86-input-keyboard 2/2] Scancode translation table for wskbd on Amiga keyboards.
From: Frank Wille <p...@netbsd.org> Signed-off-by: Thomas Klausner <w...@netbsd.org> --- src/bsd_KbdMap.c | 121 +++ src/bsd_kbd.c| 5 +++ 2 files changed, 126 insertions(+) diff --git a/src/bsd_KbdMap.c b/src/bsd_KbdMap.c index 95c6bd8..4b785af 100644 --- a/src/bsd_KbdMap.c +++ b/src/bsd_KbdMap.c @@ -841,6 +841,122 @@ TransMapRec wsAdb = { wsAdbMap }; +/* Map for amiga keyboards */ +static CARD8 wsAmigaMap[] = { + /* 0 */ KEY_Tilde, + /* 1 */ KEY_1, + /* 2 */ KEY_2, + /* 3 */ KEY_3, + /* 4 */ KEY_4, + /* 5 */ KEY_5, + /* 6 */ KEY_6, + /* 7 */ KEY_7, + /* 8 */ KEY_8, + /* 9 */ KEY_9, + /* 10 */ KEY_0, + /* 11 */ KEY_Minus, + /* 12 */ KEY_Equal, + /* 13 */ KEY_BSlash,/* key in this position only on Amiga */ + /* 14 */ KEY_NOTUSED, + /* 15 */ KEY_KP_0, + /* 16 */ KEY_Q, + /* 17 */ KEY_W, + /* 18 */ KEY_E, + /* 19 */ KEY_R, + /* 20 */ KEY_T, + /* 21 */ KEY_Y, + /* 22 */ KEY_U, + /* 23 */ KEY_I, + /* 24 */ KEY_O, + /* 25 */ KEY_P, + /* 26 */ KEY_LBrace, + /* 27 */ KEY_RBrace, + /* 28 */ KEY_NOTUSED, + /* 29 */ KEY_KP_1, + /* 30 */ KEY_KP_2, + /* 31 */ KEY_KP_3, + /* 32 */ KEY_A, + /* 33 */ KEY_S, + /* 34 */ KEY_D, + /* 35 */ KEY_F, + /* 36 */ KEY_G, + /* 37 */ KEY_H, + /* 38 */ KEY_J, + /* 39 */ KEY_K, + /* 40 */ KEY_L, + /* 41 */ KEY_SemiColon, + /* 42 */ KEY_Quote, + /* 43 */ KEY_BSlash,/* # on international keyboards */ + /* 44 */ KEY_NOTUSED, + /* 45 */ KEY_KP_4, + /* 46 */ KEY_KP_5, + /* 47 */ KEY_KP_6, + /* 48 */ KEY_Less, + /* 49 */ KEY_Z, + /* 50 */ KEY_X, + /* 51 */ KEY_C, + /* 52 */ KEY_V, + /* 53 */ KEY_B, + /* 54 */ KEY_N, + /* 55 */ KEY_M, + /* 56 */ KEY_Comma, + /* 57 */ KEY_Period, + /* 58 */ KEY_Slash, + /* 59 */ KEY_NOTUSED, + /* 60 */ KEY_KP_Decimal, + /* 61 */ KEY_KP_7, + /* 62 */ KEY_KP_8, + /* 63 */ KEY_KP_9, + /* 64 */ KEY_Space, + /* 65 */ KEY_BackSpace, + /* 66 */ KEY_Tab, + /* 67 */ KEY_KP_Enter, + /* 68 */ KEY_Enter, + /* 69 */ KEY_Escape, + /* 70 */ KEY_Delete, + /* 71 */ KEY_NOTUSED, + /* 72 */ KEY_NOTUSED, + /* 73 */ KEY_NOTUSED, + /* 74 */ KEY_KP_Minus, + /* 75 */ KEY_NOTUSED, + /* 76 */ KEY_Up, + /* 77 */ KEY_Down, + /* 78 */ KEY_Right, + /* 79 */ KEY_Left, + /* 80 */ KEY_F1, + /* 81 */ KEY_F2, + /* 82 */ KEY_F3, + /* 83 */ KEY_F4, + /* 84 */ KEY_F5, + /* 85 */ KEY_F6, + /* 86 */ KEY_F7, + /* 87 */ KEY_F8, + /* 88 */ KEY_F9, + /* 89 */ KEY_F10, + /* 90 */ KEY_UNKNOWN, /* Keypad [ */ + /* 91 */ KEY_UNKNOWN, /* Keypad ] */ + /* 92 */ KEY_KP_Divide, + /* 93 */ KEY_KP_Multiply, + /* 94 */ KEY_KP_Plus, + /* 95 */ KEY_Help, + /* 96 */ KEY_ShiftL, + /* 97 */ KEY_ShiftR, + /* 98 */ KEY_NOTUSED, + /* 99 */ KEY_LCtrl, + /* 100 */ KEY_Alt, + /* 101 */ KEY_AltLang, + /* 102 */ KEY_LMeta, + /* 103 */ KEY_RMeta +}; +#define WS_AMIGA_MAP_SIZE (sizeof(wsAmigaMap)/sizeof(*wsAmigaMap)) + +static +TransMapRec wsAmiga = { +0, +WS_AMIGA_MAP_SIZE, +wsAmigaMap +}; + /* Map for LK201 keyboards */ static CARD8 wsLk201Map[] = { /* 0 */ KEY_F1, @@ -1386,6 +1502,11 @@ KbdGetMapping (InputInfoPtr pInfo, KeySymsPtr pKeySyms, CARD8 *pModMap) pKbd->scancodeMap = break; #endif +#ifdef WSKBD_TYPE_AMIGA + case WSKBD_TYPE_AMIGA: +pKbd->scancodeMap = +break; +#endif #ifdef WSKBD_TYPE_LK201 case WSKBD_TYPE_LK201: pKbd->scancodeMap = diff --git a/src/bsd_kbd.c b/src/bsd_kbd.c index 284833d..62482ad 100644 --- a/src/bsd_kbd.c +++ b/src/bsd_kbd.c @@ -459,6 +459,11 @@ OpenKeyboard(InputInfoPtr pInfo) printWsType("ADB", pInfo->name); break; #endif +#ifdef WSKBD_TYPE_AMIGA + case WSKBD_TYPE_AMIGA: + printWsType("Amiga", pInfo->name); + break; +#endif #ifdef WSKBD_TYPE_LK201 case WSKBD_TYPE_LK201: printWsType("LK201", pInfo->name); -- 2.6.3 ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
[PATCH:xf86-input-keyboard 1/2] Whitespace cleanup.
Signed-off-by: Thomas Klausner <w...@netbsd.org> --- src/bsd_KbdMap.c | 36 ++-- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/src/bsd_KbdMap.c b/src/bsd_KbdMap.c index 21f337d..95c6bd8 100644 --- a/src/bsd_KbdMap.c +++ b/src/bsd_KbdMap.c @@ -20,7 +20,7 @@ #include "xf86.h" #include "xf86Priv.h" -#include "xf86_OSlib.h" +#include "xf86_OSlib.h" #include "xf86Xinput.h" #include "xf86OSKbd.h" #include "atKeynames.h" @@ -50,7 +50,7 @@ static unsigned char remap[NUM_KEYCODES] = { 0,0,0,0,0,0,0,0, /* 0x78 - 0x7f */ }; -/* This table assumes the ibm code page 437 coding for characters +/* This table assumes the ibm code page 437 coding for characters * > 0x80. They are returned in this form by PCVT */ static KeySym eascii_to_x[512] = { NoSymbol, NoSymbol, NoSymbol, NoSymbol, @@ -118,7 +118,7 @@ static KeySym eascii_to_x[512] = { XK_degree, NoSymbol, NoSymbol, XK_radical, XK_Greek_eta, XK_twosuperior, XK_periodcentered, NoSymbol, - /* + /* * special marked entries (256 + x) */ @@ -214,7 +214,7 @@ static CARD8 wsUsbMap[] = { /* 1 */ KEY_NOTUSED, /* 2 */ KEY_NOTUSED, /* 3 */ KEY_NOTUSED, - /* 4 */ KEY_A, + /* 4 */ KEY_A, /* 5 */ KEY_B, /* 6 */ KEY_C, /* 7 */ KEY_D, @@ -775,7 +775,7 @@ static CARD8 wsAdbMap[] = { /* 69 */ KEY_KP_Plus, /* 70 */ KEY_NOTUSED, /* 71 */ KEY_NumLock, /* Clear */ - /* 72 */ KEY_NOTUSED, + /* 72 */ KEY_NOTUSED, /* 73 */ KEY_NOTUSED, /* 74 */ KEY_NOTUSED, /* 75 */ KEY_KP_Divide, @@ -1272,7 +1272,7 @@ KbdGetMapping (InputInfoPtr pInfo, KeySymsPtr pKeySyms, CARD8 *pModMap) case PCVT: { keymap_t keymap; - + if (ioctl(pInfo->fd, GIO_KEYMAP, ) != -1) { for (i = 0; i < keymap.n_keys && i < NUM_KEYCODES; i++) if (remap[i]) { @@ -1291,8 +1291,8 @@ KbdGetMapping (InputInfoPtr pInfo, KeySymsPtr pKeySyms, CARD8 *pModMap) } break; #endif /* SYSCONS || PCVT */ - - } + + } #endif /* !bsdi */ /* @@ -1300,32 +1300,32 @@ KbdGetMapping (InputInfoPtr pInfo, KeySymsPtr pKeySyms, CARD8 *pModMap) */ for (i = 0; i < MAP_LENGTH; i++) pModMap[i] = NoSymbol; /* make sure it is restored */ - + for (k = map, i = MIN_KEYCODE; i < (NUM_KEYCODES + MIN_KEYCODE); i++, k += 4) - + switch(*k) { - + case XK_Shift_L: case XK_Shift_R: pModMap[i] = ShiftMask; break; - + case XK_Control_L: case XK_Control_R: pModMap[i] = ControlMask; break; - + case XK_Caps_Lock: pModMap[i] = LockMask; break; - + case XK_Alt_L: case XK_Alt_R: pModMap[i] = AltMask; break; - + case XK_Num_Lock: pModMap[i] = NumLockMask; break; @@ -1350,7 +1350,7 @@ KbdGetMapping (InputInfoPtr pInfo, KeySymsPtr pKeySyms, CARD8 *pModMap) pKeySyms->map= map; pKeySyms->mapWidth = GLYPHS_PER_KEY; pKeySyms->minKeyCode = MIN_KEYCODE; - pKeySyms->maxKeyCode = MAX_KEYCODE; + pKeySyms->maxKeyCode = MAX_KEYCODE; switch(pKbd->consType) { #ifdef SYSCONS_SUPPORT @@ -1381,9 +1381,9 @@ KbdGetMapping (InputInfoPtr pInfo, KeySymsPtr pKeySyms, CARD8 *pModMap) #endif pKbd->scancodeMap = break; -#ifdef WSKBD_TYPE_ADB +#ifdef WSKBD_TYPE_ADB case WSKBD_TYPE_ADB: -pKbd->scancodeMap = +pKbd->scancodeMap = break; #endif #ifdef WSKBD_TYPE_LK201 -- 2.6.3 ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
Re: [PATCH:xf86-video-modesetting] Fix build when XSERVER_PLATFORM_BUS is not defined.
On Mon, Nov 09, 2015 at 03:43:44PM -0500, Adam Jackson wrote: > On Fri, 2015-11-06 at 10:30 +0100, Thomas Klausner wrote: > > From: Jared McNeill <jmcne...@netbsd.org> > > It's not wrong, but this driver lives in-server now. Thanks for the information. I have attached anew patch against the xserver. Thomas >From 12382b00672f811516f6bded90651bc3257d5954 Mon Sep 17 00:00:00 2001 From: Jared McNeill <jmcne...@netbsd.org> Date: Wed, 11 Nov 2015 13:30:25 +0100 Subject: [PATCH:xserver 2/2] Fix build when XSERVER_PLATFORM_BUS is not defined. Signed-off-by: Thomas Klausner <w...@netbsd.org> --- hw/xfree86/drivers/modesetting/driver.c | 4 1 file changed, 4 insertions(+) diff --git a/hw/xfree86/drivers/modesetting/driver.c b/hw/xfree86/drivers/modesetting/driver.c index 80abcdf..e66d278 100644 --- a/hw/xfree86/drivers/modesetting/driver.c +++ b/hw/xfree86/drivers/modesetting/driver.c @@ -90,6 +90,10 @@ static const struct pci_id_match ms_device_match[] = { }; #endif +#ifndef XSERVER_PLATFORM_BUS +struct xf86_platform_device; +#endif + #ifdef XSERVER_PLATFORM_BUS static Bool ms_platform_probe(DriverPtr driver, int entity_num, int flags, -- 2.6.3 ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
[PATCH:xf86-video-modesetting] Fix build when XSERVER_PLATFORM_BUS is not defined.
From: Jared McNeill--- src/driver.c | 4 1 file changed, 4 insertions(+) diff --git a/src/driver.c b/src/driver.c index d99b027..21326d9 100644 --- a/src/driver.c +++ b/src/driver.c @@ -93,6 +93,10 @@ static const struct pci_id_match ms_device_match[] = { }; #endif +#ifndef XSERVER_PLATFORM_BUS +struct xf86_platform_device; +#endif + #ifdef XSERVER_PLATFORM_BUS static Bool ms_platform_probe(DriverPtr driver, int entity_num, int flags, struct xf86_platform_device *device, -- 2.6.2 ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
Re: [PATCH] Stop accessing the attribute array using the attribute name enum.
The whole SMI_VideoAttributes array looks quite strange to me. static XF86AttributeRec SMI_VideoAttributes[2] = { {XvSettable | XvGettable,0, 255, XV_BRIGHTNESS_NAME}, {XvSettable | XvGettable, 0x00, 0xFF, XV_COLORKEY_NAME}, }; but it is accessed using these defines as indices: #define XV_ENCODING 0 #define XV_BRIGHTNESS 1 #define XV_CAPTURE_BRIGHTNESS 2 #define XV_CONTRAST 3 #define XV_SATURATION 4 #define XV_HUE 5 #define XV_COLORKEY 6 #define XV_INTERLACED 7 However, all of this code including the CLAMP has been this way since commit 78af703cb019a60cc93843efcd4889ccb15abd13 Author: Kaleb KeithleyDate: Fri Nov 14 16:48:55 2003 + Initial revision I agree that this CLAMP call should go, perhaps just ifdefed out with a comment. Not sure what the tradition for this is with xorg. Cheers, Thomas On Wed, Sep 30, 2015 at 05:02:43PM +1300, Robert Ancell wrote: > The array has only two elements but the clamping code was assuming it > contained > all the elements in order. This means no clamping is now done but at least it > wont read off the end of the array. > > Signed-off-by: Robert Ancell > --- > src/smi_video.c | 4 > 1 file changed, 4 deletions(-) > > diff --git a/src/smi_video.c b/src/smi_video.c > index 27df68d..a13668e 100644 > --- a/src/smi_video.c > +++ b/src/smi_video.c > @@ -681,10 +681,6 @@ SetAttr(ScrnInfoPtr pScrn, int i, int value) > > if (i < XV_ENCODING || i > XV_HUE) > return BadMatch; > - > -/* clamps value to attribute range */ > -value = CLAMP(value, SMI_VideoAttributes[i].min_value, > - SMI_VideoAttributes[i].max_value); > > if (i == XV_BRIGHTNESS) { > int my_value = (value <= 128? value + 128 : value - 128); > -- > 2.5.0 > > ___ > xorg-devel@lists.x.org: X.Org development > Archives: http://lists.x.org/archives/xorg-devel > Info: http://lists.x.org/mailman/listinfo/xorg-devel ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
Re: [PATCH:xf86-video-sis] Fix arguments for miSetPointerPosition.
On Wed, Sep 30, 2015 at 04:52:13PM -0400, Connor Behan wrote: > I'm pretty sure the calls for ABI versions between 13 and 15 also need > the "&". For example, in the > http://cgit.freedesktop.org/xorg/xserver/tree/?id=81cfe44b1ed0de84ad1941fe2ca74bebef3fc58d > tree, hw/xfree86/common/xf86Module.h says ABI_XINPUT_VERSION is 14. But > mi/mipointer.c still has miPointerSetPosition() taking pointers to integers. Good catch, new patch attached. Thomas >From c11f3e7bf57df27b3bcd0ab1a7b176525c248002 Mon Sep 17 00:00:00 2001 From: Thomas Klausner <w...@netbsd.org> Date: Sun, 13 Sep 2015 23:28:53 +0200 Subject: [PATCH:xf86-video-sis] Fix arguments for miSetPointerPosition. For the call for the API between versions 5 and 15. --- src/sis_driver.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/sis_driver.c b/src/sis_driver.c index 854cb54..8f06164 100644 --- a/src/sis_driver.c +++ b/src/sis_driver.c @@ -9395,9 +9395,9 @@ SISMergedPointerMoved(SCRN_ARG_TYPE arg, int x, int y) y = (int)dy; } #elif GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 13 - miPointerSetPosition(inputInfo.pointer, Absolute, x, y); + miPointerSetPosition(inputInfo.pointer, Absolute, , ); #elif GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 5 - miPointerSetPosition(inputInfo.pointer, x, y); + miPointerSetPosition(inputInfo.pointer, , ); #else UpdateCurrentTime(); miPointerAbsoluteCursor(x, y, currentTime.milliseconds); -- 2.5.3 ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
[PATCH:xf86-video-s3virge 1/2] Increase BIOS_BSIZE.
From: Nick Hudson <sk...@netbsd.org> libpciaccess expects a much bigger buffer when reading ROM. Bump it to the (normal) IO space size. Signed-off-by: Thomas Klausner <w...@netbsd.org> --- src/s3v_driver.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/s3v_driver.c b/src/s3v_driver.c index d519dc8..e5dd2e4 100644 --- a/src/s3v_driver.c +++ b/src/s3v_driver.c @@ -316,7 +316,7 @@ s3virgeSetup(pointer module, pointer opts, int *errmaj, int *errmin) static unsigned char *find_bios_string(S3VPtr ps3v, int BIOSbase, char *match1, char *match2) { -#define BIOS_BSIZE 1024 +#define BIOS_BSIZE 0x1 #define BIOS_BASE 0xc static unsigned char bios[BIOS_BSIZE]; -- 2.5.2 ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
Re: [PATCH:libX11] Get rid of some extraneous ; at the end of C source lines
Reviewed-by: Thomas Klausner <w...@netbsd.org> On Sun, Sep 27, 2015 at 06:38:32PM -0700, Alan Coopersmith wrote: > Signed-off-by: Alan Coopersmith <alan.coopersm...@oracle.com> > --- > modules/im/ximcp/imExten.c |2 +- > src/xkb/XKBNames.c |2 +- > src/xlibi18n/lcPrTxt.c |2 +- > 3 files changed, 3 insertions(+), 3 deletions(-) > > diff --git a/modules/im/ximcp/imExten.c b/modules/im/ximcp/imExten.c > index 58de32e..c2e48a8 100644 > --- a/modules/im/ximcp/imExten.c > +++ b/modules/im/ximcp/imExten.c > @@ -367,7 +367,7 @@ _XimParseExtensionList( > if (!(n = _XimCountNumberOfExtension(data[0], (CARD8 *)[1]))) > return True; > > -buf = (CARD8 *)[1];; > +buf = (CARD8 *)[1]; > for (i = 0; i < n; i++) { > len = *((INT16 *)([2])); > for (j = 0; j < num; j++) { > diff --git a/src/xkb/XKBNames.c b/src/xkb/XKBNames.c > index 2bc94d3..1f6115b 100644 > --- a/src/xkb/XKBNames.c > +++ b/src/xkb/XKBNames.c > @@ -549,7 +549,7 @@ XkbChangeNames(Display *dpy, XkbDescPtr xkb, > XkbNameChangesPtr changes) > which = changes->changed; > firstType = changes->first_type; > nTypes = changes->num_types; > -firstLvlType = changes->first_lvl;; > +firstLvlType = changes->first_lvl; > nLvlTypes = changes->num_lvls; > if (which & XkbKeyTypeNamesMask) { > if (nTypes < 1) > diff --git a/src/xlibi18n/lcPrTxt.c b/src/xlibi18n/lcPrTxt.c > index 1e387b9..5ab5ad4 100644 > --- a/src/xlibi18n/lcPrTxt.c > +++ b/src/xlibi18n/lcPrTxt.c > @@ -150,7 +150,7 @@ _XTextPropertyToTextList( > return XConverterNotFound; > > if (is_wide_char) { > - buf_len = (text_prop->nitems + 1) * sizeof(wchar_t);; > + buf_len = (text_prop->nitems + 1) * sizeof(wchar_t); > } else { > if (strcmp(to_type, XlcNUtf8String) == 0) > buf_len = text_prop->nitems * 6 + 1; > -- > 1.7.9.2 > > ___ > xorg-devel@lists.x.org: X.Org development > Archives: http://lists.x.org/archives/xorg-devel > Info: http://lists.x.org/mailman/listinfo/xorg-devel ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
[PATCH:xf86-video-s3virge 2/2] Add cast to remove a warning on 32-bit machines.
PCI_REGION_BASE returns a 64-bit value, which needs to be converted down to 32-bit before it can be put into a 32-bit pointer. --- src/s3v_dga.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/s3v_dga.c b/src/s3v_dga.c index 0e603cf..0ab374d 100644 --- a/src/s3v_dga.c +++ b/src/s3v_dga.c @@ -337,7 +337,7 @@ S3V_OpenFramebuffer( S3VPtr ps3v = S3VPTR(pScrn); *name = NULL; /* no special device */ -*mem = (unsigned char*)PCI_REGION_BASE(ps3v->PciInfo, 0, REGION_MEM); +*mem = (unsigned char*)(uintptr_t)PCI_REGION_BASE(ps3v->PciInfo, 0, REGION_MEM); *size = ps3v->videoRambytes; *offset = 0; *flags = DGA_NEED_ROOT; -- 2.5.2 ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
Re: [PATCH:twm] Add some const.
Well, yes, but for context, here is the full function after the change: char * ExpandFilename(const char *name) { char *newname; if (name[0] != '~') return strdup(name); newname = malloc (HomeLen + strlen(name) + 2); if (!newname) { fprintf (stderr, "%s: unable to allocate %ld bytes to expand filename %s/%s\n", ProgramName, HomeLen + (unsigned long)strlen(name) + 2, Home, [1]); } else { (void) sprintf (newname, "%s/%s", Home, [1]); } return newname; } So in other words, now the function is consistent in returning a malloc()ed string when it succeeds. Thomas On Wed, Sep 23, 2015 at 08:59:22AM -0700, Jasper St. Pierre wrote: > Should also mention that it also adds a strdup -- I feel that the code > calling this might conditionally free. Would be nice to double-check > callers. > > On Wed, Sep 23, 2015 at 1:58 AM, Thomas Klausner <w...@netbsd.org> wrote: > > From: Christos Zoulas <chris...@netbsd.org> > > > > Signed-off-by: Thomas Klausner <w...@netbsd.org> > > --- > > src/util.c | 4 ++-- > > src/util.h | 2 +- > > 2 files changed, 3 insertions(+), 3 deletions(-) > > > > diff --git a/src/util.c b/src/util.c > > index 4b94051..5e8f0db 100644 > > --- a/src/util.c > > +++ b/src/util.c > > @@ -256,11 +256,11 @@ Zoom(Window wf, Window wt) > > * \param name the filename to expand > > */ > > char * > > -ExpandFilename(char *name) > > +ExpandFilename(const char *name) > > { > > char *newname; > > > > -if (name[0] != '~') return name; > > +if (name[0] != '~') return strdup(name); > > > > newname = malloc (HomeLen + strlen(name) + 2); > > if (!newname) { > > diff --git a/src/util.h b/src/util.h > > index 7f4527c..4b2d3a8 100644 > > --- a/src/util.h > > +++ b/src/util.h > > @@ -64,7 +64,7 @@ in this Software without prior written authorization from > > The Open Group. > > extern void MoveOutline ( Window root, int x, int y, int width, int height, > > int bw, int th ); > > extern void Zoom ( Window wf, Window wt ); > > -extern char * ExpandFilename ( char *name ); > > +extern char * ExpandFilename ( const char *name ); > > extern void GetUnknownIcon ( const char *name ); > > extern Pixmap FindBitmap ( const char *name, unsigned int *widthp, > >unsigned int *heightp ); > > -- > > 2.5.2 > > > > ___ > > xorg-devel@lists.x.org: X.Org development > > Archives: http://lists.x.org/archives/xorg-devel > > Info: http://lists.x.org/mailman/listinfo/xorg-devel > > > > -- > Jasper > ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
Re: [PATCH:twm] Add some const.
Ah, good catch. I've attached a cleanup patch for that. Thomas On Wed, Sep 23, 2015 at 11:38:02AM -0700, Jasper St. Pierre wrote: > I was imagining that it might be used like: > > char *foo = ExpandFilename(name); > ... > if (foo != name) > free(foo); > > ... which would still work, but the != is now dead code. If callers > were unconditionally freeing before, I heavily suspect something more > serious here. > > On Wed, Sep 23, 2015 at 9:30 AM, Thomas Klausner <w...@netbsd.org> wrote: > > Well, yes, but for context, here is the full function after the change: > > > > char * > > ExpandFilename(const char *name) > > { > > char *newname; > > > > if (name[0] != '~') return strdup(name); > > > > newname = malloc (HomeLen + strlen(name) + 2); > > if (!newname) { > > fprintf (stderr, > > "%s: unable to allocate %ld bytes to expand filename > > %s/%s\n", > > ProgramName, HomeLen + (unsigned long)strlen(name) + 2, > > Home, [1]); > > } else { > > (void) sprintf (newname, "%s/%s", Home, [1]); > > } > > > > return newname; > > } > > > > So in other words, now the function is consistent in returning a > > malloc()ed string when it succeeds. > > Thomas > > > > On Wed, Sep 23, 2015 at 08:59:22AM -0700, Jasper St. Pierre wrote: > >> Should also mention that it also adds a strdup -- I feel that the code > >> calling this might conditionally free. Would be nice to double-check > >> callers. > >> > >> On Wed, Sep 23, 2015 at 1:58 AM, Thomas Klausner <w...@netbsd.org> wrote: > >> > From: Christos Zoulas <chris...@netbsd.org> > >> > > >> > Signed-off-by: Thomas Klausner <w...@netbsd.org> > >> > --- > >> > src/util.c | 4 ++-- > >> > src/util.h | 2 +- > >> > 2 files changed, 3 insertions(+), 3 deletions(-) > >> > > >> > diff --git a/src/util.c b/src/util.c > >> > index 4b94051..5e8f0db 100644 > >> > --- a/src/util.c > >> > +++ b/src/util.c > >> > @@ -256,11 +256,11 @@ Zoom(Window wf, Window wt) > >> > * \param name the filename to expand > >> > */ > >> > char * > >> > -ExpandFilename(char *name) > >> > +ExpandFilename(const char *name) > >> > { > >> > char *newname; > >> > > >> > -if (name[0] != '~') return name; > >> > +if (name[0] != '~') return strdup(name); > >> > > >> > newname = malloc (HomeLen + strlen(name) + 2); > >> > if (!newname) { > >> > diff --git a/src/util.h b/src/util.h > >> > index 7f4527c..4b2d3a8 100644 > >> > --- a/src/util.h > >> > +++ b/src/util.h > >> > @@ -64,7 +64,7 @@ in this Software without prior written authorization > >> > from The Open Group. > >> > extern void MoveOutline ( Window root, int x, int y, int width, int > >> > height, > >> > int bw, int th ); > >> > extern void Zoom ( Window wf, Window wt ); > >> > -extern char * ExpandFilename ( char *name ); > >> > +extern char * ExpandFilename ( const char *name ); > >> > extern void GetUnknownIcon ( const char *name ); > >> > extern Pixmap FindBitmap ( const char *name, unsigned int *widthp, > >> >unsigned int *heightp ); > >> > -- > >> > 2.5.2 > >> > > >> > ___ > >> > xorg-devel@lists.x.org: X.Org development > >> > Archives: http://lists.x.org/archives/xorg-devel > >> > Info: http://lists.x.org/mailman/listinfo/xorg-devel > >> > >> > >> > >> -- > >> Jasper > >> > > > > -- > Jasper > >From e8cd9fe47d1458d6a5ea17addb5cef7026742c82 Mon Sep 17 00:00:00 2001 From: Thomas Klausner <w...@netbsd.org> Date: Wed, 23 Sep 2015 20:53:24 +0200 Subject: [PATCH:twm 2/2] Adapt callers to ExpandFilename change. It now always allocates memory, so remove some unnecessary checks. While here, improve handling of an error case. --- src/menus.c | 32 ++-- src/util.c | 4 ++-- 2 files changed, 20 insertions(+), 16 deletions(-) diff --git a/src/menus.c b/src/menus.c index e23b5ff..ada9c41 100644 --- a/src/menus.c
[PATCH:twm] Add some const.
From: Christos Zoulas <chris...@netbsd.org> Signed-off-by: Thomas Klausner <w...@netbsd.org> --- src/util.c | 4 ++-- src/util.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/util.c b/src/util.c index 4b94051..5e8f0db 100644 --- a/src/util.c +++ b/src/util.c @@ -256,11 +256,11 @@ Zoom(Window wf, Window wt) * \param name the filename to expand */ char * -ExpandFilename(char *name) +ExpandFilename(const char *name) { char *newname; -if (name[0] != '~') return name; +if (name[0] != '~') return strdup(name); newname = malloc (HomeLen + strlen(name) + 2); if (!newname) { diff --git a/src/util.h b/src/util.h index 7f4527c..4b2d3a8 100644 --- a/src/util.h +++ b/src/util.h @@ -64,7 +64,7 @@ in this Software without prior written authorization from The Open Group. extern void MoveOutline ( Window root, int x, int y, int width, int height, int bw, int th ); extern void Zoom ( Window wf, Window wt ); -extern char * ExpandFilename ( char *name ); +extern char * ExpandFilename ( const char *name ); extern void GetUnknownIcon ( const char *name ); extern Pixmap FindBitmap ( const char *name, unsigned int *widthp, unsigned int *heightp ); -- 2.5.2 ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
[PATCH:xf86-video-siliconmotion 2/2] Support Gdium.
From: Michael LorenzComment out Int10 support since it's useless on Gdium/SM50x. --- src/smi_driver.c | 7 +-- src/smilynx_crtc.c | 8 src/smilynx_hw.c | 5 - src/smilynx_output.c | 3 ++- 4 files changed, 15 insertions(+), 8 deletions(-) diff --git a/src/smi_driver.c b/src/smi_driver.c index 2568637..59e6d15 100644 --- a/src/smi_driver.c +++ b/src/smi_driver.c @@ -1020,6 +1020,7 @@ SMI_DetectPanelSize(ScrnInfoPtr pScrn) if (pSmi->lcdWidth == 0 || pSmi->lcdHeight == 0) { /* panel size detection ... requires BIOS call on 730 hardware */ +#ifdef USE_INT10 if (pSmi->Chipset == SMI_COUGAR3DR) { if (pSmi->pInt10 != NULL) { pSmi->pInt10->num = 0x10; @@ -1076,7 +1077,9 @@ SMI_DetectPanelSize(ScrnInfoPtr pScrn) /* Set this to indicate that we've done the detection */ pSmi->lcd = 1; } - else if (IS_MSOC(pSmi)) { + else +#endif /* USE_INT10 */ + if (IS_MSOC(pSmi)) { pSmi->lcdWidth = (READ_SCR(pSmi, PANEL_WWIDTH) >> 16) & 2047; pSmi->lcdHeight = (READ_SCR(pSmi, PANEL_WHEIGHT) >> 16) & 2047; } @@ -1266,7 +1269,7 @@ SMI_MapMmio(ScrnInfoPtr pScrn) result); if (err) - return (FALSE); + pSmi->MapBase = NULL; } #endif diff --git a/src/smilynx_crtc.c b/src/smilynx_crtc.c index fb7183c..937cf36 100644 --- a/src/smilynx_crtc.c +++ b/src/smilynx_crtc.c @@ -565,7 +565,7 @@ SMILynx_CrtcModeSet_bios(xf86CrtcPtr crtc, CARD8 tmp; ENTER(); - +#ifdef USE_INT10 /* Find the INT 10 mode number */ { static struct { @@ -604,14 +604,14 @@ SMILynx_CrtcModeSet_bios(xf86CrtcPtr crtc, } } } - +#endif if(!reg->mode){ xf86DrvMsg(pScrn->scrnIndex, X_INFO, "SMILynx_CrtcModeSet_bios: Not a known BIOS mode: " "falling back to direct modesetting.\n"); SMILynx_CrtcModeSet_vga(crtc,mode,adjusted_mode,x,y); LEAVE(); } - +#ifdef USE_INT10 pSmi->pInt10->num = 0x10; pSmi->pInt10->ax = reg->mode | 0x80; xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Setting mode 0x%02X\n", @@ -632,7 +632,7 @@ SMILynx_CrtcModeSet_bios(xf86CrtcPtr crtc, SMICRTC(crtc)->video_init(crtc); SMILynx_CrtcAdjustFrame(crtc, x,y); - +#endif LEAVE(); } diff --git a/src/smilynx_hw.c b/src/smilynx_hw.c index b2ee8a5..9ad6ebf 100644 --- a/src/smilynx_hw.c +++ b/src/smilynx_hw.c @@ -297,6 +297,7 @@ SMILynx_Save(ScrnInfoPtr pScrn) pSmi->ModeStructInit = TRUE; } +#ifdef USE_INT10 if (pSmi->useBIOS && pSmi->pInt10 != NULL) { pSmi->pInt10->num = 0x10; pSmi->pInt10->ax = 0x0F00; @@ -305,7 +306,7 @@ SMILynx_Save(ScrnInfoPtr pScrn) xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Current mode 0x%02X.\n", save->mode); } - +#endif if (xf86GetVerbosity() > 1) { xf86DrvMsgVerb(pScrn->scrnIndex, X_INFO, VERBLEV, "Saved current video mode. Register dump:\n"); @@ -358,6 +359,7 @@ SMILynx_WriteMode(ScrnInfoPtr pScrn, vgaRegPtr vgaSavePtr, SMIRegPtr restore) VGAOUT8_INDEX(pSmi, VGA_SEQ_INDEX, VGA_SEQ_DATA, 0xA0, restore->SRA0); if (pSmi->useBIOS && restore->mode != 0){ +#ifdef USE_INT10 pSmi->pInt10->num = 0x10; pSmi->pInt10->ax = restore->mode | 0x80; xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Setting mode 0x%02X\n", @@ -372,6 +374,7 @@ SMILynx_WriteMode(ScrnInfoPtr pScrn, vgaRegPtr vgaSavePtr, SMIRegPtr restore) /* Enable DPR/VPR registers. */ tmp = VGAIN8_INDEX(pSmi, VGA_SEQ_INDEX, VGA_SEQ_DATA, 0x21); VGAOUT8_INDEX(pSmi, VGA_SEQ_INDEX, VGA_SEQ_DATA, 0x21, tmp & ~0x03); +#endif } else { /* Restore the standard VGA registers */ vgaHWRestore(pScrn, vgaSavePtr, VGA_SR_ALL); diff --git a/src/smilynx_output.c b/src/smilynx_output.c index 5ac0bbd..aa17a0c 100644 --- a/src/smilynx_output.c +++ b/src/smilynx_output.c @@ -124,6 +124,7 @@ SMILynx_OutputDPMS_lcd(xf86OutputPtr output, int mode) static void SMILynx_OutputDPMS_bios(xf86OutputPtr output, int mode) { +#ifdef USE_INT10 ScrnInfoPtr pScrn = output->scrn; SMIPtr pSmi = SMIPTR(pScrn); @@ -147,7 +148,7 @@ SMILynx_OutputDPMS_bios(xf86OutputPtr output, int mode) pSmi->pInt10->cx = 0x; pSmi->pInt10->num = 0x10; xf86ExecX86int10(pSmi->pInt10); - +#endif LEAVE(); } -- 2.5.2 ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
Re: [PATCH:xproto 1/3] Fix FD_SETSIZE definition.
Can someone please review this set? Thanks, Thomas On Fri, Jul 17, 2015 at 10:24:17AM +0200, Thomas Klausner wrote: > From: Matthew Green <m...@netbsd.org> > > Move the define of FD_SETSIZE before the include of select.h, so that > is actually does something useful. > > Signed-off-by: Thomas Klausner <w...@netbsd.org> > --- > Xpoll.h.in | 12 ++-- > 1 file changed, 6 insertions(+), 6 deletions(-) > > diff --git a/Xpoll.h.in b/Xpoll.h.in > index 01be164..6716e8b 100644 > --- a/Xpoll.h.in > +++ b/Xpoll.h.in > @@ -54,6 +54,12 @@ from The Open Group. > > #ifndef USE_POLL > > +#define XFD_SETSIZE 512 > + > +#ifndef FD_SETSIZE > +#define FD_SETSIZE XFD_SETSIZE > +#endif > + > #include > > #include /* Get the FD_* macros. */ > @@ -67,12 +73,6 @@ typedef long fd_mask; > # endif > #endif > > -#define XFD_SETSIZE 512 > - > -#ifndef FD_SETSIZE > -#define FD_SETSIZE XFD_SETSIZE > -#endif > - > #ifndef NBBY > #define NBBY 8 /* number of bits in a byte */ > #endif > -- > 2.4.5 > > ___ > xorg-devel@lists.x.org: X.Org development > Archives: http://lists.x.org/archives/xorg-devel > Info: http://lists.x.org/mailman/listinfo/xorg-devel ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
xf86-video-siliconmotion patches from NetBSD xsrc
This is not the final version, but posted as a base for discussion. Please suggest how this should be done properly. Thanks! ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
[PATCH:xf86-video-siliconmotion 1/2] Fix endian detection on NetBSD.
NetBSD provides BYTE_ENDIAN, but this driver looks for __BYTE_ENDIAN. --- src/smi.h | 6 ++ 1 file changed, 6 insertions(+) diff --git a/src/smi.h b/src/smi.h index 5e44892..f3227e0 100644 --- a/src/smi.h +++ b/src/smi.h @@ -67,6 +67,12 @@ authorization from the XFree86 Project and Silicon Motion. /* D E F I N I T I O N S */ /**/ +#ifdef __NetBSD__ +#define __BYTE_ORDER BYTE_ORDER +#define __LITTLE_ENDIAN LITTLE_ENDIAN +#define __BIG_ENDIAN BIG_ENDIAN +#endif + #define PCI_VENDOR_SMI 0x126F #define PCI_CHIP_SMI9100x0910 #define PCI_CHIP_SMI8100x0810 -- 2.5.2 ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
[PATCH:xserver] Move X11/Xpoll.h include earlier than sys/select.h
From: Matthew Green <m...@netbsd.org> Assures setting FD_SETSIZE early enough. Signed-off-by: Thomas Klausner <w...@netbsd.org> --- os/WaitFor.c| 3 ++- os/connection.c | 3 ++- os/io.c | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/os/WaitFor.c b/os/WaitFor.c index 431f1a6..ad9fd3d 100644 --- a/os/WaitFor.c +++ b/os/WaitFor.c @@ -56,6 +56,8 @@ SOFTWARE. #include #endif +#include + #ifdef WIN32 #include #endif @@ -66,7 +68,6 @@ SOFTWARE. #include "misc.h" #include "osdep.h" -#include #include "dixstruct.h" #include "opaque.h" #ifdef DPMSExtension diff --git a/os/connection.c b/os/connection.c index 3d33c41..71b75e1 100644 --- a/os/connection.c +++ b/os/connection.c @@ -64,6 +64,8 @@ SOFTWARE. #include #endif +#include + #ifdef WIN32 #include #endif @@ -103,7 +105,6 @@ SOFTWARE. #endif /* WIN32 */ #include "misc.h" /* for typedef of pointer */ #include "osdep.h" -#include #include "opaque.h" #include "dixstruct.h" #include "xace.h" diff --git a/os/io.c b/os/io.c index 96a243d..ae973cf 100644 --- a/os/io.c +++ b/os/io.c @@ -57,6 +57,8 @@ SOFTWARE. #undef DEBUG_COMMUNICATION +#include + #ifdef WIN32 #include #endif @@ -74,7 +76,6 @@ SOFTWARE. #include #include "os.h" #include "osdep.h" -#include #include "opaque.h" #include "dixstruct.h" #include "misc.h" -- 2.5.2 ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
Re: [PATCH:xf86-video-siliconmotion 1/2] Fix endian detection on NetBSD.
On Mon, Sep 14, 2015 at 10:22:06AM -0700, Alan Coopersmith wrote: > On 09/14/15 09:39 AM, Thomas Klausner wrote: > >NetBSD provides BYTE_ENDIAN, but this driver looks for __BYTE_ENDIAN. > >--- > > src/smi.h | 6 ++ > > 1 file changed, 6 insertions(+) > > > >diff --git a/src/smi.h b/src/smi.h > >index 5e44892..f3227e0 100644 > >--- a/src/smi.h > >+++ b/src/smi.h > >@@ -67,6 +67,12 @@ authorization from the XFree86 Project and Silicon Motion. > > /* D E F I N I T I O N S */ > > > > /**/ > > > >+#ifdef __NetBSD__ > >+#define __BYTE_ORDER BYTE_ORDER > >+#define __LITTLE_ENDIAN LITTLE_ENDIAN > >+#define __BIG_ENDIAN BIG_ENDIAN > >+#endif > >+ > > Should it be including instead? (Actual question - I don't > know > the answer, just know that's an already existing definition of those symbols.) Sure, that sounds fine to me. Thanks, new patch attached. Thomas >From 85e6afee301c72e14ca0a37252160b546703f65f Mon Sep 17 00:00:00 2001 From: Thomas Klausner <w...@netbsd.org> Date: Mon, 14 Sep 2015 18:36:32 +0200 Subject: [PATCH:xf86-video-siliconmotion 2/2] Use X11/Xarch.h for endian detection. --- src/smi.h| 1 + src/smi_driver.c | 2 +- src/smi_xaa.c| 18 +- 3 files changed, 11 insertions(+), 10 deletions(-) diff --git a/src/smi.h b/src/smi.h index 5e44892..2742c8d 100644 --- a/src/smi.h +++ b/src/smi.h @@ -34,6 +34,7 @@ authorization from the XFree86 Project and Silicon Motion. #include #include +#include #include "xf86.h" #include "xf86_OSproc.h" diff --git a/src/smi_driver.c b/src/smi_driver.c index 59e6d15..997daf4 100644 --- a/src/smi_driver.c +++ b/src/smi_driver.c @@ -487,7 +487,7 @@ SMI_PreInit(ScrnInfoPtr pScrn, int flags) if (pScrn->depth > 8) { /* The defaults are OK for us */ rgb zeros = {0, 0, 0}; -#if __BYTE_ORDER == __BIG_ENDIAN +#if X_BYTE_ORDER == X_BIG_ENDIAN rgb masks = {0xff00,0xff,0xff00}; #else rgb masks = {0, 0, 0}; diff --git a/src/smi_xaa.c b/src/smi_xaa.c index a878098..cd861a1 100644 --- a/src/smi_xaa.c +++ b/src/smi_xaa.c @@ -211,7 +211,7 @@ SMI_SetupForScreenToScreenCopy(ScrnInfoPtr pScrn, int xdir, int ydir, int rop, ENTER(); DEBUG("xdir=%d ydir=%d rop=%02X trans=%08X\n", xdir, ydir, rop, trans); -#if __BYTE_ORDER == __BIG_ENDIAN +#if X_BYTE_ORDER == X_BIG_ENDIAN if (pScrn->depth >= 24) trans = lswapl(trans); #endif @@ -296,7 +296,7 @@ SMI_SetupForSolidFill(ScrnInfoPtr pScrn, int color, int rop, | SMI_BITBLT | SMI_START_ENGINE; -#if __BYTE_ORDER == __BIG_ENDIAN +#if X_BYTE_ORDER == X_BIG_ENDIAN if (pScrn->depth >= 24) { /* because of the BGR values are in the MSB bytes, * 'white' is not possible and -1 has a different meaning. @@ -408,7 +408,7 @@ SMI_SetupForCPUToScreenColorExpandFill(ScrnInfoPtr pScrn, int fg, int bg, ENTER(); DEBUG("fg=%08X bg=%08X rop=%02X\n", fg, bg, rop); -#if __BYTE_ORDER == __BIG_ENDIAN +#if X_BYTE_ORDER == X_BIG_ENDIAN if (pScrn->depth >= 24) { /* see remark elswere */ if (fg == 0x7FFF) @@ -431,7 +431,7 @@ SMI_SetupForCPUToScreenColorExpandFill(ScrnInfoPtr pScrn, int fg, int bg, WRITE_DPR(pSmi, 0x18, ~fg); WRITE_DPR(pSmi, 0x20, fg); } else { -#if __BYTE_ORDER == __BIG_ENDIAN +#if X_BYTE_ORDER == X_BIG_ENDIAN if (bg == 0xFF7F) bg = -1; #endif @@ -498,7 +498,7 @@ SMI_SetupForMono8x8PatternFill(ScrnInfoPtr pScrn, int patx, int paty, int fg, DEBUG("patx=%08X paty=%08X fg=%08X bg=%08X rop=%02X\n", patx, paty, fg, bg, rop); -#if __BYTE_ORDER == __BIG_ENDIAN +#if X_BYTE_ORDER == X_BIG_ENDIAN if (pScrn->depth >= 24) { if (fg == 0x7FFF) fg = -1; @@ -524,7 +524,7 @@ SMI_SetupForMono8x8PatternFill(ScrnInfoPtr pScrn, int patx, int paty, int fg, WRITE_DPR(pSmi, 0x34, patx); WRITE_DPR(pSmi, 0x38, paty); } else { -#if __BYTE_ORDER == __BIG_ENDIAN +#if X_BYTE_ORDER == X_BIG_ENDIAN if (bg == 0xFF7F) bg = -1; #endif @@ -582,7 +582,7 @@ SMI_SetupForColor8x8PatternFill(ScrnInfoPtr pScrn, int patx, int paty, int rop, | SMI_COLOR_PATTERN | SMI_START_ENGINE; -#if __BYTE_ORDER == __BIG_ENDIAN +#if X_BYTE_ORDER == X_BIG_ENDIAN if (pScrn->depth >= 24) trans_color = lswapl(trans_color); #endif @@ -666,7 +666,7 @@ SMI_SetupForImageWrite(ScrnInfoPtr pScrn, int rop, unsigned int planemask, DEBUG("rop=%02X trans_color=%08X bpp=%d depth=%d\n", rop, trans_color, bpp, depth); -#
[PATCH:xf86-video-mga] Use correct type in function call.
Fixes passing argument 2 of 'pci_device_cfg_read_u32' from incompatible pointer type pciaccess.h:153:5: note: expected '__uint32_t *' but argument is of type 'CARD32 *' Signed-off-by: Thomas Klausner <w...@netbsd.org> --- src/mga_dac3026.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/mga_dac3026.c b/src/mga_dac3026.c index 97c2c7a..bf4e668 100644 --- a/src/mga_dac3026.c +++ b/src/mga_dac3026.c @@ -852,8 +852,12 @@ MGA3026Save(ScrnInfoPtr pScrn, vgaRegPtr vgaReg, MGARegPtr mgaReg, mgaReg->DacRegs[i] = inTi3026(MGADACregs[i]); #ifdef XSERVER_LIBPCIACCESS - pci_device_cfg_read_u32(pMga->PciInfo, & mgaReg->Option, +{ + uint32_t Option; + pci_device_cfg_read_u32(pMga->PciInfo, & Option, PCI_OPTION_REG); +mgaReg->Option = Option; +} #else mgaReg->Option = pciReadLong(pMga->PciTag, PCI_OPTION_REG); #endif -- 2.5.1 ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
[PATCH:xf86-video-sis] Fix arguments for miSetPointerPosition.
For the call for the API between versions 5 and 13. --- src/sis_driver.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sis_driver.c b/src/sis_driver.c index 854cb54..c1d26f3 100644 --- a/src/sis_driver.c +++ b/src/sis_driver.c @@ -9397,7 +9397,7 @@ SISMergedPointerMoved(SCRN_ARG_TYPE arg, int x, int y) #elif GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 13 miPointerSetPosition(inputInfo.pointer, Absolute, x, y); #elif GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 5 - miPointerSetPosition(inputInfo.pointer, x, y); + miPointerSetPosition(inputInfo.pointer, , ); #else UpdateCurrentTime(); miPointerAbsoluteCursor(x, y, currentTime.milliseconds); -- 2.5.1 ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
Re: xf86-driver-xgi patches from NetBSD xsrc
On Mon, Aug 10, 2015 at 03:13:32PM -0400, Connor Behan wrote: On 06/08/15 08:56 AM, Thomas Klausner wrote: This patch series contains all local changes in NetBSD xsrc for the xf86-video-xgi driver. Patch 16 appears to introduce a whitespace error. Otherwise, series Thanks, fixed. Reviewed-by: Connor Behan connor.be...@gmail.com All pushed, thank you for the review! If the last release really was so long ago, perhaps someone can now make a new one? (I don't know how or if I even have the right :) ) Thomas ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
[PATCH:xf86-video-xgi 11/19] Do not build in DEBUG mode by default.
Signed-off-by: Thomas Klausner w...@netbsd.org --- src/xgi.h | 7 --- 1 file changed, 7 deletions(-) diff --git a/src/xgi.h b/src/xgi.h index dbae51f..4a0a431 100755 --- a/src/xgi.h +++ b/src/xgi.h @@ -32,13 +32,6 @@ #ifndef _XGI_H_ #define _XGI_H_ -#define DEBUG -#define DEBUG1 -#define DEBUG2 -#define DEBUG3 -#define DEBUG4 -#define DEBUG5 - /*** #define DEBUG #define DEBUG1 -- 2.5.0 ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
[PATCH:xf86-video-xgi 06/19] Add prototype for bGetEDID.
Fixes warning: implicit declaration of function 'bGetEDID' Signed-off-by: Thomas Klausner w...@netbsd.org --- src/vb_i2c.h | 1 + src/xgi_driver.c | 1 + 2 files changed, 2 insertions(+) diff --git a/src/vb_i2c.h b/src/vb_i2c.h index 69f02cd..1284e9d 100755 --- a/src/vb_i2c.h +++ b/src/vb_i2c.h @@ -184,5 +184,6 @@ extern BOOLEAN ResetI2C(PXGI_HW_DEVICE_INFO pHWDE, PI2CControl pI2CControl); extern BOOLEAN I2CRead(PXGI_HW_DEVICE_INFO pHWDE,PI2CControl pI2CControl); extern BOOLEAN I2CWrite(PXGI_HW_DEVICE_INFO pHWDE, PI2CControl pI2CControl); extern BOOLEAN ResetI2C(PXGI_HW_DEVICE_INFO pHWDE, PI2CControl pI2CControl); +extern BOOLEAN bGetEDID(PXGI_HW_DEVICE_INFO, ULONG , PUCHAR, ULONG); #endif diff --git a/src/xgi_driver.c b/src/xgi_driver.c index 7e5ede1..72bb3c6 100755 --- a/src/xgi_driver.c +++ b/src/xgi_driver.c @@ -78,6 +78,7 @@ #include vb_def.h #include xgi_driver.h #include valid_mode.h +#include vb_i2c.h #define _XF86DGA_SERVER_ #include X11/extensions/xf86dgaproto.h -- 2.5.0 ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
[PATCH:xf86-video-xgi 02/19] Stop using obsolete header file.
Signed-off-by: Thomas Klausner w...@netbsd.org --- src/xgi_driver.c | 2 +- src/xgi_setup.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/xgi_driver.c b/src/xgi_driver.c index 8551625..7e5ede1 100755 --- a/src/xgi_driver.c +++ b/src/xgi_driver.c @@ -80,7 +80,7 @@ #include valid_mode.h #define _XF86DGA_SERVER_ -#include X11/extensions/xf86dgastr.h +#include X11/extensions/xf86dgaproto.h #include globals.h diff --git a/src/xgi_setup.c b/src/xgi_setup.c index a4514ad..2817966 100755 --- a/src/xgi_setup.c +++ b/src/xgi_setup.c @@ -50,7 +50,7 @@ /* #include valid_mode.h */ #define _XF86DGA_SERVER_ -#include X11/extensions/xf86dgastr.h +#include X11/extensions/xf86dgaproto.h #include globals.h #ifdef HAVE_XEXTPROTO_71 -- 2.5.0 ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
[PATCH:xf86-video-xgi 03/19] Use correct type for variable.
Fixes many warnings of this type: xgi.h:1016:14: note: expected 'XGIIOADDRESS' but argument is of type 'PUCHAR' Signed-off-by: Thomas Klausner w...@netbsd.org --- src/vb_i2c.c | 38 +++--- src/vgatypes.h | 2 +- 2 files changed, 20 insertions(+), 20 deletions(-) diff --git a/src/vb_i2c.c b/src/vb_i2c.c index d238d90..90e4630 100755 --- a/src/vb_i2c.c +++ b/src/vb_i2c.c @@ -114,7 +114,7 @@ typedef enum _I2C_ACCESS_CMD #define ENABLE_GPIOC 0x04 VOID EnableGPIOA( -PUCHAR pjIOPort, I2C_ACCESS_CMD CmdType) +XGIIOADDRESS pjIOPort, I2C_ACCESS_CMD CmdType) { PDEBUGI2C(ErrorF(EnableGPIOA()-pjIOPort=0x%x...\n, pjIOPort)); @@ -134,7 +134,7 @@ PUCHAR pjIOPort, I2C_ACCESS_CMD CmdType) VOID EnableGPIOB( -PUCHAR pjIOPort, I2C_ACCESS_CMD CmdType) +XGIIOADDRESS pjIOPort, I2C_ACCESS_CMD CmdType) { UCHAR ujCR4A = XGI_GetReg(pjIOPort, IND_CR4A_GPIO_REG_III); @@ -152,7 +152,7 @@ PUCHAR pjIOPort, I2C_ACCESS_CMD CmdType) VOID EnableGPIOC( -PUCHAR pjIOPort, I2C_ACCESS_CMD CmdType) +XGIIOADDRESS pjIOPort, I2C_ACCESS_CMD CmdType) { UCHAR ujCR4A = XGI_GetReg(pjIOPort, IND_CR4A_GPIO_REG_III); @@ -1174,8 +1174,8 @@ UCHAR ReverseUCHAR(UCHAR data) */ VOID vWriteClockLineDVI(PXGI_HW_DEVICE_INFO pHWDE, UCHAR data) { -UCHAR temp; -PUCHAR pjI2cIOBase; +UCHARtemp; +XGIIOADDRESS pjI2cIOBase; PDEBUGI2C(ErrorF(vWriteClockLineDVI()...begin\n)); @@ -1224,8 +1224,8 @@ VOID vWriteClockLineDVI(PXGI_HW_DEVICE_INFO pHWDE, UCHAR data) */ VOID vWriteDataLineDVI(PXGI_HW_DEVICE_INFO pHWDE, UCHAR data) { -UCHAR temp; -PUCHAR pjI2cIOBase; +UCHARtemp; +XGIIOADDRESS pjI2cIOBase; PDEBUGI2C(ErrorF(vWriteDataLineDVI()...begin\n)); @@ -1277,8 +1277,8 @@ VOID vWriteDataLineDVI(PXGI_HW_DEVICE_INFO pHWDE, UCHAR data) */ BOOLEAN bReadClockLineDVI(PXGI_HW_DEVICE_INFO pHWDE) { -UCHAR cPortData; -PUCHAR pjI2cIOBase; +UCHARcPortData; +XGIIOADDRESS pjI2cIOBase; PDEBUGI2C(ErrorF(bReadClockLineDVI()...begin\n)); @@ -1318,7 +1318,7 @@ BOOLEAN bReadClockLineDVI(PXGI_HW_DEVICE_INFO pHWDE) BOOLEAN bReadDataLineDVI(PXGI_HW_DEVICE_INFO pHWDE) { UCHAR cPortData; -PUCHAR pjI2cIOBase; +XGIIOADDRESS pjI2cIOBase; PDEBUGI2C(ErrorF(bReadDataLineDVI()...begin\n)); @@ -1357,7 +1357,7 @@ BOOLEAN bReadDataLineDVI(PXGI_HW_DEVICE_INFO pHWDE) //*// VOID vWaitForCRT1HsyncActive(PXGI_HW_DEVICE_INFO pHWDE) { -PUCHAR pjPort = pHWDE-pjIOAddress + INPUT_STATUS_1_COLOR; +XGIIOADDRESS pjPort = pHWDE-pjIOAddress + INPUT_STATUS_1_COLOR; ULONG i; for (i = 0; i 0x00; i++) @@ -1398,7 +1398,7 @@ VOID vWaitForCRT1HsyncActive(PXGI_HW_DEVICE_INFO pHWDE) VOID vWriteClockLineCRT(PXGI_HW_DEVICE_INFO pHWDE, UCHAR data) { UCHAR temp, ujSR1F; -PUCHAR pjI2cIOBase = pHWDE-pjIOAddress + SEQ_ADDRESS_PORT; +XGIIOADDRESS pjI2cIOBase = pHWDE-pjIOAddress + SEQ_ADDRESS_PORT; PDEBUGI2C(ErrorF(I2C:Write CRT clock = %x\n, data 1)); @@ -1433,7 +1433,7 @@ VOID vWriteClockLineCRT(PXGI_HW_DEVICE_INFO pHWDE, UCHAR data) VOID vWriteDataLineCRT(PXGI_HW_DEVICE_INFO pHWDE, UCHAR data) { UCHAR temp, ujSR1F; -PUCHAR pjI2cIOBase = pHWDE-pjIOAddress + SEQ_ADDRESS_PORT; +XGIIOADDRESS pjI2cIOBase = pHWDE-pjIOAddress + SEQ_ADDRESS_PORT; PDEBUGI2C(ErrorF(I2C:Write CRT data = %x\n, data 1)); @@ -1467,7 +1467,7 @@ VOID vWriteDataLineCRT(PXGI_HW_DEVICE_INFO pHWDE, UCHAR data) BOOLEAN bReadClockLineCRT(PXGI_HW_DEVICE_INFO pHWDE) { UCHAR cPortData; -PUCHAR pjI2cIOBase = pHWDE-pjIOAddress + SEQ_ADDRESS_PORT; +XGIIOADDRESS pjI2cIOBase = pHWDE-pjIOAddress + SEQ_ADDRESS_PORT; cPortData = XGI_GetReg(pjI2cIOBase, IND_SR11_DDC_REG); cPortData = GETBITS(cPortData, 0:0); @@ -1489,7 +1489,7 @@ BOOLEAN bReadClockLineCRT(PXGI_HW_DEVICE_INFO pHWDE) BOOLEAN bReadDataLineCRT(PXGI_HW_DEVICE_INFO pHWDE) { UCHAR cPortData; -PUCHAR pjI2cIOBase = pHWDE-pjIOAddress + SEQ_ADDRESS_PORT; +XGIIOADDRESS pjI2cIOBase = pHWDE-pjIOAddress + SEQ_ADDRESS_PORT; cPortData = XGI_GetReg(pjI2cIOBase, IND_SR11_DDC_REG); cPortData = GETBITS(cPortData, 1:1); @@ -1517,7 +1517,7 @@ BOOLEAN bReadDataLineCRT(PXGI_HW_DEVICE_INFO pHWDE) VOID vWriteClockLineFCNT(PXGI_HW_DEVICE_INFO pHWDE, UCHAR data) { UCHAR temp; -PUCHAR pjI2cIOBase = pHWDE-pjIOAddress + SEQ_ADDRESS_PORT; +XGIIOADDRESS pjI2cIOBase = pHWDE-pjIOAddress + SEQ_ADDRESS_PORT; PDEBUGI2C(ErrorF(I2C:Write FCNT clock = %x\n, data 1)); @@ -1541,7
xf86-driver-xgi patches from NetBSD xsrc
This patch series contains all local changes in NetBSD xsrc for the xf86-video-xgi driver. ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
[PATCH:xf86-video-xgi 10/19] Improve format strings in messages and errors.
Signed-off-by: Thomas Klausner w...@netbsd.org --- src/vb_ext.c | 2 +- src/xgi_accel.c | 7 --- src/xgi_driver.c | 18 +- 3 files changed, 14 insertions(+), 13 deletions(-) diff --git a/src/vb_ext.c b/src/vb_ext.c index 2f8c689..662cb7b 100755 --- a/src/vb_ext.c +++ b/src/vb_ext.c @@ -510,7 +510,7 @@ VOID XGISetDPMS(ScrnInfoPtr pScrn, PVB_DEVICE_INFO pVBInfo, PXGI_HW_DEVICE_INFO /* VB_DEVICE_INFO VBINF; */ /* PVB_DEVICE_INFO pVBInfo = pXGI-XGI_Pr */ /* VBINF */; - ErrorF(XGISetDPMS(VESA_POWER_STATE = 0x%x)...\n, VESA_POWER_STATE); +ErrorF(XGISetDPMS(VESA_POWER_STATE = 0x%lx)...\n, VESA_POWER_STATE); InitTo330Pointer( pXGIHWDE-jChipType, pVBInfo ) ; ReadVBIOSTablData( pXGIHWDE-jChipType , pVBInfo) ; diff --git a/src/xgi_accel.c b/src/xgi_accel.c index 62607fb..d4d8d4b 100755 --- a/src/xgi_accel.c +++ b/src/xgi_accel.c @@ -1722,11 +1722,12 @@ void XGIDumpCMDQueue(ScrnInfoPtr pScrn) ErrorF(--\n) ; SwWP = Volari_GetSwWP() ; -ErrorF(SwWP=0x%x\n, SwWP) ; -ErrorF(pXGI-cmdQueueBase=0x%x\n, pXGI-cmdQueueBase) ; +ErrorF(SwWP=0x%lx\n, SwWP) ; +ErrorF(pXGI-cmdQueueBase=%p\n, pXGI-cmdQueueBase) ; for( i = 0 ; i SwWP ; i+=0x04 ) { - ErrorF([%04X]: %08lX\n,i, *(CARD32 *)(pXGI-cmdQueueBase+i)); + ErrorF([%04X]: %08lX\n,i, + (unsigned long)*(CARD32 *)(pXGI-cmdQueueBase+i)); } } diff --git a/src/xgi_driver.c b/src/xgi_driver.c index a8a04db..2b72e5a 100755 --- a/src/xgi_driver.c +++ b/src/xgi_driver.c @@ -726,13 +726,13 @@ XGIErrorLog(ScrnInfoPtr pScrn, const char *format, ...) **\n; va_start(ap, format); -xf86DrvMsg(pScrn-scrnIndex, X_ERROR, str); +xf86DrvMsg(pScrn-scrnIndex, X_ERROR, %s, str); xf86DrvMsg(pScrn-scrnIndex, X_ERROR, ERROR:\n); xf86VDrvMsgVerb(pScrn-scrnIndex, X_ERROR, 1, format, ap); va_end(ap); xf86DrvMsg(pScrn-scrnIndex, X_ERROR, END OF MESSAGE\n); -xf86DrvMsg(pScrn-scrnIndex, X_ERROR, str); +xf86DrvMsg(pScrn-scrnIndex, X_ERROR, %s, str); } #ifdef XSERVER_LIBPCIACCESS @@ -2626,12 +2626,12 @@ XGIPreInit(ScrnInfoPtr pScrn, int flags) vgaHWSetMmioFuncs(VGAHWPTR(pScrn), VGAHWPTR(pScrn)-Base, 0); #endif - xf86DrvMsgVerb(pScrn-scrnIndex, X_INFO, 3, - VGA memory map from 0x%x to 0x%x \n, + xf86DrvMsgVerb(pScrn-scrnIndex, X_INFO, 3, + VGA memory map from %p to %p \n, #ifdef XSERVER_LIBPCIACCESS - pXGI-PciInfo-regions[2].base_addr, VGAHWPTR(pScrn)-Base); + (void *)(intptr_t)pXGI-PciInfo-regions[2].base_addr, VGAHWPTR(pScrn)-Base); #else - pXGI-PciInfo-ioBase[2], VGAHWPTR(pScrn)-Base); + (void *)(intptr_t)pXGI-PciInfo-ioBase[2], VGAHWPTR(pScrn)-Base); #endif } } @@ -2907,7 +2907,7 @@ XGIPreInit(ScrnInfoPtr pScrn, int flags) pXGI-xgi_HwDevExt.pjIOAddress = (pointer)((XGIIOADDRESS) (pXGI-RelIO + 0x30)); xf86DrvMsg(pScrn-scrnIndex, from, Relocated IO registers at 0x%lX\n, (unsigned long) pXGI-RelIO); - ErrorF(xgi_driver.c-pXGI-xgi_HwDevExt.pjIOAddress=0x%x...\n, pXGI-xgi_HwDevExt.pjIOAddress); +ErrorF(xgi_driver.c-pXGI-xgi_HwDevExt.pjIOAddress=0x%lx...\n, pXGI-xgi_HwDevExt.pjIOAddress); if (!xf86SetDepthBpp(pScrn, 0, 0, 0, pix24flags)) { XGIErrorLog(pScrn, xf86SetDepthBpp() error\n); @@ -3585,7 +3585,7 @@ XGIPreInit(ScrnInfoPtr pScrn, int flags) pScrn-monitor-nHsync = 1; pScrn-monitor-hsync[0].lo=30; pScrn-monitor-hsync[0].hi=50; - ErrorF(No HorizSync information set in Monitor section and use default (%d, %d)...\n, + ErrorF(No HorizSync information set in Monitor section and use default (%g, %g)...\n, pScrn-monitor-hsync[0].lo, pScrn-monitor-hsync[0].hi); } @@ -3594,7 +3594,7 @@ XGIPreInit(ScrnInfoPtr pScrn, int flags) pScrn-monitor-nVrefresh = 1; pScrn-monitor-vrefresh[0].lo=40; pScrn-monitor-vrefresh[0].hi=60; - ErrorF(No VertRefresh information set in Monitor section and use default (%d, %d)...\n, + ErrorF(No VertRefresh information set in Monitor section and use default (%g, %g)...\n, pScrn-monitor-vrefresh[0].lo, pScrn-monitor-vrefresh[0].hi); } } -- 2.5.0 ___ xorg-devel@lists.x.org: X.Org development
[PATCH:xf86-video-xgi 05/19] Use correct variable type.
Fixes warning: passing argument 2 of 'pci_device_cfg_read_u32' from incompatible pointer type Signed-off-by: Thomas Klausner w...@netbsd.org --- src/xgi_setup.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/xgi_setup.c b/src/xgi_setup.c index 2817966..310ea83 100755 --- a/src/xgi_setup.c +++ b/src/xgi_setup.c @@ -65,7 +65,7 @@ extern int FbDevExist; static Bool bAccessVGAPCIInfo(PXGI_HW_DEVICE_INFO pHwDevInfo, ULONG ulOffset, -ULONG ulSet, ULONG *pulValue); +ULONG ulSet, CARD32 *pulValue); static Bool bAccessNBridgePCIInfo(PXGI_HW_DEVICE_INFO pHwDevInfo, ULONG ulOffset, ULONG ulSet, ULONG *pulValue); static Bool XGI_IsXG21(ScrnInfoPtr pScrn); @@ -659,7 +659,7 @@ XGI_InitHwDevInfo(ScrnInfoPtr pScrn) } Bool -bAccessVGAPCIInfo(PXGI_HW_DEVICE_INFO pHwDevInfo, ULONG ulOffset, ULONG ulSet, ULONG *pulValue) +bAccessVGAPCIInfo(PXGI_HW_DEVICE_INFO pHwDevInfo, ULONG ulOffset, ULONG ulSet, CARD32 *pulValue) { XGIPtr pXGI ; #ifdef XSERVER_LIBPCIACCESS -- 2.5.0 ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
[PATCH:xf86-video-xgi 09/19] Use better variable types.
Fixes a couple more warnings. Signed-off-by: Thomas Klausner w...@netbsd.org --- src/vb_setmode.c | 16 src/vgatypes.h | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/vb_setmode.c b/src/vb_setmode.c index 98cd1c5..b0f64b1 100755 --- a/src/vb_setmode.c +++ b/src/vb_setmode.c @@ -189,7 +189,7 @@ void XGI_GetTVInfo(USHORT ModeNo, USHORT ModeIdIndex, void XGI_SetCRT2ECLK(USHORT ModeNo, USHORT ModeIdIndex, USHORT RefreshRateTableIndex, PVB_DEVICE_INFO pVBInfo); void InitTo330Pointer(UCHAR, PVB_DEVICE_INFO pVBInfo); -void XGI_GetLCDSync(USHORT * HSyncWidth, USHORT * VSyncWidth, +void XGI_GetLCDSync(ULONG * HSyncWidth, ULONG * VSyncWidth, PVB_DEVICE_INFO pVBInfo); void XGI_DisableBridge(PXGI_HW_DEVICE_INFO HwDeviceExtension, PVB_DEVICE_INFO pVBInfo); @@ -325,8 +325,8 @@ InitTo330Pointer(UCHAR ChipType, PVB_DEVICE_INFO pVBInfo) (void) memcpy(pVBInfo-ECLKData, XGI330_ECLKData, sizeof(XGI330_ECLKData)); } -pVBInfo-VCLKData = XGI_VCLKData; -pVBInfo-VBVCLKData = XGI_VBVCLKData; +pVBInfo-VCLKData = (const XGI_VCLKDataStruct *)XGI_VCLKData; +pVBInfo-VBVCLKData = (const XGI_VBVCLKDataStruct *)XGI_VBVCLKData; pVBInfo-ScreenOffset = XGI330_ScreenOffset; pVBInfo-StResInfo = XGI330_StResInfo; pVBInfo-ModeResInfo = XGI330_ModeResInfo; @@ -3131,7 +3131,7 @@ XGI_GetLVDSResInfo(USHORT ModeNo, USHORT ModeIdIndex, PVB_DEVICE_INFO pVBInfo) static void -get_HDE_VDE(PVB_DEVICE_INFO pVBInfo, USHORT *HDE, USHORT *VDE) +get_HDE_VDE(PVB_DEVICE_INFO pVBInfo, ULONG *HDE, ULONG *VDE) { switch (pVBInfo-LCDResInfo) { case Panel1024x768: @@ -3265,7 +3265,7 @@ void XGI_SetLVDSRegs(USHORT ModeNo, USHORT ModeIdIndex, USHORT RefreshRateTableIndex, PVB_DEVICE_INFO pVBInfo) { -USHORT tempbx, tempax, tempcx, tempdx, push1, push2, modeflag; +ULONG tempbx, tempax, tempcx, tempdx, push1, push2, modeflag; unsigned long temp, temp1, temp2, temp3, push3; XGI330_LCDDataDesStruct *LCDPtr = NULL; XGI330_LCDDataDesStruct2 *LCDPtr1 = NULL; @@ -6282,7 +6282,7 @@ XGI_SetLCDRegs(USHORT ModeNo, USHORT ModeIdIndex, PXGI_HW_DEVICE_INFO HwDeviceExtension, USHORT RefreshRateTableIndex, PVB_DEVICE_INFO pVBInfo) { -USHORT push1, +ULONG push1, push2, pushbx, tempax, @@ -8610,7 +8610,7 @@ XGI_GetLCDCapPtr1(PVB_DEVICE_INFO pVBInfo) /* Description : */ /* - */ void -XGI_GetLCDSync(USHORT * HSyncWidth, USHORT * VSyncWidth, +XGI_GetLCDSync(ULONG * HSyncWidth, ULONG * VSyncWidth, PVB_DEVICE_INFO pVBInfo) { USHORT Index; @@ -10018,7 +10018,7 @@ XGI_GetVCLK2Ptr(USHORT ModeNo, USHORT ModeIdIndex, { /* Jong 10/08/2007; merge code */ USHORT tempbx ; -UCHAR *CHTVVCLKPtr = NULL ; +const UCHAR *CHTVVCLKPtr = NULL ; unsigned VCLKIndex; USHORT CRT2Index; diff --git a/src/vgatypes.h b/src/vgatypes.h index 6f1e20c..d0a65bf 100755 --- a/src/vgatypes.h +++ b/src/vgatypes.h @@ -210,7 +210,7 @@ typedef struct _XGI_DSReg typedef struct _XGI_HW_DEVICE_INFO XGI_HW_DEVICE_INFO, *PXGI_HW_DEVICE_INFO; -typedef BOOLEAN (*PXGI_QUERYSPACE) (PXGI_HW_DEVICE_INFO, ULONG, ULONG, ULONG *); +typedef BOOLEAN (*PXGI_QUERYSPACE) (PXGI_HW_DEVICE_INFO, ULONG, ULONG, CARD32 *); struct _XGI_HW_DEVICE_INFO { -- 2.5.0 ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
[PATCH:xf86-video-xgi 04/19] Remove const marker for some variables.
They are used in non-const context. Fixes a couple of warnings: warning: assignment discards 'const' qualifier from pointer target type Signed-off-by: Thomas Klausner w...@netbsd.org --- src/vb_table.h | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/vb_table.h b/src/vb_table.h index b26427c..d49f233 100755 --- a/src/vb_table.h +++ b/src/vb_table.h @@ -3112,14 +3112,14 @@ static const XGI_ModeResInfoStruct XGI330_ModeResInfo[]= { 1152, 864, 8,16} }; -static const UCHAR XGI330_OutputSelect = 0x40; -static const UCHAR XGI330_SoftSetting = 0x30; -static const UCHAR XGI330_SR07 = 0x18; -static const UCHAR XG21_DVOSetting = 0x00 ; -static const UCHAR XG21_CR2E = 0x00 ; -static const UCHAR XG21_CR2F = 0x00 ; -static const UCHAR XG21_CR46 = 0x00 ; -static const UCHAR XG21_CR47 = 0x00 ; +static UCHAR XGI330_OutputSelect = 0x40; +static UCHAR XGI330_SoftSetting = 0x30; +static UCHAR XGI330_SR07 = 0x18; +static UCHAR XG21_DVOSetting = 0x00 ; +static UCHAR XG21_CR2E = 0x00 ; +static UCHAR XG21_CR2F = 0x00 ; +static UCHAR XG21_CR46 = 0x00 ; +static UCHAR XG21_CR47 = 0x00 ; UCHAR XG27_CR97 = 0xC1 ; UCHAR XG27_SR36 = 0x30 ; -- 2.5.0 ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
[PATCH:xf86-video-xgi 08/19] Uncomment header includes.
Needed for open() and ioctl(). Signed-off-by: Thomas Klausner w...@netbsd.org --- src/xgi_driver.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/xgi_driver.c b/src/xgi_driver.c index fec7b78..a8a04db 100755 --- a/src/xgi_driver.c +++ b/src/xgi_driver.c @@ -110,11 +110,8 @@ #define DEFAULT_DPI 96 #endif -/* Jong 01/22/2009; compiler error; type conflict */ -/* #include fcntl.h #include sys/ioctl.h -*/ #ifdef XSERVER_LIBPCIACCESS static Bool XGIPciProbe(DriverPtr drv, int entity_num, -- 2.5.0 ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
[PATCH:xf86-video-xgi 12/19] Make PutImage implementation match prototype.
Fixes warning: assignment from incompatible pointer type Signed-off-by: Thomas Klausner w...@netbsd.org --- src/xgi_video.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/xgi_video.c b/src/xgi_video.c index 716d6e1..420ba07 100755 --- a/src/xgi_video.c +++ b/src/xgi_video.c @@ -102,7 +102,7 @@ static void XGIQueryBestSize(ScrnInfoPtr, Bool, short, short, short, short, unsigned int *, unsigned int *, pointer); static int XGIPutImage( ScrnInfoPtr, short, short, short, short, short, short, short, short, -int, unsigned char*, short, short, Bool, RegionPtr, pointer); +int, unsigned char*, short, short, Bool, RegionPtr, pointer, DrawablePtr); static int XGIQueryImageAttributes(ScrnInfoPtr, int, unsigned short *, unsigned short *, int *, int *); @@ -1082,7 +1082,8 @@ XGIPutImage( int id, unsigned char* buf, short width, short height, Bool sync, - RegionPtr clipBoxes, pointer data + RegionPtr clipBoxes, pointer data, + DrawablePtr pDraw ){ XGIPtr pXGI = XGIPTR(pScrn); XGIPortPrivPtr pPriv = (XGIPortPrivPtr)data; -- 2.5.0 ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
[PATCH:xf86-video-xgi 07/19] Consistently use Bool instead of BOOL.
Signed-off-by: Thomas Klausner w...@netbsd.org --- src/xgi.h| 8 src/xgi_driver.c | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/xgi.h b/src/xgi.h index a5702c4..dbae51f 100755 --- a/src/xgi.h +++ b/src/xgi.h @@ -51,7 +51,7 @@ #ifndef XGI_VIDEO_HW /* avoid compile error in xgi_videohw.c; weird! */ /* Jong 07/27/2009; use run-time debug instead except for HW acceleration routines */ -extern BOOL g_bRunTimeDebug; +extern Bool g_bRunTimeDebug; #define RUNTIMEDEBUG(p)if(g_bRunTimeDebug)p; /* Jong@08052009 */ @@ -807,12 +807,12 @@ typedef struct { MonitorRangeRec CRT1Range,CRT2Range; #ifdef XGIDUALHEAD -BOOL DualHeadMode; /* TRUE if we use dual head mode */ -BOOL SecondHead; /* TRUE is this is the second head */ +Bool DualHeadMode; /* TRUE if we use dual head mode */ +Bool SecondHead; /* TRUE is this is the second head */ XGIEntPtr entityPrivate; /* Ptr to private entity (see above) */ #endif XGIFBLayout CurrentLayout; /* Current framebuffer layout */ -BOOL Primary;/* Display adapter is primary */ +Bool Primary;/* Display adapter is primary */ xf86Int10InfoPtrpInt; /* Our int10 */ /** diff --git a/src/xgi_driver.c b/src/xgi_driver.c index 72bb3c6..fec7b78 100755 --- a/src/xgi_driver.c +++ b/src/xgi_driver.c @@ -136,7 +136,7 @@ xf86MonPtr g_pMonitorDVI=NULL; /* Jong 12/04/2007; used for filtering of CRT1 m /* Jong 07/27/2009; use run-time debug instead except for HW acceleration routines */ /* Set Option RunTimeDebug to true in X configuration file */ -BOOL g_bRunTimeDebug=0; +Bool g_bRunTimeDebug=0; /* Jong@09072009 */ unsigned char g_DVI_I_SignalType = 0x00; -- 2.5.0 ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
[PATCH:xf86-video-xgi 01/19] Avoid redefinitions of u8, uint8_t, and GETBITS.
Signed-off-by: Thomas Klausner w...@netbsd.org --- src/vb_i2c.h | 6 +- src/xgi.h| 2 ++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/vb_i2c.h b/src/vb_i2c.h index 1e9de25..69f02cd 100755 --- a/src/vb_i2c.h +++ b/src/vb_i2c.h @@ -7,7 +7,9 @@ #endif #ifndef u32 #define u32 unsigned long -#define u8 unsigned long +#endif +#ifndef u8 +#define u8 uint8_t #endif /* Jong@08052009 */ @@ -82,7 +84,9 @@ // set bits as 1 between bit(a) and bit(b) #define MASK(n) ( BITS(LARGE(n)-SMALL(n)+1) SMALL(n) ) // get bits [a:b]'s binary value +#ifndef GETBITS #define GETBITS(b,n)( ((b) MASK(n)) SMALL(n) ) /* Jong@08032009 */ +#endif // set binary value from [a:0] to [c:d] #define SETBITS(b, n) ( ( (b) ((1?n) (0?n) ? (0?n) : (1?n)) ) MASK(n) ) // move bits value from [a:b] to [c:d] diff --git a/src/xgi.h b/src/xgi.h index 0bc8d30..a5702c4 100755 --- a/src/xgi.h +++ b/src/xgi.h @@ -1022,7 +1022,9 @@ extern void XGI_SetRegANDOR(XGIIOADDRESS Port, USHORT Index, USHORT DataAND, extern void XGI_SetRegAND(XGIIOADDRESS Port, USHORT Index, USHORT DataAND); extern void XGI_SetRegOR(XGIIOADDRESS Port, USHORT Index, USHORT DataOR); +#ifndef uint8_t #define uint8_tCARD8 +#endif extern void XGI_WriteDAC(XGIIOADDRESS dac_data, unsigned shift, unsigned ordering, uint8_t red, uint8_t green, uint8_t blue); -- 2.5.0 ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
[PATCH:xf86-video-xgi 14/19] Remove PACKAGE_* definitions from xgi_dri.c.
They are provided by configure (via config.h or command line). Signed-off-by: Thomas Klausner w...@netbsd.org --- src/xgi_dri.c| 5 - src/xgi_driver.c | 6 +++--- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/src/xgi_dri.c b/src/xgi_dri.c index c4cbfed..fcfab89 100755 --- a/src/xgi_dri.c +++ b/src/xgi_dri.c @@ -39,11 +39,6 @@ #include config.h #endif -/* Jong 09/27/2007; added for PACKAGE_VERSION_MAJOR,... */ -#define PACKAGE_VERSION_MAJOR 1 -#define PACKAGE_VERSION_MINOR 1 -#define PACKAGE_VERSION_PATCHLEVEL 0 - #include xf86.h #include xf86_OSproc.h diff --git a/src/xgi_driver.c b/src/xgi_driver.c index 2b72e5a..4806476 100755 --- a/src/xgi_driver.c +++ b/src/xgi_driver.c @@ -47,9 +47,9 @@ #include config.h #endif -#define PACKAGE_VERSION_MAJOR 6 -#define PACKAGE_VERSION_MINOR 1 -#define PACKAGE_VERSION_PATCHLEVEL 6803 +#define PACKAGE_VERSION_MAJOR 1 +#define PACKAGE_VERSION_MINOR 6 +#define PACKAGE_VERSION_PATCHLEVEL 0 #include fb.h #include micmap.h -- 2.5.0 ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
[PATCH:xf86-video-xgi 18/19] Add unistd.h for usleep().
Signed-off-by: Thomas Klausner w...@netbsd.org --- src/vb_i2c.c| 1 + src/xgi_accel.c | 1 + 2 files changed, 2 insertions(+) diff --git a/src/vb_i2c.c b/src/vb_i2c.c index 90e4630..69cdb8a 100755 --- a/src/vb_i2c.c +++ b/src/vb_i2c.c @@ -2,6 +2,7 @@ #ifdef HAVE_CONFIG_H #include config.h #endif +#include unistd.h #include osdef.h #include vgatypes.h diff --git a/src/xgi_accel.c b/src/xgi_accel.c index d4d8d4b..c96af14 100755 --- a/src/xgi_accel.c +++ b/src/xgi_accel.c @@ -34,6 +34,7 @@ #ifdef HAVE_CONFIG_H #include config.h #endif +#include unistd.h #include xf86.h #include xf86_OSproc.h -- 2.5.0 ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
[PATCH:xf86-video-xgi 16/19] Compare integer return values to integers.
Fixes: warning: comparison between pointer and integer Signed-off-by: Thomas Klausner w...@netbsd.org --- src/xgi_opt.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/xgi_opt.c b/src/xgi_opt.c index c0608d5..54153fc 100755 --- a/src/xgi_opt.c +++ b/src/xgi_opt.c @@ -315,13 +315,13 @@ xgiOptions(ScrnInfoPtr pScrn) Non_DDCDefaultResolutionY , Non_DDCDefaultRefreshRate ); - if( (xf86NameCmp(Non_DDCDefaultResolutionX,) == NULL) || (xf86NameCmp(Non_DDCDefaultResolutionY,) == NULL) ) + if( (xf86NameCmp(Non_DDCDefaultResolutionX,) == 0) || (xf86NameCmp(Non_DDCDefaultResolutionY,) == 0) ) { strcpy(Non_DDCDefaultResolutionX, 1024); strcpy(Non_DDCDefaultResolutionY, 768); } - if( (xf86NameCmp(Non_DDCDefaultRefreshRate,) == NULL) || (xf86NameCmp(Non_DDCDefaultRefreshRate,auto) == NULL) ) + if( (xf86NameCmp(Non_DDCDefaultRefreshRate,) == 0) || (xf86NameCmp(Non_DDCDefaultRefreshRate,auto) == 0) ) strcpy(Non_DDCDefaultRefreshRate, 60); ErrorF(Non-DDC default mode is (%s x %s @ %s Hz)...\n, -- 2.5.0 ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
[PATCH:xf86-video-xgi 13/19] Make cast match target variable type.
Signed-off-by: Thomas Klausner w...@netbsd.org --- src/vb_ext.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vb_ext.c b/src/vb_ext.c index 662cb7b..f4b5d68 100755 --- a/src/vb_ext.c +++ b/src/vb_ext.c @@ -139,7 +139,7 @@ void XGI_GetSenseStatus( PXGI_HW_DEVICE_INFO HwDeviceExtension , PVB_DEVICE_INFO USHORT tempax = 0 , tempbx , tempcx , temp , P2reg0 = 0 , SenseModeNo = 0 , OutputSelect = pVBInfo-OutputSelect, ModeIdIndex , i ; -pVBInfo-BaseAddr = ( USHORT )HwDeviceExtension-pjIOAddress ; +pVBInfo-BaseAddr = ( ULONG )HwDeviceExtension-pjIOAddress ; { /* for 301 */ if ( pVBInfo-VBInfo SetCRT2ToHiVisionTV ) -- 2.5.0 ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
[PATCH:xf86-video-xgi 19/19] Remove const from variable.
Fixes. assignment discards ‘const’ qualifier from pointer target type Signed-off-by: Thomas Klausner w...@netbsd.org --- src/xgi_driver.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/xgi_driver.c b/src/xgi_driver.c index 4806476..abaf1e1 100755 --- a/src/xgi_driver.c +++ b/src/xgi_driver.c @@ -626,7 +626,7 @@ XGIDisplayPowerManagementSet(ScrnInfoPtr pScrn, int PowerManagementMode, typedef struct { - unsigned char name[10]; +char name[10]; unsigned intDCLK; unsigned intHDisplay; unsigned intHSyncStart; -- 2.5.0 ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
[PATCH:xf86-video-xgi 15/19] Fix return value.
From: Alan Barrett a...@netbsd.org In XGI_GetTVPtrIndex2(), return the correct value through *tempch by using (*tempch)++ instead of *tempch++. Found using clang -Wunused-value. Signed-off-by: Thomas Klausner w...@netbsd.org --- src/vb_setmode.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vb_setmode.c b/src/vb_setmode.c index b0f64b1..bfcae8b 100755 --- a/src/vb_setmode.c +++ b/src/vb_setmode.c @@ -9502,7 +9502,7 @@ XGI_GetTVPtrIndex2(USHORT * tempbx, UCHAR * tempcl, UCHAR * tempch, if (pVBInfo- VBType (VB_XGI301B | VB_XGI302B | VB_XGI301LV | VB_XGI302LV | VB_XGI301C)) -*tempch++; +(*tempch)++; } -- 2.5.0 ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
[PATCH:xf86-video-xgi 17/19] Make two unused Scaling variables static.
Avoids xgi_drv_pic.a(xgi_setup.pico):(.rodata+0x30): multiple definition of `XGIScalingP4Regs' Signed-off-by: Thomas Klausner w...@netbsd.org --- src/xgi_driver.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/xgi_driver.h b/src/xgi_driver.h index 0754f16..fe8a8c1 100755 --- a/src/xgi_driver.h +++ b/src/xgi_driver.h @@ -493,10 +493,10 @@ static const MyXGITVVScale XGITVVScale[] = { }, }; -unsigned const char XGIScalingP1Regs[] = { +static unsigned const char XGIScalingP1Regs[] = { 0x08,0x09,0x0b,0x0c,0x0d,0x0e,0x10,0x11,0x12 }; -unsigned const char XGIScalingP4Regs[] = { +static unsigned const char XGIScalingP4Regs[] = { 0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1a,0x1b }; -- 2.5.0 ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
Re: [PATCH:xf86-video-xgi 14/19] Remove PACKAGE_* definitions from xgi_dri.c.
Here's an improved patch, really removing both of them. Thomas From 86e939d6d521847ca22c43640fa50aa0f220f5c2 Mon Sep 17 00:00:00 2001 From: Thomas Klausner w...@netbsd.org Date: Thu, 6 Aug 2015 14:33:02 +0200 Subject: [PATCH:xf86-video-xgi 14/19] Remove PACKAGE_* definitions from xgi_dri.c. They are provided by configure (via config.h or command line). Signed-off-by: Thomas Klausner w...@netbsd.org --- src/xgi_dri.c| 5 - src/xgi_driver.c | 4 2 files changed, 9 deletions(-) diff --git a/src/xgi_dri.c b/src/xgi_dri.c index c4cbfed..fcfab89 100755 --- a/src/xgi_dri.c +++ b/src/xgi_dri.c @@ -39,11 +39,6 @@ #include config.h #endif -/* Jong 09/27/2007; added for PACKAGE_VERSION_MAJOR,... */ -#define PACKAGE_VERSION_MAJOR 1 -#define PACKAGE_VERSION_MINOR 1 -#define PACKAGE_VERSION_PATCHLEVEL 0 - #include xf86.h #include xf86_OSproc.h diff --git a/src/xgi_driver.c b/src/xgi_driver.c index 2b72e5a..71b7409 100755 --- a/src/xgi_driver.c +++ b/src/xgi_driver.c @@ -47,10 +47,6 @@ #include config.h #endif -#define PACKAGE_VERSION_MAJOR 6 -#define PACKAGE_VERSION_MINOR 1 -#define PACKAGE_VERSION_PATCHLEVEL 6803 - #include fb.h #include micmap.h #include xf86.h -- 2.5.0 ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
Re: [PATCH:xf86-video-mga] Fix pointer cast warning.
On Sat, Aug 01, 2015 at 12:02:27AM -0400, Connor Behan wrote: I just looked through the drivers on the main site and found 7 problematic ones. * Geode is not careful enough with pSrc and its drawables * Mga is not careful enough either, plus it has a useless DFS hook * Radeonhd is not careful enough with pSrc / drawables * Siliconmotion is not careful enough with the drawable * Sis has useless UTS / DFS hooks but its wrappers do a good job of hiding this * Via is not careful enough with pSrc / drawables and it uses devPrivate all over the place * Xgi's UTS / DFS hooks are useless (except maybe on ARM) and it uses devPrivate Do people want to pick one to work on? I can start, but I'll need someone else to push the patches. I'd be glad to push your patches. For the record: geode, mga, siliconmotion, sis, and xgi are still part of NetBSD's xsrc. (radeonhd and via are not.) I'll happily dig up the NetBSD xsrc diffs for them if someone is willing to review them. Thomas ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
Re: [PATCH:xf86-video-mga] Fix pointer cast warning.
So what can we do to make this progress? Thomas On Thu, Feb 26, 2015 at 02:59:49AM -0500, Connor Behan wrote: On 25/02/15 06:41 PM, Tormod Volden wrote: And then disable the DownloadFromScreen() implementation, or perhaps even disable EXA altogether. If nobody can find the real problem that is maybe all that can be done. The fix should be: char *src = pExa-memoryBase + exaGetPixmapOffset(pSrc); When I first saw exaGetPixmapFirstPixel() in savage and mga, I assumed this was just a shorthand for the above. But evidently it's not. As for other broken EXA drivers, I don't have hardware to test but some basic suggestions are: 1. Use the above instead of pPix-devPrivate.ptr. 2. Make all hooks start by verifying that pSrc is non-NULL. 3. Remove UTS / DFS hooks unless they actually do a DRM blit. ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
[PATCH:xkbcomp] Adjust a NUL-string assignment to avoid const issues.
From: Matthew Green m...@netbsd.org Signed-off-by: Thomas Klausner w...@netbsd.org --- expr.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/expr.c b/expr.c index e0f957c..841ab07 100644 --- a/expr.c +++ b/expr.c @@ -729,8 +729,8 @@ ExprResolveString(ExprDef * expr, val_rtrn-str = XkbAtomGetString(NULL, expr-value.str); if (val_rtrn-str == NULL) { -static const char *empty = ; -val_rtrn-str = empty; +static char empty_char = '\0'; +val_rtrn-str = empty_char; } return True; case ExprIdent: -- 2.4.6 ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
Re: [PATCH:xf86-video-mga 2/2] Use correct type in function call.
On Tue, Feb 24, 2015 at 07:47:09AM +0100, Mark Kettenis wrote: On Mon, Feb 23, 2015 at 4:28 AM, Thomas Klausner w...@netbsd.org wrote: Fixes passing argument 2 of 'pci_device_cfg_read_u32' from incompatible pointer type pciaccess.h:153:5: note: expected '__uint32_t *' but argument is of type 'CARD32 *' Signed-off-by: Thomas Klausner w...@netbsd.org --- src/mga_dac3026.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/mga_dac3026.c b/src/mga_dac3026.c index 97c2c7a..e825702 100644 --- a/src/mga_dac3026.c +++ b/src/mga_dac3026.c @@ -852,8 +852,12 @@ MGA3026Save(ScrnInfoPtr pScrn, vgaRegPtr vgaReg, MGARegPtr mgaReg, mgaReg-DacRegs[i] = inTi3026(MGADACregs[i]); #ifdef XSERVER_LIBPCIACCESS - pci_device_cfg_read_u32(pMga-PciInfo, mgaReg-Option, +{ + uint32_t Option; + pci_device_cfg_read_u32(pMga-PciInfo, Option, PCI_OPTION_REG); +mgaReg-Option = Option; I don't understand why the previous code generated that warning (isn't __uint32_t* implicitly castable to CARD32*?) On 32-bit systems, CARD32 is unsigned long, whereas uint32_t is usually unsigned int. And since int and long might differ in size on other systems, the compiler (rightfully) complains. but even so, why isn't a cast the appropriate solution? Because casts almost never are the appropriate solution if they can be avoided? Anything I can do to make progress with this patch? Thomas ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
[PATCH:xf86-video-tdfx] Don't mess with BARs if only one card is present.
From: Michael Lorenz macal...@netbsd.org Fixes this driver on NetBSD/macppc. Signed-off-by: Thomas Klausner w...@netbsd.org --- src/tdfx_driver.c | 19 +-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/src/tdfx_driver.c b/src/tdfx_driver.c index 03fa165..b15ff9c 100644 --- a/src/tdfx_driver.c +++ b/src/tdfx_driver.c @@ -661,7 +661,20 @@ TDFXInitChips(ScrnInfoPtr pScrn) xf86DrvMsgVerb(pScrn-scrnIndex, X_INFO, 3, TDFXInitChips: cfgbits = 0x%08lx\n, cfgbits); -for (i = 0; i pTDFX-numChips; i++) { +if (pTDFX-numChips == 1) { + /* + * Do not fudge BARs with only one chip present. + */ + pTDFX-MMIOAddr[0] = mem0base 0xff00; + pTDFX-LinearAddr[0] = mem1base 0xff00; + xf86DrvMsgVerb(pScrn-scrnIndex, X_INFO, 3, +TDFXInitChips: MMIOAddr[%d] = 0x%08lx\n, +0, pTDFX-MMIOAddr[0]); + xf86DrvMsgVerb(pScrn-scrnIndex, X_INFO, 3, +TDFXInitChips: LinearAddr[%d] = 0x%08lx\n, +0, pTDFX-LinearAddr[0]); +} else { + for (i = 0; i pTDFX-numChips; i++) { PCI_WRITE_LONG(initbits | BIT(10), CFG_INIT_ENABLE, i); #if 0 @@ -692,6 +705,7 @@ TDFXInitChips(ScrnInfoPtr pScrn) PCI_WRITE_LONG(cfgbits, CFG_PCI_DECODE, i); PCI_WRITE_LONG(initbits, CFG_INIT_ENABLE, i); + } } } @@ -2230,7 +2244,8 @@ TDFXScreenInit(SCREEN_INIT_ARGS_DECL) { if (!pTDFX-usePIO) TDFXSetMMIOAccess(pTDFX); -#if USE_PCIVGAIO +#ifndef USE_PCIVGAIO + /* access VGA registers through the IO BAR, not legacy decoding */ hwp-PIOOffset = pTDFX-PIOBase[0] - 0x300; #endif vgaHWGetIOBase(hwp); -- 2.4.6 ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
[PATCH:xserver] Move X11/Xpoll.h include earlier than sys/select.h
From: Matthew Green m...@netbsd.org Assures setting FD_SETSIZE early enough. Signed-off-by: Thomas Klausner w...@netbsd.org --- os/WaitFor.c| 3 ++- os/connection.c | 3 ++- os/io.c | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/os/WaitFor.c b/os/WaitFor.c index 431f1a6..ad9fd3d 100644 --- a/os/WaitFor.c +++ b/os/WaitFor.c @@ -56,6 +56,8 @@ SOFTWARE. #include dix-config.h #endif +#include X11/Xpoll.h + #ifdef WIN32 #include X11/Xwinsock.h #endif @@ -66,7 +68,6 @@ SOFTWARE. #include misc.h #include osdep.h -#include X11/Xpoll.h #include dixstruct.h #include opaque.h #ifdef DPMSExtension diff --git a/os/connection.c b/os/connection.c index c36b125..acafc09 100644 --- a/os/connection.c +++ b/os/connection.c @@ -64,6 +64,8 @@ SOFTWARE. #include dix-config.h #endif +#include X11/Xpoll.h + #ifdef WIN32 #include X11/Xwinsock.h #endif @@ -103,7 +105,6 @@ SOFTWARE. #endif /* WIN32 */ #include misc.h /* for typedef of pointer */ #include osdep.h -#include X11/Xpoll.h #include opaque.h #include dixstruct.h #include xace.h diff --git a/os/io.c b/os/io.c index 96a243d..ae973cf 100644 --- a/os/io.c +++ b/os/io.c @@ -57,6 +57,8 @@ SOFTWARE. #undef DEBUG_COMMUNICATION +#include X11/Xpoll.h + #ifdef WIN32 #include X11/Xwinsock.h #endif @@ -74,7 +76,6 @@ SOFTWARE. #include X11/Xproto.h #include os.h #include osdep.h -#include X11/Xpoll.h #include opaque.h #include dixstruct.h #include misc.h -- 2.4.6 ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
[PATCH:mkfontscale] Add new ConstList functions and use them.
Gets rid of lots of const warnings. Signed-off-by: Thomas Klausner w...@netbsd.org --- Makefile.am | 2 ++ constlist.c | 93 +++ constlist.h | 35 ++ mkfontscale.c | 24 --- 4 files changed, 143 insertions(+), 11 deletions(-) create mode 100644 constlist.c create mode 100644 constlist.h diff --git a/Makefile.am b/Makefile.am index 7147f5a..47906c6 100644 --- a/Makefile.am +++ b/Makefile.am @@ -27,6 +27,8 @@ AM_CFLAGS = $(CWARNFLAGS) mkfontscale_LDADD = @MKFONTSCALE_LIBS@ mkfontscale_SOURCES = \ + constlist.c \ + constlist.h \ data.h \ hash.c \ hash.h \ diff --git a/constlist.c b/constlist.c new file mode 100644 index 000..b57fc97 --- /dev/null +++ b/constlist.c @@ -0,0 +1,93 @@ +/* + Copyright (c) 2002-2003 by Juliusz Chroboczek + Copyright (c) 2015 by Thomas Klausner + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the Software), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED AS IS, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + +#include stdlib.h +#include constlist.h + +ConstListPtr +appendConstList(ConstListPtr first, ConstListPtr second) +{ +ConstListPtr current; + +if(second == NULL) +return first; + +if(first == NULL) +return second; + +for(current = first; current-next; current = current-next) +; + +current-next = second; +return first; +} + +ConstListPtr +makeConstList(const char **a, int n, ConstListPtr old, int begin) +{ +ConstListPtr first, current, next; +int i; + +if(n == 0) +return old; + +first = malloc(sizeof(ConstListRec)); +if(!first) +return NULL; + +first-value = a[0]; +first-next = NULL; + +current = first; +for(i = 1; i n; i++) { +next = malloc(sizeof(ConstListRec)); +if(!next) { +destroyConstList(first); +return NULL; +} +next-value = a[i]; +next-next = NULL; + +current-next = next; +current = next; +} +if(begin) { +current-next = old; +return first; +} else { +return appendConstList(old, first); +} +} + +void +destroyConstList(ConstListPtr old) +{ +ConstListPtr next; +if(!old) +return; +while(old) { +next = old-next; +free(old); +old = next; +} +} diff --git a/constlist.h b/constlist.h new file mode 100644 index 000..5ba9f51 --- /dev/null +++ b/constlist.h @@ -0,0 +1,35 @@ +/* + Copyright (c) 2015 Thomas Klausner + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the Software), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED AS IS, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + +#ifndef _MKS_CONSTLIST_H_ +#define _MKS_CONSTLIST_H_ 1 + +typedef struct _ConstList { +const char *value; +struct _ConstList *next; +} ConstListRec, *ConstListPtr; + +ConstListPtr appendConstList(ConstListPtr first, ConstListPtr second); +ConstListPtr makeConstList(const char **a, int n, ConstListPtr old, int begin); +void destroyConstList(ConstListPtr old); + +#endif /* _MKS_CONSTLIST_H_ */ diff --git
FreeBSD/DragonFly patches for xf86-video-ati, xf86-input-mouse, and xf86-video-intel
Hi! David Shao reported some issues against pkgsrc, providing build/run fixes for xorg software on DragonFly BSD and FreeBSD. However, I'd like to avoid having pkgsrc-only patches. So I'm wondering what your opinions are on getting (versions of) these patches included. He says that the patches are basically from FreeBSD ports. Do we have a FreeBSD committer on this mailing list? The patches are for xf86-video-ati (first one), xf86-input-mouse (second), and xf86-video-intel (last). Cheers, Thomas (two FreeBSD X.org team members from https://wiki.freebsd.org/Graphics added to cc) - Forwarded message from davs...@gmail.com - Date: Mon, 20 Jul 2015 04:05:00 + (UTC) From: davs...@gmail.com To: pkg-mana...@netbsd.org, gnats-ad...@netbsd.org, pkgsrc-b...@netbsd.org Cc: Subject: pkg/50067: x11/xf86-video-ati dports patch-src_radeon__kms.c for newer DragonFly and FreeBSD Mail-Reply-To: davs...@gmail.com Number: 50067 Category: pkg Synopsis: x11/xf86-video-ati dports patch-src_radeon__kms.c for newer DragonFly and FreeBSD Confidential: no Severity: non-critical Priority: low Responsible:pkg-manager State: open Class: sw-bug Submitter-Id: net Arrival-Date: Mon Jul 20 04:05:00 + 2015 Originator: David Shao Release:pkgsrc current cvs Organization: Environment: DragonFly 4.3-DEVELOPMENT DragonFly v4.2.2.63.ga2b9b7-DEVELOPMENT #1: Sun Jul 19 19:22:57 PDT 2015 x@:/usr/obj/usr/src/sys/X86_64_GENERIC x86_64 Description: x11/xf86-video-ati can be patched using a patch from DragonFly dports so that KMS and other capabilities from newer DragonFly and FreeBSD Oses can be activated. Unlike say NetBSD or OpenBSD, for DragonFly and FreeBSD the Radeon drm kernel modules are not necessarily loaded before Xorg is started using say startx. The following patch is from DragonFly dports master as of commit 4f04bfe0ea83ce09 ..., file x11-drivers/xf86-video-ati/files/patch-src__radeon_kms.c: It has been tested on DragonFly 4.3-DEVELOPMENT x86_64 and FreeBSD 10.1 release amd64, using openbox and a patched xf86-input-mouse. It also at least compiled and built successfully on NetBSD 6.99.20 amd64 X11_type=modular, and should have no affect on it. The result for DragonFly and FreeBSD is the desired activation, as can be seen from Xorg.0.log: [61.049] (II) [KMS] Kernel modesetting enabled. ... [63.244] (II) RADEON(0): KMS Color Tiling: enabled [63.244] (II) RADEON(0): KMS Color Tiling 2D: enabled [63.244] (II) RADEON(0): KMS Pageflipping: enabled [63.244] (II) RADEON(0): SwapBuffers wait for vsync: enabled [63.319] (II) RADEON(0): Output VGA-0 has no monitor section [63.319] (II) RADEON(0): Output HDMI-0 has no monitor section [63.326] (II) RADEON(0): Output DVI-0 has no monitor section [63.400] (II) RADEON(0): EDID for output VGA-0 [63.400] (II) RADEON(0): Manufacturer: VSC Model: d427 Serial#: 16843009 [63.400] (II) RADEON(0): Year: 2010 Week: 44 ... [63.425] (II) RADEON(0): [DRI2] Setup complete [63.425] (II) RADEON(0): [DRI2] DRI driver: r600 [63.425] (II) RADEON(0): [DRI2] VDPAU driver: r600 [63.425] (II) RADEON(0): Front buffer size: 5120K [63.425] (II) RADEON(0): VRAM usage limit set to 462384K [63.440] (==) RADEON(0): Backing store enabled [63.440] (II) RADEON(0): Direct rendering enabled [63.440] (II) EXA(0): Driver allocated offscreen pixmaps [63.440] (II) EXA(0): Driver registered support for the following operations: [63.440] (II) Solid [63.440] (II) Copy [63.440] (II) Composite (RENDER acceleration) [63.440] (II) UploadToScreen [63.440] (II) DownloadFromScreen [63.440] (II) RADEON(0): Acceleration enabled [63.441] (==) RADEON(0): DPMS enabled ... [63.444] (--) RandR disabled [63.833] (II) AIGLX: enabled GLX_MESA_copy_sub_buffer [63.833] (II) AIGLX: enabled GLX_ARB_create_context [63.833] (II) AIGLX: enabled GLX_ARB_create_context_profile [63.833] (II) AIGLX: enabled GLX_EXT_create_context_es2_profile [63.833] (II) AIGLX: enabled GLX_INTEL_swap_event [63.833] (II) AIGLX: enabled GLX_SGI_swap_control and GLX_MESA_swap_control [63.833] (II) AIGLX: enabled GLX_EXT_framebuffer_sRGB [63.833] (II) AIGLX: enabled GLX_ARB_fbconfig_float [63.833] (II) AIGLX: GLX_EXT_texture_from_pixmap backed by buffer objects [63.834] (II) AIGLX: Loaded and initialized r600 How-To-Repeat: Fix: The following is the patch: $NetBSD$ --- src/radeon_kms.c.orig 2014-10-02 03:31:27.0 + +++ src/radeon_kms.c @@ -30,6 +30,12 @@ #include errno.h #include sys/ioctl.h + +#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__) +#include sys/param.h +#include sys/linker.h +#endif + /* Driver data structures */ #include radeon.h #include radeon_reg.h @@ -280,7 +286,7 @@ static void
[PATCH:luit] Protect config.h inclusion by HAVE_CONFIG_H.
Signed-off-by: Thomas Klausner w...@netbsd.org --- other.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/other.h b/other.h index d18b586..1b156a7 100644 --- a/other.h +++ b/other.h @@ -23,7 +23,9 @@ THE SOFTWARE. #ifndef LUIT_OTHER_H #define LUIT_OTHER_H 1 +#ifdef HAVE_CONFIG_H #include config.h/* include this, for self-contained headers */ +#endif #ifndef GCC_UNUSED # if defined(__GNUC__) ((__GNUC__ * 100 + __GNUC_MINOR__) = 205) -- 2.4.6 ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
Re: [PATCH:xfs 1/2] FD_SETSIZE fixes.
On Fri, Jul 24, 2015 at 04:04:00AM -0400, Olivier Fourdan wrote: I posted a comment to your Xpoll patch already: http://lists.x.org/archives/xorg-devel/2015-July/046951.html Yes, thanks for your comment. You may disagree with my comment, just wanted to make sure we considered that. No, I don't disagree, I just thought it wasn't my place to comment on Win32 issues. If you reckon it's a different issue, I can post another patch to go on top of yours and discuss from there. I'm fine with adapting the patch if someone decides it's the way to go. Thomas ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
Re: [PATCH:xf86-video-geode] Properly hide config.h inclusion inside HAVE_CONFIG_H.
On Wed, Jul 22, 2015 at 03:05:28PM +0100, Emil Velikov wrote: On 21 July 2015 at 22:12, Thomas Klausner w...@netbsd.org wrote: On Mon, Jul 20, 2015 at 05:03:13PM +0100, Emil Velikov wrote: Hi Thomas, On 20 July 2015 at 09:37, Thomas Klausner w...@netbsd.org wrote: From: Matthew Green m...@netbsd.org Signed-off-by: Thomas Klausner w...@netbsd.org --- src/geode.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/geode.h b/src/geode.h index ac69368..244cadf 100644 --- a/src/geode.h +++ b/src/geode.h @@ -28,7 +28,9 @@ #define _GEODE_H_ #include geode_pcirename.h +#ifdef HAVE_CONFIG_H #include config.h +#endif While you're here, can you move the config.h inclusion before the geode_pcirename.h one ? Sure, attached. Personally, I'd mention something like v2: make config.h inclusion the first one. But either way Reviewed-by: Emil Velikov emil.l.veli...@gmail.com Sure, I've amended the commit message in the suggested way and pushed the change. Thanks for the review, Thomas ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
Re: [PATCH:xfs 1/2] FD_SETSIZE fixes.
On Wed, Jul 22, 2015 at 03:08:33PM +0100, Emil Velikov wrote: On 21 July 2015 at 22:18, Thomas Klausner w...@netbsd.org wrote: Hi Emil! On Mon, Jul 20, 2015 at 05:00:43PM +0100, Emil Velikov wrote: On 19 July 2015 at 08:56, Thomas Klausner w...@netbsd.org wrote: From: Matthew Green m...@netbsd.org Move X11/Xpoll.h include earlier than sys/select.h to avoid missing out on setting FD_SETSIZE early enough. Shouldn't there be a comment to prevent the next person from reverting/messing up with the order ? ... diff --git a/os/io.c b/os/io.c index 124ecd8..8ebb8e4 100644 --- a/os/io.c +++ b/os/io.c @@ -46,6 +46,8 @@ in this Software without prior written authorization from The Open Group. * THIS SOFTWARE. */ +#include X11/Xpoll.h + #include config.h This looks like a no-go. I cannot think of a case where you'd want anything before config.h. So would you like the attached patch pushed too? Yes that's perfect. Can you please add the comment in os/connection.c as well please. With that the patch is Reviewed-by: Emil Velikov emil.l.veli...@gmail.com Thanks. I've added such comments and pushed the patches. I'm still looking for a reviewer of the corresponding patch in Xpoll.h itself (xproto). Perhaps patches 23 in the series discouraged reviewers, but patch 1 is needed for this, otherwise the other re-ordering patches are not sufficient. Cheers, Thomas ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
[PATCH:xmag] Protect config.h with HAVE_CONFIG_H.
Signed-off-by: Thomas Klausner w...@netbsd.org --- Scale.c | 2 ++ xmag.c | 2 ++ 2 files changed, 4 insertions(+) diff --git a/Scale.c b/Scale.c index f32aeec..ce2064a 100644 --- a/Scale.c +++ b/Scale.c @@ -30,7 +30,9 @@ from The Open Group. * Author: Davor Matic, MIT X Consortium */ +#ifdef HAVE_CONFIG_H #include config.h +#endif #include stdio.h #include ctype.h diff --git a/xmag.c b/xmag.c index e1d6505..c4a88ea 100644 --- a/xmag.c +++ b/xmag.c @@ -26,7 +26,9 @@ from The Open Group. */ +#ifdef HAVE_CONFIG_H #include config.h +#endif #include stdlib.h/* for exit() and abs() */ #include stdio.h -- 2.4.6 ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
Re: [PATCH:xf86-video-geode] Properly hide config.h inclusion inside HAVE_CONFIG_H.
On Mon, Jul 20, 2015 at 05:03:13PM +0100, Emil Velikov wrote: Hi Thomas, On 20 July 2015 at 09:37, Thomas Klausner w...@netbsd.org wrote: From: Matthew Green m...@netbsd.org Signed-off-by: Thomas Klausner w...@netbsd.org --- src/geode.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/geode.h b/src/geode.h index ac69368..244cadf 100644 --- a/src/geode.h +++ b/src/geode.h @@ -28,7 +28,9 @@ #define _GEODE_H_ #include geode_pcirename.h +#ifdef HAVE_CONFIG_H #include config.h +#endif While you're here, can you move the config.h inclusion before the geode_pcirename.h one ? Sure, attached. Thomas From 4968210734eca510133f035a7318a6f124d689a2 Mon Sep 17 00:00:00 2001 From: Matthew Green m...@netbsd.org Date: Mon, 20 Jul 2015 10:37:16 +0200 Subject: [PATCH:xf86-video-geode] Properly hide config.h inclusion inside HAVE_CONFIG_H. Signed-off-by: Thomas Klausner w...@netbsd.org --- src/geode.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/geode.h b/src/geode.h index ac69368..815efc7 100644 --- a/src/geode.h +++ b/src/geode.h @@ -27,8 +27,10 @@ #ifndef _GEODE_H_ #define _GEODE_H_ -#include geode_pcirename.h +#ifdef HAVE_CONFIG_H #include config.h +#endif +#include geode_pcirename.h #ifdef HAVE_XAA_H #include xaa.h -- 2.4.6 ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
Re: [PATCH:xfs 1/2] FD_SETSIZE fixes.
Hi Emil! On Mon, Jul 20, 2015 at 05:00:43PM +0100, Emil Velikov wrote: On 19 July 2015 at 08:56, Thomas Klausner w...@netbsd.org wrote: From: Matthew Green m...@netbsd.org Move X11/Xpoll.h include earlier than sys/select.h to avoid missing out on setting FD_SETSIZE early enough. Shouldn't there be a comment to prevent the next person from reverting/messing up with the order ? ... diff --git a/os/io.c b/os/io.c index 124ecd8..8ebb8e4 100644 --- a/os/io.c +++ b/os/io.c @@ -46,6 +46,8 @@ in this Software without prior written authorization from The Open Group. * THIS SOFTWARE. */ +#include X11/Xpoll.h + #include config.h This looks like a no-go. I cannot think of a case where you'd want anything before config.h. So would you like the attached patch pushed too? Mildly related: how many cases in Xorg are there, where config.h is not the first include, is missing (but needed), or the #ifdef guard is omitted ? I'd assume 1 3 shouldn't be too hard to grep through. Note: I'm neither suggesting that you should do it, nor volunteering :-) About #3: we avoid config.h in NetBSD's xsrc, so we'll report any we find (see the xmag ones today for example). Thanks for not volunteering me :) Thomas diff --git a/os/io.c b/os/io.c index 8ebb8e4..8259b2f 100644 --- a/os/io.c +++ b/os/io.c @@ -46,10 +46,11 @@ in this Software without prior written authorization from The Open Group. * THIS SOFTWARE. */ -#include X11/Xpoll.h - #include config.h +/* include Xpoll.h early for possible FD_SETSIZE re-definition */ +#include X11/Xpoll.h + #include X11/Xtrans/Xtrans.h #include stdio.h #include errno.h ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
[PATCH:xmodmap] Properly hide config.h behind HAVE_CONFIG_H.
From: Matthew Green m...@netbsd.org Signed-off-by: Thomas Klausner w...@netbsd.org --- handle.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/handle.c b/handle.c index 00c95a6..02a5f41 100644 --- a/handle.c +++ b/handle.c @@ -26,7 +26,10 @@ from The Open Group. */ +#ifdef HAVE_CONFIG_H #include config.h +#endif + #include X11/Xos.h #include X11/Xlib.h #include stdio.h -- 2.4.6 ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
[PATCH:xf86-video-geode] Properly hide config.h inclusion inside HAVE_CONFIG_H.
From: Matthew Green m...@netbsd.org Signed-off-by: Thomas Klausner w...@netbsd.org --- src/geode.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/geode.h b/src/geode.h index ac69368..244cadf 100644 --- a/src/geode.h +++ b/src/geode.h @@ -28,7 +28,9 @@ #define _GEODE_H_ #include geode_pcirename.h +#ifdef HAVE_CONFIG_H #include config.h +#endif #ifdef HAVE_XAA_H #include xaa.h -- 2.4.6 ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
[PATCH:xf86-video-vesa] When debugging, print the VGAbase as well.
From: Matthew Green m...@netbsd.org Just in case it ends up zero and causes a segmentation fault. Signed-off-by: Thomas Klausner w...@netbsd.org --- src/vesa.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/vesa.c b/src/vesa.c index 564bb06..5b9ccb0 100644 --- a/src/vesa.c +++ b/src/vesa.c @@ -1304,9 +1304,10 @@ VESAMapVidMem(ScrnInfoPtr pScrn) #endif xf86DrvMsgVerb(pScrn-scrnIndex, X_INFO, DEBUG_VERB, - virtual address = %p,\n + virtual address = %p, VGAbase = %p\n \tphysical address = 0x%lx, size = %ld\n, - pVesa-base, pScrn-memPhysBase, pVesa-mapSize); + pVesa-base, pVesa-VGAbase, + pScrn-memPhysBase, pVesa-mapSize); return (pVesa-base != NULL); } -- 2.4.6 ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
[PATCH:xf86-input-keyboard] Add defines for Japanese 106-key USB keyboards.
From: Yasushi Oshima oshima...@yagoto-urayama.jp Via http://gnats.netbsd.org/48347 Signed-off-by: Thomas Klausner w...@netbsd.org --- src/bsd_KbdMap.c | 30 +++--- 1 file changed, 23 insertions(+), 7 deletions(-) diff --git a/src/bsd_KbdMap.c b/src/bsd_KbdMap.c index 123ab96..21f337d 100644 --- a/src/bsd_KbdMap.c +++ b/src/bsd_KbdMap.c @@ -345,17 +345,33 @@ static CARD8 wsUsbMap[] = { /* 132 */ KEY_NOTUSED, /* 133 */ KEY_NOTUSED, /* 134 */ KEY_NOTUSED, - /* 135 */ KEY_NOTUSED, - /* 136 */ KEY_NOTUSED, - /* 137 */ KEY_NOTUSED, - /* 138 */ KEY_NOTUSED, - /* 139 */ KEY_NOTUSED, +/* + * Special keycodes for Japanese keyboards + * Override atKeyname HKTG and BSlash2 code to unique values for JP106 keyboards + */ +#undef KEY_HKTG +#define KEY_HKTG 200 /* Japanese Hiragana Katakana Toggle */ +#undef KEY_BSlash2 +#define KEY_BSlash2203 /* Japanese '\_' key */ + + /* 135 */ KEY_BSlash2, /* Japanese 106 kbd: '\_' */ + /* 136 */ KEY_HKTG, /* Japanese 106 kbd: Hiragana Katakana toggle */ + /* 137 */ KEY_Yen, /* Japanese 106 kbd: '\|' */ + /* 138 */ KEY_XFER, /* Japanese 106 kbd: Henkan */ + /* 139 */ KEY_NFER, /* Japanese 106 kbd: Muhenkan */ /* 140 */ KEY_NOTUSED, /* 141 */ KEY_NOTUSED, /* 142 */ KEY_NOTUSED, /* 143 */ KEY_NOTUSED, - /* 144 */ KEY_NOTUSED, - /* 145 */ KEY_NOTUSED, +/* + * Special keycodes for Korean keyboards + * Define Hangul and Hangul_Hanja unique key codes + * These keys also use KANA and EISU on some Macintosh Japanese USB keyboards + */ +#define KEY_Hangul 201 /* Also KANA Key on Mac JP USB kbd */ +#define KEY_Hangul_Hanja 202 /* Also EISU Key on Mac JP USB kbd */ + /* 144 */ KEY_Hangul, /* Korean 106 kbd: Hangul */ + /* 145 */ KEY_Hangul_Hanja, /* Korean 106 kbd: Hangul Hanja */ /* 146 */ KEY_NOTUSED, /* 147 */ KEY_NOTUSED, /* 148 */ KEY_NOTUSED, -- 2.4.6 ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
[PATCH:libX11 1/2] Do not return() after exit().
Signed-off-by: Thomas Klausner w...@netbsd.org --- src/XlibInt.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/XlibInt.c b/src/XlibInt.c index 80c1298..bbc5c82 100644 --- a/src/XlibInt.c +++ b/src/XlibInt.c @@ -1256,7 +1256,7 @@ int _XDefaultIOError( } exit(1); -return(0); /* dummy - function should never return */ + /*NOTREACHED*/ } @@ -1465,7 +1465,7 @@ _XIOError ( else _XDefaultIOError(dpy); exit (1); -return 0; +/*NOTREACHED*/ } -- 2.4.6 ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel