Re: [PATCH xserver 2/2] dri2: Invalidate DRI2 buffers for all windows with the same pixmap on swap.
On Son, 2011-03-27 at 23:00 -0700, Keith Packard wrote: On Fri, 25 Mar 2011 18:26:56 +0100, Michel Dänzer mic...@daenzer.net wrote: From: Michel Dänzer daen...@vmware.com Without this, when a compositing manager unredirects a fullscreen window which uses DRI2 and page flipping, the DRI2 buffer information for the compositing manager's output window (typically the Composite Overlay Window or root window) may become stale, resulting in all kinds of hilarity. Yeah, this looks sufficient to me. I'm wondering if krh can think of any more efficient way to do this -- walking the whole tree seems pretty heavy-weight. Unless someone comes up with a cleverer mechanism, I'll merge this in a few days. 10 days have passed. -- Earthling Michel Dänzer |http://www.vmware.com Libre software enthusiast | Debian, X and DRI developer ___ 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: [PULL] [xorg/xserver] XRes v1.2
On 05.04.2011 18:58, Keith Packard wrote: On Tue, 05 Apr 2011 18:38:41 +0300, Erkki Seppalaerkki.sepp...@vincit.fi wrote: On 05.04.2011 17:54, Keith Packard wrote: Please just fix users of the existing 'Hash' function to call HashResourceID directly. Hm, are you sure? It looks like this afterwards: +Hash(int client, XID id) Am I looking at the wrong branch? (this is client-tracking-v2) You are looking at the correct branch. It was the diff replacing all existing calls to Hash with HashResourceID, resulting in some duplicity: - res = clientTable[cid].resources[Hash(cid, id)]; + res = clientTable[cid].resources[HashResourceID(id, clientTable[cid].hashsize)]; times eight. I updated the git repository. I have separated the three consecutive steps: dix: add hashing functions to resource.h for others to use. - Publishes the HashResourceID function dix: don't use a local wrapper for calling HashResourceID - Makes the aforementioned search/replace and removes function Hash - You can choose to apply this at your discretion :). dix: HashResourceID always succeeds - Handles values that are less or more than the previous bounds (numBits 0 will fail with an assertion). ht_resourceid_hash now knows that HashResourceID always succeeds, so it doesn't fall back to using the generic hash. ___ 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 5/5] dix: don't free stranger pointers inside AllocARGBCursor
On 04/04/2011 08:54 PM, Tiago Vignatti wrote: This seems a good convention to follow: if pointers are allocate outside a given function, then free there as well when a failure occurs. AllocARGBCursor and its callers were mixing up the freeing of resources and causing a particular double free inside TileScreenSaver (srcbits and mskbits). Signed-off-by: Tiago Vignattitiago.vigna...@nokia.com --- dix/cursor.c|5 + dix/dispatch.c | 12 +--- render/render.c | 12 +--- 3 files changed, 19 insertions(+), 10 deletions(-) [...] diff --git a/render/render.c b/render/render.c index 8ff8ee6..8e58711 100644 --- a/render/render.c +++ b/render/render.c @@ -1706,11 +1706,17 @@ ProcRenderCreateCursor (ClientPtr client) GetColor(twocolor[1], 0), pCursor, client, stuff-cid); if (rc != Success) - return rc; -if (!AddResource(stuff-cid, RT_CURSOR, (pointer)pCursor)) - return BadAlloc; + goto bail; +if (!AddResource(stuff-cid, RT_CURSOR, (pointer)pCursor)) { + rc = BadAlloc; + goto bail; +} return Success; +bail: +free(srcbits); +free(mskbits); +return rc; } static int There are a few return points in ProcRenderCreateCursor that could be eliminated in the same fashion. But maybe this is more appropriate as a follow-up patch. Anyway, Reviewed-by: Ander Conselvan de Oliveira ander.conselvan-de-olive...@nokia.com Cheers, Ander ___ 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] Decouple the test suite from make check
On Tue, Apr 5, 2011 at 10:55 PM, Peter Hutterer peter.hutte...@who-t.net wrote: On Tue, Apr 05, 2011 at 04:24:40PM -0700, Aaron Plattner wrote: The check target is run during distcheck after the test suite is built, so having it run the test suite itself means that the suite has to pass before a tarball can be distributed. Also, an unsuspecting developer attempting to create a tarball might accidentally run the test suite against his host X server, which is bad because some of the tests can have adverse effects. Signed-off-by: Aaron Plattner aplatt...@nvidia.com --- Makefile.am | 8 +--- 1 files changed, 5 insertions(+), 3 deletions(-) diff --git a/Makefile.am b/Makefile.am index b8de497..87040d2 100644 --- a/Makefile.am +++ b/Makefile.am @@ -7,18 +7,20 @@ tetexec.cfg: @rm -f xts5/$@ @cd xts5 $(MAKE) $(AM_MAKEFLAGS) $@ -# make check testing. Override the test set with scenario. +# Helpers for running the test suite in-tree. Override the test set with +# scenario. scenario = -check-local: check.sh +run-tests: check.sh all @if test -z $$DISPLAY; then \ echo DISPLAY not set; \ exit 1; \ fi $(SHELL) $(builddir)/check.sh $(scenario) +.PHONY: run-tests # Helper target for testing subsets (test-Xopen, etc.) test-%: - @$(MAKE) $(AM_MAKEFLAGS) check scenario='$*' + @$(MAKE) $(AM_MAKEFLAGS) run-tests scenario='$*' if HAVE_DOCTOOLS miscmandir = $(MISC_MAN_DIR) -- 1.7.1 Acked-by: Peter Hutterer peter.hutte...@who-t.net Agreed. When I started playing with the autotools and xts, it _seemed_ like using the automake test driver be a frontend was a good idea. Can you also update the README to reference run-tests instead of check? With that, Reviewed-by: Dan Nicholson dbn.li...@gmail.com -- Dan ___ 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: [PULL] Fix XWin compilation after commit 769531b9
On 25/03/2011 19:34, Jon TURNEY wrote: Hi Keith, Please consider pulling this patch into master. Ping? For my future reference, do you have any preference to receive single patches as pull requests or as a patch? Thanks. The following changes since commit 03f45df93469f6aef391e97007b9614e0770cc4c: Merge remote-tracking branch 'airlied/xinerama-cleanup' (2011-03-23 13:38:37 +0900) are available in the git repository at: git://anongit.freedesktop.org/~jturney/xserver master Jon TURNEY (1): Fix XWin compilation after commit 769531b9 hw/xwin/winmouse.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) ___ 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: [PULL] Fix XWin compilation after commit 769531b9
On Wed, 06 Apr 2011 13:50:27 +0100, Jon TURNEY jon.tur...@dronecode.org.uk wrote: On 25/03/2011 19:34, Jon TURNEY wrote: Hi Keith, Please consider pulling this patch into master. Ping? Sorry, I must have mis-marked this in my to-do patch queue. Thanks for the ping. Merged. c9d89ce..3085b17 master - master -- keith.pack...@intel.com pgpiAD8eKA7bC.pgp Description: PGP signature ___ 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 sis 04/15] Fix suggest parentheses around operand of ‘!’ compiler warnings.
Signed-off-by: Timo Aaltonen timo.aalto...@canonical.com --- src/sis_cursor.c |2 +- src/sis_utility.c |2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/sis_cursor.c b/src/sis_cursor.c index 13eddc4..67a3402 100644 --- a/src/sis_cursor.c +++ b/src/sis_cursor.c @@ -759,7 +759,7 @@ SiS300LoadCursorImage(ScrnInfoPtr pScrn, UChar *src) } if(pSiS-VBFlags CRT2_ENABLE) { - if((pSiS-UseHWARGBCursor) (!pSiS-VBFlags DISPTYPE_CRT1)) { + if((pSiS-UseHWARGBCursor) ((!pSiS-VBFlags) DISPTYPE_CRT1)) { status2 = sis301GetCursorStatus; sis301DisableHWCursor() SISWaitRetraceCRT2(pScrn); diff --git a/src/sis_utility.c b/src/sis_utility.c index 64d8919..0892cf5 100644 --- a/src/sis_utility.c +++ b/src/sis_utility.c @@ -523,7 +523,7 @@ SISSwitchCRT2Type(ScrnInfoPtr pScrn, ULong newvbflags, Bool quiet) } #endif -if((!(newvbflags CRT2_ENABLE)) (!newvbflags DISPTYPE_CRT1)) { +if((!(newvbflags CRT2_ENABLE)) ((!newvbflags) DISPTYPE_CRT1)) { if(!quiet) { xf86DrvMsg(pScrn-scrnIndex, X_ERROR, CRT2 can't be switched off while CRT1 is off\n); -- 1.7.4.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 sis 00/15] a bunch of cleanups, and a taste of things to come
Here's a first set of patches to xf86-video-sis, hoping to narrow down the diff against Thomas Winischofer's 'sisfree' (*) package and the forked versions from Intel and SiS (and Mandriva). The first 13 are more or less self-explanatory, but the two final ones are moving things around to make the code more readable, among other things. Every commit is build-tested against xserver 1.10 headers. * http://www.winischhofer.net/linuxsispart4.shtml#download Timo Aaltonen (15): Write out remaining IS_SIS* macros. Replace deprecated x(c)alloc/xfree with m/calloc/free Fix format not a string literal and no format arguments compile warnings Fix suggest parentheses around operand of ‘!’ compiler warnings. Fix compile warnings of uninitialized variables Declare mmioFlags only if XSERVER_LIBPCIACCESS isn't defined Purge obsolete and unused SIS_CP checks Drop useless checks and relevant code for old XFree86 releases Drop unused and non-working XAA trapezoid support for 310 series and later Remove unused code from sis_video.c Remove unused code from SISPutImageBlit() Remove unused non-working Xv deinterlacer code Remove deprecated XV SD interface Move configurable values from sis.h to sis_config.h Move all TV related functions fron sis_driver.c to sis_vb.c src/init.c | 35 +- src/init.h |3 - src/init301.c | 62 +- src/init301.h |3 - src/initdef.h | 19 +- src/initextx.c | 18 +- src/sis.h | 86 +-- src/sis310_accel.c | 754 --- src/sis6326_video.c | 60 +-- src/sis_accel.c | 128 --- src/sis_config.h| 71 ++ src/sis_cursor.c|8 +- src/sis_dac.h |2 + src/sis_dga.c |6 +- src/sis_dri.c | 38 +- src/sis_driver.c| 2625 --- src/sis_driver.h| 813 + src/sis_memcpy.c| 10 +- src/sis_opt.c | 49 +- src/sis_utility.c | 527 +-- src/sis_vb.c| 2259 ++-- src/sis_vb.h| 931 ++ src/sis_vga.c |7 +- src/sis_video.c | 291 +-- src/sis_video.h | 195 src/sis_videostr.h |3 - src/vgatypes.h |5 - 27 files changed, 3490 insertions(+), 5518 deletions(-) create mode 100644 src/sis_config.h create mode 100644 src/sis_vb.h -- 1.7.4.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 sis 03/15] Fix format not a string literal and no format arguments compile warnings
Signed-off-by: Timo Aaltonen timo.aalto...@canonical.com --- src/sis_driver.c |8 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/sis_driver.c b/src/sis_driver.c index 8ce1cdd..337bba6 100644 --- a/src/sis_driver.c +++ b/src/sis_driver.c @@ -403,14 +403,14 @@ SISErrorLog(ScrnInfoPtr pScrn, const char *format, ...) static const char *str = **\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); } static void @@ -1888,14 +1888,14 @@ SiSUpdateXineramaScreenInfo(ScrnInfoPtr pScrn1) if(infochanged !usenonrect) { xf86DrvMsg(pScrn1-scrnIndex, X_INFO, Virtual screen size does not match maximum display modes...\n); - xf86DrvMsg(pScrn1-scrnIndex, X_INFO, rectxine); + xf86DrvMsg(pScrn1-scrnIndex, X_INFO, %s, rectxine); } } else if(infochanged usenonrect) { usenonrect = FALSE; xf86DrvMsg(pScrn1-scrnIndex, X_INFO, Only clone modes available for this virtual screen size...\n); - xf86DrvMsg(pScrn1-scrnIndex, X_INFO, rectxine); + xf86DrvMsg(pScrn1-scrnIndex, X_INFO, %s, rectxine); } if(pSiS-maxCRT1_X1) { /* Means we have at least one non-clone mode */ -- 1.7.4.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 sis 02/15] Replace deprecated x(c)alloc/xfree with m/calloc/free
and xrealloc with realloc. Signed-off-by: Timo Aaltonen timo.aalto...@canonical.com --- src/initextx.c | 18 src/sis6326_video.c |6 +- src/sis_dga.c |6 +- src/sis_dri.c | 24 +- src/sis_driver.c| 128 +- src/sis_memcpy.c| 10 ++-- src/sis_opt.c | 12 ++-- src/sis_utility.c |6 +- src/sis_vga.c |2 +- src/sis_video.c |8 ++-- 10 files changed, 110 insertions(+), 110 deletions(-) diff --git a/src/initextx.c b/src/initextx.c index 5c00398..1e84d0f 100644 --- a/src/initextx.c +++ b/src/initextx.c @@ -238,10 +238,10 @@ SiSBuildBuiltInModeList(ScrnInfoPtr pScrn, BOOLEAN includelcdmodes, BOOLEAN isfo continue; } - if(!(new = xalloc(sizeof(DisplayModeRec return first; + if(!(new = malloc(sizeof(DisplayModeRec return first; memset(new, 0, sizeof(DisplayModeRec)); - if(!(new-name = xalloc(10))) { -xfree(new); + if(!(new-name = malloc(10))) { +free(new); return first; } if(!first) first = new; @@ -385,11 +385,11 @@ SiSBuildBuiltInModeList(ScrnInfoPtr pScrn, BOOLEAN includelcdmodes, BOOLEAN isfo } } - if(!(new = xalloc(sizeof(DisplayModeRec return first; + if(!(new = malloc(sizeof(DisplayModeRec return first; memset(new, 0, sizeof(DisplayModeRec)); - if(!(new-name = xalloc(12))) { -xfree(new); + if(!(new-name = malloc(12))) { +free(new); return first; } if(!first) first = new; @@ -470,11 +470,11 @@ SiSBuildBuiltInModeList(ScrnInfoPtr pScrn, BOOLEAN includelcdmodes, BOOLEAN isfo if(pSiS-SiS_Pr-CP_DataValid[i]) { - if(!(new = xalloc(sizeof(DisplayModeRec return first; + if(!(new = malloc(sizeof(DisplayModeRec return first; memset(new, 0, sizeof(DisplayModeRec)); - if(!(new-name = xalloc(10))) { - xfree(new); + if(!(new-name = malloc(10))) { + free(new); return first; } if(!first) first = new; diff --git a/src/sis6326_video.c b/src/sis6326_video.c index c6b18e2..66352b7 100644 --- a/src/sis6326_video.c +++ b/src/sis6326_video.c @@ -170,7 +170,7 @@ void SIS6326InitVideo(ScreenPtr pScreen) adaptors = newAdaptor; } else { /* need to free this someplace */ - newAdaptors = xalloc((num_adaptors + 1) * sizeof(XF86VideoAdaptorPtr*)); + newAdaptors = malloc((num_adaptors + 1) * sizeof(XF86VideoAdaptorPtr*)); if(newAdaptors) { memcpy(newAdaptors, adaptors, num_adaptors * sizeof(XF86VideoAdaptorPtr)); @@ -185,7 +185,7 @@ void SIS6326InitVideo(ScreenPtr pScreen) xf86XVScreenInit(pScreen, adaptors, num_adaptors); if(newAdaptors) - xfree(newAdaptors); + free(newAdaptors); } /* client libraries expect an encoding */ @@ -531,7 +531,7 @@ SIS6326SetupImageVideo(ScreenPtr pScreen) return NULL; #endif -if(!(adapt = xcalloc(1, sizeof(XF86VideoAdaptorRec) + +if(!(adapt = calloc(1, sizeof(XF86VideoAdaptorRec) + sizeof(SISPortPrivRec) + sizeof(DevUnion return NULL; diff --git a/src/sis_dga.c b/src/sis_dga.c index d358645..16b0ee4 100644 --- a/src/sis_dga.c +++ b/src/sis_dga.c @@ -150,18 +150,18 @@ SISSetupDGAMode( if(pMode-HDisplay != otherPitch) { - newmodes = xrealloc(modes, (*num + 2) * sizeof(DGAModeRec)); + newmodes = realloc(modes, (*num + 2) * sizeof(DGAModeRec)); oneMore = TRUE; } else { - newmodes = xrealloc(modes, (*num + 1) * sizeof(DGAModeRec)); + newmodes = realloc(modes, (*num + 1) * sizeof(DGAModeRec)); oneMore = FALSE; } if(!newmodes) { - xfree(modes); + free(modes); return NULL; } modes = newmodes; diff --git a/src/sis_dri.c b/src/sis_dri.c index 3a476a2..97ed951 100644 --- a/src/sis_dri.c +++ b/src/sis_dri.c @@ -149,19 +149,19 @@ SISInitVisualConfigs(ScreenPtr pScreen) case 32: numConfigs = (useZ16) ? 8 : 16; -if(!(pConfigs = (__GLXvisualConfig*)xcalloc(sizeof(__GLXvisualConfig), +if(!(pConfigs = (__GLXvisualConfig*)calloc(sizeof(__GLXvisualConfig), numConfigs))) { return FALSE; } -if(!(pSISConfigs = (SISConfigPrivPtr)xcalloc(sizeof(SISConfigPrivRec), +if(!(pSISConfigs = (SISConfigPrivPtr)calloc(sizeof(SISConfigPrivRec), numConfigs))) { - xfree(pConfigs); +
[PATCH sis 01/15] Write out remaining IS_SIS* macros.
Signed-off-by: Timo Aaltonen timo.aalto...@canonical.com --- src/init.c| 35 +-- src/init301.c | 48 src/initdef.h | 19 +-- 3 files changed, 50 insertions(+), 52 deletions(-) diff --git a/src/init.c b/src/init.c index 74df1f5..9dfb6cf 100644 --- a/src/init.c +++ b/src/init.c @@ -1276,7 +1276,7 @@ SiSDetermineROMLayout661(struct SiS_Private *SiS_Pr) if((romvmaj != 0) || (romvmin = 92)) { return TRUE; } - } else if(IS_SIS650740) { + } else if((SiS_Pr-ChipType = SIS_650) (SiS_Pr-ChipType = SIS_740)) { if((ROMAddr[0x1a] == 'N') (ROMAddr[0x1b] == 'e') (ROMAddr[0x1c] == 'w') @@ -1404,7 +1404,7 @@ SiS_ResetSegmentRegOver(struct SiS_Private *SiS_Pr) static void SiS_ResetSegmentRegisters(struct SiS_Private *SiS_Pr) { - if((IS_SIS65x) || (SiS_Pr-ChipType = SIS_661)) { + if((SiS_Pr-SiS_SysFlags SF_Is65x) || (SiS_Pr-ChipType = SIS_661)) { SiS_ResetSegmentReg(SiS_Pr); SiS_ResetSegmentRegOver(SiS_Pr); } @@ -1522,7 +1522,9 @@ SiS_Get310DRAMType(struct SiS_Private *SiS_Pr) } else { data = SiS_GetReg(SiS_Pr-SiS_P3d4,0x78) 0x07; } - } else if(IS_SIS550650740) { + } else if((SiS_Pr-ChipType == SIS_550) || + (SiS_Pr-ChipType == SIS_650) || + (SiS_Pr-ChipType == SIS_740)) { data = SiS_GetReg(SiS_Pr-SiS_P3c4,0x13) 0x07; } else { /* 315, 330 */ data = SiS_GetReg(SiS_Pr-SiS_P3c4,0x3a) 0x03; @@ -1732,17 +1734,25 @@ SiS_SetLowModeTest(struct SiS_Private *SiS_Pr, unsigned short ModeNo) static void SiS_OpenCRTC(struct SiS_Private *SiS_Pr) { - if(IS_SIS650) { + switch(SiS_Pr-ChipType) { + case SIS_650: SiS_SetRegAND(SiS_Pr-SiS_P3d4,0x51,0x1f); - if(IS_SIS651) SiS_SetRegOR(SiS_Pr-SiS_P3d4,0x51,0x20); + if(SiS_Pr-SiS_SysFlags (SF_Is651 | SF_Is652)) { + SiS_SetRegOR(SiS_Pr-SiS_P3d4,0x51,0x20); + } SiS_SetRegAND(SiS_Pr-SiS_P3d4,0x56,0xe7); - } else if(IS_SIS661741660760) { + break; + case SIS_661: + case SIS_741: + case SIS_660: + case SIS_760: SiS_SetRegAND(SiS_Pr-SiS_P3d4,0x61,0xf7); SiS_SetRegAND(SiS_Pr-SiS_P3d4,0x51,0x1f); SiS_SetRegAND(SiS_Pr-SiS_P3d4,0x56,0xe7); if(!SiS_Pr-SiS_ROMNew) { SiS_SetRegAND(SiS_Pr-SiS_P3d4,0x3a,0xef); } + break; } } @@ -1752,7 +1762,11 @@ SiS_CloseCRTC(struct SiS_Private *SiS_Pr) #if 0 /* This locks some CRTC registers. We don't want that. */ unsigned short temp1 = 0, temp2 = 0; - if(IS_SIS661741660760) { + switch(SiS_Pr-ChipType) { + case SIS_661: + case SIS_741: + case SIS_660: + case SIS_760: if(SiS_Pr-SiS_VBInfo SetCRT2ToLCDA) { temp1 = 0xa0; temp2 = 0x08; } @@ -1953,7 +1967,8 @@ SiS_SetATTRegs(struct SiS_Private *SiS_Pr, unsigned short StandTableIndex) } } else if(SiS_Pr-SiS_VBInfo SetCRT2ToLCD) { if(SiS_Pr-ChipType = SIS_315H) { - if(IS_SIS550650740660) { + if((SiS_Pr-ChipType = SIS_550) + (SiS_Pr-ChipType != SIS_330)) { /* 315, 330 don't do this */ if(SiS_Pr-SiS_VBType VB_SIS30xB) { if(SiS_Pr-SiS_VBInfo SetInSlaveMode) ARdata = 0; @@ -3134,7 +3149,7 @@ SiS_StrangeStuff(struct SiS_Private *SiS_Pr) * this here. */ #ifdef SIS315H - if((IS_SIS651) || (IS_SISM650) || + if((SiS_Pr-SiS_SysFlags SF_Is65x) || SiS_Pr-ChipType == SIS_340 || SiS_Pr-ChipType == XGI_40) { SiS_SetReg(SiS_Pr-SiS_VidCapt, 0x3f, 0x00); /* Fiddle with capture regs */ @@ -3401,7 +3416,7 @@ SiSSetMode(struct SiS_Private *SiS_Pr, unsigned short ModeNo) SiS_SetReg(SiS_Pr-SiS_P3d4,0x38,backupreg); -if((IS_SIS650) (SiS_GetReg(SiS_Pr-SiS_P3d4,0x30) 0xfc)) { +if((SiS_Pr-ChipType == SIS_650) (SiS_GetReg(SiS_Pr-SiS_P3d4,0x30) 0xfc)) { if((ModeNo == 0x03) || (ModeNo == 0x10)) { SiS_SetRegOR(SiS_Pr-SiS_P3d4,0x51,0x80); SiS_SetRegOR(SiS_Pr-SiS_P3d4,0x56,0x08); diff --git a/src/init301.c b/src/init301.c index ffa6eaa..603ecb6 100644 --- a/src/init301.c +++ b/src/init301.c @@ -984,7 +984,7 @@ SiS_GetVBInfo(struct SiS_Private *SiS_Pr, unsigned short ModeNo, /* Reset LCDA setting if not driver mode */ SiS_SetRegAND(SiS_Pr-SiS_P3d4,0x38,0xfc); } - if(IS_SIS650) { + if(SiS_Pr-ChipType == SIS_650) { if(SiS_Pr-SiS_UseLCDA) { if(SiS_GetReg(SiS_Pr-SiS_P3d4,0x5f) 0xF0) { if((ModeNo = 0x13) || (!(SiS_GetReg(SiS_Pr-SiS_P3d4,0x31) (DriverMode 8 { @@ -2557,7 +2557,7 @@ SiS_SetCRT2ModeRegs(struct SiS_Private *SiS_Pr, unsigned short ModeNo, unsigned if(SiS_Pr-SiS_IF_DEF_LVDS == 1) {
[PATCH sis 06/15] Declare mmioFlags only if XSERVER_LIBPCIACCESS isn't defined
Signed-off-by: Timo Aaltonen timo.aalto...@canonical.com --- src/sis_driver.c |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/src/sis_driver.c b/src/sis_driver.c index 337bba6..61fd515 100644 --- a/src/sis_driver.c +++ b/src/sis_driver.c @@ -7103,7 +7103,9 @@ static Bool SISMapMem(ScrnInfoPtr pScrn) { SISPtr pSiS = SISPTR(pScrn); +#ifndef XSERVER_LIBPCIACCESS int mmioFlags = VIDMEM_MMIO; +#endif #ifdef SISDUALHEAD SISEntPtr pSiSEnt = pSiS-entityPrivate; #endif -- 1.7.4.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 sis 05/15] Fix compile warnings of uninitialized variables
Signed-off-by: Timo Aaltonen timo.aalto...@canonical.com --- src/sis_utility.c |4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/src/sis_utility.c b/src/sis_utility.c index 0892cf5..0e9dc5b 100644 --- a/src/sis_utility.c +++ b/src/sis_utility.c @@ -1550,7 +1550,9 @@ SiSHandleSiSDirectCommand(xSiSCtrlCommandReply *sdcbuf) #ifdef SISMERGED if(pSiS-MergedFB) { int clk, hd, hss, hse, ht, vd, vss, vse, vt; -unsigned int pos, crt1x, crt1y, crt1clk, crt2x, crt2y, crt2clk; +unsigned int pos; +unsigned int crt1x = 0, crt1y = 0, crt1clk = 0; +unsigned int crt2x = 0, crt2y = 0, crt2clk = 0; clk = sdcbuf-sdc_parm[0]; hd= sdcbuf-sdc_parm[1]; -- 1.7.4.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 sis 09/15] Drop unused and non-working XAA trapezoid support for 310 series and later
Signed-off-by: Timo Aaltonen timo.aalto...@canonical.com --- src/sis310_accel.c | 176 1 files changed, 0 insertions(+), 176 deletions(-) diff --git a/src/sis310_accel.c b/src/sis310_accel.c index befb095..26c4c00 100644 --- a/src/sis310_accel.c +++ b/src/sis310_accel.c @@ -56,18 +56,6 @@ #ifdef SIS_USE_XAA -#undef TRAP/* Use/Don't use Trapezoid Fills -* DOES NOT WORK. XAA sometimes provides illegal -* trapezoid data (left and right edges cross each -* other) which causes drawing errors. Since -* checking the trapezoid for such a case is very -* time-intensive, it is faster to let it be done -* by the generic polygon functions. -* Does not work on 330 series at all, hangs the engine. -* Even with correct trapezoids, this is slower than -* doing it by the CPU. - */ - #undef CTSCE /* Use/Don't use CPUToScreenColorExpand. Disabled * because it is slower than doing it by the CPU. * Indirect mode does not work in VRAM queue mode. @@ -424,85 +412,6 @@ SiSSubsequentSolidFillRect(ScrnInfoPtr pScrn, #ifdef SIS_USE_XAA /* XAA -- */ -/* Trapezoid */ -/* This would work better if XAA would provide us with valid trapezoids. - * In fact, with small trapezoids the left and the right edge often cross - * each other which causes drawing errors (filling over whole scanline). - * DOES NOT WORK ON 330 SERIES, HANGS THE ENGINE. - */ -#ifdef TRAP -static void -SiSSubsequentSolidFillTrap(ScrnInfoPtr pScrn, int y, int h, - int left, int dxL, int dyL, int eL, - int right, int dxR, int dyR, int eR ) -{ - SISPtr pSiS = SISPTR(pScrn); - CARD32 dstbase = 0; - - if(y = 2048) { - dstbase = pSiS-scrnOffset * y; - y = 0; - } - - dstbase += FBOFFSET; - -#ifdef SISVRAMQ/* Not optimized yet */ - SiSCheckQueue(16 * 10) -#else - SiSSetupDSTBase(dstbase) -#endif - -#if 1 - SiSSetupPATFG(0xff) /* FOR TESTING */ -#endif - - /* Clear CommandReg because SetUp can be used for Rect and Trap */ - pSiS-CommandReg = ~(T_L_X_INC | T_L_Y_INC | - T_R_X_INC | T_R_Y_INC | - T_XISMAJORL | T_XISMAJORR | - BITBLT); - -xf86DrvMsg(0, X_INFO, Trap (%d %d %d %d) dxL %d dyL %d eL %d dxR %d dyR %d eR %d\n, - left, right, y, h, dxL, dyL, eL, dxR, dyR, eR); - - /* Determine egde angles */ - if(dxL 0) { dxL = -dxL; } - else{ SiSSetupCMDFlag(T_L_X_INC) } - if(dxR 0) { dxR = -dxR; } - else{ SiSSetupCMDFlag(T_R_X_INC) } - - /* (Y direction always positive - do this anyway) */ - if(dyL 0) { dyL = -dyL; } - else{ SiSSetupCMDFlag(T_L_Y_INC) } - if(dyR 0) { dyR = -dyR; } - else{ SiSSetupCMDFlag(T_R_Y_INC) } - - /* Determine major axis */ - if(dxL = dyL) { SiSSetupCMDFlag(T_XISMAJORL) } - if(dxR = dyR) { SiSSetupCMDFlag(T_XISMAJORR) } - - SiSSetupCMDFlag(TRAPAZOID_FILL); - -#ifdef SISVRAMQ - SiSSetupYHLR(y, h, left, right) - SiSSetupdLdR(dxL, dyL, dxR, dyR) - SiSSetupELER(eL, eR) - SiSSetupDSTBaseDoCMD(dstbase) -#else - /* Set up deltas */ - SiSSetupdL(dxL, dyL) - SiSSetupdR(dxR, dyR) - /* Set up y, h, left, right */ - SiSSetupYH(y, h) - SiSSetupLR(left, right) - /* Set up initial error term */ - SiSSetupEL(eL) - SiSSetupER(eR) - SiSDoCMD -#endif -} -#endif - static void SiSSetupForSolidLine(ScrnInfoPtr pScrn, int color, int rop, unsigned int planemask) @@ -748,73 +657,6 @@ SiSSubsequentMonoPatternFill(ScrnInfoPtr pScrn, #endif } -/* --- Trapezoid --- */ - -/* Does not work at all on 330 series */ - -#ifdef TRAP -static void -SiSSubsequentMonoPatternFillTrap(ScrnInfoPtr pScrn, - int patx, int paty, - int y, int h, - int left, int dxL, int dyL, int eL, - int right, int dxR, int dyR, int eR) -{ - SISPtr pSiS = SISPTR(pScrn); - CARD32 dstbase = 0; - - if(y = 2048) { - dstbase=pSiS-scrnOffset*y; - y = 0; - } - - dstbase += FBOFFSET; - -#ifdef SISVRAMQ - SiSCheckQueue(16 * 4); -#else - SiSSetupDSTBase(dstbase) -#endif - - /* Clear CommandReg because SetUp can be used for Rect and Trap */ - pSiS-CommandReg = ~(T_XISMAJORL | T_XISMAJORR | - T_L_X_INC | T_L_Y_INC | -
[PATCH sis 07/15] Purge obsolete and unused SIS_CP checks
Signed-off-by: Timo Aaltonen timo.aalto...@canonical.com --- src/init.h |3 --- src/init301.c| 14 -- src/init301.h|3 --- src/sis.h| 11 --- src/sis_driver.c | 12 src/sis_opt.c| 16 src/sis_video.c | 23 --- src/sis_video.h |6 -- 8 files changed, 0 insertions(+), 88 deletions(-) diff --git a/src/init.h b/src/init.h index bc90933..d0ac959 100644 --- a/src/init.h +++ b/src/init.h @@ -68,9 +68,6 @@ #ifdef SIS_LINUX_KERNEL #include vgatypes.h #include vstruct.h -#ifdef SIS_CP -#undef SIS_CP -#endif #include linux/config.h #include linux/version.h #include linux/types.h diff --git a/src/init301.c b/src/init301.c index 603ecb6..74bbc4c 100644 --- a/src/init301.c +++ b/src/init301.c @@ -7354,11 +7354,7 @@ SiS_SetGroup3(struct SiS_Private *SiS_Pr, unsigned short ModeNo, unsigned short if(SiS_Pr-SiS_VBInfo SetCRT2ToLCDA) return; -#ifndef SIS_CP SiS_SetReg(SiS_Pr-SiS_Part3Port,0x00,0x00); -#else - SIS_CP_INIT301_CP -#endif if(SiS_Pr-SiS_TVMode TVSetPALTiming) { SiS_SetReg(SiS_Pr-SiS_Part3Port,0x13,0xFA); @@ -7398,10 +7394,6 @@ SiS_SetGroup3(struct SiS_Private *SiS_Pr, unsigned short ModeNo, unsigned short } } } - -#ifdef SIS_CP - SIS_CP_INIT301_CP2 -#endif } /*/ @@ -8081,9 +8073,7 @@ SiS_SetCHTVReg(struct SiS_Private *SiS_Pr, unsigned short ModeNo, unsigned short /* Register 0x3D does not exist in non-macrovision register map (Maybe this is a macrovision register?) */ -#ifndef SIS_CP SiS_SetCH70xx(SiS_Pr,0x3d,0x00); -#endif /* Register 0x10 only contains 1 writable bit (S0) for sensing, all other bits a read-only. Macrovision? @@ -8199,10 +8189,6 @@ SiS_SetCHTVReg(struct SiS_Private *SiS_Pr, unsigned short ModeNo, unsigned short } -#ifdef SIS_CP - SIS_CP_INIT301_CP3 -#endif - } #ifdef SIS315H /* --- 315 series only -- */ diff --git a/src/init301.h b/src/init301.h index 7dca546..d656bad 100644 --- a/src/init301.h +++ b/src/init301.h @@ -62,9 +62,6 @@ #ifdef SIS_LINUX_KERNEL #include vgatypes.h #include vstruct.h -#ifdef SIS_CP -#undef SIS_CP -#endif #include linux/config.h #include linux/version.h #include linux/types.h diff --git a/src/sis.h b/src/sis.h index 2144052..7cf81af 100644 --- a/src/sis.h +++ b/src/sis.h @@ -68,11 +68,6 @@ #define TWDEBUG/* for debugging */ #endif -#undef SIS_CP -#if 0 -#include siscp.H -#endif - #include compiler.h #include xf86Pci.h #include xf86Priv.h @@ -929,9 +924,6 @@ typedef struct { UShort MapCountIOPBase;/* map/unmap queue counter */ Bool forceUnmapIOPBase; /* ignore counter and unmap */ #endif -#ifdef SIS_CP -SIS_CP_H_ENT -#endif } SISEntRec, *SISEntPtr; #endif @@ -1294,9 +1286,6 @@ typedef struct { intSiS76xUMASize; intCRT1isoff; ULong UMAsize, LFBsize; /* For SiSCtrl extension info only */ -#ifdef SIS_CP -SIS_CP_H -#endif ULong ChipFlags; ULong SiS_SD_Flags, SiS_SD2_Flags, SiS_SD3_Flags, SiS_SD4_Flags; Bool UseHWARGBCursor; diff --git a/src/sis_driver.c b/src/sis_driver.c index 61fd515..863ad24 100644 --- a/src/sis_driver.c +++ b/src/sis_driver.c @@ -4280,9 +4280,6 @@ SISPreInit(ScrnInfoPtr pScrn, int flags) pSiSEnt-SenseYPbPr = pSiS-SenseYPbPr; pSiSEnt-XvUseMemcpy = pSiS-XvUseMemcpy; pSiSEnt-BenchMemCpy = pSiS-BenchMemCpy; -#ifdef SIS_CP - SIS_CP_DRIVER_COPYOPTIONSENT -#endif } else { /* We always use same cursor type on both screens */ pSiS-HWCursor = pSiSEnt-HWCursor; @@ -4364,9 +4361,6 @@ SISPreInit(ScrnInfoPtr pScrn, int flags) pSiSEnt-NewGammaConR = pSiS-NewGammaConR; pSiSEnt-NewGammaConG = pSiS-NewGammaConG; pSiSEnt-NewGammaConB = pSiS-NewGammaConB; -#ifdef SIS_CP - SIS_CP_DRIVER_COPYOPTIONS -#endif } } #endif @@ -5514,9 +5508,6 @@ SISPreInit(ScrnInfoPtr pScrn, int flags) } } -#ifdef SIS_CP -SIS_CP_DRIVER_RECONFIGOPT -#endif if((pSiS-Chipset == PCI_CHIP_SIS6326) (pSiS-SiS6326Flags SIS6326_HASTV)) { if(pSiS-sis6326tvplug != -1) { @@ -10478,9 +10469,6 @@ void SiSPreSetMode(ScrnInfoPtr pScrn, DisplayModePtr mode, int viewmode) } else { pSiS-SiS_Pr-SiS_CHSOverScan = FALSE; } -#ifdef SIS_CP - SIS_CP_DRIVER_CONFIG -#endif break; case CRT2_LCD: diff --git a/src/sis_opt.c b/src/sis_opt.c index d39ff6e..933049e 100644 --- a/src/sis_opt.c +++ b/src/sis_opt.c @@ -152,9 +152,6 @@ typedef enum { OPTION_FORCE1ASPECT, OPTION_FORCE2ASPECT, OPTION_TVBLUE, -#ifdef SIS_CP -SIS_CP_OPT_OPTIONS -#endif OPTION_PSEUDO } SISOpts;
[PATCH sis 08/15] Drop useless checks and relevant code for old XFree86 releases
Signed-off-by: Timo Aaltonen timo.aalto...@canonical.com --- src/sis.h | 11 src/sis310_accel.c | 42 --- src/sis6326_video.c | 54 src/sis_cursor.c|6 src/sis_dri.c | 14 -- src/sis_driver.c| 35 -- src/sis_opt.c | 21 --- src/sis_vga.c |5 --- src/sis_video.c | 68 --- src/vgatypes.h |5 --- 10 files changed, 0 insertions(+), 261 deletions(-) diff --git a/src/sis.h b/src/sis.h index 7cf81af..3314471 100644 --- a/src/sis.h +++ b/src/sis.h @@ -87,11 +87,6 @@ #ifdef XORG_VERSION_CURRENT #include xorgVersion.h #define SISMYSERVERNAME X.org -#ifndef XF86_VERSION_NUMERIC -#define XF86_VERSION_NUMERIC(major,minor,patch,snap,dummy) \ - (((major) * 1000) + ((minor) * 10) + ((patch) * 1000) + snap) -#define XF86_VERSION_CURRENT XF86_VERSION_NUMERIC(4,3,99,902,0) -#endif #if XORG_VERSION_CURRENT = XORG_VERSION_NUMERIC(6,8,99,900,0) || XORG_VERSION_CURRENT XORG_VERSION_NUMERIC(4,0,0,0,0) #define SISISXORG6899900 #endif @@ -120,10 +115,8 @@ #define SIS_CURRENT_VERSION ((SIS_MAJOR_VERSION 16) | \ (SIS_MINOR_VERSION 8) | SIS_PATCH sisLEVEL ) -#if (XF86_VERSION_CURRENT = XF86_VERSION_NUMERIC(4,3,99,0,0)) || (defined(XvExtension)) #include xf86xv.h #include X11/extensions/Xv.h -#endif /* Platform/architecture related definitions: */ @@ -169,12 +162,8 @@ #undef SISHAVEDRMWRITE #undef SISNEWDRI #ifdef XF86DRI -#if XF86_VERSION_CURRENT = XF86_VERSION_NUMERIC(4,2,99,3,0) #define SISHAVEDRMWRITE -#endif -#if XF86_VERSION_CURRENT = XF86_VERSION_NUMERIC(4,3,99,14,0) #define SISNEWDRI -#endif #undef SIS315DRI /* define this if dri is adapted for 315/330 series */ #include xf86drm.h #include sarea.h diff --git a/src/sis310_accel.c b/src/sis310_accel.c index 8bba823..befb095 100644 --- a/src/sis310_accel.c +++ b/src/sis310_accel.c @@ -144,11 +144,7 @@ extern unsigned char SiSGetPatternROP(int rop); CARD32 dummybuf; #ifdef SIS_NEED_ARRAY -#if XF86_VERSION_CURRENT = XF86_VERSION_NUMERIC(4,2,0,0,0) #define SiSRenderOpsMAX 0x2b -#else -#define SiSRenderOpsMAX 0x0f -#endif static const CARD8 SiSRenderOps[] = { /* PictOpXXX 1 = supported, 0 = unsupported */ 1, 1, 1, 1, 0, 0, 0, 0, @@ -319,32 +315,6 @@ SiSSubsequentScreenToScreenCopy(ScrnInfoPtr pScrn, mymin = min(src_y, dst_y); mymax = max(src_y, dst_y); - /* Libxaa.a has a bug: The tilecache cannot operate -* correctly if there are 512x512 slots, but no 256x256 -* slots. This leads to catastrophic data fed to us. -* Filter this out here and warn the user. -* Fixed in 4.3.99.10 (?) and Debian's 4.3.0.1 -*/ -#if (XF86_VERSION_CURRENT XF86_VERSION_NUMERIC(4,3,99,10,0)) (XF86_VERSION_CURRENT != XF86_VERSION_NUMERIC(4,3,0,1,0)) - if((src_x 0) || - (dst_x 0) || - (src_y 0) || - (dst_y 0) || - (width = 0) || - (height = 0)) { - xf86DrvMsg(pScrn-scrnIndex, X_ERROR, - BitBlit fatal error: Illegal coordinates:\n); - xf86DrvMsg(pScrn-scrnIndex, X_ERROR, - Source x %d y %d, dest x %d y %d, width %d height %d\n, - src_x, src_y, dst_x, dst_y, width, height); - xf86DrvMsg(pScrn-scrnIndex, X_ERROR, - This is very probably caused by a known bug in libxaa.a.\n); - xf86DrvMsg(pScrn-scrnIndex, X_ERROR, - Please update libxaa.a to avoid this error.\n); - return; - } -#endif - /* Although the chip knows the direction to use * if the source and destination areas overlap, * that logic fails if we fiddle with the bitmap @@ -1435,29 +1405,23 @@ SiSSetupForCPUToScreenAlphaTexture(ScrnInfoPtr pScrn, SiSSetupDSTColorDepth(pSiS-SiS310_AccelDepth); switch(op) { case PictOpClear: -#if XF86_VERSION_CURRENT = XF86_VERSION_NUMERIC(4,2,0,0,0) case PictOpDisjointClear: case PictOpConjointClear: -#endif SiSSetupPATFGDSTRect(0, pSiS-scrnOffset, DEV_HEIGHT) /* SiSSetupROP(0x00) - is already 0 */ SiSSetupCMDFlag(PATFG) docopy = FALSE; break; case PictOpSrc: -#if XF86_VERSION_CURRENT = XF86_VERSION_NUMERIC(4,2,0,0,0) case PictOpDisjointSrc: case PictOpConjointSrc: -#endif SiSSetupSRCPitchDSTRect((pitch 2), pSiS-scrnOffset, DEV_HEIGHT); SiSSetupAlpha(0xff) SiSSetupCMDFlag(ALPHA_BLEND | SRCVIDEO | A_NODESTALPHA) break; case PictOpDst: -#if XF86_VERSION_CURRENT = XF86_VERSION_NUMERIC(4,2,0,0,0) case PictOpDisjointDst: case PictOpConjointDst: -#endif SiSSetupSRCPitchDSTRect((pitch 2),
[PATCH sis 10/15] Remove unused code from sis_video.c
Signed-off-by: Timo Aaltonen timo.aalto...@canonical.com --- src/sis310_accel.c | 536 src/sis_accel.c| 128 - 2 files changed, 0 insertions(+), 664 deletions(-) diff --git a/src/sis310_accel.c b/src/sis310_accel.c index 26c4c00..6f93e78 100644 --- a/src/sis310_accel.c +++ b/src/sis310_accel.c @@ -56,21 +56,6 @@ #ifdef SIS_USE_XAA -#undef CTSCE /* Use/Don't use CPUToScreenColorExpand. Disabled -* because it is slower than doing it by the CPU. -* Indirect mode does not work in VRAM queue mode. -* Does not work on 330 series (even in MMIO mode). -*/ -#undef CTSCE_DIRECT/* Use direct method - This works (on both 315 and 330 at -* least in VRAM queue mode) but we don't use this either, -* because it's slower than doing it by the CPU. (Using it -* would require defining CTSCE) -*/ - -#undef STSCE /* Use/Don't use ScreenToScreenColorExpand - does not work, -* see comments below. -*/ - #define INCL_RENDER/* Use/Don't use RENDER extension acceleration */ #ifdef INCL_RENDER @@ -196,14 +181,6 @@ SiSSync(ScrnInfoPtr pScrn) #ifdef SIS_USE_XAA if(!pSiS-useEXA) { -#ifdef CTSCE -#ifdef CTSCE_DIRECT - if(pSiS-DoColorExpand) { - SiSDoCMD - pSiS-ColorExpandBusy = TRUE; - } -#endif -#endif pSiS-DoColorExpand = FALSE; } #endif @@ -711,420 +688,6 @@ SiSSubsequentColor8x8PatternFillRect(ScrnInfoPtr pScrn, int patternx, } #endif -/* CPUToScreen Color Expand --- */ - -#ifdef CTSCE - -#ifdef CTSCE_DIRECT - -/* Direct method */ - -/* This is somewhat a fake. We let XAA copy its data not to an - * aperture, but to video RAM, and then do a ScreenToScreen - * color expansion. - * Since the data is sent AFTER the call to Subsequent, we - * don't execute the command here, but set a flag and do - * that in the (subsequent) call to Sync() - */ - -static void -SiSSetupForCPUToScreenColorExpandFill(ScrnInfoPtr pScrn, - int fg, int bg, int rop, unsigned int planemask) -{ - SISPtr pSiS=SISPTR(pScrn); - -#ifdef SISVRAMQ - SiSSetupDSTColorDepth(pSiS-SiS310_AccelDepth); - SiSSetupROP(SiSGetCopyROP(rop)); - SiSSetupSRCFGDSTRect(fg, pSiS-scrnOffset, DEV_HEIGHT) - if(bg == -1) { - SiSSetupCMDFlag(TRANSPARENT | ENCOLOREXP | SRCVIDEO); - } else { - SiSSetupSRCBG(bg); - SiSSetupCMDFlag(ENCOLOREXP | SRCVIDEO); - } - SiSSyncWP -#else - SiSSetupSRCXY(0,0); - SiSSetupROP(SiSGetCopyROP(rop)); - SiSSetupSRCFG(fg); - SiSSetupDSTRect(pSiS-scrnOffset, DEV_HEIGHT); - SiSSetupDSTColorDepth(pSiS-DstColor); - if(bg == -1) { - SiSSetupCMDFlag(TRANSPARENT | ENCOLOREXP | SRCVIDEO - | pSiS-SiS310_AccelDepth); - } else { - SiSSetupSRCBG(bg); - SiSSetupCMDFlag(ENCOLOREXP | SRCVIDEO | pSiS-SiS310_AccelDepth); - } -#endif -} - -static void -SiSSubsequentCPUToScreenColorExpandFill( - ScrnInfoPtr pScrn, int x, int y, int w, - int h, int skipleft) -{ - SISPtr pSiS = SISPTR(pScrn); - int _x0, _y0, _x1, _y1; - CARD32 srcbase, dstbase; - - srcbase = pSiS-ColorExpandBase; - - dstbase = 0; - if(y = 2048) { - dstbase = pSiS-scrnOffset*y; - y = 0; - } - - srcbase += FBOFFSET; - dstbase += FBOFFSET; - -#ifdef SISVRAMQ - SiSSetupSRCDSTBase(srcbase,dstbase); -#else - SiSSetupSRCBase(srcbase); - SiSSetupDSTBase(dstbase) -#endif - - if(skipleft 0) { - _x0 = x + skipleft; - _y0 = y; - _x1 = x + w; - _y1 = y + h; -#ifdef SISVRAMQ - SiSSetupClip(_x0, _y0, _x1, _y1); -#else - SiSSetupClipLT(_x0, _y0); - SiSSetupClipRB(_x1, _y1); -#endif - SiSSetupCMDFlag(CLIPENABLE); - } else { - pSiS-CommandReg = (~CLIPENABLE); - } - -#ifdef SISVRAMQ - SiSSetupRectSRCPitch(w, h, w + 7) 3) + 3) 2) 2); - SiSSetupSRCDSTXY(0, 0, x, y); -#else - SiSSetupRect(w, h); - SiSSetupSRCPitch(w+7)/8)+3) 2) * 4); - SiSSetupDSTXY(x, y); -#endif - - if(pSiS-ColorExpandBusy) { - pSiS-ColorExpandBusy = FALSE; - SiSIdle - } - - pSiS-DoColorExpand = TRUE; -} - -#else - -/* Indirect method */ - -/* This is SLOW, slower than the CPU on most chipsets */ -/* Does not work in VRAM queue mode. */ - -static void -SiSSetupForScanlineCPUToScreenColorExpandFill(ScrnInfoPtr pScrn, - int fg, int bg, int rop, unsigned int planemask) -{ - SISPtr pSiS=SISPTR(pScrn); -
[PATCH sis 14/15] Move configurable values from sis.h to sis_config.h
Signed-off-by: Timo Aaltonen timo.aalto...@canonical.com --- src/sis.h| 40 +- src/sis_config.h | 71 ++ 2 files changed, 72 insertions(+), 39 deletions(-) create mode 100644 src/sis_config.h diff --git a/src/sis.h b/src/sis.h index 9ef30b8..b8dba90 100644 --- a/src/sis.h +++ b/src/sis.h @@ -173,45 +173,7 @@ #include sis_dri.h #endif /* XF86DRI */ -/* Configurable stuff: - */ - -#define SISDUALHEAD/* Include Dual Head code */ - -#define SISMERGED /* Include Merged-FB code */ - -#undef SISXINERAMA -#ifdef SISMERGED -#define SISXINERAMA/* Include SiS Pseudo-Xinerama for MergedFB mode */ -#define SIS_XINERAMA_MAJOR_VERSION 1 -#define SIS_XINERAMA_MINOR_VERSION 1 -#endif - -#define SIS_ARGB_CURSOR/* Include code for color hardware cursors */ - -#define ENABLE_YPBPR /* Include YPbPr support on SiS bridges (315 series and 661/741/760) */ - -#define SISVRAMQ /* Use VRAM queue mode on 315/330/340/XGI series */ - -#undef INCL_YUV_BLIT_ADAPTOR -#ifdef SISVRAMQ -#define INCL_YUV_BLIT_ADAPTOR /* Include support for YUV-RGB blit adaptors (VRAM queue mode only) */ -#endif - -#if 1 -#define SIS_USE_XAA/* Include code for XAA */ -#endif - -#ifdef SISVRAMQ -#ifdef XORG_VERSION_CURRENT -#if defined(SIS_HAVE_EXA) || (defined(XF86EXA) (XF86EXA != 0)) -#if 1 -#define SIS_USE_EXA/* Include code for EXA */ -#endif -#endif -#endif -#endif - -/* End of configurable stuff - */ +#include sis_config.h #define UNLOCK_ALWAYS /* Always unlock the registers (should be set!) */ diff --git a/src/sis_config.h b/src/sis_config.h new file mode 100644 index 000..b8b625c --- /dev/null +++ b/src/sis_config.h @@ -0,0 +1,71 @@ +/* + * Configurable compile-time options + * + * Copyright (C) 2001-2005 by Thomas Winischhofer, Vienna, Austria + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1) Redistributions of source code must retain the above copyright + *notice, this list of conditions and the following disclaimer. + * 2) Redistributions in binary form must reproduce the above copyright + *notice, this list of conditions and the following disclaimer in the + *documentation and/or other materials provided with the distribution. + * 3) The name of the author may not be used to endorse or promote products + *derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * Author: Thomas Winischhofer tho...@winischhofer.net + * + */ + +#undef SISXINERAMA +#undef INCL_YUV_BLIT_ADAPTOR + +/* Configurable stuff: - */ + +#define SISDUALHEAD/* Include Dual Head support */ + +#define SISMERGED /* Include Merged-FB support */ + +#ifdef SISMERGED +#define SISXINERAMA/* Include SiS Pseudo-Xinerama support for MergedFB mode */ +#define SIS_XINERAMA_MAJOR_VERSION 1 +#define SIS_XINERAMA_MINOR_VERSION 1 +#endif + +#define SIS_ARGB_CURSOR/* Include support for color hardware cursors */ + +#define ENABLE_YPBPR /* Include YPbPr support on SiS bridges (315 series and 661/741/760) */ + +#define SISVRAMQ /* Use VRAM queue mode on 315/330/340/XGI series */ + +#ifdef SISVRAMQ +#define INCL_YUV_BLIT_ADAPTOR /* Include support for YUV-RGB blit adaptors (VRAM queue mode only) */ +#endif + +#if 1 +#define SIS_USE_XAA/* Include support for XAA */ +#endif + +#ifdef SISVRAMQ +#ifdef XORG_VERSION_CURRENT +#if defined(SIS_HAVE_EXA) || (defined(XF86EXA) (XF86EXA != 0)) +#if 1 +#define SIS_USE_EXA/* Include support for EXA */ +#endif +#endif +#endif +#endif + +/* End of configurable stuff - */ -- 1.7.4.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 sis 11/15] Remove unused code from SISPutImageBlit()
Signed-off-by: Timo Aaltonen timo.aalto...@canonical.com --- src/sis_video.c | 66 --- 1 files changed, 0 insertions(+), 66 deletions(-) diff --git a/src/sis_video.c b/src/sis_video.c index 9859f33..17d8f71 100644 --- a/src/sis_video.c +++ b/src/sis_video.c @@ -4269,34 +4269,6 @@ SISPutImageBlit( DSTVIDEO; -#if 0 /* Not implemented by hardware! */ - if(pPriv-vsync) { -#ifdef SISMERGED - if(!pSiS-MergedFB) { -#endif -#ifdef SISDUALHEAD - if(pSiS-DualHeadMode) { - if(pSiS-SecondHead) { - MyPacket.P12_Command |= pPriv-VBlankTriggerCRT1; - } else { - MyPacket.P12_Command |= pPriv-VBlankTriggerCRT2; - } -} else { -#endif -Bool IsSlaveMode = SiSBridgeIsInSlaveMode(pScrn); -if((pSiS-VBFlags DISPTYPE_DISP2) !IsSlaveMode) - MyPacket.P12_Command |= pPriv-VBlankTriggerCRT2; - else if((pSiS-VBFlags DISPTYPE_DISP1) || IsSlaveMode) - MyPacket.P12_Command |= pPriv-VBlankTriggerCRT1; -#ifdef SISDUALHEAD - } -#endif -#ifdef SISMERGED - } -#endif - } -#endif - first = TRUE; while(nbox--) { left = pbox-x1; @@ -4321,23 +4293,6 @@ SISPutImageBlit( MyPacket.P12_RectWidth = right - left; MyPacket.P12_RectHeight = bottom - top; -#if 0 -#ifdef SISMERGED - if((first) (pSiS-MergedFB)) { - int scrwidth = ((SiSMergedDisplayModePtr)pSiS-CurrentLayout.mode-Private)-CRT2-HDisplay; -int scrheight = ((SiSMergedDisplayModePtr)pSiS-CurrentLayout.mode-Private)-CRT2-VDisplay; -if( (right pSiS-CRT2pScrn-frameX0) || -(left = pSiS-CRT2pScrn-frameX0 + scrwidth) || -(bottom pSiS-CRT2pScrn-frameY0) || -(top = pSiS-CRT2pScrn-frameY0 + scrheight) ) { - MyPacket.P12_Command |= pPriv-VBlankTriggerCRT1; -} else { - MyPacket.P12_Command |= pPriv-VBlankTriggerCRT2; -} - } -#endif -#endif - offsety = offsetuv = 0; if(packed) { if(pbox-y1 drw_y + yoffset) { @@ -4346,19 +4301,9 @@ SISPutImageBlit( if(pbox-x1 drw_x + xoffset) { offsetuv += ((pbox-x1 - drw_x - xoffset) 1); if(offsetuv 3) { -#if 0 /* Paint over covering object - no */ - if(MyPacket.P12_DstX 0) { - offsetuv = ~3; - MyPacket.P12_DstX--; - MyPacket.P12_RectWidth++; - } else { -#endif offsetuv = (offsetuv + 3) ~3; MyPacket.P12_DstX++; MyPacket.P12_RectWidth--; -#if 0 - } -#endif } } } else { @@ -4383,22 +4328,11 @@ SISPutImageBlit( MyPacket.P12_YSrcAddr = pPriv-bufAddr[index][pPriv-currentBuf[index]] + offsety + FBOFFSET; MyPacket.P12_UVSrcAddr = pPriv-bufAddr[index][pPriv-currentBuf[index]] + bytesize + offsetuv + FBOFFSET; SISWriteBlitPacket(pSiS, (CARD32*)MyPacket); -#if 0 - MyPacket.P12_Command = ~(pPriv-VBlankTriggerCRT1 | pPriv-VBlankTriggerCRT2); -#endif first = FALSE; mycont: pbox++; } -#if 0 - { - int debug = 0; - while( (SIS_MMIO_IN16(pSiS-IOBase, Q_STATUS+2) 0x8000) != 0x8000) { debug++; }; - while( (SIS_MMIO_IN16(pSiS-IOBase, Q_STATUS+2) 0x8000) != 0x8000) { debug++; }; - xf86DrvMsg(0, X_INFO, vsync %d, debug %d\n, pPriv-vsync, debug); - } -#endif pPriv-currentBuf[index] ^= 1; -- 1.7.4.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 sis 12/15] Remove unused non-working Xv deinterlacer code
Signed-off-by: Timo Aaltonen timo.aalto...@canonical.com --- src/sis.h |7 -- src/sis_video.c| 55 src/sis_video.h|9 src/sis_videostr.h |3 -- 4 files changed, 0 insertions(+), 74 deletions(-) diff --git a/src/sis.h b/src/sis.h index 3314471..f40563e 100644 --- a/src/sis.h +++ b/src/sis.h @@ -212,10 +212,6 @@ #endif #if 0 -#define SISDEINT /* Include Xv deinterlacer code (not functional yet!) */ -#endif - -#if 0 #define XV_SD_DEPRECATED /* Include deprecated XV SD interface for SiSCtrl */ #endif @@ -1253,9 +1249,6 @@ typedef struct { Atom xvDisableGfx, xvDisableGfxLR, xvTVXPosition, xvTVYPosition; Atom xvDisableColorkey, xvUseChromakey, xvChromaMin, xvChromaMax; Atom xvInsideChromakey, xvYUVChromakey, xvVSync; -#ifdef SISDEINT -Atom xvdeintmeth; -#endif Atom xvGammaRed, xvGammaGreen, xvGammaBlue; #ifdef XV_SD_DEPRECATED Atom xv_QVF, xv_QVV, xv_USD, xv_SVF, xv_QDD, xv_TAF, xv_TSA, xv_TEE, xv_GSF; diff --git a/src/sis_video.c b/src/sis_video.c index 17d8f71..f134aad 100644 --- a/src/sis_video.c +++ b/src/sis_video.c @@ -968,9 +968,6 @@ SISSetupImageVideo(ScreenPtr pScreen) pSiS-xvYUVChromakey = MAKE_ATOM(sisxvyuvchromakey); pSiS-xvChromaMin= MAKE_ATOM(sisxvchromamin); pSiS-xvChromaMax = MAKE_ATOM(sisxvchromamax); -#ifdef SISDEINT -pSiS-xvdeintmeth= MAKE_ATOM(sisxvdeinterlace); -#endif #ifdef XV_SD_DEPRECATED pSiS-xv_QVF = MAKE_ATOM(sisxvqueryvbflags); pSiS-xv_GDV = MAKE_ATOM(sisxvsdgetdriverversion); @@ -1212,12 +1209,6 @@ SISSetPortAttribute(ScrnInfoPtr pScrn, Atom attribute, pPriv-chromamin = value; } else if(attribute == pSiS-xvChromaMax) { pPriv-chromamax = value; -#ifdef SISDEINT - } else if(attribute == pSiS-xvdeintmeth) { - if(value 0) value = 0; - if(value 4) value = 4; - pPriv-deinterlacemethod = value; -#endif } else if(attribute == pSiS-xvHue) { if(pSiS-VGAEngine == SIS_315_VGA) { if((value -8) || (value 7)) return BadValue; @@ -1309,10 +1300,6 @@ SISGetPortAttribute(ScrnInfoPtr pScrn, Atom attribute, *value = pPriv-chromamin; } else if(attribute == pSiS-xvChromaMax) { *value = pPriv-chromamax; -#ifdef SISDEINT - } else if(attribute == pSiS-xvdeintmeth) { - *value = pPriv-deinterlacemethod; -#endif } else if(attribute == pSiS-xvHue) { if(pSiS-VGAEngine == SIS_315_VGA) { *value = pPriv-hue; @@ -2666,26 +2653,7 @@ SISDisplayVideo(ScrnInfoPtr pScrn, SISPortPrivPtr pPriv) overlay.keyOP = VI_ROP_DestKey; } -#ifdef SISDEINT - switch(pPriv-deinterlacemethod) { - case 1: - overlay.bobEnable = 0x02; - /* overlay.bobEnable |= (pPriv-currentBuf) ? 0x00 : 0x10; */ - break; - case 2: - overlay.bobEnable = 0x08; - /* overlay.bobEnable |= (pPriv-currentBuf) ? 0x00 : 0x10; */ - break; - case 3: - overlay.bobEnable = 0x0a; - /* overlay.bobEnable |= (pPriv-currentBuf) ? 0x00 : 0x10; */ - break; - default: -#endif overlay.bobEnable = 0x00;/* Disable BOB de-interlacer */ -#ifdef SISDEINT - } -#endif #ifdef SISMERGED if(pSiS-MergedFB) { @@ -3461,9 +3429,6 @@ SISPutImage( int myreds[] = { 0x00ff, 0xf800, 0, 0x00ff }; #endif int totalSize = 0; -#ifdef SISDEINT - Booldeintfm = (pPriv-deinterlacemethod 1) ? TRUE : FALSE; -#endif #if 0 xf86DrvMsg(0, X_INFO, PutImage: src %dx%d-%dx%d, drw %dx%d-%dx%d, id %x, w %d h %d, buf %p\n, @@ -3545,23 +3510,6 @@ SISPutImage( if(!(pPriv-bufAddr[0] = SISAllocateFBMemory(pScrn, pPriv-handle, totalSize 1))) return BadAlloc; -#ifdef SISDEINT - if(deintfm) { - pPriv-bufAddr[1] = pPriv-bufAddr[0] + pPriv-srcPitch; - - { - CARD8 *src = (CARD8 *)buf; - CARD8 *dest = (CARD8 *)(pSiS-FbBase + pPriv-bufAddr[pPriv-currentBuf]); - int i = height; - while(i--) { - SiSMemCopyToVideoRam(pSiS, dest, src, pPriv-srcPitch); - src += pPriv-srcPitch; - dest += (pPriv-srcPitch 1); - } - } - - } else { -#endif pPriv-bufAddr[1] = pPriv-bufAddr[0] + totalSize; /* copy data */ @@ -3578,9 +3526,6 @@ SISPutImage( *dest++ = *src++; } } -#ifdef SISDEINT - } -#endif SISDisplayVideo(pScrn, pPriv); diff --git a/src/sis_video.h b/src/sis_video.h index 7cd63c3..25fadd1 100644 --- a/src/sis_video.h +++ b/src/sis_video.h @@ -214,9 +214,6 @@ static char sisxvinsidechromakey[] = XV_INSIDE_CHROMAKEY; static char sisxvyuvchromakey[]= XV_YUV_CHROMAKEY; static char sisxvchromamin[] = XV_CHROMAMIN; static char sisxvchromamax[] =
[PATCH sis 13/15] Remove deprecated XV SD interface
Signed-off-by: Timo Aaltonen timo.aalto...@canonical.com --- src/sis.h | 17 -- src/sis_utility.c | 515 - src/sis_video.c | 71 src/sis_video.h | 180 --- 4 files changed, 0 insertions(+), 783 deletions(-) diff --git a/src/sis.h b/src/sis.h index f40563e..9ef30b8 100644 --- a/src/sis.h +++ b/src/sis.h @@ -211,10 +211,6 @@ #endif #endif -#if 0 -#define XV_SD_DEPRECATED /* Include deprecated XV SD interface for SiSCtrl */ -#endif - /* End of configurable stuff - */ #define UNLOCK_ALWAYS /* Always unlock the registers (should be set!) */ @@ -1250,19 +1246,6 @@ typedef struct { Atom xvDisableColorkey, xvUseChromakey, xvChromaMin, xvChromaMax; Atom xvInsideChromakey, xvYUVChromakey, xvVSync; Atom xvGammaRed, xvGammaGreen, xvGammaBlue; -#ifdef XV_SD_DEPRECATED -Atom xv_QVF, xv_QVV, xv_USD, xv_SVF, xv_QDD, xv_TAF, xv_TSA, xv_TEE, xv_GSF; -Atom xv_TTE, xv_TCO, xv_TCC, xv_TCF, xv_TLF, xv_CMD, xv_CMDR, xv_CT1, xv_SGA; -Atom xv_GDV, xv_GHI, xv_OVR, xv_GBI, xv_TXS, xv_TYS, xv_CFI, xv_COC, xv_COF; -Atom xv_YFI, xv_GSS, xv_BRR, xv_BRG, xv_BRB, xv_PBR, xv_PBG, xv_PBB, xv_SHC; -Atom xv_BRR2, xv_BRG2, xv_BRB2, xv_PBR2, xv_PBG2, xv_PBB2, xv_PMD, xv_RDT; -Atom xv_GARC2,xv_GAGC2,xv_GABC2, xv_GSF2; -Atom xv_BRRC2, xv_BRGC2, xv_BRBC2, xv_PBRC2, xv_PBGC2, xv_PBBC2; -#ifdef TWDEBUG -Atom xv_STR; -#endif -unsigned int xv_sd_result; -#endif /* XV_SD_DEPRECATED */ intxv_sisdirectunlocked; intSiS76xLFBSize; intSiS76xUMASize; diff --git a/src/sis_utility.c b/src/sis_utility.c index 0e9dc5b..a3f61b1 100644 --- a/src/sis_utility.c +++ b/src/sis_utility.c @@ -254,13 +254,6 @@ typedef struct { void SiSCtrlExtInit(ScrnInfoPtr pScrn); void SiSCtrlExtUnregister(SISPtr pSiS, int index); -#ifdef XV_SD_DEPRECATED -intSISSetPortUtilAttribute(ScrnInfoPtr pScrn, Atom attribute, - INT32 value, SISPortPrivPtr pPriv); -intSISGetPortUtilAttribute(ScrnInfoPtr pScrn, Atom attribute, - INT32 *value, SISPortPrivPtr pPriv); -#endif - extern BoolSISRedetectCRT2Type(ScrnInfoPtr pScrn); extern UShort SiS_CheckModeCRT1(ScrnInfoPtr pScrn, DisplayModePtr mode, unsigned int VBFlags, Bool hcm); @@ -713,37 +706,6 @@ SISCheckModeForCRT2Type(ScrnInfoPtr pScrn, DisplayModePtr mode, ULong vbflags, U return result; } -#ifdef XV_SD_DEPRECATED -static int -SISCheckModeIndexForCRT2Type(ScrnInfoPtr pScrn, UShort cond, UShort index, Bool quiet) -{ -SISPtr pSiS = SISPTR(pScrn); -DisplayModePtr mode = pScrn-modes; -ULong vbflags; -int i; - -/* Not only CRT2, but also LCDA */ - -/* returns 0 if mode ok, - * 0x01 if mode not ok for CRT2 device, - * 0x02 if mode too large for current root window - * or combinations thereof - */ - -vbflags = SiSCondToVBFlags(cond, pSiS-VBFlags); - -/* Find mode of given index */ -if(index) { - for(i = 0; i index; i++) { - if(!mode) return 0x03; - mode = mode-next; - } -} - -return(SISCheckModeForCRT2Type(pScrn, mode, vbflags, cond, quiet)); -} -#endif - static DisplayModePtr sisFindModeFromTiming(ScrnInfoPtr pScrn, UShort hdisplay, UShort vdisplay, UShort htotal, UShort vtotal, @@ -2102,480 +2064,3 @@ SiSCtrlExtUnregister(SISPtr pSiS, int index) } } } - -/*** - * Xv attribute interface * - ***/ - -#ifdef XV_SD_DEPRECATED - -int -SISSetPortUtilAttribute(ScrnInfoPtr pScrn, Atom attribute, - INT32 value, SISPortPrivPtr pPriv) -{ - SISPtr pSiS = SISPTR(pScrn); -#ifdef SISDUALHEAD - SISEntPtr pSiSEnt = pSiS-entityPrivate;; -#endif - - if(attribute == pSiS-xv_USD) { - if(pSiS-enablesisctrl) { -if(value == SIS_DIRECTKEY) { - pSiS-xv_sisdirectunlocked++; - } else if(pSiS-xv_sisdirectunlocked) { - pSiS-xv_sisdirectunlocked--; - } - } else { - pSiS-xv_sisdirectunlocked = 0; - } - } else if(attribute == pSiS-xv_SVF) { -#ifdef SISDUALHEAD - if(!pPriv-dualHeadMode) -#endif - if(pSiS-xv_sisdirectunlocked) { - SISSwitchCRT2Type(pScrn, (ULong)value, FALSE); - SISUpdateVideoParms(pSiS, pPriv); - } - } else if(attribute == pSiS-xv_CT1) { -#ifdef SISDUALHEAD - if(!pPriv-dualHeadMode) -#endif - if(pSiS-xv_sisdirectunlocked) { - SISSwitchCRT1Status(pScrn, (ULong)value, FALSE); -
Re: [PATCH xserver 2/2] dri2: Invalidate DRI2 buffers for all windows with the same pixmap on swap.
On Wed, 06 Apr 2011 10:19:01 +0200, Michel Dänzer mic...@daenzer.net wrote: 10 days have passed. I hoped you would take a few minutes and write a more efficient version. Like this. diff --git a/hw/xfree86/dri2/dri2.c b/hw/xfree86/dri2/dri2.c index 10be599..6e9abb2 100644 --- a/hw/xfree86/dri2/dri2.c +++ b/hw/xfree86/dri2/dri2.c @@ -782,6 +782,20 @@ DRI2WaitSwap(ClientPtr client, DrawablePtr pDrawable) return FALSE; } +/* + * A TraverseTree callback to invalidate all windows using the same + * pixmap + */ + +static int +DRI2InvalidateWalk(WindowPtr pWin, pointer data) +{ +if (pWin-drawable.pScreen-GetWindowPixmap(pWin) != data) + return WT_DONTWALKCHILDREN; +DRI2InvalidateDrawable(pWin-drawable); +return WT_WALKCHILDREN; +} + int DRI2SwapBuffers(ClientPtr client, DrawablePtr pDraw, CARD64 target_msc, CARD64 divisor, CARD64 remainder, CARD64 *swap_target, @@ -882,7 +896,23 @@ DRI2SwapBuffers(ClientPtr client, DrawablePtr pDraw, CARD64 target_msc, */ *swap_target = pPriv-swap_count + pPriv-swapsPending; -DRI2InvalidateDrawable(pDraw); +if (pDraw-type == DRAWABLE_WINDOW) { + WindowPtr pWin = (WindowPtr) pDraw; + PixmapPtr pPixmap = pScreen-GetWindowPixmap(pWin); + + /* +* Find the top-most window using this pixmap +*/ + while (pWin-parent pScreen-GetWindowPixmap(pWin-parent) == pPixmap) + pWin = pWin-parent; + + /* +* Walk the sub-tree to invalidate all of the +* windows using the same pixmap +*/ + TraverseTree(pWin, DRI2InvalidateWalk, pPixmap); +} else + DRI2InvalidateDrawable(pDraw); return Success; } -- keith.pack...@intel.com pgpR1PHLvSY3N.pgp Description: PGP signature ___ 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] Don't report old relative values in getValuatorEvents
On 04/05/2011 07:31 PM, Jeremy Huddleston wrote: (related to my recent reply for the 1.10 merge of this patch) I believe this should this instead be: +else if (dev dev-valuator-axes[xv-first_valuator + j].mode == Absolute) As much as I just want to be done with this issue, I think you are right... If the internal event is converted to XI 1.x after the device is removed, this could cause a NULL pointer dereference. I'll send another patch to fix this up. Thanks, -- Chase On Mar 31, 2011, at 08:29, Chase Douglas wrote: Relative valuator values should not be reported in any future events. If a relative valuator value is not set in an internal event, set the value to 0 for XI 1.x valuator events sent over the wire. Signed-off-by: Chase Douglas chase.doug...@canonical.com --- dix/eventconvert.c |4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/dix/eventconvert.c b/dix/eventconvert.c index 3285133..088ba98 100644 --- a/dix/eventconvert.c +++ b/dix/eventconvert.c @@ -389,8 +389,10 @@ getValuatorEvents(DeviceEvent *ev, deviceValuator *xv) for (j = 0; j xv-num_valuators; j++) { if (BitIsOn(ev-valuators.mask, xv-first_valuator + j)) valuators[j] = ev-valuators.data[xv-first_valuator + j]; -else +else if (dev-valuator-axes[xv-first_valuator + j].mode == Absolute) valuators[j] = dev-valuator-axisVal[xv-first_valuator + j]; +else +valuators[j] = 0; } if (i + 6 num_valuators) -- 1.7.4.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 ___ 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] Fix unset valuator handling for XI 1.x valuator events again
Set the valuator values for unset masked absolute valuators in the internal device event. This ensures the values will always be correct in getValuatorEvents even if the device has been removed. Signed-off-by: Chase Douglas chase.doug...@canonical.com --- dix/eventconvert.c | 14 +- dix/getevents.c|4 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/dix/eventconvert.c b/dix/eventconvert.c index a5fe0a9..14731f4 100644 --- a/dix/eventconvert.c +++ b/dix/eventconvert.c @@ -383,12 +383,12 @@ getValuatorEvents(DeviceEvent *ev, deviceValuator *xv) int i; int state = 0; int first_valuator, num_valuators; -DeviceIntPtr dev = NULL; num_valuators = countValuators(ev, first_valuator); if (num_valuators 0) { +DeviceIntPtr dev = NULL; dixLookupDevice(dev, ev-deviceid, serverClient, DixUseAccess); /* State needs to be assembled BEFORE the device is updated. */ state = (dev dev-key) ? XkbStateFieldFromRec(dev-key-xkbInfo-state) : 0; @@ -405,14 +405,10 @@ getValuatorEvents(DeviceEvent *ev, deviceValuator *xv) xv-deviceid = ev-deviceid; xv-device_state = state; -for (j = 0; j xv-num_valuators; j++) { -if (BitIsOn(ev-valuators.mask, xv-first_valuator + j)) -valuators[j] = ev-valuators.data[xv-first_valuator + j]; -else if (dev-valuator-axes[xv-first_valuator + j].mode == Absolute) -valuators[j] = dev-valuator-axisVal[xv-first_valuator + j]; -else -valuators[j] = 0; -} +/* Unset valuators in masked valuator events have the proper data values + * in the case of an absolute axis in between two set valuators. */ +for (j = 0; j xv-num_valuators; j++) +valuators[j] = ev-valuators.data[xv-first_valuator + j]; if (i + 6 num_valuators) xv-deviceid |= MORE_EVENTS; diff --git a/dix/getevents.c b/dix/getevents.c index c3b7ced..644b388 100644 --- a/dix/getevents.c +++ b/dix/getevents.c @@ -205,6 +205,8 @@ set_valuators(DeviceIntPtr dev, DeviceEvent* event, ValuatorMask *mask) { int i; +/* Set the data to the previous value for unset absolute axes. The values + * may be used when sent as part of an XI 1.x valuator event. */ for (i = 0; i valuator_mask_size(mask); i++) { if (valuator_mask_isset(mask, i)) @@ -216,6 +218,8 @@ set_valuators(DeviceIntPtr dev, DeviceEvent* event, ValuatorMask *mask) event-valuators.data_frac[i] = dev-last.remainder[i] * (1 16) * (1 16); } +else if (valuator_get_mode(dev, i) == Absolute) +event-valuators.data[i] = dev-valuator-axisVal[i]; } } -- 1.7.4.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: [PATCH sis 04/15] Fix suggest parentheses around operand of ‘!’ compiler warnings.
From: Timo Aaltonen tjaal...@ubuntu.com Date: Wed, 6 Apr 2011 19:50:06 +0300 Signed-off-by: Timo Aaltonen timo.aalto...@canonical.com --- src/sis_cursor.c |2 +- src/sis_utility.c |2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/sis_cursor.c b/src/sis_cursor.c index 13eddc4..67a3402 100644 --- a/src/sis_cursor.c +++ b/src/sis_cursor.c @@ -759,7 +759,7 @@ SiS300LoadCursorImage(ScrnInfoPtr pScrn, UChar *src) } if(pSiS-VBFlags CRT2_ENABLE) { - if((pSiS-UseHWARGBCursor) (!pSiS-VBFlags DISPTYPE_CRT1)) { + if((pSiS-UseHWARGBCursor) ((!pSiS-VBFlags) DISPTYPE_CRT1)) { Hmm, while your change is correct in the sense that it doesn't change the meaning of the code, I do think that what's actually meant here is: if((pSiS-UseHWARGBCursor) (!(pSiS-VBFlags DISPTYPE_CRT1))) { What's there now, just doesn't make sense, since it will always evaluate to false. See also SiS310LoadCursorImage. diff --git a/src/sis_utility.c b/src/sis_utility.c index 64d8919..0892cf5 100644 --- a/src/sis_utility.c +++ b/src/sis_utility.c @@ -523,7 +523,7 @@ SISSwitchCRT2Type(ScrnInfoPtr pScrn, ULong newvbflags, Bool quiet) } #endif -if((!(newvbflags CRT2_ENABLE)) (!newvbflags DISPTYPE_CRT1)) { +if((!(newvbflags CRT2_ENABLE)) ((!newvbflags) DISPTYPE_CRT1)) { And this should probably be if((!(newvbflags CRT2_ENABLE)) (!(newvbflags DISPTYPE_CRT1))) { Cheers, Mark ___ 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] Fix unset valuator handling for XI 1.x valuator events again
why do we no longer need to check the valuators.mask? It looks like (from just the src changes here) that the !absolute (relative) case would still need to be handled. if (BitIsOn(ev-valuators.mask, xv-first_valuator + j)) valuators[j] = ev-valuators.data[xv-first_valuator + j]; else valuators[j] = 0; On Apr 6, 2011, at 11:51, Chase Douglas wrote: Set the valuator values for unset masked absolute valuators in the internal device event. This ensures the values will always be correct in getValuatorEvents even if the device has been removed. Signed-off-by: Chase Douglas chase.doug...@canonical.com --- dix/eventconvert.c | 14 +- dix/getevents.c|4 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/dix/eventconvert.c b/dix/eventconvert.c index a5fe0a9..14731f4 100644 --- a/dix/eventconvert.c +++ b/dix/eventconvert.c @@ -383,12 +383,12 @@ getValuatorEvents(DeviceEvent *ev, deviceValuator *xv) int i; int state = 0; int first_valuator, num_valuators; -DeviceIntPtr dev = NULL; num_valuators = countValuators(ev, first_valuator); if (num_valuators 0) { +DeviceIntPtr dev = NULL; dixLookupDevice(dev, ev-deviceid, serverClient, DixUseAccess); /* State needs to be assembled BEFORE the device is updated. */ state = (dev dev-key) ? XkbStateFieldFromRec(dev-key-xkbInfo-state) : 0; @@ -405,14 +405,10 @@ getValuatorEvents(DeviceEvent *ev, deviceValuator *xv) xv-deviceid = ev-deviceid; xv-device_state = state; -for (j = 0; j xv-num_valuators; j++) { -if (BitIsOn(ev-valuators.mask, xv-first_valuator + j)) -valuators[j] = ev-valuators.data[xv-first_valuator + j]; -else if (dev-valuator-axes[xv-first_valuator + j].mode == Absolute) -valuators[j] = dev-valuator-axisVal[xv-first_valuator + j]; -else -valuators[j] = 0; -} +/* Unset valuators in masked valuator events have the proper data values + * in the case of an absolute axis in between two set valuators. */ +for (j = 0; j xv-num_valuators; j++) +valuators[j] = ev-valuators.data[xv-first_valuator + j]; if (i + 6 num_valuators) xv-deviceid |= MORE_EVENTS; diff --git a/dix/getevents.c b/dix/getevents.c index c3b7ced..644b388 100644 --- a/dix/getevents.c +++ b/dix/getevents.c @@ -205,6 +205,8 @@ set_valuators(DeviceIntPtr dev, DeviceEvent* event, ValuatorMask *mask) { int i; +/* Set the data to the previous value for unset absolute axes. The values + * may be used when sent as part of an XI 1.x valuator event. */ for (i = 0; i valuator_mask_size(mask); i++) { if (valuator_mask_isset(mask, i)) @@ -216,6 +218,8 @@ set_valuators(DeviceIntPtr dev, DeviceEvent* event, ValuatorMask *mask) event-valuators.data_frac[i] = dev-last.remainder[i] * (1 16) * (1 16); } +else if (valuator_get_mode(dev, i) == Absolute) +event-valuators.data[i] = dev-valuator-axisVal[i]; } } -- 1.7.4.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: [PATCH] Fix unset valuator handling for XI 1.x valuator events again
On 04/06/2011 07:10 PM, Jeremy Huddleston wrote: why do we no longer need to check the valuators.mask? It looks like (from just the src changes here) that the !absolute (relative) case would still need to be handled. if (BitIsOn(ev-valuators.mask, xv-first_valuator + j)) valuators[j] = ev-valuators.data[xv-first_valuator + j]; else valuators[j] = 0; This patch just shifts the logic to the internal event creation time instead of the XI 1.x event conversion time. Each internal event is memset in init_event() (called by GetPointerEvents and friends functions). This takes care of the relative valuator handling where values should be 0. Then we have to ensure that the old absolute valuator values are copied into the XI 1.x events. We do this in set_valuators() by setting the old valuator values in the internal event if the valuator wasn't changed. By the time we reach getValuatorEvents, all the valuator data is as it should be in the XI 1.x event, and the valuator range is still calculated using the internal event valuator mask. For XI 2 events, the old valuator values aren't sent because the valuators are fully masked in the events. Core events still don't have valuators. So I'm hoping this will kill the bug dead once and for all :). Thanks, -- Chase On Apr 6, 2011, at 11:51, Chase Douglas wrote: Set the valuator values for unset masked absolute valuators in the internal device event. This ensures the values will always be correct in getValuatorEvents even if the device has been removed. Signed-off-by: Chase Douglas chase.doug...@canonical.com --- dix/eventconvert.c | 14 +- dix/getevents.c|4 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/dix/eventconvert.c b/dix/eventconvert.c index a5fe0a9..14731f4 100644 --- a/dix/eventconvert.c +++ b/dix/eventconvert.c @@ -383,12 +383,12 @@ getValuatorEvents(DeviceEvent *ev, deviceValuator *xv) int i; int state = 0; int first_valuator, num_valuators; -DeviceIntPtr dev = NULL; num_valuators = countValuators(ev, first_valuator); if (num_valuators 0) { +DeviceIntPtr dev = NULL; dixLookupDevice(dev, ev-deviceid, serverClient, DixUseAccess); /* State needs to be assembled BEFORE the device is updated. */ state = (dev dev-key) ? XkbStateFieldFromRec(dev-key-xkbInfo-state) : 0; @@ -405,14 +405,10 @@ getValuatorEvents(DeviceEvent *ev, deviceValuator *xv) xv-deviceid = ev-deviceid; xv-device_state = state; -for (j = 0; j xv-num_valuators; j++) { -if (BitIsOn(ev-valuators.mask, xv-first_valuator + j)) -valuators[j] = ev-valuators.data[xv-first_valuator + j]; -else if (dev-valuator-axes[xv-first_valuator + j].mode == Absolute) -valuators[j] = dev-valuator-axisVal[xv-first_valuator + j]; -else -valuators[j] = 0; -} +/* Unset valuators in masked valuator events have the proper data values + * in the case of an absolute axis in between two set valuators. */ +for (j = 0; j xv-num_valuators; j++) +valuators[j] = ev-valuators.data[xv-first_valuator + j]; if (i + 6 num_valuators) xv-deviceid |= MORE_EVENTS; diff --git a/dix/getevents.c b/dix/getevents.c index c3b7ced..644b388 100644 --- a/dix/getevents.c +++ b/dix/getevents.c @@ -205,6 +205,8 @@ set_valuators(DeviceIntPtr dev, DeviceEvent* event, ValuatorMask *mask) { int i; +/* Set the data to the previous value for unset absolute axes. The values + * may be used when sent as part of an XI 1.x valuator event. */ for (i = 0; i valuator_mask_size(mask); i++) { if (valuator_mask_isset(mask, i)) @@ -216,6 +218,8 @@ set_valuators(DeviceIntPtr dev, DeviceEvent* event, ValuatorMask *mask) event-valuators.data_frac[i] = dev-last.remainder[i] * (1 16) * (1 16); } +else if (valuator_get_mode(dev, i) == Absolute) +event-valuators.data[i] = dev-valuator-axisVal[i]; } } -- 1.7.4.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] Xext: use EXT_MASK macro instead of manual 0x7f
Signed-off-by: Peter Hutterer peter.hutte...@who-t.net --- Xext/geext.c |9 + 1 files changed, 5 insertions(+), 4 deletions(-) diff --git a/Xext/geext.c b/Xext/geext.c index b37c1a0..3c4e640 100644 --- a/Xext/geext.c +++ b/Xext/geext.c @@ -49,6 +49,7 @@ static const int version_requests[] = { static void SGEGenericEvent(xEvent* from, xEvent* to); #define NUM_VERSION_REQUESTS (sizeof (version_requests) / sizeof (version_requests[0])) +#define EXT_MASK(ext) ((ext) 0x7F) // /*request handlers */ @@ -191,8 +192,8 @@ SGEGenericEvent(xEvent* from, xEvent* to) return; } -if (GEExtensions[gefrom-extension 0x7F].evswap) -GEExtensions[gefrom-extension 0x7F].evswap(gefrom, geto); +if (GEExtensions[EXT_MASK(gefrom-extension)].evswap) +GEExtensions[EXT_MASK(gefrom-extension)].evswap(gefrom, geto); } /* Init extension, register at server. @@ -241,11 +242,11 @@ void GERegisterExtension(int extension, void (*ev_swap)(xGenericEvent* from, xGenericEvent* to)) { -if ((extension 0x7F) = MAXEXTENSIONS) +if ((EXT_MASK(extension)) = MAXEXTENSIONS) FatalError(GE: extension MAXEXTENSIONS. This should not happen.\n); /* extension opcodes are 128, might as well save some space here */ -GEExtensions[extension 0x7f].evswap = ev_swap; +GEExtensions[EXT_MASK(extension)].evswap = ev_swap; } -- 1.7.4.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: On complexifigurability
On Tue, Apr 05, 2011 at 06:37:47PM +0100, Daniel Stone wrote: It's about organization of the code really, which leads to correct driver API usage, so we could talk about deprecation and proper versioning of unused/old/unmaintained drivers - we would be enforcing ourselves to use correct interfaces. Privately. So, I'm sure if we pick 90% of the code inside Xorg DDX we will see that they are used only for old drivers. IOW, why a newer server needs to support a very old driver? Sure, but how does #ifdef'ing the pointer acceleration code help here? For the most part[0], it's completely invisible to drivers, hidden behind GetPointerEvents(). And if you want to talk about cleaning up our interfaces so that drivers don't have to care about pointless and esoteric server implementation details, how about fixing the GetPointerEvents API? At the moment, basically every single GPE user does this: static EventList *events = InitEventList(GetMaximumEventsNum()); int nev; OsBlockSignals(); nev = GetPointerEvents(dev, MotionNotify, ...); for (i = 0; i nev; i++) mieqEnqueue(dev, (InternalEvent *)((events + i)-event)); OsReleaseSignals(); This could just turn into: PostPointerEvents(dev, MotionNotify, ...); And the server could take care of these implementation details itself, and no-one except myself and Peter would have to care anymore. And I wouldn't have to have a patch that bumps GetMaximumEventsNum()'s return up to 49 or possibly 97 for pathological cases when using smooth scrolling, because we can enqueue an unlimited number of events. note that no driver cares about the enqueuing. they just call xf86Post{Button|Motion|...}Event and be done with it. the enqueuing is in-server only and we could change this without an abi bump. With the ABI 12 changes to our input drivers, no driver does more about the history size than passing it into InitValuatorClassDeviceStruct(). So we could even safely ignore this right, let alone just removing it from the next ABI. the EventList stuff is also confined to the server only (and mostly a legacy of MPX pre 1.6), so could be cleaned quite simply if someone cares enough. as for defining an actual input API - yeah, other problem, partly made harder by the need to support multiple server versions in most drivers. It's a bit more difficult (not impossible though) to just create a xf86InputDriverAPI.h and have that as the single include in all drivers (minus misc.h, list.h, etc.). Of course, if you go down that path you'd probably want to make DeviceIntRec opaque to the drivers and have functions defined to access everything. Not screwing those up is the bulk of the work, really. Cheers, Peter Now _that's_ an API cleanup! It simplifies things, makes things a lot easier for drivers, and gets a lot of stuff no-one should ever have to care about out of the way. And removes opportunities for getting things wrong. Hell, it even brings us closer to having an actual API rather than a set of random headers that we export for external modules to use, with some rough versioning. If you do that, it means the entire mieq, EventList and Get*Events API can become deprecated for driver usage, giving us the opportunity in future to remove a whole lot of driver API. When you say API cleanup, this is the kind of thing I think about. Not just another untested codepath that seems to just be randomly added for its own sake, not providing anyone anywhere any benefit. And doesn't change the API at all. Also, in fairness, can I just add that the pointer acceleration code is currently quite well organised and very well segregated? GetPointerEvents calls accelPointer() which, well, accelerates the pointer, and all the actual acceleration code is hidden in ptrveloc.c. So if your goal is modularisation and organisation -- we're already there. Cheers, Daniel [0]: Unless you're really cool like Synaptics and want to implement your own acceleration profile. ___ 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] Fix unset valuator handling for XI 1.x valuator events again
On Wed, Apr 06, 2011 at 02:51:45PM -0400, Chase Douglas wrote: Set the valuator values for unset masked absolute valuators in the internal device event. This ensures the values will always be correct in getValuatorEvents even if the device has been removed. Signed-off-by: Chase Douglas chase.doug...@canonical.com correct enough, given the hack that's required. merged, thanks. Cheers, Peter --- dix/eventconvert.c | 14 +- dix/getevents.c|4 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/dix/eventconvert.c b/dix/eventconvert.c index a5fe0a9..14731f4 100644 --- a/dix/eventconvert.c +++ b/dix/eventconvert.c @@ -383,12 +383,12 @@ getValuatorEvents(DeviceEvent *ev, deviceValuator *xv) int i; int state = 0; int first_valuator, num_valuators; -DeviceIntPtr dev = NULL; num_valuators = countValuators(ev, first_valuator); if (num_valuators 0) { +DeviceIntPtr dev = NULL; dixLookupDevice(dev, ev-deviceid, serverClient, DixUseAccess); /* State needs to be assembled BEFORE the device is updated. */ state = (dev dev-key) ? XkbStateFieldFromRec(dev-key-xkbInfo-state) : 0; @@ -405,14 +405,10 @@ getValuatorEvents(DeviceEvent *ev, deviceValuator *xv) xv-deviceid = ev-deviceid; xv-device_state = state; -for (j = 0; j xv-num_valuators; j++) { -if (BitIsOn(ev-valuators.mask, xv-first_valuator + j)) -valuators[j] = ev-valuators.data[xv-first_valuator + j]; -else if (dev-valuator-axes[xv-first_valuator + j].mode == Absolute) -valuators[j] = dev-valuator-axisVal[xv-first_valuator + j]; -else -valuators[j] = 0; -} +/* Unset valuators in masked valuator events have the proper data values + * in the case of an absolute axis in between two set valuators. */ +for (j = 0; j xv-num_valuators; j++) +valuators[j] = ev-valuators.data[xv-first_valuator + j]; if (i + 6 num_valuators) xv-deviceid |= MORE_EVENTS; diff --git a/dix/getevents.c b/dix/getevents.c index c3b7ced..644b388 100644 --- a/dix/getevents.c +++ b/dix/getevents.c @@ -205,6 +205,8 @@ set_valuators(DeviceIntPtr dev, DeviceEvent* event, ValuatorMask *mask) { int i; +/* Set the data to the previous value for unset absolute axes. The values + * may be used when sent as part of an XI 1.x valuator event. */ for (i = 0; i valuator_mask_size(mask); i++) { if (valuator_mask_isset(mask, i)) @@ -216,6 +218,8 @@ set_valuators(DeviceIntPtr dev, DeviceEvent* event, ValuatorMask *mask) event-valuators.data_frac[i] = dev-last.remainder[i] * (1 16) * (1 16); } +else if (valuator_get_mode(dev, i) == Absolute) +event-valuators.data[i] = dev-valuator-axisVal[i]; } } -- 1.7.4.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
Splitting protocol screens from the driver interface
Hi Dave, I like the idea of separating the driver from the protocol screens, and am interested in helping out. I think it might be easiest in the short term to let the overlay functionality I talked about break and then I can add it back later in whatever form makes the most sense with the new architecture (which I hope will let overlays and Composite work together, that would be awesome). As James mentioned on IRC, the biggest issue is probably going to be access to the window clip lists, which we definitely need for GLX but can probably live without for the core X driver. Is there a design document or something somewhere that we can take a look at to get a better understanding of what your intended target looks like? -- Aaron ___ 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
[PULL 1.10] input fixes for 1.10
Note these don't yet include Chase' valuator fixes, I'll send a separate pull request for those once I've merged and tested them. The following changes since commit 49afcc76a1c799e18931cc762431975c5c059437: XQuartz: Bump bundle version to 2.6.2 (2011-04-04 09:38:35 -0700) are available in the git repository at: git://people.freedesktop.org/~whot/xserver.git server-1.10-branch Alan Coopersmith (1): XkbAddGeomProperty: Fix checks for malloc failure Bryce Harrington (1): Check for OOM condition in XISendDeviceHierarchyEvent Daniel Stone (2): Input: Actually send Xi 1.x DeviceStateNotify events Input: Don't freeze unrelated devices in DeliverGrabbedEvent Matthieu Herrb (4): Xi: take XI2 requests into account also for the swapping case. Xi: add XI_Focus{In,Out} to swapped events. Xext: fix test on extension number for the swapped case. Xi: fix querydevice request swapping Peter Hutterer (2): dix: release all buttons and keys before reattaching a device (#34182) man: list the drivers that are ignored when hotplugging (#35209) Simon Thum (2): fix percent options parsing xfree86: allow to check for options without warnings in the log Xext/geext.c |2 +- Xi/exevents.c|2 +- Xi/extinit.c |7 ++- Xi/xichangehierarchy.c |2 + Xi/xiquerydevice.c |3 +- dix/devices.c| 42 dix/events.c |7 +-- hw/xfree86/common/xf86Option.c | 77 -- hw/xfree86/doc/man/xorg.conf.man | 13 +- xkb/XKBGAlloc.c |4 +- 10 files changed, 117 insertions(+), 42 deletions(-) ___ 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] Xext: use EXT_MASK macro instead of manual 0x7f
On 04/ 6/11 05:48 PM, Peter Hutterer wrote: Signed-off-by: Peter Hutterer peter.hutte...@who-t.net +if ((EXT_MASK(extension)) = MAXEXTENSIONS) You could probably drop a set of parens there, but that's just a minor style nit. Either way, Reviewed-by: Alan Coopersmith alan.coopersm...@oracle.com -- -Alan Coopersmith-alan.coopersm...@oracle.com Oracle Solaris Platform Engineering: X Window System ___ 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
[PULL] valuator handling fix
One more fix for XI 1.x valuator handling. The following changes since commit 3085b178626c957854385c7a88a05ec3c7eb74f3: Merge remote-tracking branch 'jturney/master' (2011-04-06 08:34:10 -0700) are available in the git repository at: git://people.freedesktop.org/~whot/xserver.git for-keith Chase Douglas (1): Fix unset valuator handling for XI 1.x valuator events again Peter Hutterer (1): Xext: use EXT_MASK macro instead of manual 0x7f Xext/geext.c |9 + dix/eventconvert.c | 14 +- dix/getevents.c|4 3 files changed, 14 insertions(+), 13 deletions(-) ___ 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: [PULL 1.10] input fixes for 1.10
Merged. Thanks. 49afcc7..1f51fe4 server-1.10-branch - server-1.10-branch On Apr 6, 2011, at 18:12, Peter Hutterer wrote: Note these don't yet include Chase' valuator fixes, I'll send a separate pull request for those once I've merged and tested them. The following changes since commit 49afcc76a1c799e18931cc762431975c5c059437: XQuartz: Bump bundle version to 2.6.2 (2011-04-04 09:38:35 -0700) are available in the git repository at: git://people.freedesktop.org/~whot/xserver.git server-1.10-branch Alan Coopersmith (1): XkbAddGeomProperty: Fix checks for malloc failure Bryce Harrington (1): Check for OOM condition in XISendDeviceHierarchyEvent Daniel Stone (2): Input: Actually send Xi 1.x DeviceStateNotify events Input: Don't freeze unrelated devices in DeliverGrabbedEvent Matthieu Herrb (4): Xi: take XI2 requests into account also for the swapping case. Xi: add XI_Focus{In,Out} to swapped events. Xext: fix test on extension number for the swapped case. Xi: fix querydevice request swapping Peter Hutterer (2): dix: release all buttons and keys before reattaching a device (#34182) man: list the drivers that are ignored when hotplugging (#35209) Simon Thum (2): fix percent options parsing xfree86: allow to check for options without warnings in the log Xext/geext.c |2 +- Xi/exevents.c|2 +- Xi/extinit.c |7 ++- Xi/xichangehierarchy.c |2 + Xi/xiquerydevice.c |3 +- dix/devices.c| 42 dix/events.c |7 +-- hw/xfree86/common/xf86Option.c | 77 -- hw/xfree86/doc/man/xorg.conf.man | 13 +- xkb/XKBGAlloc.c |4 +- 10 files changed, 117 insertions(+), 42 deletions(-) ___ 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: Splitting protocol screens from the driver interface
On Thu, Apr 7, 2011 at 10:59 AM, Aaron Plattner aplatt...@nvidia.com wrote: Hi Dave, I like the idea of separating the driver from the protocol screens, and am interested in helping out. I think it might be easiest in the short term to let the overlay functionality I talked about break and then I can add it back later in whatever form makes the most sense with the new architecture (which I hope will let overlays and Composite work together, that would be awesome). As James mentioned on IRC, the biggest issue is probably going to be access to the window clip lists, which we definitely need for GLX but can probably live without for the core X driver. Is there a design document or something somewhere that we can take a look at to get a better understanding of what your intended target looks like? I'm not sure I'd call it much of a design document, but I try to put a coherent stream of words into lyx this morning, the result is at http://people.freedesktop.org/~airlied/xredesign.pdf The src will appears in my personal git repos soon. There is a lot of gaps in that document but I'm hoping it'll at least be enough for people to propose questions. I've got about 5-6 hacked up trees here with various forays into pieces of it all. Dave. ___ 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: [PULL] valuator handling fix
On Thu, 7 Apr 2011 12:47:27 +1000, Peter Hutterer peter.hutte...@who-t.net wrote: Chase Douglas (1): Fix unset valuator handling for XI 1.x valuator events again Peter Hutterer (1): Xext: use EXT_MASK macro instead of manual 0x7f Merged. 3085b17..7aad7db master - master -- keith.pack...@intel.com pgpe6k0uhZB8d.pgp Description: PGP signature ___ 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: [PULL] [xorg/xserver] XRes v1.2
On Wed, 06 Apr 2011 12:16:23 +0300, Erkki Seppala erkki.sepp...@vincit.fi wrote: On 05.04.2011 18:58, Keith Packard wrote: On Tue, 05 Apr 2011 18:38:41 +0300, Erkki Seppalaerkki.sepp...@vincit.fi wrote: On 05.04.2011 17:54, Keith Packard wrote: Please just fix users of the existing 'Hash' function to call HashResourceID directly. Hm, are you sure? It looks like this afterwards: +Hash(int client, XID id) Am I looking at the wrong branch? (this is client-tracking-v2) You are looking at the correct branch. It was the diff replacing all existing calls to Hash with HashResourceID, resulting in some duplicity: Ok, just a stale git repository; perhaps there was some lag between your mail and the git tree being visible or something. This looks ready to merge, and I would be replying with such a message if test/Makefile.am wasn't separately updated since the place you branched from. -- keith.pack...@intel.com pgppPw3Xp3wux.pgp Description: PGP signature ___ 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