From matthieu at herrb.eu Mon Sep 1 03:00:50 2014 From: matthieu at herrb.eu (Matthieu Herrb) Date: Mon, 1 Sep 2014 12:00:50 +0200 Subject: [PATCH libSM 2/2] Get rid of strcpy() in the HAVE_UUID_CREATE case. In-Reply-To: <54039908.6040505@bfs.de> References: <1409508682-30776-1-git-send-email-matthieu@herrb.eu> <1409508682-30776-2-git-send-email-matthieu@herrb.eu> <54039908.6040505@bfs.de> Message-ID: <20140901100050.GB19667@blues.laas.fr> On Sun, Aug 31, 2014 at 11:52:08PM +0200, walter harms wrote: > > > Am 31.08.2014 20:11, schrieb Matthieu Herrb: > > Even though this use was safe, some linkers produce a warning > > when strcpy() is used, and this is the only use in libSM. > > --- > > src/sm_genid.c | 9 ++++----- > > 1 file changed, 4 insertions(+), 5 deletions(-) > > > > diff --git src/sm_genid.c src/sm_genid.c > > index ec2e668..9535cd1 100644 > > --- src/sm_genid.c > > +++ src/sm_genid.c > > @@ -110,16 +110,15 @@ SmsGenerateClientID(SmsConn smsConn) > > char *temp; > > uuid_t uuid; > > uint32_t status; > > + size_t len; > > > > uuid_create(&uuid, &status); > > > > uuid_to_string(&uuid, &temp, &status); > > > > - if ((id = malloc (strlen (temp) + 2)) != NULL) > > - { > > - id[0] = '2'; > > - strcpy (id+1, temp); > > - } > > + len = strlen(temp) + 2; > > + if ((id = malloc(len)) != NULL) > > + snprintf(id, len, "2%s", temp); > > > > free(temp); > > > > perhaps asprintf() ? > asprintf(&id,"2%s",temp); asprintf() is not available everywhere (It is in OpenBSD though) and providing a replacement in libraries is a bit awkward. May be I can assume that if uuid_create() is available, asprintf() also is there ? But for such a simple use case, I think I prefer to stick to that malloc+snprintf() pattern to not give others the impression that asprintf() can be used freely in X libs. -- Matthieu Herrb From thomas.petazzoni at free-electrons.com Tue Sep 2 13:03:14 2014 From: thomas.petazzoni at free-electrons.com (Thomas Petazzoni) Date: Tue, 2 Sep 2014 22:03:14 +0200 Subject: [PATCH] os/log: adjust gcc version conditions for #pragma Message-ID: <1409688194-5733-1-git-send-email-thomas.petazzoni@free-electrons.com> In commit e67f2d7e0f9189beb2907fa06cff5ecc7f35f922 ("gcc 4.2.1 doesn't support #pragma GCC diagnostic ignored"), some compile time conditionals were added around the #pragma usage. Those conditionals ensure that the #pragma are not used on gcc <= 4.2. However, the usage of #pragma diagnostic inside functions was only added in gcc 4.6, and a build failure is therefore experienced with gcc 4.5: log.c: In function 'LogInit': log.c:199:9: error: #pragma GCC diagnostic not allowed inside functions log.c:201:9: warning: format not a string literal, argument types not checked log.c:212:9: error: #pragma GCC diagnostic not allowed inside functions log.c:214:17: warning: format not a string literal, argument types not checked $ ./host/usr/bin/powerpc-linux-gnu-gcc -v [...] gcc version 4.5.2 (Sourcery G++ Lite 2011.03-38) This patch therefore adjusts the compile time conditionals to make sure the #pragma is not used on gcc <= 4.5, and only used on gcc >= 4.6. Signed-off-by: Thomas Petazzoni --- os/log.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/os/log.c b/os/log.c index 2a721b9..629021e 100644 --- a/os/log.c +++ b/os/log.c @@ -195,7 +195,7 @@ LogInit(const char *fname, const char *backup) char *logFileName = NULL; if (fname && *fname) { -#if __GNUC__ > 4 || __GNUC__ == 4 && __GNUC_MINOR__ > 2 +#if __GNUC__ > 4 || __GNUC__ == 4 && __GNUC_MINOR__ > 5 #pragma GCC diagnostic ignored "-Wformat-nonliteral" #endif if (asprintf(&logFileName, fname, display) == -1) @@ -208,7 +208,7 @@ LogInit(const char *fname, const char *backup) char *suffix; char *oldLog; -#if __GNUC__ > 4 || __GNUC__ == 4 && __GNUC_MINOR__ > 2 +#if __GNUC__ > 4 || __GNUC__ == 4 && __GNUC_MINOR__ > 5 #pragma GCC diagnostic ignored "-Wformat-nonliteral" #endif if ((asprintf(&suffix, backup, display) == -1) || -- 2.0.0 From peter.hutterer at who-t.net Tue Sep 2 19:20:06 2014 From: peter.hutterer at who-t.net (Peter Hutterer) Date: Wed, 3 Sep 2014 12:20:06 +1000 Subject: [PATCH synaptics] eventcomm: ensure we're on the same clock as the server Message-ID: <20140903022006.GA15813@jelly.redhat.com> Default on evdev devices is CLOCK_REALTIME. If that clock falls behind the server's CLOCK_MONOTONIC, motion after a clickpad click may be delayed by the difference in the clocks. In detail: When the timer func is triggered, GetTimeInMillis() which is CLOCK_MONOTONIC, is stored as hwState->millis. The eventcomm backend uses struct input_event time (CLOCK_REALTIME). When we read events from the device, if the evdev time is less than the server time, the fix for (#48777) sets the current event time to hwState->millis. Until the evdev time overtakes that stored time, all events have the hwState->millis time. If during that time a clickpad triggers a physical click, clickpad_click_millis is set to hwState->millis + the ignore-motion timeout. Thus, all motion is ignored until the event time overtakes that stored time. The whole issue is further enhanced by us unconditionally setting the timer func if we get any events, which is a separate issue anyway. Signed-off-by: Peter Hutterer --- src/eventcomm.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/eventcomm.c b/src/eventcomm.c index 845f547..4a646af 100644 --- a/src/eventcomm.c +++ b/src/eventcomm.c @@ -39,6 +39,7 @@ #include #include #include +#include #include "synproto.h" #include "synapticsstr.h" #include @@ -88,6 +89,8 @@ struct eventcomm_proto_data { struct libevdev *evdev; enum libevdev_read_flag read_flag; + + int have_monotonic_clock; }; #ifdef HAVE_LIBEVDEV_DEVICE_LOG_FUNCS @@ -234,6 +237,7 @@ EventDeviceOnHook(InputInfoPtr pInfo, SynapticsParameters * para) SynapticsPrivate *priv = (SynapticsPrivate *) pInfo->private; struct eventcomm_proto_data *proto_data = (struct eventcomm_proto_data *) priv->proto_data; + int ret; if (libevdev_get_fd(proto_data->evdev) != -1) { struct input_event ev; @@ -253,7 +257,6 @@ EventDeviceOnHook(InputInfoPtr pInfo, SynapticsParameters * para) if (para->grab_event_device) { /* Try to grab the event device so that data don't leak to /dev/input/mice */ - int ret; ret = libevdev_grab(proto_data->evdev, LIBEVDEV_GRAB); if (ret < 0) { @@ -265,6 +268,9 @@ EventDeviceOnHook(InputInfoPtr pInfo, SynapticsParameters * para) proto_data->need_grab = FALSE; + ret = libevdev_set_clock_id(proto_data->evdev, CLOCK_MONOTONIC); + proto_data->have_monotonic_clock = (ret == 0); + InitializeTouch(pInfo); return TRUE; @@ -682,7 +688,10 @@ EventReadHwState(InputInfoPtr pInfo, switch (ev.code) { case SYN_REPORT: hw->numFingers = count_fingers(pInfo, comm); - hw->millis = 1000 * ev.time.tv_sec + ev.time.tv_usec / 1000; + if (proto_data->have_monotonic_clock) + hw->millis = 1000 * ev.time.tv_sec + ev.time.tv_usec / 1000; + else + hw->millis = GetTimeInMillis(); SynapticsCopyHwState(hwRet, hw); return TRUE; } -- 1.9.3 From hdegoede at redhat.com Wed Sep 3 01:48:47 2014 From: hdegoede at redhat.com (Hans de Goede) Date: Wed, 03 Sep 2014 10:48:47 +0200 Subject: [PATCH synaptics] eventcomm: ensure we're on the same clock as the server In-Reply-To: <20140903022006.GA15813@jelly.redhat.com> References: <20140903022006.GA15813@jelly.redhat.com> Message-ID: <5406D5EF.90101@redhat.com> Hi, On 09/03/2014 04:20 AM, Peter Hutterer wrote: > Default on evdev devices is CLOCK_REALTIME. If that clock falls behind the > server's CLOCK_MONOTONIC, motion after a clickpad click may be delayed by the > difference in the clocks. > > In detail: > When the timer func is triggered, GetTimeInMillis() which is CLOCK_MONOTONIC, > is stored as hwState->millis. The eventcomm backend uses struct > input_event time (CLOCK_REALTIME). > > When we read events from the device, if the evdev time is less than the server > time, the fix for (#48777) sets the current event time to hwState->millis. > Until the evdev time overtakes that stored time, all events have the > hwState->millis time. > > If during that time a clickpad triggers a physical click, > clickpad_click_millis is set to hwState->millis + the ignore-motion timeout. > Thus, all motion is ignored until the event time overtakes that stored > time. > > The whole issue is further enhanced by us unconditionally setting the timer > func if we get any events, which is a separate issue anyway. > > Signed-off-by: Peter Hutterer Looks good: Reviewed-by: Hans de Goede Regards, Hans > --- > src/eventcomm.c | 13 +++++++++++-- > 1 file changed, 11 insertions(+), 2 deletions(-) > > diff --git a/src/eventcomm.c b/src/eventcomm.c > index 845f547..4a646af 100644 > --- a/src/eventcomm.c > +++ b/src/eventcomm.c > @@ -39,6 +39,7 @@ > #include > #include > #include > +#include > #include "synproto.h" > #include "synapticsstr.h" > #include > @@ -88,6 +89,8 @@ struct eventcomm_proto_data { > > struct libevdev *evdev; > enum libevdev_read_flag read_flag; > + > + int have_monotonic_clock; > }; > > #ifdef HAVE_LIBEVDEV_DEVICE_LOG_FUNCS > @@ -234,6 +237,7 @@ EventDeviceOnHook(InputInfoPtr pInfo, SynapticsParameters * para) > SynapticsPrivate *priv = (SynapticsPrivate *) pInfo->private; > struct eventcomm_proto_data *proto_data = > (struct eventcomm_proto_data *) priv->proto_data; > + int ret; > > if (libevdev_get_fd(proto_data->evdev) != -1) { > struct input_event ev; > @@ -253,7 +257,6 @@ EventDeviceOnHook(InputInfoPtr pInfo, SynapticsParameters * para) > > if (para->grab_event_device) { > /* Try to grab the event device so that data don't leak to /dev/input/mice */ > - int ret; > > ret = libevdev_grab(proto_data->evdev, LIBEVDEV_GRAB); > if (ret < 0) { > @@ -265,6 +268,9 @@ EventDeviceOnHook(InputInfoPtr pInfo, SynapticsParameters * para) > > proto_data->need_grab = FALSE; > > + ret = libevdev_set_clock_id(proto_data->evdev, CLOCK_MONOTONIC); > + proto_data->have_monotonic_clock = (ret == 0); > + > InitializeTouch(pInfo); > > return TRUE; > @@ -682,7 +688,10 @@ EventReadHwState(InputInfoPtr pInfo, > switch (ev.code) { > case SYN_REPORT: > hw->numFingers = count_fingers(pInfo, comm); > - hw->millis = 1000 * ev.time.tv_sec + ev.time.tv_usec / 1000; > + if (proto_data->have_monotonic_clock) > + hw->millis = 1000 * ev.time.tv_sec + ev.time.tv_usec / 1000; > + else > + hw->millis = GetTimeInMillis(); > SynapticsCopyHwState(hwRet, hw); > return TRUE; > } > From manuel.montezelo at gmail.com Wed Sep 3 13:28:55 2014 From: manuel.montezelo at gmail.com (Manuel A. Fernandez Montecelo) Date: Wed, 3 Sep 2014 21:28:55 +0100 Subject: [PATCH cf] Add support for OpenRISC 1000 (or1k) CPU In-Reply-To: <53e942b6.afcdb40a.0cf3.1d96@mx.google.com> References: <53e942b6.afcdb40a.0cf3.1d96@mx.google.com> Message-ID: Hi, Does the lack of replies to the patch mean that it's not considered, or it will be queued for a later date when gathering changes for the next release? For a bit of background information about the patch, this is what I replied when somebody in private asked me about some aspects of the patch, in particular why it was including changes for tools/files which are regarded as obsolete. ----------- We're creating a port for this architecture in Debian (more than 6 thousand packages already availabe), and imake is shipped as part of the package "xutils-dev" [1]. We do not know (and it's in fact impossible to discard) if somebody in the wide world is using the imake software or not through Debian, Ubuntu or other derivatives. It seems to be used at least by cernlib, according to the description [2]. I started creating the patch for only linux.cf back in march, IIRC. But when I decided to submit upstream, I looked at what had happened with the new architecture of Arm64 (added in 2013), and I guessed that if support in all files was added that so recently, it would be desired or even that you requested me to do that for this architecture. But I can remove that if you prefer. rasmol, vnc4, isdnutils, xcal, wnn6, xaw3d and a few others definitely need linux.cf to get compiled; I don't know if we will need the rest yet. [1] https://packages.debian.org/sid/xutils-dev [2] https://packages.debian.org/sid/cernlib-base-dev : "Also included are a contributed set of Autoconf macros to test for CERNLIB libraries, and a set of Imake macros to allow CERNLIB modules to be built out-of-tree." Cheers. -- Manuel A. Fernandez Montecelo From alan.coopersmith at oracle.com Wed Sep 3 13:31:29 2014 From: alan.coopersmith at oracle.com (Alan Coopersmith) Date: Wed, 03 Sep 2014 13:31:29 -0700 Subject: [PATCH cf] Add support for OpenRISC 1000 (or1k) CPU In-Reply-To: References: <53e942b6.afcdb40a.0cf3.1d96@mx.google.com> Message-ID: <54077AA1.4050907@oracle.com> On 09/ 3/14 01:28 PM, Manuel A. Fernandez Montecelo wrote: > Hi, > > Does the lack of replies to the patch mean that it's not considered, > or it will be queued for a later date when gathering changes for the > next release? It mostly means that absolutely positively no one in the entire world actually cares enough about the Imake cf files to do anything with it. Maybe one of us will pick it up going through the patch queue someday, but I wouldn't hold your breath. -- -Alan Coopersmith- alan.coopersmith at oracle.com Oracle Solaris Engineering - http://blogs.oracle.com/alanc From manuel.montezelo at gmail.com Wed Sep 3 13:50:19 2014 From: manuel.montezelo at gmail.com (Manuel A. Fernandez Montecelo) Date: Wed, 3 Sep 2014 21:50:19 +0100 Subject: [PATCH cf] Add support for OpenRISC 1000 (or1k) CPU In-Reply-To: <54077AA1.4050907@oracle.com> References: <53e942b6.afcdb40a.0cf3.1d96@mx.google.com> <54077AA1.4050907@oracle.com> Message-ID: 2014-09-03 21:31 GMT+01:00 Alan Coopersmith : > On 09/ 3/14 01:28 PM, Manuel A. Fernandez Montecelo wrote: >> >> Hi, >> >> Does the lack of replies to the patch mean that it's not considered, >> or it will be queued for a later date when gathering changes for the >> next release? > > > It mostly means that absolutely positively no one in the entire world > actually cares enough about the Imake cf files to do anything with it. > > Maybe one of us will pick it up going through the patch queue someday, > but I wouldn't hold your breath. OK, thanks for the feedback. Cheers. -- Manuel A. Fernandez Montecelo From keithp at keithp.com Thu Sep 4 08:36:07 2014 From: keithp at keithp.com (Keith Packard) Date: Thu, 4 Sep 2014 08:36:07 -0700 Subject: [PATCH] glx/present: Only send GLX_BufferSwapComplete for PresentCompleteKindPixmap Message-ID: <1409844967-19450-1-git-send-email-keithp@keithp.com> Present didn't provide the 'kind' argument to the present_complete_notify hook that GLX uses to construct GLX_BufferSwapComplete events, so GLX was reporting events for PresentCompleteKindMSC notifications, which resulted in duplicate GLX_BufferSwapComplete events and crashes in clutter. See the gnome bug: https://bugzilla.gnome.org/show_bug.cgi?id=733282 Signed-off-by: Keith Packard --- glx/glxcmds.c | 7 +++++-- present/present.h | 1 + present/present_event.c | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/glx/glxcmds.c b/glx/glxcmds.c index 2fc3f4c..d11c667 100644 --- a/glx/glxcmds.c +++ b/glx/glxcmds.c @@ -2508,13 +2508,16 @@ __glXsendSwapEvent(__GLXdrawable *drawable, int type, CARD64 ust, #if PRESENT static void -__glXpresentCompleteNotify(WindowPtr window, CARD8 present_mode, CARD32 serial, - uint64_t ust, uint64_t msc) +__glXpresentCompleteNotify(WindowPtr window, CARD8 present_kind, CARD8 present_mode, + CARD32 serial, uint64_t ust, uint64_t msc) { __GLXdrawable *drawable; int glx_type; int rc; + if (present_kind != PresentCompleteKindPixmap) + return; + rc = dixLookupResourceByType((void **) &drawable, window->drawable.id, __glXDrawableRes, serverClient, DixGetAttrAccess); diff --git a/present/present.h b/present/present.h index 0e3bdc0..aab2e16 100644 --- a/present/present.h +++ b/present/present.h @@ -116,6 +116,7 @@ extern _X_EXPORT Bool present_screen_init(ScreenPtr screen, present_screen_info_ptr info); typedef void (*present_complete_notify_proc)(WindowPtr window, + CARD8 kind, CARD8 mode, CARD32 serial, uint64_t ust, diff --git a/present/present_event.c b/present/present_event.c index ff57eba..d3a59ea 100644 --- a/present/present_event.c +++ b/present/present_event.c @@ -174,7 +174,7 @@ present_send_complete_notify(WindowPtr window, CARD8 kind, CARD8 mode, CARD32 se } } if (complete_notify) - (*complete_notify)(window, mode, serial, ust, msc); + (*complete_notify)(window, kind, mode, serial, ust, msc); } void -- 2.0.1 From eric at anholt.net Thu Sep 4 10:30:50 2014 From: eric at anholt.net (Eric Anholt) Date: Thu, 04 Sep 2014 10:30:50 -0700 Subject: [PATCH] glx/present: Only send GLX_BufferSwapComplete for PresentCompleteKindPixmap In-Reply-To: <1409844967-19450-1-git-send-email-keithp@keithp.com> References: <1409844967-19450-1-git-send-email-keithp@keithp.com> Message-ID: <878ulzpa2d.fsf@eliezer.anholt.net> Keith Packard writes: > Present didn't provide the 'kind' argument to the > present_complete_notify hook that GLX uses to construct > GLX_BufferSwapComplete events, so GLX was reporting events for > PresentCompleteKindMSC notifications, which resulted in duplicate > GLX_BufferSwapComplete events and crashes in clutter. Reviewed-by: Eric Anholt -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 818 bytes Desc: not available URL: From eric at anholt.net Thu Sep 4 10:59:40 2014 From: eric at anholt.net (Eric Anholt) Date: Thu, 4 Sep 2014 10:59:40 -0700 Subject: [PATCH] glx: Disable indirect GLX contexts by default. Message-ID: <1409853580-12555-1-git-send-email-eric@anholt.net> Almost every situation of someone running indirect GLX is a mistake that results in X Server crashes. Indirect GLX is the cause of regular security vulnerabilities, and rarely provides any capability to the user. Just disable it unless someone wants to enable it for their special use case (using +iglx on the command line). Signed-off-by: Eric Anholt --- I kept saying I as going to send out this patch, and since I just crashed my server a few times from trying to run Xephyr -glamor with a broken driver, it's probably time. os/utils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/os/utils.c b/os/utils.c index f319743..c83f77d 100644 --- a/os/utils.c +++ b/os/utils.c @@ -194,7 +194,7 @@ Bool noGEExtension = FALSE; Bool CoreDump; -Bool enableIndirectGLX = TRUE; +Bool enableIndirectGLX = FALSE; #ifdef PANORAMIX Bool PanoramiXExtensionDisabledHack = FALSE; -- 2.1.0 From peter.hutterer at who-t.net Thu Sep 4 16:01:44 2014 From: peter.hutterer at who-t.net (Peter Hutterer) Date: Fri, 5 Sep 2014 09:01:44 +1000 Subject: X.Org looking for projects and mentors for the Outreach Program for Women Message-ID: <20140904230144.GA20941@jelly.redhat.com> Hi everyone, X.Org will join the Outreach Program for Women (OPW) in Round 9 (December 2014 - March 2015). The OPW is "open to anyone who was assigned female at birth and anyone who identifies as a woman, genderqueer, genderfluid, or genderfree regardless of gender presentation or assigned sex at birth." For more details on the program see https://wiki.gnome.org/OutreachProgramForWomen We've secured funding for one participant and are currently looking for suitable projects and mentors. The scope of the program is "not limited to coding, but include user experience design, graphic design, documentation, web development, marketing, translation and other types of tasks needed to sustain a FOSS project." So if you are interested in mentoring or you can think of a suitable project, please add it to the wiki page or alternatively email me. http://www.x.org/wiki/XorgOPW/ If you are interested in participating and you can think of a suitable project, please do the same and we'll try our best to find a mentor for you. The applications will open on September 22, so let's get some good projects up there by then! Cheers, Peter, on behalf of the X.Org BoD From pomidorabelisima at gmail.com Thu Sep 4 15:43:04 2014 From: pomidorabelisima at gmail.com (poma) Date: Fri, 05 Sep 2014 00:43:04 +0200 Subject: EE Xorg.bin xf86PlatformMatchDriver - Segmentation fault - Server aborting Message-ID: <5408EAF8.2070500@gmail.com> First of all, I welcome the revered readership. Graciously invite you to help me figure out what's going on here. With: - xorg-x11-server-Xorg-1.16.0-5.fc22.x86_64 - xorg-x11-server-Xorg-1.16.0-6.fc22.x86_64 including: http://pkgs.fedoraproject.org/cgit/xorg-x11-server.git/commit/?id=5556cee ... # submitted http://lists.x.org/archives/xorg-devel/2014-June/042826.html # needed to allow X to start on arm and other devices without video on pci buses # There's a slight variant upstream but it doesn't build against 1.16.0 atm # rebase of Rob Clark's patches Patch10300: xorg-non-pci.patch ... %changelog ... * Mon Aug 25 2014 Peter Robinson 1.16.0-5 - re-add support for non pci platform devices ... i.e. http://pkgs.fedoraproject.org/cgit/xorg-x11-server.git/plain/xorg-non-pci.patch this happens *with* *auto-detection* i.e. without "xorg.conf[.d/*.conf]" configuration files: $ cat /var/log/Xorg.0.log [ 29.277] X.Org X Server 1.16.0 Release Date: 2014-07-16 [ 29.277] X Protocol Version 11, Revision 0 [ 29.277] Build Operating System: 3.15.8-200.fc20.x86_64 [ 29.277] Current Operating System: Linux rawhide642 3.17.0-0.rc3.git0.1.fc22.x86_64 #1 SMP Mon Sep 1 14:47:34 UTC 2014 x86_64 [ 29.277] Kernel command line: BOOT_IMAGE=/vmlinuz-3.17.0-0.rc3.git0.1.fc22.x86_64 root=UUID=a07556d2-6fe2-417f-8202-c54c07fd9386 drm_kms_helper.edid_firmware=HDMI-A-1:edid/1920x1080.bin drm_kms_helper.edid_firmware=DVI-I-1:edid/848x480.bin initrd=/initramfs-3.17.0-0.rc3.git0.1.fc22.x86_64.img [ 29.278] Build Date: 26 August 2014 07:34:52PM [ 29.278] Build ID: xorg-x11-server 1.16.0-5.fc22 [ 29.278] Current version of pixman: 0.32.6 [ 29.278] Before reporting problems, check http://wiki.x.org to make sure that you have the latest version. [ 29.278] Markers: (--) probed, (**) from config file, (==) default setting, (++) from command line, (!!) notice, (II) informational, (WW) warning, (EE) error, (NI) not implemented, (??) unknown. [ 29.279] (==) Log file: "/var/log/Xorg.0.log", Time: Thu Sep 4 23:22:47 2014 [ 29.296] (==) Using system config directory "/usr/share/X11/xorg.conf.d" [ 29.296] (==) No Layout section. Using the first Screen section. [ 29.296] (==) No screen section available. Using defaults. [ 29.297] (**) |-->Screen "Default Screen Section" (0) [ 29.297] (**) | |-->Monitor "" [ 29.297] (==) No monitor specified for screen "Default Screen Section". Using a default monitor configuration. [ 29.297] (==) Automatically adding devices [ 29.298] (==) Automatically enabling devices [ 29.298] (==) Automatically adding GPU devices [ 29.298] (==) FontPath set to: catalogue:/etc/X11/fontpath.d, built-ins [ 29.298] (==) ModulePath set to "/usr/lib64/xorg/modules" [ 29.298] (II) The server relies on udev to provide the list of input devices. If no devices become available, reconfigure udev or disable AutoAddDevices. [ 29.298] (II) Loader magic: 0x81de40 [ 29.298] (II) Module ABI versions: [ 29.298] X.Org ANSI C Emulation: 0.4 [ 29.298] X.Org Video Driver: 18.0 [ 29.298] X.Org XInput driver : 21.0 [ 29.298] X.Org Server Extension : 8.0 [ 29.324] (EE) systemd-logind: failed to get session: PID 712 does not belong to any known session [ 29.326] (II) xfree86: Adding drm device (/dev/dri/card1) [ 29.328] (II) xfree86: Adding drm device (/dev/dri/card0) [ 29.380] (--) PCI:*(0:1:0:0) 10de:087d:1849:087d rev 177, Mem @ 0xfb000000/16777216, 0xe0000000/268435456, 0xf6000000/33554432, I/O @ 0x0000ec00/128, BIOS @ 0x????????/131072 [ 29.383] (II) LoadModule: "glx" [ 29.384] (II) Loading /usr/lib64/xorg/modules/extensions/libglx.so [ 29.421] (II) Module glx: vendor="X.Org Foundation" [ 29.430] compiled for 1.16.0, module version = 1.0.0 [ 29.430] ABI class: X.Org Server Extension, version 8.0 [ 29.430] (==) AIGLX enabled [ 29.430] (EE) [ 29.430] (EE) Backtrace: [ 29.432] (EE) 0: /usr/libexec/Xorg.bin (OsLookupColor+0x119) [0x59bea9] [ 29.456] (EE) 1: /lib64/libc.so.6 (__restore_rt+0x0) [0x7fb5636ae98f] [ 29.457] (EE) 2: /usr/libexec/Xorg.bin (xf86PlatformMatchDriver+0x253) [0x49a8b3] [ 29.470] (EE) 3: /usr/libexec/Xorg.bin (config_fini+0x1bcd) [0x49f9fd] [ 29.471] (EE) 4: /usr/libexec/Xorg.bin (config_fini+0x20be) [0x4a031e] [ 29.472] (EE) 5: /usr/libexec/Xorg.bin (InitOutput+0xb56) [0x47bc06] [ 29.499] (EE) 6: /usr/libexec/Xorg.bin (remove_fs_handlers+0x22a) [0x43cfca] [ 29.526] (EE) 7: /lib64/libc.so.6 (__libc_start_main+0xf0) [0x7fb5636990e0] [ 29.527] (EE) 8: /usr/libexec/Xorg.bin (_start+0x29) [0x42761e] [ 29.551] (EE) 9: ? (?+0x29) [0x29] [ 29.552] (EE) [ 29.552] (EE) Segmentation fault at address 0x0 [ 29.552] (EE) Fatal server error: [ 29.552] (EE) Caught signal 11 (Segmentation fault). Server aborting [ 29.552] (EE) [ 29.552] (EE) Please consult the Fedora Project support at http://wiki.x.org for help. [ 29.553] (EE) Please also check the log file at "/var/log/Xorg.0.log" for additional information. [ 29.553] (EE) ~~~~~~~~~~~~~~~~~~~~~~~~~ $ cat /var/log/Xorg.1.log [ 29.315] X.Org X Server 1.16.0 Release Date: 2014-07-16 [ 29.315] X Protocol Version 11, Revision 0 [ 29.315] Build Operating System: 3.15.8-200.fc20.x86_64 [ 29.316] Current Operating System: Linux rawhide642 3.17.0-0.rc3.git0.1.fc22.x86_64 #1 SMP Mon Sep 1 14:47:34 UTC 2014 x86_64 [ 29.316] Kernel command line: BOOT_IMAGE=/vmlinuz-3.17.0-0.rc3.git0.1.fc22.x86_64 root=UUID=a07556d2-6fe2-417f-8202-c54c07fd9386 drm_kms_helper.edid_firmware=HDMI-A-1:edid/1920x1080.bin drm_kms_helper.edid_firmware=DVI-I-1:edid/848x480.bin initrd=/initramfs-3.17.0-0.rc3.git0.1.fc22.x86_64.img [ 29.316] Build Date: 26 August 2014 07:34:52PM [ 29.316] Build ID: xorg-x11-server 1.16.0-5.fc22 [ 29.316] Current version of pixman: 0.32.6 [ 29.316] Before reporting problems, check http://wiki.x.org to make sure that you have the latest version. [ 29.316] Markers: (--) probed, (**) from config file, (==) default setting, (++) from command line, (!!) notice, (II) informational, (WW) warning, (EE) error, (NI) not implemented, (??) unknown. [ 29.323] (==) Log file: "/var/log/Xorg.1.log", Time: Thu Sep 4 23:22:47 2014 [ 29.333] (==) Using system config directory "/usr/share/X11/xorg.conf.d" [ 29.333] (==) No Layout section. Using the first Screen section. [ 29.333] (==) No screen section available. Using defaults. [ 29.333] (**) |-->Screen "Default Screen Section" (0) [ 29.334] (**) | |-->Monitor "" [ 29.334] (==) No monitor specified for screen "Default Screen Section". Using a default monitor configuration. [ 29.352] (==) Automatically adding devices [ 29.352] (==) Automatically enabling devices [ 29.352] (==) Automatically adding GPU devices [ 29.352] (==) FontPath set to: catalogue:/etc/X11/fontpath.d, built-ins [ 29.352] (==) ModulePath set to "/usr/lib64/xorg/modules" [ 29.352] (II) The server relies on udev to provide the list of input devices. If no devices become available, reconfigure udev or disable AutoAddDevices. [ 29.353] (II) Loader magic: 0x81de40 [ 29.353] (II) Module ABI versions: [ 29.353] X.Org ANSI C Emulation: 0.4 [ 29.353] X.Org Video Driver: 18.0 [ 29.353] X.Org XInput driver : 21.0 [ 29.355] X.Org Server Extension : 8.0 [ 29.381] (EE) systemd-logind: failed to get session: PID 714 does not belong to any known session [ 29.382] (II) xfree86: Adding drm device (/dev/dri/card1) [ 29.391] (II) LoadModule: "glx" [ 29.392] (II) Loading /usr/lib64/xorg/modules/extensions/libglx.so [ 29.438] (II) Module glx: vendor="X.Org Foundation" [ 29.438] compiled for 1.16.0, module version = 1.0.0 [ 29.438] ABI class: X.Org Server Extension, version 8.0 [ 29.438] (==) AIGLX enabled [ 29.439] (EE) [ 29.439] (EE) Backtrace: [ 29.441] (EE) 0: /usr/libexec/Xorg.bin (OsLookupColor+0x119) [0x59bea9] [ 29.451] (EE) 1: /lib64/libc.so.6 (__restore_rt+0x0) [0x7fbc053d398f] [ 29.456] (EE) 2: /usr/libexec/Xorg.bin (xf86PlatformMatchDriver+0x253) [0x49a8b3] [ 29.470] (EE) 3: /usr/libexec/Xorg.bin (config_fini+0x1bcd) [0x49f9fd] [ 29.474] (EE) 4: /usr/libexec/Xorg.bin (config_fini+0x20be) [0x4a031e] [ 29.483] (EE) 5: /usr/libexec/Xorg.bin (InitOutput+0xb56) [0x47bc06] [ 29.491] (EE) 6: /usr/libexec/Xorg.bin (remove_fs_handlers+0x22a) [0x43cfca] [ 29.505] (EE) 7: /lib64/libc.so.6 (__libc_start_main+0xf0) [0x7fbc053be0e0] [ 29.509] (EE) 8: /usr/libexec/Xorg.bin (_start+0x29) [0x42761e] [ 29.511] (EE) 9: ? (?+0x29) [0x29] [ 29.523] (EE) [ 29.523] (EE) Segmentation fault at address 0x0 [ 29.526] (EE) Fatal server error: [ 29.526] (EE) Caught signal 11 (Segmentation fault). Server aborting [ 29.526] (EE) [ 29.527] (EE) Please consult the Fedora Project support at http://wiki.x.org for help. [ 29.527] (EE) Please also check the log file at "/var/log/Xorg.1.log" for additional information. [ 29.527] (EE) ~~~~~~~~~~~~~~~~~ Besides such code doesn't exist upstream: http://cgit.freedesktop.org/xorg/xserver/tree/hw/xfree86/common/xf86Init.c#n546 http://cgit.freedesktop.org/xorg/xserver/tree/hw/xfree86/common/xf86str.h#n258 http://cgit.freedesktop.org/xorg/xserver/tree/hw/xfree86/common/xf86platformBus.c#n275 ====================================================================================== Contrariwise *without* *auto-detection* i.e. if the "xorg.conf[.d/*.conf]" configuration files are provided, Xorg works. e.g. $ cat /etc/X11/xorg.conf.d/nvidia-nouveau-seat0.conf Section "Device" Identifier "nvidia0" Driver "nouveau" MatchSeat "seat0" EndSection ~~~~~~~~~~ $ cat /var/log/Xorg.0.log [ 24.759] X.Org X Server 1.16.0 Release Date: 2014-07-16 [ 24.759] X Protocol Version 11, Revision 0 [ 24.759] Build Operating System: 3.15.8-200.fc20.x86_64 [ 24.759] Current Operating System: Linux rawhide642 3.17.0-0.rc3.git0.1.fc22.x86_64 #1 SMP Mon Sep 1 14:47:34 UTC 2014 x86_64 [ 24.760] Kernel command line: BOOT_IMAGE=/vmlinuz-3.17.0-0.rc3.git0.1.fc22.x86_64 root=UUID=a07556d2-6fe2-417f-8202-c54c07fd9386 drm_kms_helper.edid_firmware=HDMI-A-1:edid/1920x1080.bin drm_kms_helper.edid_firmware=DVI-I-1:edid/848x480.bin initrd=/initramfs-3.17.0-0.rc3.git0.1.fc22.x86_64.img [ 24.760] Build Date: 26 August 2014 07:34:52PM [ 24.760] Build ID: xorg-x11-server 1.16.0-5.fc22 [ 24.760] Current version of pixman: 0.32.6 [ 24.760] Before reporting problems, check http://wiki.x.org to make sure that you have the latest version. [ 24.760] Markers: (--) probed, (**) from config file, (==) default setting, (++) from command line, (!!) notice, (II) informational, (WW) warning, (EE) error, (NI) not implemented, (??) unknown. [ 24.761] (==) Log file: "/var/log/Xorg.0.log", Time: Thu Sep 4 23:27:33 2014 [ 24.775] (==) Using config directory: "/etc/X11/xorg.conf.d" [ 24.775] (==) Using system config directory "/usr/share/X11/xorg.conf.d" [ 24.801] (==) No Layout section. Using the first Screen section. [ 24.801] (==) No screen section available. Using defaults. [ 24.801] (**) |-->Screen "Default Screen Section" (0) [ 24.801] (**) | |-->Monitor "" [ 24.802] (==) No device specified for screen "Default Screen Section". Using the first device section listed. [ 24.802] (**) | |-->Device "nvidia0" [ 24.802] (==) No monitor specified for screen "Default Screen Section". Using a default monitor configuration. [ 24.802] (==) Automatically adding devices [ 24.802] (==) Automatically enabling devices [ 24.802] (==) Automatically adding GPU devices [ 24.802] (==) FontPath set to: catalogue:/etc/X11/fontpath.d, built-ins [ 24.802] (==) ModulePath set to "/usr/lib64/xorg/modules" [ 24.802] (II) The server relies on udev to provide the list of input devices. If no devices become available, reconfigure udev or disable AutoAddDevices. [ 24.802] (II) Loader magic: 0x81de40 [ 24.803] (II) Module ABI versions: [ 24.803] X.Org ANSI C Emulation: 0.4 [ 24.803] X.Org Video Driver: 18.0 [ 24.803] X.Org XInput driver : 21.0 [ 24.803] X.Org Server Extension : 8.0 [ 24.808] (EE) systemd-logind: failed to get session: PID 569 does not belong to any known session [ 24.809] (II) xfree86: Adding drm device (/dev/dri/card1) [ 24.810] (II) xfree86: Adding drm device (/dev/dri/card0) [ 24.816] (--) PCI:*(0:1:0:0) 10de:087d:1849:087d rev 177, Mem @ 0xfb000000/16777216, 0xe0000000/268435456, 0xf6000000/33554432, I/O @ 0x0000ec00/128, BIOS @ 0x????????/131072 [ 24.816] (II) LoadModule: "glx" [ 24.829] (II) Loading /usr/lib64/xorg/modules/extensions/libglx.so [ 24.836] (II) Module glx: vendor="X.Org Foundation" [ 24.836] compiled for 1.16.0, module version = 1.0.0 [ 24.836] ABI class: X.Org Server Extension, version 8.0 [ 24.836] (==) AIGLX enabled [ 24.836] (II) LoadModule: "nouveau" [ 24.836] (II) Loading /usr/lib64/xorg/modules/drivers/nouveau_drv.so [ 24.936] (II) Module nouveau: vendor="X.Org Foundation" [ 24.936] compiled for 1.16.0, module version = 1.0.11 [ 24.936] Module class: X.Org Video Driver [ 24.936] ABI class: X.Org Video Driver, version 18.0 [ 24.936] (II) NOUVEAU driver [ 24.936] (II) NOUVEAU driver for NVIDIA chipset families : [ 24.936] RIVA TNT (NV04) [ 24.936] RIVA TNT2 (NV05) [ 24.937] GeForce 256 (NV10) [ 24.937] GeForce 2 (NV11, NV15) [ 24.937] GeForce 4MX (NV17, NV18) [ 24.937] GeForce 3 (NV20) [ 24.937] GeForce 4Ti (NV25, NV28) [ 24.937] GeForce FX (NV3x) [ 24.938] GeForce 6 (NV4x) [ 24.938] GeForce 7 (G7x) [ 24.938] GeForce 8 (G8x) [ 24.938] GeForce GTX 200 (NVA0) [ 24.938] GeForce GTX 400 (NVC0) [ 24.938] (++) using VT number 7 [ 24.943] (II) [drm] nouveau interface version: 1.2.0 [ 24.943] (II) Loading sub module "dri2" [ 24.943] (II) LoadModule: "dri2" [ 24.943] (II) Module "dri2" already built-in [ 24.944] (--) NOUVEAU(0): Chipset: "NVIDIA NVAC" [ 24.944] (II) NOUVEAU(0): Creating default Display subsection in Screen section "Default Screen Section" for depth/fbbpp 24/32 [ 24.944] (==) NOUVEAU(0): Depth 24, (--) framebuffer bpp 32 [ 24.944] (==) NOUVEAU(0): RGB weight 888 [ 24.944] (==) NOUVEAU(0): Default visual is TrueColor [ 24.944] (==) NOUVEAU(0): Using HW cursor [ 24.944] (==) NOUVEAU(0): GLX sync to VBlank enabled. [ 24.944] (==) NOUVEAU(0): Page flipping enabled [ 24.944] (==) NOUVEAU(0): Swap limit set to 1 [Max allowed 2] [ 24.944] (==) NOUVEAU(0): Page flipping synced to vblank by kernel. [ 24.944] (II) NOUVEAU(0): Initializing outputs ... [ 24.947] (II) NOUVEAU(0): Output VGA-1 has no monitor section [ 24.949] (II) NOUVEAU(0): Output DVI-D-1 has no monitor section [ 25.009] (II) NOUVEAU(0): Output HDMI-1 has no monitor section [ 25.009] (II) NOUVEAU(0): 3 crtcs needed for screen. [ 25.026] (II) NOUVEAU(0): Allocated crtc nr. 0 to this screen. [ 25.026] (II) NOUVEAU(0): Allocated crtc nr. 1 to this screen. [ 25.028] (II) NOUVEAU(0): EDID for output VGA-1 [ 25.030] (II) NOUVEAU(0): EDID for output DVI-D-1 [ 25.089] (II) Quirked EDID physical size to 0x0 cm [ 25.090] (II) NOUVEAU(0): EDID for output HDMI-1 [ 25.090] (II) NOUVEAU(0): Manufacturer: SAM Model: 659 Serial#: 0 [ 25.090] (II) NOUVEAU(0): Year: 2009 Week: 45 [ 25.090] (II) NOUVEAU(0): EDID Version: 1.3 [ 25.090] (II) NOUVEAU(0): Digital Display Input [ 25.090] (II) NOUVEAU(0): Indeterminate output size [ 25.090] (II) NOUVEAU(0): Gamma: 2.20 [ 25.090] (II) NOUVEAU(0): No DPMS capabilities specified [ 25.090] (II) NOUVEAU(0): Supported color encodings: RGB 4:4:4 YCrCb 4:4:4 [ 25.090] (II) NOUVEAU(0): First detailed timing is preferred mode [ 25.090] (II) NOUVEAU(0): redX: 0.640 redY: 0.330 greenX: 0.300 greenY: 0.600 [ 25.090] (II) NOUVEAU(0): blueX: 0.150 blueY: 0.060 whiteX: 0.312 whiteY: 0.329 [ 25.090] (II) NOUVEAU(0): Supported established timings: [ 25.090] (II) NOUVEAU(0): 720x400 at 70Hz [ 25.090] (II) NOUVEAU(0): 640x480 at 60Hz [ 25.090] (II) NOUVEAU(0): 640x480 at 67Hz [ 25.090] (II) NOUVEAU(0): 640x480 at 72Hz [ 25.091] (II) NOUVEAU(0): 640x480 at 75Hz [ 25.091] (II) NOUVEAU(0): 800x600 at 60Hz [ 25.091] (II) NOUVEAU(0): 800x600 at 72Hz [ 25.091] (II) NOUVEAU(0): 800x600 at 75Hz [ 25.091] (II) NOUVEAU(0): 832x624 at 75Hz [ 25.091] (II) NOUVEAU(0): 1024x768 at 60Hz [ 25.091] (II) NOUVEAU(0): 1024x768 at 70Hz [ 25.091] (II) NOUVEAU(0): 1024x768 at 75Hz [ 25.091] (II) NOUVEAU(0): 1280x1024 at 75Hz [ 25.091] (II) NOUVEAU(0): 1152x864 at 75Hz [ 25.091] (II) NOUVEAU(0): Manufacturer's mask: 0 [ 25.091] (II) NOUVEAU(0): Supported standard timings: [ 25.091] (II) NOUVEAU(0): #0: hsize: 1152 vsize 864 refresh: 75 vid: 20337 [ 25.091] (II) NOUVEAU(0): #1: hsize: 1280 vsize 800 refresh: 60 vid: 129 [ 25.091] (II) NOUVEAU(0): #2: hsize: 1280 vsize 960 refresh: 60 vid: 16513 [ 25.091] (II) NOUVEAU(0): #3: hsize: 1280 vsize 1024 refresh: 60 vid: 32897 [ 25.091] (II) NOUVEAU(0): #4: hsize: 1440 vsize 900 refresh: 60 vid: 149 [ 25.091] (II) NOUVEAU(0): #5: hsize: 1440 vsize 900 refresh: 75 vid: 3989 [ 25.091] (II) NOUVEAU(0): #6: hsize: 1680 vsize 1050 refresh: 60 vid: 179 [ 25.091] (II) NOUVEAU(0): #7: hsize: 1600 vsize 1200 refresh: 60 vid: 16553 [ 25.092] (II) NOUVEAU(0): Supported detailed timing: [ 25.092] (II) NOUVEAU(0): clock: 148.5 MHz Image Size: 160 x 90 mm [ 25.092] (II) NOUVEAU(0): h_active: 1920 h_sync: 2008 h_sync_end 2052 h_blank_end 2200 h_border: 0 [ 25.092] (II) NOUVEAU(0): v_active: 1080 v_sync: 1084 v_sync_end 1089 v_blanking: 1125 v_border: 0 [ 25.092] (II) NOUVEAU(0): Supported detailed timing: [ 25.092] (II) NOUVEAU(0): clock: 85.5 MHz Image Size: 160 x 90 mm [ 25.092] (II) NOUVEAU(0): h_active: 1360 h_sync: 1424 h_sync_end 1536 h_blank_end 1792 h_border: 0 [ 25.092] (II) NOUVEAU(0): v_active: 768 v_sync: 771 v_sync_end 777 v_blanking: 795 v_border: 0 [ 25.092] (II) NOUVEAU(0): Ranges: V min: 24 V max: 75 Hz, H min: 26 H max: 81 kHz, PixClock max 235 MHz [ 25.092] (II) NOUVEAU(0): Monitor name: SAMSUNG [ 25.092] (II) NOUVEAU(0): Supported detailed timing: [ 25.092] (II) NOUVEAU(0): clock: 74.2 MHz Image Size: 160 x 90 mm [ 25.092] (II) NOUVEAU(0): h_active: 1280 h_sync: 1390 h_sync_end 1430 h_blank_end 1650 h_border: 0 [ 25.092] (II) NOUVEAU(0): v_active: 720 v_sync: 725 v_sync_end 730 v_blanking: 750 v_border: 0 [ 25.092] (II) NOUVEAU(0): Supported detailed timing: [ 25.093] (II) NOUVEAU(0): clock: 74.2 MHz Image Size: 160 x 90 mm [ 25.093] (II) NOUVEAU(0): h_active: 1280 h_sync: 1720 h_sync_end 1760 h_blank_end 1980 h_border: 0 [ 25.093] (II) NOUVEAU(0): v_active: 720 v_sync: 725 v_sync_end 730 v_blanking: 750 v_border: 0 [ 25.093] (II) NOUVEAU(0): Supported detailed timing: [ 25.093] (II) NOUVEAU(0): clock: 74.2 MHz Image Size: 160 x 90 mm [ 25.093] (II) NOUVEAU(0): h_active: 1920 h_sync: 2008 h_sync_end 2052 h_blank_end 2200 h_border: 0 [ 25.093] (II) NOUVEAU(0): v_active: 540 v_sync: 542 v_sync_end 547 v_blanking: 562 v_border: 0 [ 25.093] (II) NOUVEAU(0): Supported detailed timing: [ 25.093] (II) NOUVEAU(0): clock: 74.2 MHz Image Size: 160 x 90 mm [ 25.093] (II) NOUVEAU(0): h_active: 1920 h_sync: 2448 h_sync_end 2492 h_blank_end 2640 h_border: 0 [ 25.093] (II) NOUVEAU(0): v_active: 540 v_sync: 542 v_sync_end 547 v_blanking: 562 v_border: 0 [ 25.093] (II) NOUVEAU(0): Number of EDID sections to follow: 1 [ 25.093] (II) NOUVEAU(0): EDID (in hex): [ 25.093] (II) NOUVEAU(0): 00ffffffffffff004c2d590600000000 [ 25.093] (II) NOUVEAU(0): 2d130103801009780aee91a3544c9926 [ 25.093] (II) NOUVEAU(0): 0f5054bdef80714f8100814081809500 [ 25.094] (II) NOUVEAU(0): 950fb300a940023a801871382d40582c [ 25.094] (II) NOUVEAU(0): 4500a05a0000001e662150b051001b30 [ 25.094] (II) NOUVEAU(0): 40703600a05a0000001e000000fd0018 [ 25.094] (II) NOUVEAU(0): 4b1a5117000a202020202020000000fc [ 25.094] (II) NOUVEAU(0): 0053414d53554e470a2020202020013a [ 25.094] (II) NOUVEAU(0): 020323f14b901f041305140312202122 [ 25.094] (II) NOUVEAU(0): 2309070783010000e2000f67030c0010 [ 25.094] (II) NOUVEAU(0): 00b82d011d007251d01e206e285500a0 [ 25.094] (II) NOUVEAU(0): 5a0000001e011d00bc52d01e20b82855 [ 25.094] (II) NOUVEAU(0): 40a05a0000001e011d8018711c162058 [ 25.094] (II) NOUVEAU(0): 2c2500a05a0000009e011d80d0721c16 [ 25.094] (II) NOUVEAU(0): 20102c2580a05a0000009e0000000000 [ 25.094] (II) NOUVEAU(0): 0000000000000000000000000000000d [ 25.094] (--) NOUVEAU(0): HDMI max TMDS frequency 225000KHz [ 25.095] (II) NOUVEAU(0): Printing probed modes for output HDMI-1 [ 25.095] (II) NOUVEAU(0): Modeline "1920x1080"x60.0 148.50 1920 2008 2052 2200 1080 1084 1089 1125 +hsync +vsync (67.5 kHz eP) [ 25.095] (II) NOUVEAU(0): Modeline "1920x1080"x50.0 148.50 1920 2448 2492 2640 1080 1084 1089 1125 +hsync +vsync (56.2 kHz e) [ 25.095] (II) NOUVEAU(0): Modeline "1920x1080"x59.9 148.35 1920 2008 2052 2200 1080 1084 1089 1125 +hsync +vsync (67.4 kHz e) [ 25.095] (II) NOUVEAU(0): Modeline "1920x1080i"x60.0 74.25 1920 2008 2052 2200 1080 1084 1094 1125 interlace +hsync +vsync (33.8 kHz e) [ 25.095] (II) NOUVEAU(0): Modeline "1920x1080i"x50.0 74.25 1920 2448 2492 2640 1080 1084 1094 1125 interlace +hsync +vsync (28.1 kHz e) [ 25.095] (II) NOUVEAU(0): Modeline "1920x1080"x30.0 74.25 1920 2008 2052 2200 1080 1084 1089 1125 +hsync +vsync (33.8 kHz e) [ 25.095] (II) NOUVEAU(0): Modeline "1920x1080"x25.0 74.25 1920 2448 2492 2640 1080 1084 1089 1125 +hsync +vsync (28.1 kHz e) [ 25.095] (II) NOUVEAU(0): Modeline "1920x1080"x24.0 74.25 1920 2558 2602 2750 1080 1084 1089 1125 +hsync +vsync (27.0 kHz e) [ 25.095] (II) NOUVEAU(0): Modeline "1920x1080i"x59.9 74.18 1920 2008 2052 2200 1080 1084 1094 1125 interlace +hsync +vsync (33.7 kHz e) [ 25.095] (II) NOUVEAU(0): Modeline "1920x1080"x30.0 74.18 1920 2008 2052 2200 1080 1084 1089 1125 +hsync +vsync (33.7 kHz e) [ 25.095] (II) NOUVEAU(0): Modeline "1920x1080"x24.0 74.18 1920 2558 2602 2750 1080 1084 1089 1125 +hsync +vsync (27.0 kHz e) [ 25.095] (II) NOUVEAU(0): Modeline "1600x1200"x60.0 162.00 1600 1664 1856 2160 1200 1201 1204 1250 +hsync +vsync (75.0 kHz e) [ 25.095] (II) NOUVEAU(0): Modeline "1680x1050"x59.9 119.00 1680 1728 1760 1840 1050 1053 1059 1080 +hsync -vsync (64.7 kHz e) [ 25.095] (II) NOUVEAU(0): Modeline "1280x1024"x75.0 135.00 1280 1296 1440 1688 1024 1025 1028 1066 +hsync +vsync (80.0 kHz e) [ 25.096] (II) NOUVEAU(0): Modeline "1280x1024"x60.0 108.00 1280 1328 1440 1688 1024 1025 1028 1066 +hsync +vsync (64.0 kHz e) [ 25.096] (II) NOUVEAU(0): Modeline "1440x900"x75.0 136.75 1440 1536 1688 1936 900 903 909 942 -hsync +vsync (70.6 kHz e) [ 25.096] (II) NOUVEAU(0): Modeline "1440x900"x59.9 88.75 1440 1488 1520 1600 900 903 909 926 +hsync -vsync (55.5 kHz e) [ 25.096] (II) NOUVEAU(0): Modeline "1280x960"x60.0 108.00 1280 1376 1488 1800 960 961 964 1000 +hsync +vsync (60.0 kHz e) [ 25.096] (II) NOUVEAU(0): Modeline "1360x768"x60.0 85.50 1360 1424 1536 1792 768 771 777 795 +hsync +vsync (47.7 kHz e) [ 25.096] (II) NOUVEAU(0): Modeline "1280x800"x59.9 71.00 1280 1328 1360 1440 800 803 809 823 +hsync -vsync (49.3 kHz e) [ 25.096] (II) NOUVEAU(0): Modeline "1152x864"x75.0 108.00 1152 1216 1344 1600 864 865 868 900 +hsync +vsync (67.5 kHz e) [ 25.096] (II) NOUVEAU(0): Modeline "1280x720"x60.0 74.25 1280 1390 1430 1650 720 725 730 750 +hsync +vsync (45.0 kHz e) [ 25.096] (II) NOUVEAU(0): Modeline "1280x720"x50.0 74.25 1280 1720 1760 1980 720 725 730 750 +hsync +vsync (37.5 kHz e) [ 25.096] (II) NOUVEAU(0): Modeline "1280x720"x59.9 74.18 1280 1390 1430 1650 720 725 730 750 +hsync +vsync (45.0 kHz e) [ 25.096] (II) NOUVEAU(0): Modeline "1024x768"x75.1 78.80 1024 1040 1136 1312 768 769 772 800 +hsync +vsync (60.1 kHz e) [ 25.096] (II) NOUVEAU(0): Modeline "1024x768"x70.1 75.00 1024 1048 1184 1328 768 771 777 806 -hsync -vsync (56.5 kHz e) [ 25.096] (II) NOUVEAU(0): Modeline "1024x768"x60.0 65.00 1024 1048 1184 1344 768 771 777 806 -hsync -vsync (48.4 kHz e) [ 25.096] (II) NOUVEAU(0): Modeline "832x624"x74.6 57.28 832 864 928 1152 624 625 628 667 -hsync -vsync (49.7 kHz e) [ 25.096] (II) NOUVEAU(0): Modeline "800x600"x72.2 50.00 800 856 976 1040 600 637 643 666 +hsync +vsync (48.1 kHz e) [ 25.096] (II) NOUVEAU(0): Modeline "800x600"x75.0 49.50 800 816 896 1056 600 601 604 625 +hsync +vsync (46.9 kHz e) [ 25.097] (II) NOUVEAU(0): Modeline "800x600"x60.3 40.00 800 840 968 1056 600 601 605 628 +hsync +vsync (37.9 kHz e) [ 25.097] (II) NOUVEAU(0): Modeline "720x576"x50.0 27.00 720 732 796 864 576 581 586 625 -hsync -vsync (31.2 kHz e) [ 25.097] (II) NOUVEAU(0): Modeline "720x480"x60.0 27.03 720 736 798 858 480 489 495 525 -hsync -vsync (31.5 kHz e) [ 25.097] (II) NOUVEAU(0): Modeline "720x480"x59.9 27.00 720 736 798 858 480 489 495 525 -hsync -vsync (31.5 kHz e) [ 25.097] (II) NOUVEAU(0): Modeline "640x480"x75.0 31.50 640 656 720 840 480 481 484 500 -hsync -vsync (37.5 kHz e) [ 25.097] (II) NOUVEAU(0): Modeline "640x480"x72.8 31.50 640 664 704 832 480 489 491 520 -hsync -vsync (37.9 kHz e) [ 25.097] (II) NOUVEAU(0): Modeline "640x480"x66.7 30.24 640 704 768 864 480 483 486 525 -hsync -vsync (35.0 kHz e) [ 25.097] (II) NOUVEAU(0): Modeline "640x480"x60.0 25.20 640 656 752 800 480 490 492 525 -hsync -vsync (31.5 kHz e) [ 25.097] (II) NOUVEAU(0): Modeline "640x480"x59.9 25.18 640 656 752 800 480 490 492 525 -hsync -vsync (31.5 kHz e) [ 25.097] (II) NOUVEAU(0): Modeline "720x400"x70.1 28.32 720 738 846 900 400 412 414 449 -hsync +vsync (31.5 kHz e) [ 25.097] (II) NOUVEAU(0): Output VGA-1 disconnected [ 25.097] (II) NOUVEAU(0): Output DVI-D-1 disconnected [ 25.097] (II) NOUVEAU(0): Output HDMI-1 connected [ 25.097] (II) NOUVEAU(0): Using exact sizes for initial modes [ 25.097] (II) NOUVEAU(0): Output HDMI-1 using initial mode 1920x1080 +0+0 [ 25.097] (II) NOUVEAU(0): Using default gamma of (1.0, 1.0, 1.0) unless otherwise stated. [ 25.098] (--) NOUVEAU(0): Virtual size is 1920x1080 (pitch 0) [ 25.098] (**) NOUVEAU(0): Driver mode "1920x1080": 148.5 MHz (scaled from 0.0 MHz), 67.5 kHz, 60.0 Hz [ 25.098] (II) NOUVEAU(0): Modeline "1920x1080"x60.0 148.50 1920 2008 2052 2200 1080 1084 1089 1125 +hsync +vsync (67.5 kHz eP) [ 25.098] (**) NOUVEAU(0): Driver mode "1920x1080": 148.5 MHz (scaled from 0.0 MHz), 56.2 kHz, 50.0 Hz [ 25.098] (II) NOUVEAU(0): Modeline "1920x1080"x50.0 148.50 1920 2448 2492 2640 1080 1084 1089 1125 +hsync +vsync (56.2 kHz e) [ 25.098] (**) NOUVEAU(0): Driver mode "1920x1080": 148.4 MHz (scaled from 0.0 MHz), 67.4 kHz, 59.9 Hz [ 25.098] (II) NOUVEAU(0): Modeline "1920x1080"x59.9 148.35 1920 2008 2052 2200 1080 1084 1089 1125 +hsync +vsync (67.4 kHz e) [ 25.098] (**) NOUVEAU(0): Driver mode "1920x1080i": 74.2 MHz (scaled from 0.0 MHz), 33.8 kHz, 60.0 Hz (I) [ 25.098] (II) NOUVEAU(0): Modeline "1920x1080i"x60.0 74.25 1920 2008 2052 2200 1080 1084 1094 1125 interlace +hsync +vsync (33.8 kHz e) [ 25.098] (**) NOUVEAU(0): Driver mode "1920x1080i": 74.2 MHz (scaled from 0.0 MHz), 28.1 kHz, 50.0 Hz (I) [ 25.098] (II) NOUVEAU(0): Modeline "1920x1080i"x50.0 74.25 1920 2448 2492 2640 1080 1084 1094 1125 interlace +hsync +vsync (28.1 kHz e) [ 25.098] (**) NOUVEAU(0): Driver mode "1920x1080": 74.2 MHz (scaled from 0.0 MHz), 33.8 kHz, 30.0 Hz [ 25.098] (II) NOUVEAU(0): Modeline "1920x1080"x30.0 74.25 1920 2008 2052 2200 1080 1084 1089 1125 +hsync +vsync (33.8 kHz e) [ 25.098] (**) NOUVEAU(0): Driver mode "1920x1080": 74.2 MHz (scaled from 0.0 MHz), 28.1 kHz, 25.0 Hz [ 25.098] (II) NOUVEAU(0): Modeline "1920x1080"x25.0 74.25 1920 2448 2492 2640 1080 1084 1089 1125 +hsync +vsync (28.1 kHz e) [ 25.098] (**) NOUVEAU(0): Driver mode "1920x1080": 74.2 MHz (scaled from 0.0 MHz), 27.0 kHz, 24.0 Hz [ 25.099] (II) NOUVEAU(0): Modeline "1920x1080"x24.0 74.25 1920 2558 2602 2750 1080 1084 1089 1125 +hsync +vsync (27.0 kHz e) [ 25.099] (**) NOUVEAU(0): Driver mode "1920x1080i": 74.2 MHz (scaled from 0.0 MHz), 33.7 kHz, 59.9 Hz (I) [ 25.099] (II) NOUVEAU(0): Modeline "1920x1080i"x59.9 74.18 1920 2008 2052 2200 1080 1084 1094 1125 interlace +hsync +vsync (33.7 kHz e) [ 25.099] (**) NOUVEAU(0): Driver mode "1920x1080": 74.2 MHz (scaled from 0.0 MHz), 33.7 kHz, 30.0 Hz [ 25.099] (II) NOUVEAU(0): Modeline "1920x1080"x30.0 74.18 1920 2008 2052 2200 1080 1084 1089 1125 +hsync +vsync (33.7 kHz e) [ 25.099] (**) NOUVEAU(0): Driver mode "1920x1080": 74.2 MHz (scaled from 0.0 MHz), 27.0 kHz, 24.0 Hz [ 25.099] (II) NOUVEAU(0): Modeline "1920x1080"x24.0 74.18 1920 2558 2602 2750 1080 1084 1089 1125 +hsync +vsync (27.0 kHz e) [ 25.099] (**) NOUVEAU(0): Driver mode "1600x1200": 162.0 MHz (scaled from 0.0 MHz), 75.0 kHz, 60.0 Hz [ 25.099] (II) NOUVEAU(0): Modeline "1600x1200"x60.0 162.00 1600 1664 1856 2160 1200 1201 1204 1250 +hsync +vsync (75.0 kHz e) [ 25.099] (**) NOUVEAU(0): Driver mode "1680x1050": 119.0 MHz (scaled from 0.0 MHz), 64.7 kHz, 59.9 Hz [ 25.099] (II) NOUVEAU(0): Modeline "1680x1050"x59.9 119.00 1680 1728 1760 1840 1050 1053 1059 1080 +hsync -vsync (64.7 kHz e) [ 25.099] (**) NOUVEAU(0): Driver mode "1280x1024": 135.0 MHz (scaled from 0.0 MHz), 80.0 kHz, 75.0 Hz [ 25.099] (II) NOUVEAU(0): Modeline "1280x1024"x75.0 135.00 1280 1296 1440 1688 1024 1025 1028 1066 +hsync +vsync (80.0 kHz e) [ 25.099] (**) NOUVEAU(0): Driver mode "1280x1024": 108.0 MHz (scaled from 0.0 MHz), 64.0 kHz, 60.0 Hz [ 25.099] (II) NOUVEAU(0): Modeline "1280x1024"x60.0 108.00 1280 1328 1440 1688 1024 1025 1028 1066 +hsync +vsync (64.0 kHz e) [ 25.099] (**) NOUVEAU(0): Driver mode "1440x900": 136.8 MHz (scaled from 0.0 MHz), 70.6 kHz, 75.0 Hz [ 25.100] (II) NOUVEAU(0): Modeline "1440x900"x75.0 136.75 1440 1536 1688 1936 900 903 909 942 -hsync +vsync (70.6 kHz e) [ 25.100] (**) NOUVEAU(0): Driver mode "1440x900": 88.8 MHz (scaled from 0.0 MHz), 55.5 kHz, 59.9 Hz [ 25.100] (II) NOUVEAU(0): Modeline "1440x900"x59.9 88.75 1440 1488 1520 1600 900 903 909 926 +hsync -vsync (55.5 kHz e) [ 25.100] (**) NOUVEAU(0): Driver mode "1280x960": 108.0 MHz (scaled from 0.0 MHz), 60.0 kHz, 60.0 Hz [ 25.100] (II) NOUVEAU(0): Modeline "1280x960"x60.0 108.00 1280 1376 1488 1800 960 961 964 1000 +hsync +vsync (60.0 kHz e) [ 25.100] (**) NOUVEAU(0): Driver mode "1360x768": 85.5 MHz (scaled from 0.0 MHz), 47.7 kHz, 60.0 Hz [ 25.100] (II) NOUVEAU(0): Modeline "1360x768"x60.0 85.50 1360 1424 1536 1792 768 771 777 795 +hsync +vsync (47.7 kHz e) [ 25.100] (**) NOUVEAU(0): Driver mode "1280x800": 71.0 MHz (scaled from 0.0 MHz), 49.3 kHz, 59.9 Hz [ 25.100] (II) NOUVEAU(0): Modeline "1280x800"x59.9 71.00 1280 1328 1360 1440 800 803 809 823 +hsync -vsync (49.3 kHz e) [ 25.100] (**) NOUVEAU(0): Driver mode "1152x864": 108.0 MHz (scaled from 0.0 MHz), 67.5 kHz, 75.0 Hz [ 25.100] (II) NOUVEAU(0): Modeline "1152x864"x75.0 108.00 1152 1216 1344 1600 864 865 868 900 +hsync +vsync (67.5 kHz e) [ 25.100] (**) NOUVEAU(0): Driver mode "1280x720": 74.2 MHz (scaled from 0.0 MHz), 45.0 kHz, 60.0 Hz [ 25.100] (II) NOUVEAU(0): Modeline "1280x720"x60.0 74.25 1280 1390 1430 1650 720 725 730 750 +hsync +vsync (45.0 kHz e) [ 25.100] (**) NOUVEAU(0): Driver mode "1280x720": 74.2 MHz (scaled from 0.0 MHz), 37.5 kHz, 50.0 Hz [ 25.100] (II) NOUVEAU(0): Modeline "1280x720"x50.0 74.25 1280 1720 1760 1980 720 725 730 750 +hsync +vsync (37.5 kHz e) [ 25.100] (**) NOUVEAU(0): Driver mode "1280x720": 74.2 MHz (scaled from 0.0 MHz), 45.0 kHz, 59.9 Hz [ 25.100] (II) NOUVEAU(0): Modeline "1280x720"x59.9 74.18 1280 1390 1430 1650 720 725 730 750 +hsync +vsync (45.0 kHz e) [ 25.101] (**) NOUVEAU(0): Driver mode "1024x768": 78.8 MHz (scaled from 0.0 MHz), 60.1 kHz, 75.1 Hz [ 25.101] (II) NOUVEAU(0): Modeline "1024x768"x75.1 78.80 1024 1040 1136 1312 768 769 772 800 +hsync +vsync (60.1 kHz e) [ 25.101] (**) NOUVEAU(0): Driver mode "1024x768": 75.0 MHz (scaled from 0.0 MHz), 56.5 kHz, 70.1 Hz [ 25.101] (II) NOUVEAU(0): Modeline "1024x768"x70.1 75.00 1024 1048 1184 1328 768 771 777 806 -hsync -vsync (56.5 kHz e) [ 25.101] (**) NOUVEAU(0): Driver mode "1024x768": 65.0 MHz (scaled from 0.0 MHz), 48.4 kHz, 60.0 Hz [ 25.101] (II) NOUVEAU(0): Modeline "1024x768"x60.0 65.00 1024 1048 1184 1344 768 771 777 806 -hsync -vsync (48.4 kHz e) [ 25.101] (**) NOUVEAU(0): Driver mode "832x624": 57.3 MHz (scaled from 0.0 MHz), 49.7 kHz, 74.6 Hz [ 25.101] (II) NOUVEAU(0): Modeline "832x624"x74.6 57.28 832 864 928 1152 624 625 628 667 -hsync -vsync (49.7 kHz e) [ 25.101] (**) NOUVEAU(0): Driver mode "800x600": 50.0 MHz (scaled from 0.0 MHz), 48.1 kHz, 72.2 Hz [ 25.101] (II) NOUVEAU(0): Modeline "800x600"x72.2 50.00 800 856 976 1040 600 637 643 666 +hsync +vsync (48.1 kHz e) [ 25.101] (**) NOUVEAU(0): Driver mode "800x600": 49.5 MHz (scaled from 0.0 MHz), 46.9 kHz, 75.0 Hz [ 25.101] (II) NOUVEAU(0): Modeline "800x600"x75.0 49.50 800 816 896 1056 600 601 604 625 +hsync +vsync (46.9 kHz e) [ 25.101] (**) NOUVEAU(0): Driver mode "800x600": 40.0 MHz (scaled from 0.0 MHz), 37.9 kHz, 60.3 Hz [ 25.101] (II) NOUVEAU(0): Modeline "800x600"x60.3 40.00 800 840 968 1056 600 601 605 628 +hsync +vsync (37.9 kHz e) [ 25.101] (**) NOUVEAU(0): Driver mode "720x576": 27.0 MHz (scaled from 0.0 MHz), 31.2 kHz, 50.0 Hz [ 25.101] (II) NOUVEAU(0): Modeline "720x576"x50.0 27.00 720 732 796 864 576 581 586 625 -hsync -vsync (31.2 kHz e) [ 25.101] (**) NOUVEAU(0): Driver mode "720x480": 27.0 MHz (scaled from 0.0 MHz), 31.5 kHz, 60.0 Hz [ 25.102] (II) NOUVEAU(0): Modeline "720x480"x60.0 27.03 720 736 798 858 480 489 495 525 -hsync -vsync (31.5 kHz e) [ 25.102] (**) NOUVEAU(0): Driver mode "720x480": 27.0 MHz (scaled from 0.0 MHz), 31.5 kHz, 59.9 Hz [ 25.102] (II) NOUVEAU(0): Modeline "720x480"x59.9 27.00 720 736 798 858 480 489 495 525 -hsync -vsync (31.5 kHz e) [ 25.102] (**) NOUVEAU(0): Driver mode "640x480": 31.5 MHz (scaled from 0.0 MHz), 37.5 kHz, 75.0 Hz [ 25.102] (II) NOUVEAU(0): Modeline "640x480"x75.0 31.50 640 656 720 840 480 481 484 500 -hsync -vsync (37.5 kHz e) [ 25.102] (**) NOUVEAU(0): Driver mode "640x480": 31.5 MHz (scaled from 0.0 MHz), 37.9 kHz, 72.8 Hz [ 25.102] (II) NOUVEAU(0): Modeline "640x480"x72.8 31.50 640 664 704 832 480 489 491 520 -hsync -vsync (37.9 kHz e) [ 25.102] (**) NOUVEAU(0): Driver mode "640x480": 30.2 MHz (scaled from 0.0 MHz), 35.0 kHz, 66.7 Hz [ 25.102] (II) NOUVEAU(0): Modeline "640x480"x66.7 30.24 640 704 768 864 480 483 486 525 -hsync -vsync (35.0 kHz e) [ 25.102] (**) NOUVEAU(0): Driver mode "640x480": 25.2 MHz (scaled from 0.0 MHz), 31.5 kHz, 60.0 Hz [ 25.102] (II) NOUVEAU(0): Modeline "640x480"x60.0 25.20 640 656 752 800 480 490 492 525 -hsync -vsync (31.5 kHz e) [ 25.102] (**) NOUVEAU(0): Driver mode "640x480": 25.2 MHz (scaled from 0.0 MHz), 31.5 kHz, 59.9 Hz [ 25.102] (II) NOUVEAU(0): Modeline "640x480"x59.9 25.18 640 656 752 800 480 490 492 525 -hsync -vsync (31.5 kHz e) [ 25.102] (**) NOUVEAU(0): Driver mode "720x400": 28.3 MHz (scaled from 0.0 MHz), 31.5 kHz, 70.1 Hz [ 25.102] (II) NOUVEAU(0): Modeline "720x400"x70.1 28.32 720 738 846 900 400 412 414 449 -hsync +vsync (31.5 kHz e) [ 25.102] (==) NOUVEAU(0): DPI set to (96, 96) [ 25.102] (II) Loading sub module "fb" [ 25.103] (II) LoadModule: "fb" [ 25.103] (II) Loading /usr/lib64/xorg/modules/libfb.so [ 25.104] (II) Module fb: vendor="X.Org Foundation" [ 25.104] compiled for 1.16.0, module version = 1.0.0 [ 25.105] ABI class: X.Org ANSI C Emulation, version 0.4 [ 25.105] (II) Loading sub module "shadowfb" [ 25.105] (II) LoadModule: "shadowfb" [ 25.122] (II) Loading /usr/lib64/xorg/modules/libshadowfb.so [ 25.245] (II) Module shadowfb: vendor="X.Org Foundation" [ 25.245] compiled for 1.16.0, module version = 1.0.0 [ 25.245] ABI class: X.Org ANSI C Emulation, version 0.4 [ 25.246] (--) Depth 24 pixmap format is 32 bpp [ 25.255] (II) NOUVEAU(0): Channel setup complete. [ 25.258] (EE) NOUVEAU(0): [COPY] failed to allocate class. [ 25.260] (II) NOUVEAU(0): [DRI2] Setup complete [ 25.260] (II) NOUVEAU(0): [DRI2] DRI driver: nouveau [ 25.260] (II) NOUVEAU(0): [DRI2] VDPAU driver: nouveau [ 25.262] (II) Loading sub module "exa" [ 25.262] (II) LoadModule: "exa" [ 25.262] (II) Loading /usr/lib64/xorg/modules/libexa.so [ 25.286] (II) Module exa: vendor="X.Org Foundation" [ 25.286] compiled for 1.16.0, module version = 2.6.0 [ 25.286] ABI class: X.Org Video Driver, version 18.0 [ 25.286] (II) EXA(0): Driver allocated offscreen pixmaps [ 25.286] (II) EXA(0): Driver registered support for the following operations: [ 25.286] (II) Solid [ 25.286] (II) Copy [ 25.286] (II) Composite (RENDER acceleration) [ 25.286] (II) UploadToScreen [ 25.286] (II) DownloadFromScreen [ 25.286] (==) NOUVEAU(0): Backing store enabled [ 25.287] (==) NOUVEAU(0): Silken mouse enabled [ 25.287] (II) NOUVEAU(0): [XvMC] Associated with Nouveau GeForce 8/9 Textured Video. [ 25.287] (II) NOUVEAU(0): [XvMC] Extension initialized. [ 25.287] (==) NOUVEAU(0): DPMS enabled [ 25.288] (II) NOUVEAU(0): RandR 1.2 enabled, ignore the following RandR disabled message. [ 25.289] (--) RandR disabled [ 25.318] (II) SELinux: Disabled on system [ 26.201] (II) AIGLX: enabled GLX_MESA_copy_sub_buffer [ 26.201] (II) AIGLX: enabled GLX_ARB_create_context [ 26.201] (II) AIGLX: enabled GLX_ARB_create_context_profile [ 26.201] (II) AIGLX: enabled GLX_EXT_create_context_es2_profile [ 26.201] (II) AIGLX: enabled GLX_INTEL_swap_event [ 26.202] (II) AIGLX: enabled GLX_SGI_swap_control and GLX_MESA_swap_control [ 26.202] (II) AIGLX: enabled GLX_EXT_framebuffer_sRGB [ 26.202] (II) AIGLX: enabled GLX_ARB_fbconfig_float [ 26.202] (II) AIGLX: GLX_EXT_texture_from_pixmap backed by buffer objects [ 26.205] (II) AIGLX: Loaded and initialized nouveau [ 26.205] (II) GLX: Initialized DRI2 GL provider for screen 0 [ 26.210] (II) NOUVEAU(0): NVEnterVT is called. [ 26.241] (II) NOUVEAU(0): Setting screen physical size to 508 x 285 [ 26.241] resize called 1920 1080 [ 26.636] (II) config/udev: Adding input device Power Button (/dev/input/event1) [ 26.636] (**) Power Button: Applying InputClass "evdev keyboard catchall" [ 26.636] (II) LoadModule: "evdev" [ 26.637] (II) Loading /usr/lib64/xorg/modules/input/evdev_drv.so [ 26.703] (II) Module evdev: vendor="X.Org Foundation" [ 26.703] compiled for 1.16.0, module version = 2.9.0 [ 26.703] Module class: X.Org XInput Driver [ 26.703] ABI class: X.Org XInput driver, version 21.0 [ 26.703] (II) Using input driver 'evdev' for 'Power Button' [ 26.703] (**) Power Button: always reports core events [ 26.703] (**) evdev: Power Button: Device: "/dev/input/event1" [ 26.704] (--) evdev: Power Button: Vendor 0 Product 0x1 [ 26.704] (--) evdev: Power Button: Found keys [ 26.704] (II) evdev: Power Button: Configuring as keyboard [ 26.704] (**) Option "config_info" "udev:/sys/devices/LNXSYSTM:00/LNXPWRBN:00/input/input1/event1" [ 26.704] (II) XINPUT: Adding extended input device "Power Button" (type: KEYBOARD, id 6) [ 26.704] (**) Option "xkb_rules" "evdev" [ 26.704] (**) Option "xkb_model" "pc104" [ 26.704] (**) Option "xkb_layout" "us" [ 26.818] (II) config/udev: Adding input device Power Button (/dev/input/event0) [ 26.818] (**) Power Button: Applying InputClass "evdev keyboard catchall" [ 26.818] (II) Using input driver 'evdev' for 'Power Button' [ 26.818] (**) Power Button: always reports core events [ 26.818] (**) evdev: Power Button: Device: "/dev/input/event0" [ 26.819] (--) evdev: Power Button: Vendor 0 Product 0x1 [ 26.819] (--) evdev: Power Button: Found keys [ 26.819] (II) evdev: Power Button: Configuring as keyboard [ 26.819] (**) Option "config_info" "udev:/sys/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0C0C:00/input/input0/event0" [ 26.819] (II) XINPUT: Adding extended input device "Power Button" (type: KEYBOARD, id 7) [ 26.819] (**) Option "xkb_rules" "evdev" [ 26.819] (**) Option "xkb_model" "pc104" [ 26.819] (**) Option "xkb_layout" "us" [ 26.823] (II) config/udev: Adding input device HDA NVidia Line Out CLFE (/dev/input/event7) [ 26.823] (II) No input driver specified, ignoring this device. [ 26.823] (II) This device may have been added with another device file. [ 26.824] (II) config/udev: Adding input device HDA NVidia Front Headphone (/dev/input/event8) [ 26.824] (II) No input driver specified, ignoring this device. [ 26.824] (II) This device may have been added with another device file. [ 26.825] (II) config/udev: Adding input device HDA NVidia HDMI/DP,pcm=3 Phantom (/dev/input/event9) [ 26.826] (II) No input driver specified, ignoring this device. [ 26.826] (II) This device may have been added with another device file. [ 26.827] (II) config/udev: Adding input device HDA NVidia Front Mic (/dev/input/event2) [ 26.827] (II) No input driver specified, ignoring this device. [ 26.827] (II) This device may have been added with another device file. [ 26.828] (II) config/udev: Adding input device HDA NVidia Rear Mic (/dev/input/event3) [ 26.828] (II) No input driver specified, ignoring this device. [ 26.828] (II) This device may have been added with another device file. [ 26.829] (II) config/udev: Adding input device HDA NVidia Line (/dev/input/event4) [ 26.829] (II) No input driver specified, ignoring this device. [ 26.829] (II) This device may have been added with another device file. [ 26.830] (II) config/udev: Adding input device HDA NVidia Line Out Front (/dev/input/event5) [ 26.831] (II) No input driver specified, ignoring this device. [ 26.831] (II) This device may have been added with another device file. [ 26.832] (II) config/udev: Adding input device HDA NVidia Line Out Surround (/dev/input/event6) [ 26.832] (II) No input driver specified, ignoring this device. [ 26.832] (II) This device may have been added with another device file. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ $ cat /etc/X11/xorg.conf.d/udl-modesetting-seat1.conf Section "Device" Identifier "udl0" Driver "modesetting" MatchSeat "seat1" EndSection ~~~~~~~~~~ $ cat /var/log/Xorg.1.log [ 24.779] X.Org X Server 1.16.0 Release Date: 2014-07-16 [ 24.779] X Protocol Version 11, Revision 0 [ 24.780] Build Operating System: 3.15.8-200.fc20.x86_64 [ 24.780] Current Operating System: Linux rawhide642 3.17.0-0.rc3.git0.1.fc22.x86_64 #1 SMP Mon Sep 1 14:47:34 UTC 2014 x86_64 [ 24.780] Kernel command line: BOOT_IMAGE=/vmlinuz-3.17.0-0.rc3.git0.1.fc22.x86_64 root=UUID=a07556d2-6fe2-417f-8202-c54c07fd9386 drm_kms_helper.edid_firmware=HDMI-A-1:edid/1920x1080.bin drm_kms_helper.edid_firmware=DVI-I-1:edid/848x480.bin initrd=/initramfs-3.17.0-0.rc3.git0.1.fc22.x86_64.img [ 24.780] Build Date: 26 August 2014 07:34:52PM [ 24.780] Build ID: xorg-x11-server 1.16.0-5.fc22 [ 24.780] Current version of pixman: 0.32.6 [ 24.780] Before reporting problems, check http://wiki.x.org to make sure that you have the latest version. [ 24.780] Markers: (--) probed, (**) from config file, (==) default setting, (++) from command line, (!!) notice, (II) informational, (WW) warning, (EE) error, (NI) not implemented, (??) unknown. [ 24.781] (==) Log file: "/var/log/Xorg.1.log", Time: Thu Sep 4 23:27:34 2014 [ 24.781] (==) Using config directory: "/etc/X11/xorg.conf.d" [ 24.781] (==) Using system config directory "/usr/share/X11/xorg.conf.d" [ 24.801] (==) No Layout section. Using the first Screen section. [ 24.801] (==) No screen section available. Using defaults. [ 24.801] (**) |-->Screen "Default Screen Section" (0) [ 24.801] (**) | |-->Monitor "" [ 24.802] (==) No device specified for screen "Default Screen Section". Using the first device section listed. [ 24.802] (**) | |-->Device "udl0" [ 24.802] (==) No monitor specified for screen "Default Screen Section". Using a default monitor configuration. [ 24.802] (==) Automatically adding devices [ 24.802] (==) Automatically enabling devices [ 24.803] (==) Automatically adding GPU devices [ 24.803] (==) FontPath set to: catalogue:/etc/X11/fontpath.d, built-ins [ 24.803] (==) ModulePath set to "/usr/lib64/xorg/modules" [ 24.803] (II) The server relies on udev to provide the list of input devices. If no devices become available, reconfigure udev or disable AutoAddDevices. [ 24.803] (II) Loader magic: 0x81de40 [ 24.803] (II) Module ABI versions: [ 24.803] X.Org ANSI C Emulation: 0.4 [ 24.803] X.Org Video Driver: 18.0 [ 24.803] X.Org XInput driver : 21.0 [ 24.803] X.Org Server Extension : 8.0 [ 24.810] (EE) systemd-logind: failed to get session: PID 571 does not belong to any known session [ 24.811] (II) xfree86: Adding drm device (/dev/dri/card1) [ 24.814] (II) LoadModule: "glx" [ 24.829] (II) Loading /usr/lib64/xorg/modules/extensions/libglx.so [ 24.837] (II) Module glx: vendor="X.Org Foundation" [ 24.837] compiled for 1.16.0, module version = 1.0.0 [ 24.837] ABI class: X.Org Server Extension, version 8.0 [ 24.837] (==) AIGLX enabled [ 24.837] (II) LoadModule: "modesetting" [ 24.837] (II) Loading /usr/lib64/xorg/modules/drivers/modesetting_drv.so [ 24.844] (II) Module modesetting: vendor="X.Org Foundation" [ 24.844] compiled for 1.16.0, module version = 0.9.0 [ 24.844] Module class: X.Org Video Driver [ 24.844] ABI class: X.Org Video Driver, version 18.0 [ 24.844] (II) modesetting: Driver for Modesetting Kernel Drivers: kms [ 24.844] (II) modesetting(0): using drv /dev/dri/card1 [ 24.844] (II) modesetting(0): Creating default Display subsection in Screen section "Default Screen Section" for depth/fbbpp 24/32 [ 24.844] (==) modesetting(0): Depth 24, (==) framebuffer bpp 32 [ 24.844] (==) modesetting(0): RGB weight 888 [ 24.844] (==) modesetting(0): Default visual is TrueColor [ 24.844] (II) modesetting(0): ShadowFB: preferred NO, enabled NO [ 24.847] (II) modesetting(0): Output DVI-0 has no monitor section [ 24.848] (II) modesetting(0): EDID for output DVI-0 [ 24.848] (II) modesetting(0): Manufacturer: LNX Model: 0 Serial#: 0 [ 24.848] (II) modesetting(0): Year: 2012 Week: 5 [ 24.848] (II) modesetting(0): EDID Version: 1.3 [ 24.848] (II) modesetting(0): Analog Display Input, Input Voltage Level: 0.700/0.700 V [ 24.848] (II) modesetting(0): Sync: Separate CompositeSerration on. V.Sync Pulse req. if CompSync or SyncOnGreen [ 24.848] (II) modesetting(0): Max Image Size [cm]: horiz.: 22 vert.: 12 [ 24.848] (II) modesetting(0): Gamma: 2.20 [ 24.848] (II) modesetting(0): DPMS capabilities: StandBy Suspend Off; RGB/Color Display [ 24.848] (II) modesetting(0): First detailed timing is preferred mode [ 24.849] (II) modesetting(0): redX: 0.642 redY: 0.349 greenX: 0.292 greenY: 0.596 [ 24.849] (II) modesetting(0): blueX: 0.147 blueY: 0.125 whiteX: 0.312 whiteY: 0.328 [ 24.849] (II) modesetting(0): Manufacturer's mask: 0 [ 24.849] (II) modesetting(0): Supported standard timings: [ 24.849] (II) modesetting(0): #0: hsize: 848 vsize 477 refresh: 60 vid: 49227 [ 24.849] (II) modesetting(0): Supported detailed timing: [ 24.849] (II) modesetting(0): clock: 33.8 MHz Image Size: 220 x 125 mm [ 24.849] (II) modesetting(0): h_active: 848 h_sync: 864 h_sync_end 976 h_blank_end 1088 h_border: 0 [ 24.849] (II) modesetting(0): v_active: 480 v_sync: 486 v_sync_end 494 v_blanking: 517 v_border: 0 [ 24.849] (II) modesetting(0): Serial No: Linux #0 [ 24.849] (II) modesetting(0): Ranges: V min: 59 V max: 61 Hz, H min: 30 H max: 32 kHz, PixClock max 45 MHz [ 24.849] (II) modesetting(0): Monitor name: Linux WVGA [ 24.849] (II) modesetting(0): EDID (in hex): [ 24.849] (II) modesetting(0): 00ffffffffffff0031d8000000000000 [ 24.849] (II) modesetting(0): 051601036d160c78ea5ec0a4594a9825 [ 24.849] (II) modesetting(0): 2050540000004bc00101010101010101 [ 24.850] (II) modesetting(0): 0101010101012f0d50f030e025101070 [ 24.850] (II) modesetting(0): 6800dc7d0000001e000000ff004c696e [ 24.850] (II) modesetting(0): 75782023300a20202020000000fd003b [ 24.850] (II) modesetting(0): 3d1e2004000a202020202020000000fc [ 24.850] (II) modesetting(0): 004c696e757820575647410a20200096 [ 24.850] (II) modesetting(0): Printing probed modes for output DVI-0 [ 24.850] (II) modesetting(0): Modeline "848x480"x60.0 33.75 848 864 976 1088 480 486 494 517 +hsync +vsync (31.0 kHz eP) [ 24.850] (II) modesetting(0): Modeline "848x477"x60.0 31.32 848 864 952 1056 477 478 481 494 -hsync +vsync (29.7 kHz) [ 24.850] (II) modesetting(0): Output DVI-0 connected [ 24.850] (II) modesetting(0): Using exact sizes for initial modes [ 24.850] (II) modesetting(0): Output DVI-0 using initial mode 848x480 +0+0 [ 24.850] (II) modesetting(0): Using default gamma of (1.0, 1.0, 1.0) unless otherwise stated. [ 24.850] (==) modesetting(0): DPI set to (96, 96) [ 24.850] (II) Loading sub module "fb" [ 24.850] (II) LoadModule: "fb" [ 24.851] (II) Loading /usr/lib64/xorg/modules/libfb.so [ 24.870] (II) Module fb: vendor="X.Org Foundation" [ 24.870] compiled for 1.16.0, module version = 1.0.0 [ 24.871] ABI class: X.Org ANSI C Emulation, version 0.4 [ 24.871] (==) Depth 24 pixmap format is 32 bpp [ 24.871] (==) modesetting(0): Backing store enabled [ 24.871] (==) modesetting(0): Silken mouse enabled [ 24.871] (II) modesetting(0): RandR 1.2 enabled, ignore the following RandR disabled message. [ 24.872] (==) modesetting(0): DPMS enabled [ 24.880] (--) RandR disabled [ 24.902] (II) SELinux: Disabled on system [ 24.905] (II) AIGLX: Screen 0 is not DRI2 capable [ 24.905] (EE) AIGLX: reverting to software rendering [ 26.203] (II) AIGLX: Loaded and initialized swrast [ 26.203] (II) GLX: Initialized DRISWRAST GL provider for screen 0 [ 26.205] (II) modesetting(0): Damage tracking initialized [ 26.205] (II) modesetting(0): Setting screen physical size to 224 x 127 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Each profound conclusion is welcome. poma Addition: A similar report: https://bugzilla.redhat.com/show_bug.cgi?id=1118540 From emil.l.velikov at gmail.com Thu Sep 4 17:58:38 2014 From: emil.l.velikov at gmail.com (Emil Velikov) Date: Fri, 5 Sep 2014 01:58:38 +0100 Subject: [PATCH libX11] x11-xcb: Move internal dependencies to Message-ID: <1409878718-6885-1-git-send-email-emil.l.velikov@gmail.com> Similar to libxcb and it's modules we do not need to have libraries in the Requires field in the pkg-config file. We will be able to retain the explicit x11/xcb header inclusion from the x11-xcb ones and satisfy all the build-time dependencies, while avoiding over-linking and other potential runtime issues. Cc: Keith Packard Cc: Alan Coopersmith References: http://people.freedesktop.org/~dbn/pkg-config-guide.html#faq References: https://wiki.mageia.org/en/Overlinking_issues_in_packaging References: http://err.no/personal/blog/2008/Mar/25 Signed-off-by: Emil Velikov --- Please keep me Cc'd as I'm not subscribed to the list. -Emil x11-xcb.pc.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/x11-xcb.pc.in b/x11-xcb.pc.in index 315a9d1..195f470 100644 --- a/x11-xcb.pc.in +++ b/x11-xcb.pc.in @@ -6,6 +6,6 @@ includedir=@includedir@ Name: X11 XCB Description: X Library XCB interface Version: @PACKAGE_VERSION@ -Requires: x11 xcb +Requires.private: x11 xcb Cflags: -I${includedir} Libs: -L${libdir} -lX11-xcb -- 2.0.2 From peter.hutterer at who-t.net Thu Sep 4 20:39:53 2014 From: peter.hutterer at who-t.net (Peter Hutterer) Date: Fri, 5 Sep 2014 13:39:53 +1000 Subject: [PATCH synaptics] Use cumulative relative touch movements while scrolling In-Reply-To: <1408039422-14545-1-git-send-email-gabriele.mzt@gmail.com> References: <1408039422-14545-1-git-send-email-gabriele.mzt@gmail.com> Message-ID: <20140905033953.GA3330@jelly.local> On Thu, Aug 14, 2014 at 08:03:42PM +0200, Gabriele Mazzotta wrote: > Signed-off-by: Gabriele Mazzotta sorry about the delay, merged, 90d1930..ec0901e master -> master Cheers, Peter > --- > src/eventcomm.c | 8 +++++--- > src/synaptics.c | 8 +++++--- > 2 files changed, 10 insertions(+), 6 deletions(-) > > diff --git a/src/eventcomm.c b/src/eventcomm.c > index 1f440b8..54421bb 100644 > --- a/src/eventcomm.c > +++ b/src/eventcomm.c > @@ -665,9 +665,11 @@ EventReadHwState(InputInfoPtr pInfo, > > SynapticsResetTouchHwState(hw, FALSE); > > - /* Reset cumulative values if buttons were not previously pressed, > - * or no finger was previously present. */ > - if ((!hw->left && !hw->right && !hw->middle) || hw->z < para->finger_low) { > + /* Reset cumulative values if buttons were not previously pressed and no > + * two-finger scrolling is ongoing, or no finger was previously present. */ > + if (((!hw->left && !hw->right && !hw->middle) && > + !(priv->vert_scroll_twofinger_on || priv->vert_scroll_twofinger_on)) || > + hw->z < para->finger_low) { > hw->cumulative_dx = hw->x; > hw->cumulative_dy = hw->y; > sync_cumulative = TRUE; > diff --git a/src/synaptics.c b/src/synaptics.c > index b1dbe03..a84536b 100644 > --- a/src/synaptics.c > +++ b/src/synaptics.c > @@ -3187,9 +3187,11 @@ HandleState(InputInfoPtr pInfo, struct SynapticsHwState *hw, CARD32 now, > } > } > > - /* If a physical button is pressed on a clickpad, use cumulative relative > - * touch movements for motion */ > - if (para->clickpad && (priv->lastButtons & 7) && > + /* If a physical button is pressed on a clickpad or a two-finger scrolling > + * is ongoing, use cumulative relative touch movements for motion */ > + if (para->clickpad && > + ((priv->lastButtons & 7) || > + (priv->vert_scroll_twofinger_on || priv->horiz_scroll_twofinger_on)) && > priv->last_button_area != TOP_BUTTON_AREA) { > hw->x = hw->cumulative_dx; > hw->y = hw->cumulative_dy; > -- > 2.1.0.rc1 > > _______________________________________________ > xorg-devel at lists.x.org: X.Org development > Archives: http://lists.x.org/archives/xorg-devel > Info: http://lists.x.org/mailman/listinfo/xorg-devel > From peter.hutterer at who-t.net Thu Sep 4 21:10:30 2014 From: peter.hutterer at who-t.net (Peter Hutterer) Date: Fri, 5 Sep 2014 14:10:30 +1000 Subject: [PATCH] [synaptic] swipe actions based on the tree-fingers touch In-Reply-To: <20140425193144.3295d508@sambook> References: <20140309225815.50770829@sambook> <20140425193144.3295d508@sambook> Message-ID: <20140905041030.GA3589@jelly.local> Hi Arkadiusz, sorry about the delay on the review here. On Fri, Apr 25, 2014 at 07:31:44PM +0200, Arkadiusz Bokowy wrote: > When touchpad can report more then 2 active fingers, we can generate action > based on swipe gesture. It includes upward, downward, to the left and to the > right swipes. To all of those gestures can be assigned one button event. By > default (internal driver default) swipes are disabled (assigned button 0). > The swipe length (hand displacement) required for triggering button event can > be set independently for horizontal and vertical movement. There is also > possibility for triggering repeatable events during swipe handling, however > it is disabled by default. > > The most preferable button assignment is button 8, 9, 10 and 11 for to the > left, to the right, upward and downward swipes respectively. Such a > configuration provides browser history navigation (e.g. Firefox) with > horizontal swipes. Button 10 and 11 are not used, though. > > Added Synaptic driver options: > * SwipeUpButton, SwipeDownButton, SwipeLeftButton, SwipeRightButton > * HorizSwipeThreshold, VertSwipeThreshold > * SingleSwipe > > This changes was developed on Samsung NP530U3C with the ETPS/2 Elantech > Touchpad, which can report up to three-finger touch. Also tested on the > SynPS/2 Synaptics TouchPad. Patch is generated for the driver version 1.7.4. > > Signed-off-by: Arkadiusz Bokowy > --- > include/synaptics-properties.h | 10 +++++ > man/synaptics.man | 28 ++++++++++++ > src/properties.c | 44 +++++++++++++++++++ > src/synaptics.c | 99 +++++++++++++++++++++++++++++++++++++++++- > src/synapticsstr.h | 21 +++++++++ > tools/synclient.c | 7 +++ > 6 files changed, 207 insertions(+), 2 deletions(-) > > diff --git a/include/synaptics-properties.h b/include/synaptics-properties.h > index 19bd2b2..e74ffd0 100644 > --- a/include/synaptics-properties.h > +++ b/include/synaptics-properties.h > @@ -104,6 +104,16 @@ > * element. order: Finger 1, 2, 3 */ > #define SYNAPTICS_PROP_CLICK_ACTION "Synaptics Click Action" > > +/* 8 bit, up to MAX_SWIPE values (see synaptics.h), 0 disables an > + * element. order: Up, Down, Left, Right */ > +#define SYNAPTICS_PROP_SWIPE_ACTION "Synaptics Swipe Action" no references to header files please. Just say there are 4 values in it. > + > +/* 8 bit, 2 values, vertical, horizontal */ > +#define SYNAPTICS_PROP_SWIPE_THRESHOLD "Synaptics Swipe Threshold" > + > +/* 8 bit (BOOL) */ > +#define SYNAPTICS_PROP_SINGLE_SWIPE "Synaptics Single Swipe" I don't think we need this one. I'm ok with adding support for three-finger swipe but if we only map them to buttons anyway, a single button per gesture is enough. The only time where multiple buttons are useful is for scroll buttons and that's where we already have two-finger scrolling for. that brings up the next question: should we even support vertical scroll. in X, due to a number of limitations the only buttons that make sense to map to are 8/9 for back/forward. Some specialised apps may be able to use 10/11 etc. but I'd rather have a small limited feature that has predictable outcomes. so I'm in favour of dropping the single swipe toggle, up/down and, quite frankly, four finger swiping. Unless gabriele comes up with a really good use-case, just exposing what the hw can do isn't enough tbh. > + > /* 8 bit (BOOL) */ > #define SYNAPTICS_PROP_CIRCULAR_SCROLLING "Synaptics Circular Scrolling" > > diff --git a/man/synaptics.man b/man/synaptics.man > index 7da7527..d3e4fb3 100644 > --- a/man/synaptics.man > +++ b/man/synaptics.man > @@ -358,6 +358,34 @@ Left/Right/Top/BottomEdge parameters. > . > For circular touchpads. Property: "Synaptics Circular Pad" > .TP > +.BI "Option \*qSwipeUpButton\*q \*q" integer \*q > +Which mouse button is reported on a upward tree-finger swipe. Property: > +"Synaptics Swipe Action" see Gabriele's patch, this should have Three in the name to be less ambiuous. > +.TP > +.BI "Option \*qSwipeDownButton\*q \*q" integer \*q > +Which mouse button is reported on a downward tree-finger swipe. Property: > +"Synaptics Swipe Action" > +.TP > +.BI "Option \*qSwipeLeftButton\*q \*q" integer \*q > +Which mouse button is reported on a tree-finger swipe to the left. Property: > +"Synaptics Swipe Action" > +.TP > +.BI "Option \*qSwipeRightButton\*q \*q" integer \*q > +Which mouse button is reported on a tree-finger swipe to the right. Property: > +"Synaptics Swipe Action" > +.TP > +.BI "Option \*qHorizSwipeThreshold\*q \*q" integer \*q > +Horizontal threshold for triggering swipe event. Property: "Synaptics Swipe > +Threshold" > +.TP > +.BI "Option \*qVertSwipeThreshold\*q \*q" integer \*q > +Vertical threshold for triggering swipe event. Property: "Synaptics Swipe > +Threshold" both thresholds need a unit specification. The rest looks good, but as I said above I think we should limit this patch to do a lot less. Cheers, Peter > +.TP > +.BI "Option \*qSingleSwipe\*q \*q" boolean \*q > +Trigger only one button click event per swipe. Property: "Synaptics Single > +Swipe" > +.TP > .BI "Option \*qPalmDetect\*q \*q" boolean \*q > If palm detection should be enabled. > . > diff --git a/src/properties.c b/src/properties.c > index 886d8c2..140cf6e 100644 > --- a/src/properties.c > +++ b/src/properties.c > @@ -80,6 +80,9 @@ Atom prop_circscroll = 0; > Atom prop_circscroll_dist = 0; > Atom prop_circscroll_trigger = 0; > Atom prop_circpad = 0; > +Atom prop_swipeaction = 0; > +Atom prop_swipethreshold = 0; > +Atom prop_singleswipe = 0; > Atom prop_palm = 0; > Atom prop_palm_dim = 0; > Atom prop_coastspeed = 0; > @@ -298,6 +301,18 @@ InitDeviceProperties(InputInfoPtr pInfo) > prop_circpad = > InitAtom(pInfo->dev, SYNAPTICS_PROP_CIRCULAR_PAD, 8, 1, > ¶->circular_pad); > + > + memcpy(values, para->swipe_action, MAX_SWIPE * sizeof(int)); > + prop_swipeaction = > + InitAtom(pInfo->dev, SYNAPTICS_PROP_SWIPE_ACTION, 8, MAX_SWIPE, values); > + values[0] = para->swipe_threshold_x; > + values[1] = para->swipe_threshold_y; > + prop_swipethreshold = > + InitAtom(pInfo->dev, SYNAPTICS_PROP_SWIPE_THRESHOLD, 32, 2, values); > + prop_singleswipe = > + InitAtom(pInfo->dev, SYNAPTICS_PROP_SINGLE_SWIPE, 8, 1, > + ¶->single_swipe); > + > prop_palm = > InitAtom(pInfo->dev, SYNAPTICS_PROP_PALM_DETECT, 8, 1, > ¶->palm_detect); > @@ -675,6 +690,35 @@ SetProperty(DeviceIntPtr dev, Atom property, XIPropertyValuePtr prop, > > para->circular_pad = *(BOOL *) prop->data; > } > + else if (property == prop_swipeaction) { > + int i; > + CARD8 *action; > + > + if (prop->size > MAX_SWIPE || prop->format != 8 || > + prop->type != XA_INTEGER) > + return BadMatch; > + > + action = (CARD8 *) prop->data; > + > + for (i = 0; i < MAX_SWIPE; i++) > + para->swipe_action[i] = action[i]; > + } > + else if (property == prop_swipethreshold) { > + INT32 *swipe_thresholds; > + > + if (prop->size != 2 || prop->format != 32 || prop->type != XA_INTEGER) > + return BadMatch; > + > + swipe_thresholds = (INT32 *) prop->data; > + para->swipe_threshold_x = swipe_thresholds[0]; > + para->swipe_threshold_y = swipe_thresholds[1]; > + } > + else if (property == prop_singleswipe) { > + if (prop->size != 1 || prop->format != 8 || prop->type != XA_INTEGER) > + return BadMatch; > + > + para->single_swipe = *(BOOL *) prop->data; > + } > else if (property == prop_palm) { > if (prop->size != 1 || prop->format != 8 || prop->type != XA_INTEGER) > return BadMatch; > diff --git a/src/synaptics.c b/src/synaptics.c > index 0986e20..ea6c7e3 100644 > --- a/src/synaptics.c > +++ b/src/synaptics.c > @@ -548,6 +548,7 @@ set_default_parameters(InputInfoPtr pInfo) > Bool vertTwoFingerScroll, horizTwoFingerScroll; > int horizResolution = 1; > int vertResolution = 1; > + int horizSwipeThreshold, vertSwipeThreshold; > int width, height, diag, range; > int horizHyst, vertHyst; > int middle_button_timeout; > @@ -614,6 +615,12 @@ set_default_parameters(InputInfoPtr pInfo) > vertTwoFingerScroll = priv->has_double ? TRUE : FALSE; > horizTwoFingerScroll = FALSE; > > + /* Calculate the minimal required swipe distance for horizontal and > + * vertical events. Default is 15 and 25 per cent of the width and > + * the height respectively. */ > + horizSwipeThreshold = width * 0.15; > + vertSwipeThreshold = height * 0.25; why two different values here? > + > /* Use resolution reported by hardware if available */ > if ((priv->resx > 0) && (priv->resy > 0)) { > horizResolution = priv->resx; > @@ -702,6 +709,19 @@ set_default_parameters(InputInfoPtr pInfo) > xf86SetBoolOption(opts, "CircularScrolling", FALSE); > pars->circular_trigger = xf86SetIntOption(opts, "CircScrollTrigger", 0); > pars->circular_pad = xf86SetBoolOption(opts, "CircularPad", FALSE); > + pars->swipe_action[UP_SWIPE] = > + xf86SetIntOption(opts, "SwipeUpButton", 0); > + pars->swipe_action[DOWN_SWIPE] = > + xf86SetIntOption(opts, "SwipeDownButton", 0); > + pars->swipe_action[LEFT_SWIPE] = > + xf86SetIntOption(opts, "SwipeLeftButton", 0); > + pars->swipe_action[RIGHT_SWIPE] = > + xf86SetIntOption(opts, "SwipeRightButton", 0); > + pars->swipe_threshold_x = > + xf86SetIntOption(opts, "HorizSwipeThreshold", horizSwipeThreshold); > + pars->swipe_threshold_y = > + xf86SetIntOption(opts, "VertSwipeThreshold", vertSwipeThreshold); > + pars->single_swipe = xf86SetBoolOption(opts, "SingleSwipe", TRUE); > pars->palm_detect = xf86SetBoolOption(opts, "PalmDetect", FALSE); > pars->palm_min_width = xf86SetIntOption(opts, "PalmMinWidth", palmMinWidth); > pars->palm_min_z = xf86SetIntOption(opts, "PalmMinZ", palmMinZ); > @@ -1862,10 +1882,13 @@ HandleTapProcessing(SynapticsPrivate * priv, struct SynapticsHwState *hw, > > touch = finger >= FS_TOUCHED && priv->finger_state == FS_UNTOUCHED; > release = finger == FS_UNTOUCHED && priv->finger_state >= FS_TOUCHED; > + /* TODO: better way to determine how many fingers was actually used > + * for gesture - there could be up to 5 fingers (or 6 ?) */ > move = (finger >= FS_TOUCHED && > (priv->tap_max_fingers <= > - ((priv->horiz_scroll_twofinger_on || > - priv->vert_scroll_twofinger_on) ? 2 : 1)) && > + (priv->swipe.threefinger_on ? 3 : > + ((priv->horiz_scroll_twofinger_on || > + priv->vert_scroll_twofinger_on) ? 2 : 1))) && > ((abs(hw->x - priv->touch_on.x) >= para->tap_move) || > (abs(hw->y - priv->touch_on.y) >= para->tap_move))); > press = (hw->left || hw->right || hw->middle); > @@ -2528,6 +2551,35 @@ HandleScrolling(SynapticsPrivate * priv, struct SynapticsHwState *hw, > return delay; > } > > +static void > +HandleSwipe(SynapticsPrivate *priv, struct SynapticsHwState *hw, Bool finger) > +{ > + SynapticsParameters *para = &priv->synpara; > + > + /* not enough fingers touched, clear swipe tracking */ > + if (!finger || hw->numFingers < 3) { > + priv->swipe.threefinger_on = FALSE; > + priv->swipe.fourfinger_on = FALSE; > + priv->swipe.posted = FALSE; > + return; > + } > + > + if (priv->swipe.threefinger_on || priv->swipe.fourfinger_on) { > + /* swipe was activated, accumulate delta */ > + priv->swipe.delta_x += hw->x - priv->swipe.last_x; > + priv->swipe.delta_y += hw->y - priv->swipe.last_y; > + } > + else { > + priv->swipe.threefinger_on = hw->numFingers == 3; > + priv->swipe.fourfinger_on = hw->numFingers == 4; > + priv->swipe.delta_x = 0; > + priv->swipe.delta_y = 0; > + } > + > + priv->swipe.last_x = hw->x; > + priv->swipe.last_y = hw->y; > +} > + > /** > * Check if any 2+ fingers are close enough together to assume this is a > * ClickFinger action. > @@ -2808,6 +2860,43 @@ repeat_scrollbuttons(const InputInfoPtr pInfo, > return delay; > } > > +static void > +post_swipe_events(const InputInfoPtr pInfo) { > + SynapticsPrivate *priv = (SynapticsPrivate *) (pInfo->private); > + SynapticsParameters *para = &priv->synpara; > + > + /* there is no need to go any further if those conditions are not met */ > + if (!(priv->swipe.threefinger_on || priv->swipe.fourfinger_on) || > + (priv->swipe.posted && para->single_swipe)) > + return; > + > + /* swipes are intrinsically related - one big if stack */ > + if (para->swipe_action[UP_SWIPE] && > + priv->swipe.delta_y < -para->swipe_threshold_y) { > + post_button_click(pInfo, para->swipe_action[UP_SWIPE]); > + priv->swipe.posted = TRUE; > + priv->swipe.delta_y = 0; > + } > + else if (para->swipe_action[DOWN_SWIPE] && > + priv->swipe.delta_y > para->swipe_threshold_y) { > + post_button_click(pInfo, para->swipe_action[DOWN_SWIPE]); > + priv->swipe.posted = TRUE; > + priv->swipe.delta_y = 0; > + } > + else if (para->swipe_action[LEFT_SWIPE] && > + priv->swipe.delta_x < -para->swipe_threshold_x) { > + post_button_click(pInfo, para->swipe_action[LEFT_SWIPE]); > + priv->swipe.posted = TRUE; > + priv->swipe.delta_x = 0; > + } > + else if (para->swipe_action[RIGHT_SWIPE] && > + priv->swipe.delta_x > para->swipe_threshold_x) { > + post_button_click(pInfo, para->swipe_action[RIGHT_SWIPE]); > + priv->swipe.posted = TRUE; > + priv->swipe.delta_x = 0; > + } > +} > + > /* Update the open slots and number of active touches */ > static void > UpdateTouchState(InputInfoPtr pInfo, struct SynapticsHwState *hw) > @@ -3039,6 +3128,8 @@ HandleState(InputInfoPtr pInfo, struct SynapticsHwState *hw, CARD32 now, > if (timeleft > 0) > delay = MIN(delay, timeleft); > > + HandleSwipe(priv, hw, (finger >= FS_TOUCHED)); > + > /* > * Compensate for unequal x/y resolution. This needs to be done after > * calculations that require unadjusted coordinates, for example edge > @@ -3109,6 +3200,10 @@ HandleState(InputInfoPtr pInfo, struct SynapticsHwState *hw, CARD32 now, > priv->scroll.last_millis = hw->millis; > } > > + /* Process swipe events only in the active area */ > + if (inside_active_area) > + post_swipe_events(pInfo); > + > if (double_click) { > post_button_click(pInfo, 1); > post_button_click(pInfo, 1); > diff --git a/src/synapticsstr.h b/src/synapticsstr.h > index 54bc154..8135fb6 100644 > --- a/src/synapticsstr.h > +++ b/src/synapticsstr.h > @@ -83,6 +83,14 @@ enum ClickFingerEvent { > MAX_CLICK > }; > > +enum SwipeEvent { > + UP_SWIPE = 0, /* Swipe upward, three fingers */ > + DOWN_SWIPE, /* Swipe downward, three fingers */ > + LEFT_SWIPE, /* Swipe to the left, three fingers */ > + RIGHT_SWIPE, /* Swipe to the right, three fingers */ > + MAX_SWIPE > +}; > + > > typedef struct _SynapticsMoveHist { > int x, y; > @@ -187,6 +195,10 @@ typedef struct _SynapticsParameters { > int locked_drag_time; /* timeout for locked drags */ > int tap_action[MAX_TAP]; /* Button to report on tap events */ > int click_action[MAX_CLICK]; /* Button to report on click with fingers */ > + int swipe_action[MAX_SWIPE]; /* Button to report on swipe action */ > + int swipe_threshold_x; /* Threshold for horizontal swipe event */ > + int swipe_threshold_y; /* Threshold for vertical swipe event */ > + Bool single_swipe; /* Allow only one action per swipe */ > Bool circular_scrolling; /* Enable circular scrolling */ > double scroll_dist_circ; /* Scrolling angle radians */ > int circular_trigger; /* Trigger area for circular scrolling */ > @@ -243,6 +255,15 @@ struct _SynapticsPrivateRec { > double coast_delta_y; /* Accumulated vertical coast delta */ > int packets_this_scroll; /* Events received for this scroll */ > } scroll; > + struct { > + int last_x; /* last x-swipe position */ > + int last_y; /* last y-swipe position */ > + double delta_x; /* accumulated horiz swipe delta */ > + double delta_y; /* accumulated vert swipe delta */ > + Bool posted; /* indicate that event was posted */ > + Bool threefinger_on; /* swipe event with three fingers */ > + Bool fourfinger_on; /* XXX: ?? swipe event with four fingers */ > + } swipe; > int count_packet_finger; /* packet counter with finger on the touchpad */ > int button_delay_millis; /* button delay for 3rd button emulation */ > Bool prev_up; /* Previous up button value, for double click emulation */ > diff --git a/tools/synclient.c b/tools/synclient.c > index ac31a66..94dad62 100644 > --- a/tools/synclient.c > +++ b/tools/synclient.c > @@ -122,6 +122,13 @@ static struct Parameter params[] = { > {"CircScrollDelta", PT_DOUBLE, .01, 3, SYNAPTICS_PROP_CIRCULAR_SCROLLING_DIST, 0 /* float */, 0}, > {"CircScrollTrigger", PT_INT, 0, 8, SYNAPTICS_PROP_CIRCULAR_SCROLLING_TRIGGER, 8, 0}, > {"CircularPad", PT_BOOL, 0, 1, SYNAPTICS_PROP_CIRCULAR_PAD, 8, 0}, > + {"SwipeUpButton", PT_INT, 0, SYN_MAX_BUTTONS, SYNAPTICS_PROP_SWIPE_ACTION, 8, 0}, > + {"SwipeDownButton", PT_INT, 0, SYN_MAX_BUTTONS, SYNAPTICS_PROP_SWIPE_ACTION, 8, 1}, > + {"SwipeLeftButton", PT_INT, 0, SYN_MAX_BUTTONS, SYNAPTICS_PROP_SWIPE_ACTION, 8, 2}, > + {"SwipeRightButton", PT_INT, 0, SYN_MAX_BUTTONS, SYNAPTICS_PROP_SWIPE_ACTION, 8, 3}, > + {"HorizSwipeThreshold", PT_INT, 0, 10000, SYNAPTICS_PROP_SWIPE_THRESHOLD, 32, 0}, > + {"VertSwipeThreshold", PT_INT, 0, 10000, SYNAPTICS_PROP_SWIPE_THRESHOLD, 32, 1}, > + {"SingleSwipe", PT_BOOL, 0, 1, SYNAPTICS_PROP_SINGLE_SWIPE, 8, 0}, > {"PalmDetect", PT_BOOL, 0, 1, SYNAPTICS_PROP_PALM_DETECT, 8, 0}, > {"PalmMinWidth", PT_INT, 0, 15, SYNAPTICS_PROP_PALM_DIMENSIONS, 32, 0}, > {"PalmMinZ", PT_INT, 0, 255, SYNAPTICS_PROP_PALM_DIMENSIONS, 32, 1}, > -- > 1.8.3.2 > _______________________________________________ > xorg-devel at lists.x.org: X.Org development > Archives: http://lists.x.org/archives/xorg-devel > Info: http://lists.x.org/mailman/listinfo/xorg-devel > From alan.coopersmith at oracle.com Thu Sep 4 23:18:03 2014 From: alan.coopersmith at oracle.com (Alan Coopersmith) Date: Thu, 4 Sep 2014 23:18:03 -0700 Subject: [PATCH] Make list tests actually test lists Message-ID: <1409897883-28154-1-git-send-email-alan.coopersmith@oracle.com> Coverity scan detected that asserts were setting values, not checking them: CID 53252: Side effect in assertion (ASSERT_SIDE_EFFECT) assignment_where_comparison_intended: Assignment item->b = i * 2 has a side effect. This code will work differently in a non-debug build. Did you intend to use a comparison ("==") instead? CID 53259: Side effect in assertion (ASSERT_SIDE_EFFECT) assignment_where_comparison_intended: Assignment item->a = i has a side effect. This code will work differently in a non-debug build. Did you intend to use a comparison ("==") instead? CID 53260: Side effect in assertion (ASSERT_SIDE_EFFECT) assignment_where_comparison_intended: Assignment item->a = i has a side effect. This code will work differently in a non-debug build. Did you intend to use a comparison ("==") instead? CID 53261: Side effect in assertion (ASSERT_SIDE_EFFECT) assignment_where_comparison_intended: Assignment item->b = i * 2 has a side effect. This code will work differently in a non-debug build. Did you intend to use a comparison ("==") instead? Fixing those to be == caused test_nt_list_insert to start failing as part assumed append order, part assumed insert order, so it had to be fixed to use consistent ordering. Signed-off-by: Alan Coopersmith --- test/list.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/test/list.c b/test/list.c index f9f54ee..28d9609 100644 --- a/test/list.c +++ b/test/list.c @@ -249,15 +249,15 @@ test_nt_list_append(void) /* Test using nt_list_next */ for (item = foo, i = 1; i <= 10; i++, item = nt_list_next(item, next)) { - assert(item->a = i); - assert(item->b = i * 2); + assert(item->a == i); + assert(item->b == i * 2); } /* Test using nt_list_for_each_entry */ i = 1; nt_list_for_each_entry(item, foo, next) { - assert(item->a = i); - assert(item->b = i * 2); + assert(item->a == i); + assert(item->b == i * 2); i++; } assert(i == 11); @@ -270,11 +270,11 @@ test_nt_list_insert(void) struct foo *foo = calloc(10, sizeof(struct foo)); struct foo *item; - foo->a = 10; - foo->b = 20; + foo->a = 1; + foo->b = 2; nt_list_init(foo, next); - for (item = &foo[1], i = 9; i > 0; i--, item++) { + for (item = &foo[1], i = 10; i > 1; i--, item++) { item->a = i; item->b = i * 2; nt_list_init(item, next); @@ -282,16 +282,16 @@ test_nt_list_insert(void) } /* Test using nt_list_next */ - for (item = foo, i = 10; i > 0; i--, item = nt_list_next(item, next)) { - assert(item->a = i); - assert(item->b = i * 2); + for (item = foo, i = 1; i <= 10; i++, item = nt_list_next(item, next)) { + assert(item->a == i); + assert(item->b == i * 2); } /* Test using nt_list_for_each_entry */ i = 1; nt_list_for_each_entry(item, foo, next) { - assert(item->a = i); - assert(item->b = i * 2); + assert(item->a == i); + assert(item->b == i * 2); i++; } assert(i == 11); -- 1.7.9.2 From gabriele.mzt at gmail.com Fri Sep 5 04:35:08 2014 From: gabriele.mzt at gmail.com (Gabriele Mazzotta) Date: Fri, 05 Sep 2014 13:35:08 +0200 Subject: [PATCH] [synaptic] swipe actions based on the tree-fingers touch In-Reply-To: <20140905041030.GA3589@jelly.local> References: <20140309225815.50770829@sambook> <20140425193144.3295d508@sambook> <20140905041030.GA3589@jelly.local> Message-ID: <2657453.DqEk0VHNGg@xps13> On Friday 05 September 2014 14:10:30 Peter Hutterer wrote: > Hi Arkadiusz, > > sorry about the delay on the review here. > > On Fri, Apr 25, 2014 at 07:31:44PM +0200, Arkadiusz Bokowy wrote: > > When touchpad can report more then 2 active fingers, we can generate action > > based on swipe gesture. It includes upward, downward, to the left and to the > > right swipes. To all of those gestures can be assigned one button event. By > > default (internal driver default) swipes are disabled (assigned button 0). > > The swipe length (hand displacement) required for triggering button event can > > be set independently for horizontal and vertical movement. There is also > > possibility for triggering repeatable events during swipe handling, however > > it is disabled by default. > > > > The most preferable button assignment is button 8, 9, 10 and 11 for to the > > left, to the right, upward and downward swipes respectively. Such a > > configuration provides browser history navigation (e.g. Firefox) with > > horizontal swipes. Button 10 and 11 are not used, though. > > > > Added Synaptic driver options: > > * SwipeUpButton, SwipeDownButton, SwipeLeftButton, SwipeRightButton > > * HorizSwipeThreshold, VertSwipeThreshold > > * SingleSwipe > > > > This changes was developed on Samsung NP530U3C with the ETPS/2 Elantech > > Touchpad, which can report up to three-finger touch. Also tested on the > > SynPS/2 Synaptics TouchPad. Patch is generated for the driver version 1.7.4. > > > > Signed-off-by: Arkadiusz Bokowy > > --- > > include/synaptics-properties.h | 10 +++++ > > man/synaptics.man | 28 ++++++++++++ > > src/properties.c | 44 +++++++++++++++++++ > > src/synaptics.c | 99 +++++++++++++++++++++++++++++++++++++++++- > > src/synapticsstr.h | 21 +++++++++ > > tools/synclient.c | 7 +++ > > 6 files changed, 207 insertions(+), 2 deletions(-) > > > > diff --git a/include/synaptics-properties.h b/include/synaptics-properties.h > > index 19bd2b2..e74ffd0 100644 > > --- a/include/synaptics-properties.h > > +++ b/include/synaptics-properties.h > > @@ -104,6 +104,16 @@ > > * element. order: Finger 1, 2, 3 */ > > #define SYNAPTICS_PROP_CLICK_ACTION "Synaptics Click Action" > > > > +/* 8 bit, up to MAX_SWIPE values (see synaptics.h), 0 disables an > > + * element. order: Up, Down, Left, Right */ > > +#define SYNAPTICS_PROP_SWIPE_ACTION "Synaptics Swipe Action" > > no references to header files please. Just say there are 4 values in it. > > > + > > +/* 8 bit, 2 values, vertical, horizontal */ > > +#define SYNAPTICS_PROP_SWIPE_THRESHOLD "Synaptics Swipe Threshold" > > + > > +/* 8 bit (BOOL) */ > > +#define SYNAPTICS_PROP_SINGLE_SWIPE "Synaptics Single Swipe" > > I don't think we need this one. I'm ok with adding support for three-finger > swipe but if we only map them to buttons anyway, a single button per gesture > is enough. The only time where multiple buttons are useful is for scroll > buttons and that's where we already have two-finger scrolling for. > > that brings up the next question: should we even support vertical scroll. in > X, due to a number of limitations the only buttons that make sense to map to > are 8/9 for back/forward. Some specialised apps may be able to use 10/11 > etc. but I'd rather have a small limited feature that has predictable > outcomes. > > so I'm in favour of dropping the single swipe toggle, up/down and, quite > frankly, four finger swiping. Unless gabriele comes up with a really good > use-case, just exposing what the hw can do isn't enough tbh. I'm using this patch and xbindkeys to perform specific actions. The reasons why I added four finger gestures were that first of all, the code was there already, I just did few changes, and second, I wanted to be able to perform more than two actions. For example, I wanted to be able to navigate in the browser history and at the same time control my music player running in background without conflicts. Using the gestures to perform actions through programs like xbindkeys is the only use-case in which having all these gestures could be useful. If you use the buttons sent for what they are, I agree with you, horizontal three-finger swipes should be enough. PS: the patch I sent had a small mistake: diff --git a/src/properties.c b/src/properties.c index ac2d8f0..dedb05d 100644 --- a/src/properties.c +++ b/src/properties.c @@ -712,7 +712,7 @@ SetProperty(DeviceIntPtr dev, Atom property, XIPropertyValuePtr prop, int i; CARD8 *action; - if (prop->size > MAX_SWIPE || prop->format != 8 || + if (prop->size > 2 * MAX_SWIPE || prop->format != 8 || prop->type != XA_INTEGER) return BadMatch; Regards, Gabriele From jon.turney at dronecode.org.uk Fri Sep 5 07:23:07 2014 From: jon.turney at dronecode.org.uk (Jon TURNEY) Date: Fri, 05 Sep 2014 15:23:07 +0100 Subject: [PULL] hw/xwin patches Message-ID: <5409C74B.3030903@dronecode.org.uk> Hi Keith, Please consider pulling into master. Thanks. The following changes since commit 3a51418b2db353519a1779cf3cebbcc9afba2520: ephyr: set screen size & origin from host X server output's CRTC geometry (2014-08-21 20:14:55 -0500) are available in the git repository at: git://people.freedesktop.org/~jturney/xserver for you to fetch changes up to f92df22a037cb8b672dab2e7aef18a22275f5660: hw/xwin/glx: Remove an incorrect assertion in glxWinDrawableSwapBuffers (2014-08-29 13:56:36 +0100) ---------------------------------------------------------------- Jon TURNEY (10): hw/xwin/glx: When generating shims, limit the considered features to GL version <=1.2 hw/xwin: Makefile.am cleanup hw/xwin: Improve choice of display name used by internal clients hw/xwin: Fix a potential crash in winRedrawScreenShadowDDNL() hw/xwin: Add an idempotency guard to glwindows.h hw/xwin/glx: Don't override the server supported GL extensions string. hw/xwin/glx: Update .gitignore hw/xwin/glx: Fix a couple of typo bugs in indirect.c hw/xwin/glx: Downgrade "forcing window to exist" message to debug hw/xwin/glx: Remove an incorrect assertion in glxWinDrawableSwapBuffers hw/xwin/Makefile.am | 33 +++++++++++++++++----- hw/xwin/glx/.gitignore | 5 +++- hw/xwin/glx/gen_gl_wrappers.py | 13 +++++---- hw/xwin/glx/glwindows.h | 5 ++++ hw/xwin/glx/indirect.c | 19 ++----------- hw/xwin/glx/winpriv.c | 2 +- hw/xwin/winclipboardthread.c | 3 +- hw/xwin/windisplay.c | 64 ++++++++++++++++++++++++++++++++++++++++++ hw/xwin/windisplay.h | 34 ++++++++++++++++++++++ hw/xwin/winmsg.h | 2 ++ hw/xwin/winmultiwindowwm.c | 7 ++--- hw/xwin/winprefs.c | 8 +++--- hw/xwin/winshadddnl.c | 4 +++ 13 files changed, 160 insertions(+), 39 deletions(-) create mode 100644 hw/xwin/windisplay.c create mode 100644 hw/xwin/windisplay.h From arkadiusz.bokowy at gmail.com Fri Sep 5 09:51:19 2014 From: arkadiusz.bokowy at gmail.com (Arkadiusz Bokowy (Arkq)) Date: Fri, 5 Sep 2014 18:51:19 +0200 Subject: [PATCH] [synaptic] swipe actions based on the tree-fingers touch In-Reply-To: <2657453.DqEk0VHNGg@xps13> References: <20140309225815.50770829@sambook> <20140425193144.3295d508@sambook> <20140905041030.GA3589@jelly.local> <2657453.DqEk0VHNGg@xps13> Message-ID: <20140905185119.0c9361ea@sambook> Hi Peter, Hi Gabriele, First of all thanks for reviewing the code and I'm glad, that you see this patch as a valuable one. At the moment of writing it, I thought, that it is a good approach to "hack" swipe functionality into the core of the synaptic driver. However right now I'm not sure about that... For a long time I was concerned, that such a approach might turn out to be a dead end. At the moment on Mac one can define actions for gestures with up to four fingers (and all of them are useful). There are also possibilities to combine gesture with key modifiers. So I think, that similar combinations should be possible in the X system. Furthermore, one should be able to configure actions if the given gesture should generate mouse click/release event or click->movie_pointer->release. Such an event is useful for moving windows with touchpad gesture. And the list of combinations goes on, including the xbindkeys mentioned by Gabriele. But long story short. I think, that gesture engine should be separated from the driver itself. However, right now I'm not able to figure out how to pass key press/release event into such a gesture engine without an ugly hack with running daemon (like syndaemon). But maybe this idea is completely wrong and I'm insane :) So, as for now, I agree with you Peter, that only the right/left swipe action is acceptable for strict incorporation into the synaptic driver. If everyone agree with that, I can generate appropriate patch including your corrections. And lastly: > > + horizSwipeThreshold = width * 0.15; > > + vertSwipeThreshold = height * 0.25; > why two different values here? The reason why I've used two different values, was based on the ergonomic of hand movement. Moving fingers up and down is quit easy and the generated delta y can be big, so setting threshold to a small value might generate false positive triggers. On the other hand, so to speak, moving hand horizontally is not very easy. So in order to trigger event the threshold has to be sufficiently bigger. I've tested this functionality on Samsung NP530 laptop which has rectangular touchpad. Furthermore, this touchpad is not very big, so comfortable placing three fingers on it and then moving hand horizontally generates small delta x. Best regards, Arkadiusz PS. I have no subscription for xorg development list, so in general I'm able to see posts in this thread only. On Fri, 05 Sep 2014 13:35:08 +0200 Gabriele Mazzotta wrote: > On Friday 05 September 2014 14:10:30 Peter Hutterer wrote: > > Hi Arkadiusz, > > > > sorry about the delay on the review here. > > > > On Fri, Apr 25, 2014 at 07:31:44PM +0200, Arkadiusz Bokowy wrote: > > > When touchpad can report more then 2 active fingers, we can generate action > > > based on swipe gesture. It includes upward, downward, to the left and to the > > > right swipes. To all of those gestures can be assigned one button event. By > > > default (internal driver default) swipes are disabled (assigned button 0). > > > The swipe length (hand displacement) required for triggering button event can > > > be set independently for horizontal and vertical movement. There is also > > > possibility for triggering repeatable events during swipe handling, however > > > it is disabled by default. > > > > > > The most preferable button assignment is button 8, 9, 10 and 11 for to the > > > left, to the right, upward and downward swipes respectively. Such a > > > configuration provides browser history navigation (e.g. Firefox) with > > > horizontal swipes. Button 10 and 11 are not used, though. > > > > > > Added Synaptic driver options: > > > * SwipeUpButton, SwipeDownButton, SwipeLeftButton, SwipeRightButton > > > * HorizSwipeThreshold, VertSwipeThreshold > > > * SingleSwipe > > > > > > This changes was developed on Samsung NP530U3C with the ETPS/2 Elantech > > > Touchpad, which can report up to three-finger touch. Also tested on the > > > SynPS/2 Synaptics TouchPad. Patch is generated for the driver version 1.7.4. > > > > > > Signed-off-by: Arkadiusz Bokowy > > > --- > > > include/synaptics-properties.h | 10 +++++ > > > man/synaptics.man | 28 ++++++++++++ > > > src/properties.c | 44 +++++++++++++++++++ > > > src/synaptics.c | 99 +++++++++++++++++++++++++++++++++++++++++- > > > src/synapticsstr.h | 21 +++++++++ > > > tools/synclient.c | 7 +++ > > > 6 files changed, 207 insertions(+), 2 deletions(-) > > > > > > diff --git a/include/synaptics-properties.h b/include/synaptics-properties.h > > > index 19bd2b2..e74ffd0 100644 > > > --- a/include/synaptics-properties.h > > > +++ b/include/synaptics-properties.h > > > @@ -104,6 +104,16 @@ > > > * element. order: Finger 1, 2, 3 */ > > > #define SYNAPTICS_PROP_CLICK_ACTION "Synaptics Click Action" > > > > > > +/* 8 bit, up to MAX_SWIPE values (see synaptics.h), 0 disables an > > > + * element. order: Up, Down, Left, Right */ > > > +#define SYNAPTICS_PROP_SWIPE_ACTION "Synaptics Swipe Action" > > > > no references to header files please. Just say there are 4 values in it. > > > > > + > > > +/* 8 bit, 2 values, vertical, horizontal */ > > > +#define SYNAPTICS_PROP_SWIPE_THRESHOLD "Synaptics Swipe Threshold" > > > + > > > +/* 8 bit (BOOL) */ > > > +#define SYNAPTICS_PROP_SINGLE_SWIPE "Synaptics Single Swipe" > > > > I don't think we need this one. I'm ok with adding support for three-finger > > swipe but if we only map them to buttons anyway, a single button per gesture > > is enough. The only time where multiple buttons are useful is for scroll > > buttons and that's where we already have two-finger scrolling for. > > > > that brings up the next question: should we even support vertical scroll. in > > X, due to a number of limitations the only buttons that make sense to map to > > are 8/9 for back/forward. Some specialised apps may be able to use 10/11 > > etc. but I'd rather have a small limited feature that has predictable > > outcomes. > > > > so I'm in favour of dropping the single swipe toggle, up/down and, quite > > frankly, four finger swiping. Unless gabriele comes up with a really good > > use-case, just exposing what the hw can do isn't enough tbh. > > I'm using this patch and xbindkeys to perform specific actions. The reasons > why I added four finger gestures were that first of all, the code was there > already, I just did few changes, and second, I wanted to be able to perform > more than two actions. > For example, I wanted to be able to navigate in the browser history and at > the same time control my music player running in background without > conflicts. > > Using the gestures to perform actions through programs like xbindkeys is > the only use-case in which having all these gestures could be useful. > If you use the buttons sent for what they are, I agree with you, horizontal > three-finger swipes should be enough. > > PS: the patch I sent had a small mistake: > > diff --git a/src/properties.c b/src/properties.c > index ac2d8f0..dedb05d 100644 > --- a/src/properties.c > +++ b/src/properties.c > @@ -712,7 +712,7 @@ SetProperty(DeviceIntPtr dev, Atom property, XIPropertyValuePtr prop, > int i; > CARD8 *action; > > - if (prop->size > MAX_SWIPE || prop->format != 8 || > + if (prop->size > 2 * MAX_SWIPE || prop->format != 8 || > prop->type != XA_INTEGER) > return BadMatch; > > > Regards, > Gabriele From gabriele.mzt at gmail.com Fri Sep 5 10:58:02 2014 From: gabriele.mzt at gmail.com (Gabriele Mazzotta) Date: Fri, 05 Sep 2014 19:58:02 +0200 Subject: [PATCH] [synaptic] swipe actions based on the tree-fingers touch In-Reply-To: <20140905185119.0c9361ea@sambook> References: <20140309225815.50770829@sambook> <2657453.DqEk0VHNGg@xps13> <20140905185119.0c9361ea@sambook> Message-ID: <1578560.m7bg5tneDv@xps13> On Friday 05 September 2014 18:51:19 Arkadiusz Bokowy wrote: > Hi Peter, > Hi Gabriele, > > First of all thanks for reviewing the code and I'm glad, that you see > this patch as a valuable one. At the moment of writing it, I thought, > that it is a good approach to "hack" swipe functionality into the core > of the synaptic driver. However right now I'm not sure about that... > > For a long time I was concerned, that such a approach might turn out to > be a dead end. At the moment on Mac one can define actions for gestures > with up to four fingers (and all of them are useful). There are also > possibilities to combine gesture with key modifiers. So I think, that > similar combinations should be possible in the X system. Furthermore, > one should be able to configure actions if the given gesture should > generate mouse click/release event or click->movie_pointer->release. > Such an event is useful for moving windows with touchpad gesture. And > the list of combinations goes on, including the xbindkeys mentioned by > Gabriele. > > But long story short. I think, that gesture engine should be separated > from the driver itself. However, right now I'm not able to figure out > how to pass key press/release event into such a gesture engine without > an ugly hack with running daemon (like syndaemon). But maybe this idea > is completely wrong and I'm insane :) > > So, as for now, I agree with you Peter, that only the right/left swipe > action is acceptable for strict incorporation into the synaptic driver. > If everyone agree with that, I can generate appropriate patch including > your corrections. I agree with you when you say that gesture engines should be kept separated and you may want to take a look at Touch?gg (https://code.google.com/p/touchegg/). The last time I tried it I had some problems, then I stumbled upon your patch, which, despite being more limiting, had always worked reliably. Gabriele From dleone at nvidia.com Fri Sep 5 17:04:57 2014 From: dleone at nvidia.com (Damien Leone) Date: Fri, 5 Sep 2014 17:04:57 -0700 Subject: [PATCH] render: Add support for RENDER RGBA formats Message-ID: <540A4FA9.3050309@nvidia.com> A non-text attachment was scrubbed... Name: 0001-render-Add-support-for-RENDER-RGBA-formats.patch Type: text/x-patch Size: 4909 bytes Desc: not available URL: From hdegoede at redhat.com Sat Sep 6 01:14:29 2014 From: hdegoede at redhat.com (Hans de Goede) Date: Sat, 6 Sep 2014 10:14:29 +0200 Subject: [PATCH for 1.16 0/2] xfree86: Allow non-PCI devices as primary Message-ID: <1409991271-3199-1-git-send-email-hdegoede@redhat.com> Hi All, When the support for automatically loading drivers for non-PCI devices landed in 1.16, these 2 patches were missed, and without these 2 patches the non-PCI device support does not work. This is a straight cherry pick from master, with one compile error due to 1.16 not having syspath directly in OdevAttributes fixed. Regards, Hans From hdegoede at redhat.com Sat Sep 6 01:14:30 2014 From: hdegoede at redhat.com (Hans de Goede) Date: Sat, 6 Sep 2014 10:14:30 +0200 Subject: [PATCH for 1.16 1/2] xfree86: Fallback to first platform device as primary In-Reply-To: <1409991271-3199-1-git-send-email-hdegoede@redhat.com> References: <1409991271-3199-1-git-send-email-hdegoede@redhat.com> Message-ID: <1409991271-3199-2-git-send-email-hdegoede@redhat.com> From: Thierry Reding When neither of the various bus implementations was able to find a primary bus and device, fallback to using the platform bus as primary bus and the first platform device as primary device. Signed-off-by: Thierry Reding Reviewed-by: Rob Clark Tested-by: Rob Clark Signed-off-by: Keith Packard Signed-off-by: Hans de Goede --- hw/xfree86/common/xf86Bus.c | 3 +++ hw/xfree86/common/xf86platformBus.c | 17 +++++++++++++++++ hw/xfree86/common/xf86platformBus.h | 1 + 3 files changed, 21 insertions(+) diff --git a/hw/xfree86/common/xf86Bus.c b/hw/xfree86/common/xf86Bus.c index b3b3f8c..bd3e4e3 100644 --- a/hw/xfree86/common/xf86Bus.c +++ b/hw/xfree86/common/xf86Bus.c @@ -210,6 +210,9 @@ xf86BusProbe(void) #if (defined(__sparc__) || defined(__sparc)) && !defined(__OpenBSD__) xf86SbusProbe(); #endif +#ifdef XSERVER_PLATFORM_BUS + xf86platformPrimary(); +#endif } /* diff --git a/hw/xfree86/common/xf86platformBus.c b/hw/xfree86/common/xf86platformBus.c index eb1a3fb..1890494 100644 --- a/hw/xfree86/common/xf86platformBus.c +++ b/hw/xfree86/common/xf86platformBus.c @@ -635,4 +635,21 @@ void xf86platformVTProbe(void) xf86PlatformReprobeDevice(i, xf86_platform_devices[i].attribs); } } + +void xf86platformPrimary(void) +{ + /* use the first platform device as a fallback */ + if (primaryBus.type == BUS_NONE) { + xf86Msg(X_INFO, "no primary bus or device found\n"); + + if (xf86_num_platform_devices > 0) { + char *syspath = xf86_get_platform_attrib(0, ODEV_ATTRIB_SYSPATH); + + primaryBus.id.plat = &xf86_platform_devices[0]; + primaryBus.type = BUS_PLATFORM; + + xf86Msg(X_NONE, "\tfalling back to %s\n", syspath); + } + } +} #endif diff --git a/hw/xfree86/common/xf86platformBus.h b/hw/xfree86/common/xf86platformBus.h index 5dee4e0..dec1956 100644 --- a/hw/xfree86/common/xf86platformBus.h +++ b/hw/xfree86/common/xf86platformBus.h @@ -77,6 +77,7 @@ extern _X_EXPORT int xf86PlatformMatchDriver(char *matches[], int nmatches); extern void xf86platformVTProbe(void); +extern void xf86platformPrimary(void); #endif #endif -- 2.1.0 From hdegoede at redhat.com Sat Sep 6 01:14:31 2014 From: hdegoede at redhat.com (Hans de Goede) Date: Sat, 6 Sep 2014 10:14:31 +0200 Subject: [PATCH for 1.16 2/2] xfree86: Allow non-PCI devices as primary In-Reply-To: <1409991271-3199-1-git-send-email-hdegoede@redhat.com> References: <1409991271-3199-1-git-send-email-hdegoede@redhat.com> Message-ID: <1409991271-3199-3-git-send-email-hdegoede@redhat.com> From: Thierry Reding On platforms that don't support PCI or have no GPU attached to the PCI bus, there can still be a primary device on a non-PCI bus. Signed-off-by: Thierry Reding Reviewed-by: Rob Clark Tested-by: Rob Clark Signed-off-by: Keith Packard Signed-off-by: Hans de Goede --- hw/xfree86/common/xf86platformBus.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/hw/xfree86/common/xf86platformBus.c b/hw/xfree86/common/xf86platformBus.c index 1890494..c541788 100644 --- a/hw/xfree86/common/xf86platformBus.c +++ b/hw/xfree86/common/xf86platformBus.c @@ -476,10 +476,9 @@ xf86platformProbeDev(DriverPtr drvp) /* for non-seat0 servers assume first device is the master */ if (ServerIsNotSeat0()) break; - if (xf86_platform_devices[j].pdev) { - if (xf86IsPrimaryPlatform(&xf86_platform_devices[j])) - break; - } + + if (xf86IsPrimaryPlatform(&xf86_platform_devices[j])) + break; } } -- 2.1.0 From pomidorabelisima at gmail.com Sat Sep 6 01:13:46 2014 From: pomidorabelisima at gmail.com (poma) Date: Sat, 06 Sep 2014 10:13:46 +0200 Subject: EE Xorg.bin xf86PlatformMatchDriver - Segmentation fault - Server aborting In-Reply-To: <540A28D2.9090806@gmail.com> References: <5408EAF8.2070500@gmail.com> <540A28D2.9090806@gmail.com> Message-ID: <540AC23A.4070401@gmail.com> ... Rebased[1] patch[2] for the modesetting also didn't help, - xorg-x11-drv-modesetting-0.9.0-4.fc21.x86_64 [1] RFC-modesetting-Add_workaround_for_platform_devices_and_supreme_xserver.patch --- a/src/driver.c 2014-06-26 10:20:17.000000000 +0200 +++ b/src/driver.c 2014-09-06 06:56:32.862956426 +0200 @@ -136,6 +136,8 @@ int modesettingEntityIndex = -1; +static Bool supports_non_pci_platform_devs = FALSE; + static MODULESETUPPROTO(Setup); static XF86ModuleVersionInfo VersRec = { @@ -229,6 +231,28 @@ fd = open_hw(dev); if (fd != -1) { int ret = check_outputs(fd); + /* if called in platformProbe path, and server does not + * supports_non_pci_platform_devs then we need to reject + * and fallback to old probe. Otherwise things won't + * even work if user has a .conf file, thanks to autoAddGPU + * loop. + */ + if (platform_dev && !supports_non_pci_platform_devs) { + drmSetVersion sv; + char *busid; + + sv.drm_di_major = 1; + sv.drm_di_minor = 4; + sv.drm_dd_major = -1; /* Don't care */ + sv.drm_dd_minor = -1; /* Don't care */ + + drmSetInterfaceVersion(fd, &sv); + + busid = drmGetBusid(fd); + if (busid && !strncmp(busid, "platform:", 9)) + ret = FALSE; + drmFreeBusid(busid); + } close(fd); return ret; } @@ -284,6 +308,10 @@ return Options; } +#if 1 /* XORG_VERSION_CURRENT >= XORG_VERSION_NUMERIC(???) */ +# define SERVER_SUPPORTS_NON_PCI_PLATFORM_DEVS 12 +#endif + static Bool ms_driver_func(ScrnInfoPtr scrn, xorgDriverFuncOp op, void *data) { @@ -298,6 +326,9 @@ case SUPPORTS_SERVER_FDS: return TRUE; #endif + case SERVER_SUPPORTS_NON_PCI_PLATFORM_DEVS: + supports_non_pci_platform_devs = TRUE; + return TRUE; default: return FALSE; } I wonder whether this has anything to do with DisplayLink USB Display Adapter per se, and are these devices properly supported from day one. Mr. Keith I see[3] you also have one such device, can you help with advice? poma [2] http://lists.x.org/archives/xorg-devel/2014-June/042819.html [3] http://keithp.com/blogs/hotplug-displaylink/ From pomidorabelisima at gmail.com Sat Sep 6 03:19:16 2014 From: pomidorabelisima at gmail.com (poma) Date: Sat, 06 Sep 2014 12:19:16 +0200 Subject: EE Xorg.bin xf86PlatformMatchDriver - Segmentation fault - Server aborting In-Reply-To: <540AC3F0.7050104@redhat.com> References: <5408EAF8.2070500@gmail.com> <540A28D2.9090806@gmail.com> <540AC3F0.7050104@redhat.com> Message-ID: <540ADFA4.70503@gmail.com> On 06.09.2014 10:21, Hans de Goede wrote: > Hi poma, > > On 09/05/2014 11:19 PM, poma wrote: >> ... >> >> - xorg-x11-server-Xorg-1.16.99.1-1.fc21.x86_64 >> commit 3a51418 >> *auto-detection* PASSED >> >> - xorg-x11-server-Xorg-1.16.99.1-2.fc21.x86_64 >> commit 3a51418 + xorg-non-pci-v2.patch[1] (rebased xorg-non-pci.patch) >> *auto-detection* BROKEN > > As discussed in another email discussion, we're dropping xorg-non-pci.patch, > as upstream has a different solution. I've just kicked of builds for F-21+ > with this patch dropped, which should resolve your issue. > > Regards, > > Hans > Thanks! poma From pomidorabelisima at gmail.com Fri Sep 5 14:19:14 2014 From: pomidorabelisima at gmail.com (poma) Date: Fri, 05 Sep 2014 23:19:14 +0200 Subject: EE Xorg.bin xf86PlatformMatchDriver - Segmentation fault - Server aborting In-Reply-To: <5408EAF8.2070500@gmail.com> References: <5408EAF8.2070500@gmail.com> Message-ID: <540A28D2.9090806@gmail.com> ... - xorg-x11-server-Xorg-1.16.99.1-1.fc21.x86_64 commit 3a51418 *auto-detection* PASSED - xorg-x11-server-Xorg-1.16.99.1-2.fc21.x86_64 commit 3a51418 + xorg-non-pci-v2.patch[1] (rebased xorg-non-pci.patch) *auto-detection* BROKEN /var/log/Xorg.0.log [ 29.408] This is a pre-release version of the X server from Fedora Project. It is not supported in any way. Bugs may be filed in the bugzilla at http://bugs.freedesktop.org/. Select the "xorg" product for bugs you find in this release. Before reporting bugs in pre-release versions please check the latest version in the X.Org Foundation git repository. See http://wiki.x.org/wiki/GitPage for git access instructions. [ 29.409] X.Org X Server 1.16.99.1 Release Date: 2014-07-17 [ 29.409] X Protocol Version 11, Revision 0 [ 29.409] Build Operating System: lnx 3.17.0-0.rc3.git0.1.fc22.x86_64 [ 29.409] Current Operating System: Linux rawhide642 3.17.0-0.rc3.git0.1.fc22.x86_64 #1 SMP Mon Sep 1 14:47:34 UTC 2014 x86_64 [ 29.409] Kernel command line: BOOT_IMAGE=/vmlinuz-3.17.0-0.rc3.git0.1.fc22.x86_64 root=UUID=a07556d2-6fe2-417f-8202-c54c07fd9386 drm_kms_helper.edid_firmware=DVI-I-1:edid/848x480.bin initrd=/initramfs-3.17.0-0.rc3.git0.1.fc22.x86_64.img [ 29.409] Build Date: 05 September 2014 09:11:28PM [ 29.410] Build ID: xorg-x11-server 1.16.99.1-2.fc21 [ 29.410] Current version of pixman: 0.32.6 [ 29.410] Before reporting problems, check http://wiki.x.org to make sure that you have the latest version. [ 29.410] Markers: (--) probed, (**) from config file, (==) default setting, (++) from command line, (!!) notice, (II) informational, (WW) warning, (EE) error, (NI) not implemented, (??) unknown. [ 29.411] (==) Log file: "/var/log/Xorg.0.log", Time: Fri Sep 5 22:40:21 2014 [ 29.411] (==) Using system config directory "/usr/share/X11/xorg.conf.d" [ 29.426] (==) No Layout section. Using the first Screen section. [ 29.426] (==) No screen section available. Using defaults. [ 29.426] (**) |-->Screen "Default Screen Section" (0) [ 29.427] (**) | |-->Monitor "" [ 29.427] (==) No monitor specified for screen "Default Screen Section". Using a default monitor configuration. [ 29.427] (==) Automatically adding devices [ 29.427] (==) Automatically enabling devices [ 29.427] (==) Automatically adding GPU devices [ 29.428] (==) FontPath set to: catalogue:/etc/X11/fontpath.d, built-ins [ 29.428] (==) ModulePath set to "/usr/lib64/xorg/modules" [ 29.428] (II) The server relies on udev to provide the list of input devices. If no devices become available, reconfigure udev or disable AutoAddDevices. [ 29.428] (II) Loader magic: 0x81be40 [ 29.428] (II) Module ABI versions: [ 29.428] X.Org ANSI C Emulation: 0.4 [ 29.428] X.Org Video Driver: 18.0 [ 29.428] X.Org XInput driver : 21.0 [ 29.428] X.Org Server Extension : 8.0 [ 29.434] (EE) systemd-logind: failed to get session: PID 655 does not belong to any known session [ 29.435] (II) xfree86: Adding drm device (/dev/dri/card1) [ 29.436] (II) xfree86: Adding drm device (/dev/dri/card0) [ 29.460] (--) PCI:*(0:1:0:0) 10de:087d:1849:087d rev 177, Mem @ 0xfb000000/16777216, 0xe0000000/268435456, 0xf6000000/33554432, I/O @ 0x0000ec00/128, BIOS @ 0x????????/131072 [ 29.461] (II) LoadModule: "glx" [ 29.462] (II) Loading /usr/lib64/xorg/modules/extensions/libglx.so [ 29.487] (II) Module glx: vendor="X.Org Foundation" [ 29.487] compiled for 1.16.99.1, module version = 1.0.0 [ 29.488] ABI class: X.Org Server Extension, version 8.0 [ 29.488] (==) AIGLX enabled [ 29.488] (EE) [ 29.488] (EE) Backtrace: [ 29.490] (EE) 0: /usr/libexec/Xorg.bin (OsSigHandler+0x29) [0x59ab89] [ 29.491] (EE) 1: /lib64/libpthread.so.0 (__restore_rt+0x0) [0x7f0d482947cf] [ 29.492] (EE) 2: /usr/libexec/Xorg.bin (xf86PlatformMatchDriver+0x31d) [0x49a3fd] [ 29.494] (EE) 3: /usr/libexec/Xorg.bin (listPossibleVideoDrivers.constprop.0+0x3d) [0x49d54d] [ 29.508] (EE) 4: /usr/libexec/Xorg.bin (autoConfigDevice+0xfe) [0x49da3e] [ 29.509] (EE) 5: /usr/libexec/Xorg.bin (InitOutput+0xb56) [0x47b9e6] [ 29.510] (EE) 6: /usr/libexec/Xorg.bin (dix_main+0x1ea) [0x43cd5a] [ 29.512] (EE) 7: /lib64/libc.so.6 (__libc_start_main+0xf0) [0x7f0d47edd0e0] [ 29.514] (EE) 8: /usr/libexec/Xorg.bin (_start+0x29) [0x4273ae] [ 29.516] (EE) 9: ? (?+0x29) [0x29] [ 29.516] (EE) [ 29.516] (EE) Segmentation fault at address 0x0 [ 29.517] (EE) Fatal server error: [ 29.517] (EE) Caught signal 11 (Segmentation fault). Server aborting [ 29.517] (EE) [ 29.517] (EE) Please consult the Fedora Project support at http://wiki.x.org for help. [ 29.517] (EE) Please also check the log file at "/var/log/Xorg.0.log" for additional information. [ 29.517] (EE) [1] xorg-non-pci-v2.patch diff -ur a/hw/xfree86/common/xf86Init.c b/hw/xfree86/common/xf86Init.c --- a/hw/xfree86/common/xf86Init.c 2014-09-05 17:48:49.000000000 +0200 +++ b/hw/xfree86/common/xf86Init.c 2014-09-05 20:21:25.627416201 +0200 @@ -544,10 +544,18 @@ if (xf86DriverList[i]->Identify != NULL) xf86DriverList[i]->Identify(0); - if (xf86DriverList[i]->driverFunc) + if (xf86DriverList[i]->driverFunc) { xf86DriverList[i]->driverFunc(NULL, GET_REQUIRED_HW_INTERFACES, &flags); + /* also let the driver know that it is safe to + * allow platformProbe() to claim the device + * if it is a non-pci platform device: + */ + xf86DriverList[i]->driverFunc(NULL, + SERVER_SUPPORTS_NON_PCI_PLATFORM_DEVS, + NULL); + } if (NEED_IO_ENABLED(flags)) want_hw_access = TRUE; diff -ur a/hw/xfree86/common/xf86platformBus.c b/hw/xfree86/common/xf86platformBus.c --- a/hw/xfree86/common/xf86platformBus.c 2014-09-05 17:48:49.000000000 +0200 +++ b/hw/xfree86/common/xf86platformBus.c 2014-09-05 20:38:47.619819642 +0200 @@ -237,6 +237,41 @@ return i; } +static int +find_non_pci_driver(const char *busid, char *returnList[], int returnListMax) +{ + /* Add more entries here if we ever return more than 4 drivers for + any device */ + const char *driverList[5] = { NULL, NULL, NULL, NULL, NULL }; + int i = 0; + char *p, *s; + + s = xstrdup(busid); + p = strtok(s, ":"); + + if (strcmp(p, "platform")) + goto out; + + /* extract device name: */ + p = strtok(NULL, ":"); + + /* check for special cases where DDX driver name does not match busid: */ + if (!strcmp(p, "mdp")) { + driverList[i++] = "freedreno"; + } + + /* add name derived from busid last: */ + driverList[i++] = p; + + for (i = 0; (i < returnListMax) && (driverList[i] != NULL); i++) { + returnList[i] = xnfstrdup(driverList[i]); + } + +out: + free(s); + return i; /* Number of entries added */ +} + /** * @return The numbers of found devices that match with the current system * drivers. @@ -267,6 +302,9 @@ if ((info != NULL) && (j < nmatches)) { j += xf86VideoPtrToDriverList(info, &(matches[j]), nmatches - j); + } else if (j < nmatches) { + char *busid = xf86_platform_odev_attributes(i)->busid; + j += find_non_pci_driver(busid, &(matches[j]), nmatches - j); } } } @@ -285,6 +323,9 @@ pci = FALSE; } + /* First pass, look for PCI devices. If we find a suitable + * PCI device that takes priority. + */ for (i = 0; i < xf86_num_platform_devices; i++) { char *busid = xf86_platform_odev_attributes(i)->busid; @@ -292,6 +333,24 @@ platform_find_pci_info(&xf86_platform_devices[i], busid); } } + + /* if we found something, we are done: */ + if (primaryBus.type != BUS_NONE) + return 0; + + /* Second pass, look for real platform devices (ie. in the linux- + * kernel sense of platform device.. something that is not pci) + */ + for (i = 0; i < xf86_num_platform_devices; i++) { + char *busid = xf86_platform_odev_attributes(i)->busid; + + if (strncmp(busid, "platform:", 9) == 0) { + primaryBus.type = BUS_PLATFORM; + primaryBus.id.plat = &xf86_platform_devices[i]; + break; + } + } + return 0; } diff -ur a/hw/xfree86/common/xf86str.h b/hw/xfree86/common/xf86str.h --- a/hw/xfree86/common/xf86str.h 2014-09-05 17:48:49.000000000 +0200 +++ b/hw/xfree86/common/xf86str.h 2014-09-05 20:18:52.805726572 +0200 @@ -258,6 +258,7 @@ RR_GET_MODE_MM, GET_REQUIRED_HW_INTERFACES = 10, SUPPORTS_SERVER_FDS = 11, + SERVER_SUPPORTS_NON_PCI_PLATFORM_DEVS = 12 } xorgDriverFuncOp; typedef Bool xorgDriverFuncProc(ScrnInfoPtr, xorgDriverFuncOp, void *); poma From hdegoede at redhat.com Sat Sep 6 01:21:04 2014 From: hdegoede at redhat.com (Hans de Goede) Date: Sat, 06 Sep 2014 10:21:04 +0200 Subject: EE Xorg.bin xf86PlatformMatchDriver - Segmentation fault - Server aborting In-Reply-To: <540A28D2.9090806@gmail.com> References: <5408EAF8.2070500@gmail.com> <540A28D2.9090806@gmail.com> Message-ID: <540AC3F0.7050104@redhat.com> Hi poma, On 09/05/2014 11:19 PM, poma wrote: > ... > > - xorg-x11-server-Xorg-1.16.99.1-1.fc21.x86_64 > commit 3a51418 > *auto-detection* PASSED > > - xorg-x11-server-Xorg-1.16.99.1-2.fc21.x86_64 > commit 3a51418 + xorg-non-pci-v2.patch[1] (rebased xorg-non-pci.patch) > *auto-detection* BROKEN As discussed in another email discussion, we're dropping xorg-non-pci.patch, as upstream has a different solution. I've just kicked of builds for F-21+ with this patch dropped, which should resolve your issue. Regards, Hans > > /var/log/Xorg.0.log > [ 29.408] > This is a pre-release version of the X server from Fedora Project. > It is not supported in any way. > Bugs may be filed in the bugzilla at http://bugs.freedesktop.org/. > Select the "xorg" product for bugs you find in this release. > Before reporting bugs in pre-release versions please check the > latest version in the X.Org Foundation git repository. > See http://wiki.x.org/wiki/GitPage for git access instructions. > [ 29.409] > X.Org X Server 1.16.99.1 > Release Date: 2014-07-17 > [ 29.409] X Protocol Version 11, Revision 0 > [ 29.409] Build Operating System: lnx 3.17.0-0.rc3.git0.1.fc22.x86_64 > [ 29.409] Current Operating System: Linux rawhide642 3.17.0-0.rc3.git0.1.fc22.x86_64 #1 SMP Mon Sep 1 14:47:34 UTC 2014 x86_64 > [ 29.409] Kernel command line: BOOT_IMAGE=/vmlinuz-3.17.0-0.rc3.git0.1.fc22.x86_64 root=UUID=a07556d2-6fe2-417f-8202-c54c07fd9386 drm_kms_helper.edid_firmware=DVI-I-1:edid/848x480.bin initrd=/initramfs-3.17.0-0.rc3.git0.1.fc22.x86_64.img > [ 29.409] Build Date: 05 September 2014 09:11:28PM > [ 29.410] Build ID: xorg-x11-server 1.16.99.1-2.fc21 > [ 29.410] Current version of pixman: 0.32.6 > [ 29.410] Before reporting problems, check http://wiki.x.org > to make sure that you have the latest version. > [ 29.410] Markers: (--) probed, (**) from config file, (==) default setting, > (++) from command line, (!!) notice, (II) informational, > (WW) warning, (EE) error, (NI) not implemented, (??) unknown. > [ 29.411] (==) Log file: "/var/log/Xorg.0.log", Time: Fri Sep 5 22:40:21 2014 > [ 29.411] (==) Using system config directory "/usr/share/X11/xorg.conf.d" > [ 29.426] (==) No Layout section. Using the first Screen section. > [ 29.426] (==) No screen section available. Using defaults. > [ 29.426] (**) |-->Screen "Default Screen Section" (0) > [ 29.427] (**) | |-->Monitor "" > [ 29.427] (==) No monitor specified for screen "Default Screen Section". > Using a default monitor configuration. > [ 29.427] (==) Automatically adding devices > [ 29.427] (==) Automatically enabling devices > [ 29.427] (==) Automatically adding GPU devices > [ 29.428] (==) FontPath set to: > catalogue:/etc/X11/fontpath.d, > built-ins > [ 29.428] (==) ModulePath set to "/usr/lib64/xorg/modules" > [ 29.428] (II) The server relies on udev to provide the list of input devices. > If no devices become available, reconfigure udev or disable AutoAddDevices. > [ 29.428] (II) Loader magic: 0x81be40 > [ 29.428] (II) Module ABI versions: > [ 29.428] X.Org ANSI C Emulation: 0.4 > [ 29.428] X.Org Video Driver: 18.0 > [ 29.428] X.Org XInput driver : 21.0 > [ 29.428] X.Org Server Extension : 8.0 > [ 29.434] (EE) systemd-logind: failed to get session: PID 655 does not belong to any known session > [ 29.435] (II) xfree86: Adding drm device (/dev/dri/card1) > [ 29.436] (II) xfree86: Adding drm device (/dev/dri/card0) > [ 29.460] (--) PCI:*(0:1:0:0) 10de:087d:1849:087d rev 177, Mem @ 0xfb000000/16777216, 0xe0000000/268435456, 0xf6000000/33554432, I/O @ 0x0000ec00/128, BIOS @ 0x????????/131072 > [ 29.461] (II) LoadModule: "glx" > [ 29.462] (II) Loading /usr/lib64/xorg/modules/extensions/libglx.so > [ 29.487] (II) Module glx: vendor="X.Org Foundation" > [ 29.487] compiled for 1.16.99.1, module version = 1.0.0 > [ 29.488] ABI class: X.Org Server Extension, version 8.0 > [ 29.488] (==) AIGLX enabled > [ 29.488] (EE) > [ 29.488] (EE) Backtrace: > [ 29.490] (EE) 0: /usr/libexec/Xorg.bin (OsSigHandler+0x29) [0x59ab89] > [ 29.491] (EE) 1: /lib64/libpthread.so.0 (__restore_rt+0x0) [0x7f0d482947cf] > [ 29.492] (EE) 2: /usr/libexec/Xorg.bin (xf86PlatformMatchDriver+0x31d) [0x49a3fd] > [ 29.494] (EE) 3: /usr/libexec/Xorg.bin (listPossibleVideoDrivers.constprop.0+0x3d) [0x49d54d] > [ 29.508] (EE) 4: /usr/libexec/Xorg.bin (autoConfigDevice+0xfe) [0x49da3e] > [ 29.509] (EE) 5: /usr/libexec/Xorg.bin (InitOutput+0xb56) [0x47b9e6] > [ 29.510] (EE) 6: /usr/libexec/Xorg.bin (dix_main+0x1ea) [0x43cd5a] > [ 29.512] (EE) 7: /lib64/libc.so.6 (__libc_start_main+0xf0) [0x7f0d47edd0e0] > [ 29.514] (EE) 8: /usr/libexec/Xorg.bin (_start+0x29) [0x4273ae] > [ 29.516] (EE) 9: ? (?+0x29) [0x29] > [ 29.516] (EE) > [ 29.516] (EE) Segmentation fault at address 0x0 > [ 29.517] (EE) > Fatal server error: > [ 29.517] (EE) Caught signal 11 (Segmentation fault). Server aborting > [ 29.517] (EE) > [ 29.517] (EE) > Please consult the Fedora Project support > at http://wiki.x.org > for help. > [ 29.517] (EE) Please also check the log file at "/var/log/Xorg.0.log" for additional information. > [ 29.517] (EE) > > > [1] xorg-non-pci-v2.patch > > diff -ur a/hw/xfree86/common/xf86Init.c b/hw/xfree86/common/xf86Init.c > --- a/hw/xfree86/common/xf86Init.c 2014-09-05 17:48:49.000000000 +0200 > +++ b/hw/xfree86/common/xf86Init.c 2014-09-05 20:21:25.627416201 +0200 > @@ -544,10 +544,18 @@ > if (xf86DriverList[i]->Identify != NULL) > xf86DriverList[i]->Identify(0); > > - if (xf86DriverList[i]->driverFunc) > + if (xf86DriverList[i]->driverFunc) { > xf86DriverList[i]->driverFunc(NULL, > GET_REQUIRED_HW_INTERFACES, > &flags); > + /* also let the driver know that it is safe to > + * allow platformProbe() to claim the device > + * if it is a non-pci platform device: > + */ > + xf86DriverList[i]->driverFunc(NULL, > + SERVER_SUPPORTS_NON_PCI_PLATFORM_DEVS, > + NULL); > + } > > if (NEED_IO_ENABLED(flags)) > want_hw_access = TRUE; > diff -ur a/hw/xfree86/common/xf86platformBus.c b/hw/xfree86/common/xf86platformBus.c > --- a/hw/xfree86/common/xf86platformBus.c 2014-09-05 17:48:49.000000000 +0200 > +++ b/hw/xfree86/common/xf86platformBus.c 2014-09-05 20:38:47.619819642 +0200 > @@ -237,6 +237,41 @@ > return i; > } > > +static int > +find_non_pci_driver(const char *busid, char *returnList[], int returnListMax) > +{ > + /* Add more entries here if we ever return more than 4 drivers for > + any device */ > + const char *driverList[5] = { NULL, NULL, NULL, NULL, NULL }; > + int i = 0; > + char *p, *s; > + > + s = xstrdup(busid); > + p = strtok(s, ":"); > + > + if (strcmp(p, "platform")) > + goto out; > + > + /* extract device name: */ > + p = strtok(NULL, ":"); > + > + /* check for special cases where DDX driver name does not match busid: */ > + if (!strcmp(p, "mdp")) { > + driverList[i++] = "freedreno"; > + } > + > + /* add name derived from busid last: */ > + driverList[i++] = p; > + > + for (i = 0; (i < returnListMax) && (driverList[i] != NULL); i++) { > + returnList[i] = xnfstrdup(driverList[i]); > + } > + > +out: > + free(s); > + return i; /* Number of entries added */ > +} > + > /** > * @return The numbers of found devices that match with the current system > * drivers. > @@ -267,6 +302,9 @@ > > if ((info != NULL) && (j < nmatches)) { > j += xf86VideoPtrToDriverList(info, &(matches[j]), nmatches - j); > + } else if (j < nmatches) { > + char *busid = xf86_platform_odev_attributes(i)->busid; > + j += find_non_pci_driver(busid, &(matches[j]), nmatches - j); > } > } > } > @@ -285,6 +323,9 @@ > pci = FALSE; > } > > + /* First pass, look for PCI devices. If we find a suitable > + * PCI device that takes priority. > + */ > for (i = 0; i < xf86_num_platform_devices; i++) { > char *busid = xf86_platform_odev_attributes(i)->busid; > > @@ -292,6 +333,24 @@ > platform_find_pci_info(&xf86_platform_devices[i], busid); > } > } > + > + /* if we found something, we are done: */ > + if (primaryBus.type != BUS_NONE) > + return 0; > + > + /* Second pass, look for real platform devices (ie. in the linux- > + * kernel sense of platform device.. something that is not pci) > + */ > + for (i = 0; i < xf86_num_platform_devices; i++) { > + char *busid = xf86_platform_odev_attributes(i)->busid; > + > + if (strncmp(busid, "platform:", 9) == 0) { > + primaryBus.type = BUS_PLATFORM; > + primaryBus.id.plat = &xf86_platform_devices[i]; > + break; > + } > + } > + > return 0; > } > > diff -ur a/hw/xfree86/common/xf86str.h b/hw/xfree86/common/xf86str.h > --- a/hw/xfree86/common/xf86str.h 2014-09-05 17:48:49.000000000 +0200 > +++ b/hw/xfree86/common/xf86str.h 2014-09-05 20:18:52.805726572 +0200 > @@ -258,6 +258,7 @@ > RR_GET_MODE_MM, > GET_REQUIRED_HW_INTERFACES = 10, > SUPPORTS_SERVER_FDS = 11, > + SERVER_SUPPORTS_NON_PCI_PLATFORM_DEVS = 12 > } xorgDriverFuncOp; > > typedef Bool xorgDriverFuncProc(ScrnInfoPtr, xorgDriverFuncOp, void *); > > > poma > > From peter.hutterer at who-t.net Mon Sep 8 01:17:10 2014 From: peter.hutterer at who-t.net (Peter Hutterer) Date: Mon, 8 Sep 2014 18:17:10 +1000 Subject: [PATCH] Make list tests actually test lists In-Reply-To: <1409897883-28154-1-git-send-email-alan.coopersmith@oracle.com> References: <1409897883-28154-1-git-send-email-alan.coopersmith@oracle.com> Message-ID: <20140908081710.GB22301@jelly.local> On Thu, Sep 04, 2014 at 11:18:03PM -0700, Alan Coopersmith wrote: > Coverity scan detected that asserts were setting values, not checking them: > > CID 53252: Side effect in assertion (ASSERT_SIDE_EFFECT) > assignment_where_comparison_intended: Assignment item->b = i * 2 > has a side effect. This code will work differently in a non-debug build. > Did you intend to use a comparison ("==") instead? > > CID 53259: Side effect in assertion (ASSERT_SIDE_EFFECT) > assignment_where_comparison_intended: Assignment item->a = i > has a side effect. This code will work differently in a non-debug build. > Did you intend to use a comparison ("==") instead? > > CID 53260: Side effect in assertion (ASSERT_SIDE_EFFECT) > assignment_where_comparison_intended: Assignment item->a = i > has a side effect. This code will work differently in a non-debug build. > Did you intend to use a comparison ("==") instead? > > CID 53261: Side effect in assertion (ASSERT_SIDE_EFFECT) > assignment_where_comparison_intended: Assignment item->b = i * 2 > has a side effect. This code will work differently in a non-debug build. > Did you intend to use a comparison ("==") instead? > > Fixing those to be == caused test_nt_list_insert to start failing as > part assumed append order, part assumed insert order, so it had to be > fixed to use consistent ordering. > > Signed-off-by: Alan Coopersmith quis probat ipsa probaties* Reviewed-by: Peter Hutterer Cheers, Peter * -ish. it's been a long time.... > --- > test/list.c | 24 ++++++++++++------------ > 1 file changed, 12 insertions(+), 12 deletions(-) > > diff --git a/test/list.c b/test/list.c > index f9f54ee..28d9609 100644 > --- a/test/list.c > +++ b/test/list.c > @@ -249,15 +249,15 @@ test_nt_list_append(void) > > /* Test using nt_list_next */ > for (item = foo, i = 1; i <= 10; i++, item = nt_list_next(item, next)) { > - assert(item->a = i); > - assert(item->b = i * 2); > + assert(item->a == i); > + assert(item->b == i * 2); > } > > /* Test using nt_list_for_each_entry */ > i = 1; > nt_list_for_each_entry(item, foo, next) { > - assert(item->a = i); > - assert(item->b = i * 2); > + assert(item->a == i); > + assert(item->b == i * 2); > i++; > } > assert(i == 11); > @@ -270,11 +270,11 @@ test_nt_list_insert(void) > struct foo *foo = calloc(10, sizeof(struct foo)); > struct foo *item; > > - foo->a = 10; > - foo->b = 20; > + foo->a = 1; > + foo->b = 2; > nt_list_init(foo, next); > > - for (item = &foo[1], i = 9; i > 0; i--, item++) { > + for (item = &foo[1], i = 10; i > 1; i--, item++) { > item->a = i; > item->b = i * 2; > nt_list_init(item, next); > @@ -282,16 +282,16 @@ test_nt_list_insert(void) > } > > /* Test using nt_list_next */ > - for (item = foo, i = 10; i > 0; i--, item = nt_list_next(item, next)) { > - assert(item->a = i); > - assert(item->b = i * 2); > + for (item = foo, i = 1; i <= 10; i++, item = nt_list_next(item, next)) { > + assert(item->a == i); > + assert(item->b == i * 2); > } > > /* Test using nt_list_for_each_entry */ > i = 1; > nt_list_for_each_entry(item, foo, next) { > - assert(item->a = i); > - assert(item->b = i * 2); > + assert(item->a == i); > + assert(item->b == i * 2); > i++; > } > assert(i == 11); > -- > 1.7.9.2 > From martin.peres at free.fr Mon Sep 8 10:23:41 2014 From: martin.peres at free.fr (Martin Peres) Date: Mon, 08 Sep 2014 19:23:41 +0200 Subject: XDC2014: Call for paper In-Reply-To: <5362D026.1030309@free.fr> References: <5362D026.1030309@free.fr> Message-ID: <540DE61D.2040502@free.fr> Le 02/05/2014 00:52, Martin Peres a ?crit : > Hello, > > I have the pleasure to announce that the X.org Developer Conference 2014 > will > be held in Bordeaux, France from October 8th to October 10th. The venue is > located in the campus of the University of Bordeaux 1, in the computer > science > research lab called LaBRI. > > The official page for the event is http://www.x.org/wiki/Events/XDC2014 > while the call for paper is at http://www.x.org/wiki/Other/Press/CFP2014/ > > As usual, we are open to talks across the layers of the graphics stack, > from > the kernel to desktop environments / graphical applications and about how > to make things better for the developers who build them. If you're not sure > if something might fit, mail me or add it to the ideas list found in the > program page. > > The conference is free of charge and opened to the general public. If > you plan > on coming, please add yourself to the attendees list. We'll use this > list to > make badges and plan for the catering. > > I am looking forward to seeing you there, if you have any > inquiries/questions, > please send them to me (please also CC: board at foundation.x.org). > > Martin Peres Two days left for submitting your talk proposal for the XDC2014. After this date, the remaining slots will be attributed on a first-come, first-served basis. From thierry.moreau at connotech.com Mon Sep 8 12:29:44 2014 From: thierry.moreau at connotech.com (Thierry Moreau) Date: Mon, 08 Sep 2014 19:29:44 +0000 Subject: Feedback on Synaptics with ClickPad Message-ID: <540E03A8.6020401@connotech.com> Hi, first of all thanks for supporting this fairly new pointer device configuration. I encounter this because I install Linux from a barebone distribution (Crux 3.1) for reasons unrelated to the X system. Configuration summary: Kernel 3.16.1 xorg-xf86-input-synaptics 1.8.0 xorg.conf manually edited. Lenovo Thinkpad Edge E540 (same as T440) I see two difficulties: Despite Option "ClickFinger2" "0" Option "ClickFinger3" "0" in the configuration, xev still reports button events for buttons 2, 4, and 5 (mixed with buttons 1 and 3, so they woud be unreliable) when I play with 2 or 3 fingers on the clickpad. I guess I can live with predictable buttons 1 and 3, so I can patch (dirty) the source to ignore other button values. But maybe my whole experience with the clickpad/linux combination is affected more seriously by the second difficulty (I do not have much experience with a fully functional and ergonomics touchpad ...). So I venture to expose my second difficulty in which my own ignorance may be part of the problem. I have doubts about the X and Y coordinates translation in my configuration. From the X log file portion attached below, the following two lines worry me: [ 42758.110] (--) synaptics: SynPS/2 Synaptics TouchPad: x-axis range 1472 - 5112 (res 42) [ 42758.110] (--) synaptics: SynPS/2 Synaptics TouchPad: y-axis range 1408 - 3834 (res 42) My concern is that the geometry parameters expressed as percentage in the configuration would be distorted by the above ranges not being zero-based. For instance, the configuration lines: [ 42758.110] (**) Option "SoftButtonAreas" "50% 0 82% 0 0 0 0 0" [ 42758.110] (**) Option "SecondarySoftButtonAreas" "58% 0 0 8% 42% 58% 0 8%" In order to be autonomous in advancing this troubleshooting, I lack basic knowledge of the X system configuration and properties mechanisms. E.g. why the above ClickFinger options do not appear effective, or the X and Y axis orientations, or a utility to display raw mouse events (xev reports coordinates for the monitored window). As a summary, I was able to advance the installation details (up-to-date software, kernel configuration, xorg.conf well adjusted to system configuration) and the device basically works for me. However, fine-tuning the touchpad parameters remains difficult. I may provide additional details if it can help you improve the synaptics linux support. Thanks a lot for this! -- Thierry Moreau --- Attachment [ 42758.085] (II) config/udev: Adding input device SynPS/2 Synaptics TouchPad (/dev/input/event5) [ 42758.085] (**) SynPS/2 Synaptics TouchPad: Applying InputClass "evdev touchpad catchall" [ 42758.085] (**) SynPS/2 Synaptics TouchPad: Applying InputClass "touchpad catchall" [ 42758.085] (**) SynPS/2 Synaptics TouchPad: Applying InputClass "Default clickpad buttons" [ 42758.085] (II) Using input driver 'synaptics' for 'SynPS/2 Synaptics TouchPad' [ 42758.085] (**) SynPS/2 Synaptics TouchPad: always reports core events [ 42758.085] (**) Option "Device" "/dev/input/event5" [ 42758.110] (II) synaptics: SynPS/2 Synaptics TouchPad: found clickpad property [ 42758.110] (II) synaptics: SynPS/2 Synaptics TouchPad: found top buttonpad property [ 42758.110] (--) synaptics: SynPS/2 Synaptics TouchPad: x-axis range 1472 - 5112 (res 42) [ 42758.110] (--) synaptics: SynPS/2 Synaptics TouchPad: y-axis range 1408 - 3834 (res 42) [ 42758.110] (--) synaptics: SynPS/2 Synaptics TouchPad: pressure range 0 - 255 [ 42758.110] (--) synaptics: SynPS/2 Synaptics TouchPad: finger width range 0 - 15 [ 42758.110] (--) synaptics: SynPS/2 Synaptics TouchPad: buttons: left double triple [ 42758.110] (--) synaptics: SynPS/2 Synaptics TouchPad: Vendor 0x2 Product 0x7 [ 42758.110] (**) Option "SoftButtonAreas" "50% 0 82% 0 0 0 0 0" [ 42758.110] (**) Option "SecondarySoftButtonAreas" "58% 0 0 8% 42% 58% 0 8%" [ 42758.110] (--) synaptics: SynPS/2 Synaptics TouchPad: touchpad found [ 42758.110] (**) SynPS/2 Synaptics TouchPad: always reports core events [ 42758.123] (**) Option "config_info" "udev:/sys/devices/platform/i8042/serio1/input/input6/event5" [ 42758.123] (II) XINPUT: Adding extended input device "SynPS/2 Synaptics TouchPad" (type: TOUCHPAD, id 9) [ 42758.123] (**) synaptics: SynPS/2 Synaptics TouchPad: (accel) MinSpeed is now constant deceleration 2.5 [ 42758.123] (**) synaptics: SynPS/2 Synaptics TouchPad: (accel) MaxSpeed is now 1.75 [ 42758.123] (**) synaptics: SynPS/2 Synaptics TouchPad: (accel) AccelFactor is now 0.046 [ 42758.123] (**) SynPS/2 Synaptics TouchPad: (accel) keeping acceleration scheme 1 [ 42758.123] (**) SynPS/2 Synaptics TouchPad: (accel) acceleration profile 1 [ 42758.123] (**) SynPS/2 Synaptics TouchPad: (accel) acceleration factor: 2.000 [ 42758.123] (**) SynPS/2 Synaptics TouchPad: (accel) acceleration threshold: 4 [ 42758.123] (--) synaptics: SynPS/2 Synaptics TouchPad: touchpad found [ 42758.123] (II) config/udev: Adding input device SynPS/2 Synaptics TouchPad (/dev/input/mouse0) [ 42758.123] (**) SynPS/2 Synaptics TouchPad: Ignoring device from InputClass "touchpad ignore duplicates" [ 42758.123] (II) config/udev: Adding input device TPPS/2 IBM TrackPoint (/dev/input/event6) [ 42758.123] (**) TPPS/2 IBM TrackPoint: Applying InputClass "evdev pointer catchall" [ 42758.123] (II) Using input driver 'evdev' for 'TPPS/2 IBM TrackPoint' [ 42758.123] (**) TPPS/2 IBM TrackPoint: always reports core events [ 42758.123] (**) evdev: TPPS/2 IBM TrackPoint: Device: "/dev/input/event6" [ 42758.123] (--) evdev: TPPS/2 IBM TrackPoint: Vendor 0x2 Product 0xa [ 42758.123] (--) evdev: TPPS/2 IBM TrackPoint: Found 3 mouse buttons [ 42758.123] (--) evdev: TPPS/2 IBM TrackPoint: Found relative axes [ 42758.123] (--) evdev: TPPS/2 IBM TrackPoint: Found x and y relative axes [ 42758.123] (II) evdev: TPPS/2 IBM TrackPoint: Configuring as mouse [ 42758.123] (**) evdev: TPPS/2 IBM TrackPoint: YAxisMapping: buttons 4 and 5 [ 42758.123] (**) evdev: TPPS/2 IBM TrackPoint: EmulateWheelButton: 4, EmulateWheelInertia: 10, EmulateWheelTimeout: 200 [ 42758.123] (**) Option "config_info" "udev:/sys/devices/platform/i8042/serio1/serio2/input/input7/event6" [ 42758.123] (II) XINPUT: Adding extended input device "TPPS/2 IBM TrackPoint" (type: MOUSE, id 10) [ 42758.123] (II) evdev: TPPS/2 IBM TrackPoint: initialized for relative axes. [ 42758.123] (**) TPPS/2 IBM TrackPoint: (accel) keeping acceleration scheme 1 [ 42758.123] (**) TPPS/2 IBM TrackPoint: (accel) acceleration profile 0 [ 42758.123] (**) TPPS/2 IBM TrackPoint: (accel) acceleration factor: 2.000 [ 42758.123] (**) TPPS/2 IBM TrackPoint: (accel) acceleration threshold: 4 [ 42758.123] (II) config/udev: Adding input device TPPS/2 IBM TrackPoint (/dev/input/mouse1) [ 42758.123] (II) No input driver specified, ignoring this device. [ 42758.123] (II) This device may have been added with another device file. ----- End From jcristau at debian.org Mon Sep 8 15:12:59 2014 From: jcristau at debian.org (Julien Cristau) Date: Tue, 9 Sep 2014 00:12:59 +0200 Subject: [PATCH for 1.16 0/2] xfree86: Allow non-PCI devices as primary In-Reply-To: <1409991271-3199-1-git-send-email-hdegoede@redhat.com> References: <1409991271-3199-1-git-send-email-hdegoede@redhat.com> Message-ID: <20140908221259.GC19116@betterave.cristau.org> On Sat, Sep 6, 2014 at 10:14:29 +0200, Hans de Goede wrote: > Hi All, > > When the support for automatically loading drivers for non-PCI devices > landed in 1.16, these 2 patches were missed, and without these 2 patches > the non-PCI device support does not work. > > This is a straight cherry pick from master, with one compile error due to > 1.16 not having syspath directly in OdevAttributes fixed. > Care to give me the commit ids from master? Thanks, Julien From peter.hutterer at who-t.net Mon Sep 8 20:29:24 2014 From: peter.hutterer at who-t.net (Peter Hutterer) Date: Tue, 9 Sep 2014 13:29:24 +1000 Subject: Feedback on Synaptics with ClickPad In-Reply-To: <540E03A8.6020401@connotech.com> References: <540E03A8.6020401@connotech.com> Message-ID: <20140909032924.GC20703@jelly.redhat.com> On Mon, Sep 08, 2014 at 07:29:44PM +0000, Thierry Moreau wrote: > > first of all thanks for supporting this fairly new pointer device > configuration. > > I encounter this because I install Linux from a barebone distribution (Crux > 3.1) for reasons unrelated to the X system. > > Configuration summary: > Kernel 3.16.1 > xorg-xf86-input-synaptics 1.8.0 > xorg.conf manually edited. > Lenovo Thinkpad Edge E540 (same as T440) > > I see two difficulties: > > Despite > Option "ClickFinger2" "0" > Option "ClickFinger3" "0" > in the configuration, xev still reports button events for buttons 2, 4, and > 5 (mixed with buttons 1 and 3, so they woud be unreliable) when I play with > 2 or 3 fingers on the clickpad. can you outline what you mean by that? ClickFinger is the button number you get when you leave more than one finger on the touchpad while physically clicking the pad. buttons 4 and 5 are scroll buttons which you'd get from two-finger scrolling. And you may have tapping enabled (TapAction). checkout synclient, it allows you to set the various values easily. xinput list-prop shows all current values, but not as obvious as synclient. > I guess I can live with predictable buttons 1 and 3, so I can patch (dirty) > the source to ignore other button values. But maybe my whole experience with > the clickpad/linux combination is affected more seriously by the second > difficulty (I do not have much experience with a fully functional and > ergonomics touchpad ...). > > So I venture to expose my second difficulty in which my own ignorance may be > part of the problem. > > I have doubts about the X and Y coordinates translation in my configuration. > From the X log file portion attached below, the following two lines worry > me: > > [ 42758.110] (--) synaptics: SynPS/2 Synaptics TouchPad: x-axis range 1472 - > 5112 (res 42) > [ 42758.110] (--) synaptics: SynPS/2 Synaptics TouchPad: y-axis range 1408 - > 3834 (res 42) > > My concern is that the geometry parameters expressed as percentage in the > configuration would be distorted by the above ranges not being zero-based. > For instance, the configuration lines: > > [ 42758.110] (**) Option "SoftButtonAreas" "50% 0 82% 0 0 0 0 0" > [ 42758.110] (**) Option "SecondarySoftButtonAreas" "58% 0 0 8% 42% 58% 0 > 8%" 0 in this case means 'stretch to infinity'. all Synaptics touchpads have a non-zero range, so we handle that well usually. > In order to be autonomous in advancing this troubleshooting, I lack basic > knowledge of the X system configuration and properties mechanisms. E.g. why > the above ClickFinger options do not appear effective, or the X and Y axis > orientations, or a utility to display raw mouse events (xev reports > coordinates for the monitored window). use touchpad-edge-detector from libevdev to get the real ranges http://cgit.freedesktop.org/libevdev/tree/tools/touchpad-edge-detector.c > As a summary, I was able to advance the installation details (up-to-date > software, kernel configuration, xorg.conf well adjusted to system > configuration) and the device basically works for me. However, fine-tuning > the touchpad parameters remains difficult. > > I may provide additional details if it can help you improve the synaptics > linux support. Thanks a lot for this! > > -- Thierry Moreau > > --- Attachment > [ 42758.085] (II) config/udev: Adding input device SynPS/2 Synaptics > TouchPad (/dev/input/event5) > [ 42758.085] (**) SynPS/2 Synaptics TouchPad: Applying InputClass "evdev > touchpad catchall" > [ 42758.085] (**) SynPS/2 Synaptics TouchPad: Applying InputClass "touchpad > catchall" > [ 42758.085] (**) SynPS/2 Synaptics TouchPad: Applying InputClass "Default > clickpad buttons" > [ 42758.085] (II) Using input driver 'synaptics' for 'SynPS/2 Synaptics > TouchPad' > [ 42758.085] (**) SynPS/2 Synaptics TouchPad: always reports core events > [ 42758.085] (**) Option "Device" "/dev/input/event5" > [ 42758.110] (II) synaptics: SynPS/2 Synaptics TouchPad: found clickpad > property > [ 42758.110] (II) synaptics: SynPS/2 Synaptics TouchPad: found top buttonpad > property > [ 42758.110] (--) synaptics: SynPS/2 Synaptics TouchPad: x-axis range 1472 - > 5112 (res 42) > [ 42758.110] (--) synaptics: SynPS/2 Synaptics TouchPad: y-axis range 1408 - > 3834 (res 42) > [ 42758.110] (--) synaptics: SynPS/2 Synaptics TouchPad: pressure range 0 - > 255 > [ 42758.110] (--) synaptics: SynPS/2 Synaptics TouchPad: finger width range > 0 - 15 > [ 42758.110] (--) synaptics: SynPS/2 Synaptics TouchPad: buttons: left > double triple > [ 42758.110] (--) synaptics: SynPS/2 Synaptics TouchPad: Vendor 0x2 Product > 0x7 > [ 42758.110] (**) Option "SoftButtonAreas" "50% 0 82% 0 0 0 0 0" > [ 42758.110] (**) Option "SecondarySoftButtonAreas" "58% 0 0 8% 42% 58% 0 > 8%" > [ 42758.110] (--) synaptics: SynPS/2 Synaptics TouchPad: touchpad found > [ 42758.110] (**) SynPS/2 Synaptics TouchPad: always reports core events > [ 42758.123] (**) Option "config_info" > "udev:/sys/devices/platform/i8042/serio1/input/input6/event5" > [ 42758.123] (II) XINPUT: Adding extended input device "SynPS/2 Synaptics > TouchPad" (type: TOUCHPAD, id 9) not sure where you have your ClickFinger option set, but it's not found by the driver, otherwise it would show up here. I think your configuration is buggy. Cheers, Peter > [ 42758.123] (**) synaptics: SynPS/2 Synaptics TouchPad: (accel) MinSpeed is > now constant deceleration 2.5 > [ 42758.123] (**) synaptics: SynPS/2 Synaptics TouchPad: (accel) MaxSpeed is > now 1.75 > [ 42758.123] (**) synaptics: SynPS/2 Synaptics TouchPad: (accel) AccelFactor > is now 0.046 > [ 42758.123] (**) SynPS/2 Synaptics TouchPad: (accel) keeping acceleration > scheme 1 > [ 42758.123] (**) SynPS/2 Synaptics TouchPad: (accel) acceleration profile 1 > [ 42758.123] (**) SynPS/2 Synaptics TouchPad: (accel) acceleration factor: > 2.000 > [ 42758.123] (**) SynPS/2 Synaptics TouchPad: (accel) acceleration > threshold: 4 > [ 42758.123] (--) synaptics: SynPS/2 Synaptics TouchPad: touchpad found > [ 42758.123] (II) config/udev: Adding input device SynPS/2 Synaptics > TouchPad (/dev/input/mouse0) > [ 42758.123] (**) SynPS/2 Synaptics TouchPad: Ignoring device from > InputClass "touchpad ignore duplicates" > [ 42758.123] (II) config/udev: Adding input device TPPS/2 IBM TrackPoint > (/dev/input/event6) > [ 42758.123] (**) TPPS/2 IBM TrackPoint: Applying InputClass "evdev pointer > catchall" > [ 42758.123] (II) Using input driver 'evdev' for 'TPPS/2 IBM TrackPoint' > [ 42758.123] (**) TPPS/2 IBM TrackPoint: always reports core events > [ 42758.123] (**) evdev: TPPS/2 IBM TrackPoint: Device: "/dev/input/event6" > [ 42758.123] (--) evdev: TPPS/2 IBM TrackPoint: Vendor 0x2 Product 0xa > [ 42758.123] (--) evdev: TPPS/2 IBM TrackPoint: Found 3 mouse buttons > [ 42758.123] (--) evdev: TPPS/2 IBM TrackPoint: Found relative axes > [ 42758.123] (--) evdev: TPPS/2 IBM TrackPoint: Found x and y relative axes > [ 42758.123] (II) evdev: TPPS/2 IBM TrackPoint: Configuring as mouse > [ 42758.123] (**) evdev: TPPS/2 IBM TrackPoint: YAxisMapping: buttons 4 and > 5 > [ 42758.123] (**) evdev: TPPS/2 IBM TrackPoint: EmulateWheelButton: 4, > EmulateWheelInertia: 10, EmulateWheelTimeout: 200 > [ 42758.123] (**) Option "config_info" > "udev:/sys/devices/platform/i8042/serio1/serio2/input/input7/event6" > [ 42758.123] (II) XINPUT: Adding extended input device "TPPS/2 IBM > TrackPoint" (type: MOUSE, id 10) > [ 42758.123] (II) evdev: TPPS/2 IBM TrackPoint: initialized for relative > axes. > [ 42758.123] (**) TPPS/2 IBM TrackPoint: (accel) keeping acceleration scheme > 1 > [ 42758.123] (**) TPPS/2 IBM TrackPoint: (accel) acceleration profile 0 > [ 42758.123] (**) TPPS/2 IBM TrackPoint: (accel) acceleration factor: 2.000 > [ 42758.123] (**) TPPS/2 IBM TrackPoint: (accel) acceleration threshold: 4 > [ 42758.123] (II) config/udev: Adding input device TPPS/2 IBM TrackPoint > (/dev/input/mouse1) > [ 42758.123] (II) No input driver specified, ignoring this device. > [ 42758.123] (II) This device may have been added with another device file. > ----- End > _______________________________________________ > xorg-devel at lists.x.org: X.Org development > Archives: http://lists.x.org/archives/xorg-devel > Info: http://lists.x.org/mailman/listinfo/xorg-devel > From thierry.moreau at connotech.com Tue Sep 9 06:45:54 2014 From: thierry.moreau at connotech.com (Thierry Moreau) Date: Tue, 09 Sep 2014 13:45:54 +0000 Subject: Feedback on Synaptics with ClickPad In-Reply-To: <20140909032924.GC20703@jelly.redhat.com> References: <540E03A8.6020401@connotech.com> <20140909032924.GC20703@jelly.redhat.com> Message-ID: <540F0492.6000409@connotech.com> Hi Peter, Thanks for this wonderful help. Quick reply (I am not yet done, but I advanced and so I report the blocking configuration item). What I took seriously was On 2014-09-09 03:29, Peter Hutterer wrote: > > not sure where you have your ClickFinger option set, but it's not found by > the driver, otherwise it would show up here. I think your configuration is > buggy. > In the InputDevice section (in /etc/xorg.conf) for the ClickPad device, the line Option "protocol" "psm" prevented the section to apply. It failed on "Synaptics driver unable to detect protocol" which I ignored (... little or no excuse ...). Maybe it has something to do with the different protocol with the Lenovo Edge series (I don't know), but the now-seemingly-effective InputDevice section has no "protocol" option at all. For the record, I came to this troubleshooting interim conclusion by comparing X log files with and without AutoAddDevices . More extensive reply to follow. Regards, - Thierry From thierry.moreau at connotech.com Tue Sep 9 09:48:33 2014 From: thierry.moreau at connotech.com (Thierry Moreau) Date: Tue, 09 Sep 2014 16:48:33 +0000 Subject: Feedback on Synaptics with ClickPad In-Reply-To: <540F0492.6000409@connotech.com> References: <540E03A8.6020401@connotech.com> <20140909032924.GC20703@jelly.redhat.com> <540F0492.6000409@connotech.com> Message-ID: <540F2F61.6020203@connotech.com> On 2014-09-09 13:45, Thierry Moreau wrote: > Hi Peter, > > Thanks for this wonderful help. > > Quick reply (I am not yet done, but I advanced and so I report the > blocking configuration item). > > What I took seriously was > > On 2014-09-09 03:29, Peter Hutterer wrote: >> >> not sure where you have your ClickFinger option set, but it's not >> found by >> the driver, otherwise it would show up here. I think your >> configuration is >> buggy. >> > > In the InputDevice section (in /etc/xorg.conf) for the ClickPad device, > the line > Option "protocol" "psm" > prevented the section to apply. It failed on > "Synaptics driver unable to detect protocol" which I ignored (... little > or no excuse ...). > > Maybe it has something to do with the different protocol with the Lenovo > Edge series (I don't know), but the now-seemingly-effective InputDevice > section has no "protocol" option at all. > > For the record, I came to this troubleshooting interim conclusion by > comparing X log files with and without AutoAddDevices . > > More extensive reply to follow. > I confirm that removing the option "protocol" allowed the InputDevice section to be fully processed by the synaptics driver (for a Lenovo / Thinkpad Edge E540). With this, I will normally handle the other concerns, notably with the suggestions from Peter. Thanks a lot! Regards, - Thierry From hdegoede at redhat.com Tue Sep 9 12:52:23 2014 From: hdegoede at redhat.com (Hans de Goede) Date: Tue, 09 Sep 2014 21:52:23 +0200 Subject: [PATCH for 1.16 0/2] xfree86: Allow non-PCI devices as primary In-Reply-To: <20140908221259.GC19116@betterave.cristau.org> References: <1409991271-3199-1-git-send-email-hdegoede@redhat.com> <20140908221259.GC19116@betterave.cristau.org> Message-ID: <540F5A77.8040801@redhat.com> Hi, On 09/09/2014 12:12 AM, Julien Cristau wrote: > On Sat, Sep 6, 2014 at 10:14:29 +0200, Hans de Goede wrote: > >> Hi All, >> >> When the support for automatically loading drivers for non-PCI devices >> landed in 1.16, these 2 patches were missed, and without these 2 patches >> the non-PCI device support does not work. >> >> This is a straight cherry pick from master, with one compile error due to >> 1.16 not having syspath directly in OdevAttributes fixed. >> > Care to give me the commit ids from master? Certainly: http://cgit.freedesktop.org/xorg/xserver/commit/?id=2f0183222b4279266e6ef60b923738ff55f0afba http://cgit.freedesktop.org/xorg/xserver/commit/?id=5d133276de9c50146e80ffc69edd429c2afe98e6 Regards, Hans From bensberg at justemail.net Tue Sep 9 13:37:18 2014 From: bensberg at justemail.net (Benno Schulenberg) Date: Tue, 09 Sep 2014 22:37:18 +0200 Subject: [patch] xkbcomp: fixing an age-old warning Message-ID: <1410295038.4125921.165564561.7C3B4C05@webmail.messagingengine.com> Hi, For many keyboard layouts, starting X produces the following warning: Warning: Type "ONE_LEVEL" has 1 levels, but has 2 symbols Ignoring extra symbols It is easily reproced with this command: $ setxkbmap -print | xkbcomp -w 1 - $DISPLAY The warning is given because in the loads of overlapping data that setxkbmap provides to xkbcomp, the key first gets defined with two symbols assigned to it [1], which automatically sets its number of levels to 2, and then it gets redefined to the type of ONE_LEVEL and with just one symbol assigned [2], but this redefining mistakenly does not adjust the number of levels to 1. Attached patch fixes this. The patch looks invasive, because it also inverts the if, to make the condition more readable, but the basic change is this: - if (into->numLevels[group] >= from->numLevels[group]) + if ((into->numLevels[group] >= from->numLevels[group]) && (from->defs.merge != MergeOverride)) This causes the number of levels to be forced to that of the new definition when the merge is an Override (that is: a redefinition and not a real merge). The patch is a fix for bug #57242 (https://bugs.freedesktop.org/show_bug.cgi?id=57242). Benno [1] altwin: key { [ Alt_R, Meta_R ] }; [2] level3: key { type[Group1]="ONE_LEVEL", symbols[Group1] = [ ISO_Level3_Shift ] }; -- http://www.fastmail.fm - The professional email service -------------- next part -------------- A non-text attachment was scrubbed... Name: 0001-When-overriding-a-key-also-adjust-its-number-of-levels.patch Type: text/x-diff Size: 1723 bytes Desc: not available URL: From peter.hutterer at who-t.net Tue Sep 9 14:25:42 2014 From: peter.hutterer at who-t.net (Peter Hutterer) Date: Wed, 10 Sep 2014 07:25:42 +1000 Subject: Feedback on Synaptics with ClickPad In-Reply-To: <540F2F61.6020203@connotech.com> References: <540E03A8.6020401@connotech.com> <20140909032924.GC20703@jelly.redhat.com> <540F0492.6000409@connotech.com> <540F2F61.6020203@connotech.com> Message-ID: <20140909212542.GA12086@jelly.redhat.com> On Tue, Sep 09, 2014 at 04:48:33PM +0000, Thierry Moreau wrote: > On 2014-09-09 13:45, Thierry Moreau wrote: > >Hi Peter, > > > >Thanks for this wonderful help. > > > >Quick reply (I am not yet done, but I advanced and so I report the > >blocking configuration item). > > > >What I took seriously was > > > >On 2014-09-09 03:29, Peter Hutterer wrote: > >> > >>not sure where you have your ClickFinger option set, but it's not > >>found by > >>the driver, otherwise it would show up here. I think your > >>configuration is > >>buggy. > >> > > > >In the InputDevice section (in /etc/xorg.conf) for the ClickPad device, > >the line > > Option "protocol" "psm" > >prevented the section to apply. It failed on > >"Synaptics driver unable to detect protocol" which I ignored (... little > >or no excuse ...). > > > >Maybe it has something to do with the different protocol with the Lenovo > >Edge series (I don't know), but the now-seemingly-effective InputDevice > >section has no "protocol" option at all. > > > >For the record, I came to this troubleshooting interim conclusion by > >comparing X log files with and without AutoAddDevices . > > > >More extensive reply to follow. > > > > I confirm that removing the option "protocol" allowed the InputDevice > section to be fully processed by the synaptics driver (for a Lenovo / > Thinkpad Edge E540). > > With this, I will normally handle the other concerns, notably with the > suggestions from Peter. two comments here: drop skip the Protocol option and the driver will auto-search for the right one (which on Linux is always evdev anyway). and I recommend moving the configuration into an InputClass section rather than an InputDevice section, and use MatchIsTouchpad or even better MatchDriver "synaptics" and only add the custom options for your touchpad. see: http://who-t.blogspot.com.au/2014/03/stacking-xorgconfd-snippets.html Cheers, Peter From nathan-ml at spicycrypto.ca Tue Sep 9 17:41:03 2014 From: nathan-ml at spicycrypto.ca (Nathan Kidd) Date: Tue, 09 Sep 2014 20:41:03 -0400 Subject: [PATCH] glproto: Fix typo in X_GLXCreateContextAttribsARB definition In-Reply-To: <53E94412.8030904@spicycrypto.ca> References: <53E94412.8030904@spicycrypto.ca> Message-ID: <540F9E1F.50109@spicycrypto.ca> On 11/08/14 06:30 PM, Nathan Kidd wrote: > Signed-off-by: Nathan Kidd > --- > glxproto.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/glxproto.h b/glxproto.h > index b50adc2..b4629c7 100644 > --- a/glxproto.h > +++ b/glxproto.h > @@ -2157,7 +2157,7 @@ typedef struct { > #define X_GLXCreateWindow 31 > #define X_GLXDestroyWindow 32 > #define X_GLXSetClientInfoARB 33 > -#define X_GLXCreateContextAtrribsARB 34 > +#define X_GLXCreateContextAttribsARB 34 > #define X_GLXSetConfigInfo2ARB 35 > > /* Opcodes for single commands (part of GLX command space) */ ping, just because this could bite someone From airlied at gmail.com Tue Sep 9 18:11:17 2014 From: airlied at gmail.com (Dave Airlie) Date: Wed, 10 Sep 2014 11:11:17 +1000 Subject: [PATCH] glproto: Fix typo in X_GLXCreateContextAttribsARB definition In-Reply-To: <540F9E1F.50109@spicycrypto.ca> References: <53E94412.8030904@spicycrypto.ca> <540F9E1F.50109@spicycrypto.ca> Message-ID: pushed, hopefully nothing used it incorrectly :-) Thanks. Dave. From michel at daenzer.net Wed Sep 10 00:20:45 2014 From: michel at daenzer.net (=?UTF-8?q?Michel=20D=C3=A4nzer?=) Date: Wed, 10 Sep 2014 16:20:45 +0900 Subject: [PATCH 1/4] glamor: Call glamor_glyphs_init from glamor_create_screen_resources Message-ID: <1410333648-5742-1-git-send-email-michel@daenzer.net> From: Michel D?nzer The comment above glamor_glyphs_init was already saying so. Signed-off-by: Michel D?nzer --- glamor/glamor.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/glamor/glamor.c b/glamor/glamor.c index 521bc25..e582e50 100644 --- a/glamor/glamor.c +++ b/glamor/glamor.c @@ -296,6 +296,11 @@ glamor_create_screen_resources(ScreenPtr screen) ret = screen->CreateScreenResources(screen); screen->CreateScreenResources = glamor_create_screen_resources; + if (!glamor_glyphs_init(screen)) { + ErrorF("Failed to initialize glyphs\n"); + ret = FALSE; + } + if (!glamor_realize_glyph_caches(screen)) { ErrorF("Failed to initialize glyph cache\n"); ret = FALSE; @@ -518,7 +523,6 @@ glamor_init(ScreenPtr screen, unsigned int flags) glamor_init_gradient_shader(screen); #endif glamor_pixmap_init(screen); - glamor_glyphs_init(screen); glamor_sync_init(screen); glamor_priv->screen = screen; -- 2.1.0 From michel at daenzer.net Wed Sep 10 00:20:46 2014 From: michel at daenzer.net (=?UTF-8?q?Michel=20D=C3=A4nzer?=) Date: Wed, 10 Sep 2014 16:20:46 +0900 Subject: [PATCH 2/4] glamor: Move 'glyph caches realized' check to glamor_realize_glyph_caches In-Reply-To: <1410333648-5742-1-git-send-email-michel@daenzer.net> References: <1410333648-5742-1-git-send-email-michel@daenzer.net> Message-ID: <1410333648-5742-2-git-send-email-michel@daenzer.net> From: Michel D?nzer And rename the boolean to reflect what it's about. Signed-off-by: Michel D?nzer --- glamor/glamor_glyphs.c | 15 ++++++--------- glamor/glamor_priv.h | 2 +- 2 files changed, 7 insertions(+), 10 deletions(-) diff --git a/glamor/glamor_glyphs.c b/glamor/glamor_glyphs.c index f570d75..b491768 100644 --- a/glamor/glamor_glyphs.c +++ b/glamor/glamor_glyphs.c @@ -269,7 +269,7 @@ glamor_unrealize_glyph_caches(ScreenPtr pScreen) glamor_screen_private *glamor = glamor_get_screen_private(pScreen); int i; - if (!glamor->glyph_cache_initialized) + if (!glamor->glyph_caches_realized) return; for (i = 0; i < GLAMOR_NUM_GLYPH_CACHE_FORMATS; i++) { @@ -284,7 +284,7 @@ glamor_unrealize_glyph_caches(ScreenPtr pScreen) if (mask_cache[i]) free(mask_cache[i]); } - glamor->glyph_cache_initialized = FALSE; + glamor->glyph_caches_realized = FALSE; } void @@ -314,6 +314,9 @@ glamor_realize_glyph_caches(ScreenPtr pScreen) }; int i; + if (glamor->glyph_caches_realized) + return TRUE; + memset(glamor->glyphCaches, 0, sizeof(glamor->glyphCaches)); for (i = 0; i < sizeof(formats) / sizeof(formats[0]); i++) { @@ -359,6 +362,7 @@ glamor_realize_glyph_caches(ScreenPtr pScreen) } assert(i == GLAMOR_NUM_GLYPH_CACHE_FORMATS); + glamor->glyph_caches_realized = TRUE; return TRUE; bail: @@ -375,17 +379,10 @@ glamor_realize_glyph_caches(ScreenPtr pScreen) Bool glamor_glyphs_init(ScreenPtr pScreen) { - glamor_screen_private *glamor = glamor_get_screen_private(pScreen); - - if (glamor->glyph_cache_initialized) - return TRUE; - if (!dixRegisterPrivateKey(&glamor_glyph_key, PRIVATE_GLYPH, sizeof(struct glamor_glyph))) return FALSE; - glamor->glyph_cache_initialized = TRUE; - return TRUE; } diff --git a/glamor/glamor_priv.h b/glamor/glamor_priv.h index 385c027..6ebb7b3 100644 --- a/glamor/glamor_priv.h +++ b/glamor/glamor_priv.h @@ -268,7 +268,7 @@ typedef struct glamor_screen_private { [SHADER_MASK_COUNT] [SHADER_IN_COUNT]; glamor_glyph_cache_t glyphCaches[GLAMOR_NUM_GLYPH_CACHE_FORMATS]; - Bool glyph_cache_initialized; + Bool glyph_caches_realized; /* shaders to restore a texture to another texture. */ GLint finish_access_prog[2]; -- 2.1.0 From michel at daenzer.net Wed Sep 10 00:20:48 2014 From: michel at daenzer.net (=?UTF-8?q?Michel=20D=C3=A4nzer?=) Date: Wed, 10 Sep 2014 16:20:48 +0900 Subject: [PATCH 4/4] glamor: Make glyph mask cache per-screen In-Reply-To: <1410333648-5742-1-git-send-email-michel@daenzer.net> References: <1410333648-5742-1-git-send-email-michel@daenzer.net> Message-ID: <1410333648-5742-4-git-send-email-michel@daenzer.net> From: Michel D?nzer It references a pixmap, which is a per-screen resource. Fixes broken text rendering in xfwm4-tweak-settings in Zaphod mode. Signed-off-by: Michel D?nzer --- glamor/glamor_glyphs.c | 48 ++++++++++++------------------------------------ glamor/glamor_priv.h | 25 +++++++++++++++++++++++++ 2 files changed, 37 insertions(+), 36 deletions(-) diff --git a/glamor/glamor_glyphs.c b/glamor/glamor_glyphs.c index 686260c..1f13624 100644 --- a/glamor/glamor_glyphs.c +++ b/glamor/glamor_glyphs.c @@ -62,14 +62,6 @@ */ #define GLYPH_BUFFER_SIZE 1024 -#define CACHE_PICTURE_SIZE 1024 -#define GLYPH_MIN_SIZE 8 -#define GLYPH_MAX_SIZE 64 -#define GLYPH_CACHE_SIZE ((CACHE_PICTURE_SIZE) * CACHE_PICTURE_SIZE / (GLYPH_MIN_SIZE * GLYPH_MIN_SIZE)) -#define MASK_CACHE_MAX_SIZE 32 -#define MASK_CACHE_WIDTH (CACHE_PICTURE_SIZE / MASK_CACHE_MAX_SIZE) -#define MASK_CACHE_MASK ((1LL << (MASK_CACHE_WIDTH)) - 1) - typedef struct { PicturePtr source; glamor_composite_rect_t rects[GLYPH_BUFFER_SIZE + 4]; @@ -123,24 +115,8 @@ glamor_glyph_get_private(ScreenPtr screen, GlyphPtr glyph) * gain. */ -struct glamor_glyph_mask_cache_entry { - int idx; - int width; - int height; - int x; - int y; -}; - -static struct glamor_glyph_mask_cache { - PixmapPtr pixmap; - struct glamor_glyph_mask_cache_entry mcache[MASK_CACHE_WIDTH]; - unsigned int free_bitmap; - unsigned int cleared_bitmap; -} *mask_cache[GLAMOR_NUM_GLYPH_CACHE_FORMATS] = { -NULL}; - static void -clear_mask_cache_bitmap(struct glamor_glyph_mask_cache *maskcache, +clear_mask_cache_bitmap(glamor_glyph_mask_cache_t *maskcache, unsigned int clear_mask_bits) { unsigned int i = 0; @@ -162,7 +138,7 @@ clear_mask_cache_bitmap(struct glamor_glyph_mask_cache *maskcache, } static void -clear_mask_cache(struct glamor_glyph_mask_cache *maskcache) +clear_mask_cache(glamor_glyph_mask_cache_t *maskcache) { int x = 0; int cnt = MASK_CACHE_WIDTH; @@ -224,7 +200,7 @@ find_continuous_bits(unsigned int bits, int bits_cnt, unsigned int *pbits_mask) } static struct glamor_glyph_mask_cache_entry * -get_mask_cache(struct glamor_glyph_mask_cache *maskcache, int blocks) +get_mask_cache(glamor_glyph_mask_cache_t *maskcache, int blocks) { int free_cleared_bit, idx = -1; int retry_cnt = 0; @@ -257,7 +233,7 @@ get_mask_cache(struct glamor_glyph_mask_cache *maskcache, int blocks) } static void -put_mask_cache_bitmap(struct glamor_glyph_mask_cache *maskcache, +put_mask_cache_bitmap(glamor_glyph_mask_cache_t *maskcache, unsigned int bitmap) { maskcache->free_bitmap |= bitmap; @@ -283,8 +259,8 @@ glamor_unrealize_glyph_caches(ScreenPtr pScreen) if (cache->glyphs) free(cache->glyphs); - if (mask_cache[i]) - free(mask_cache[i]); + if (glamor->mask_cache[i]) + free(glamor->mask_cache[i]); } glamor->glyph_caches_realized = FALSE; } @@ -358,9 +334,9 @@ glamor_realize_glyph_caches(ScreenPtr pScreen) goto bail; cache->evict = rand() % GLYPH_CACHE_SIZE; - mask_cache[i] = calloc(1, sizeof(*mask_cache[i])); - mask_cache[i]->pixmap = pixmap; - clear_mask_cache(mask_cache[i]); + glamor->mask_cache[i] = calloc(1, sizeof(*glamor->mask_cache[i])); + glamor->mask_cache[i]->pixmap = pixmap; + clear_mask_cache(glamor->mask_cache[i]); } assert(i == GLAMOR_NUM_GLYPH_CACHE_FORMATS); @@ -1182,7 +1158,7 @@ unsigned long long dst_glyphs_cnt = 0; struct glyphs_flush_mask_arg { PicturePtr mask; glamor_glyph_buffer_t *buffer; - struct glamor_glyph_mask_cache *maskcache; + glamor_glyph_mask_cache_t *maskcache; unsigned int used_bitmap; }; @@ -1398,7 +1374,7 @@ glamor_glyphs_via_mask(CARD8 op, glamor_glyph_buffer_t *pmask_buffer; struct glyphs_flush_mask_arg *pmask_arg; struct glamor_glyph_mask_cache_entry *mce = NULL; - struct glamor_glyph_mask_cache *maskcache; + glamor_glyph_mask_cache_t *maskcache; glamor_glyph_cache_t *cache; int glyphs_dst_mode; @@ -1419,7 +1395,7 @@ glamor_glyphs_via_mask(CARD8 op, cache = &glamor_priv->glyphCaches [PICT_FORMAT_RGB(mask_format->format) != 0]; - maskcache = mask_cache[PICT_FORMAT_RGB(mask_format->format) != 0]; + maskcache = glamor_priv->mask_cache[PICT_FORMAT_RGB(mask_format->format) != 0]; x = -extents.x1; y = -extents.y1; diff --git a/glamor/glamor_priv.h b/glamor/glamor_priv.h index 6ebb7b3..aa59e3b 100644 --- a/glamor/glamor_priv.h +++ b/glamor/glamor_priv.h @@ -167,6 +167,30 @@ typedef struct { uint16_t evict; } glamor_glyph_cache_t; +#define CACHE_PICTURE_SIZE 1024 +#define GLYPH_MIN_SIZE 8 +#define GLYPH_MAX_SIZE 64 +#define GLYPH_CACHE_SIZE ((CACHE_PICTURE_SIZE) * CACHE_PICTURE_SIZE / (GLYPH_MIN_SIZE * GLYPH_MIN_SIZE)) + +#define MASK_CACHE_MAX_SIZE 32 +#define MASK_CACHE_WIDTH (CACHE_PICTURE_SIZE / MASK_CACHE_MAX_SIZE) +#define MASK_CACHE_MASK ((1LL << (MASK_CACHE_WIDTH)) - 1) + +struct glamor_glyph_mask_cache_entry { + int idx; + int width; + int height; + int x; + int y; +}; + +typedef struct { + PixmapPtr pixmap; + struct glamor_glyph_mask_cache_entry mcache[MASK_CACHE_WIDTH]; + unsigned int free_bitmap; + unsigned int cleared_bitmap; +} glamor_glyph_mask_cache_t; + struct glamor_saved_procs { CloseScreenProcPtr close_screen; CreateScreenResourcesProcPtr create_screen_resources; @@ -268,6 +292,7 @@ typedef struct glamor_screen_private { [SHADER_MASK_COUNT] [SHADER_IN_COUNT]; glamor_glyph_cache_t glyphCaches[GLAMOR_NUM_GLYPH_CACHE_FORMATS]; + glamor_glyph_mask_cache_t *mask_cache[GLAMOR_NUM_GLYPH_CACHE_FORMATS]; Bool glyph_caches_realized; /* shaders to restore a texture to another texture. */ -- 2.1.0 From michel at daenzer.net Wed Sep 10 00:20:47 2014 From: michel at daenzer.net (=?UTF-8?q?Michel=20D=C3=A4nzer?=) Date: Wed, 10 Sep 2014 16:20:47 +0900 Subject: [PATCH 3/4] glamor: Track glyph caching information per screen In-Reply-To: <1410333648-5742-1-git-send-email-michel@daenzer.net> References: <1410333648-5742-1-git-send-email-michel@daenzer.net> Message-ID: <1410333648-5742-3-git-send-email-michel@daenzer.net> From: Michel D?nzer This is necessary because the glyph caches are per screen. Fixes broken menu text in gnome-terminal in Zaphod mode. Signed-off-by: Michel D?nzer --- glamor/glamor_glyphs.c | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/glamor/glamor_glyphs.c b/glamor/glamor_glyphs.c index b491768..686260c 100644 --- a/glamor/glamor_glyphs.c +++ b/glamor/glamor_glyphs.c @@ -96,9 +96,11 @@ typedef enum { static DevPrivateKeyRec glamor_glyph_key; static inline struct glamor_glyph * -glamor_glyph_get_private(GlyphPtr glyph) +glamor_glyph_get_private(ScreenPtr screen, GlyphPtr glyph) { - return (struct glamor_glyph *) glyph->devPrivates; + struct glamor_glyph *privates = (struct glamor_glyph*)glyph->devPrivates; + + return &privates[screen->myNum]; } /* @@ -380,7 +382,8 @@ Bool glamor_glyphs_init(ScreenPtr pScreen) { if (!dixRegisterPrivateKey(&glamor_glyph_key, - PRIVATE_GLYPH, sizeof(struct glamor_glyph))) + PRIVATE_GLYPH, + screenInfo.numScreens * sizeof(struct glamor_glyph))) return FALSE; return TRUE; @@ -460,7 +463,7 @@ glamor_glyph_unrealize(ScreenPtr screen, GlyphPtr glyph) struct glamor_glyph *priv; /* Use Lookup in case we have not attached to this glyph. */ - priv = glamor_glyph_get_private(glyph); + priv = glamor_glyph_get_private(screen, glyph); if (priv->cached) priv->cache->glyphs[priv->pos] = NULL; @@ -791,7 +794,7 @@ glamor_glyphs_intersect(int nlist, GlyphListPtr list, GlyphPtr *glyphs, if (y1 < MINSHORT) y1 = MINSHORT; if (check_fake_overlap) - priv = glamor_glyph_get_private(glyph); + priv = glamor_glyph_get_private(screen, glyph); x2 = x1 + glyph->info.width; y2 = y1 + glyph->info.height; @@ -1079,7 +1082,7 @@ glamor_glyph_cache(glamor_screen_private *glamor, GlyphPtr glyph, int *out_x, mask = glamor_glyph_count_to_mask(s); pos = (cache->count + s - 1) & mask; - priv = glamor_glyph_get_private(glyph); + priv = glamor_glyph_get_private(screen, glyph); if (pos < GLYPH_CACHE_SIZE) { cache->count = pos + s; } @@ -1091,7 +1094,7 @@ glamor_glyph_cache(glamor_screen_private *glamor, GlyphPtr glyph, int *out_x, if (evicted == NULL) continue; - evicted_priv = glamor_glyph_get_private(evicted); + evicted_priv = glamor_glyph_get_private(screen, evicted); assert(evicted_priv->pos == i); if (evicted_priv->size >= s) { cache->glyphs[i] = NULL; @@ -1112,7 +1115,7 @@ glamor_glyph_cache(glamor_screen_private *glamor, GlyphPtr glyph, int *out_x, if (evicted != NULL) { - evicted_priv = glamor_glyph_get_private(evicted); + evicted_priv = glamor_glyph_get_private(screen, evicted); assert(evicted_priv->pos == pos + s); evicted_priv->cached = FALSE; @@ -1239,7 +1242,7 @@ glamor_buffer_glyph(glamor_screen_private *glamor_priv, glamor_glyph_cache_t *cache; if (glyphs_dst_mode != GLYPHS_DST_MODE_MASK_TO_DST) - priv = glamor_glyph_get_private(glyph); + priv = glamor_glyph_get_private(screen, glyph); if (PICT_FORMAT_BPP(format) == 1) format = PICT_a8; @@ -1297,7 +1300,7 @@ glamor_buffer_glyph(glamor_screen_private *glamor_priv, rect->x_src = 0 + dx; rect->y_src = 0 + dy; } - priv = glamor_glyph_get_private(glyph); + priv = glamor_glyph_get_private(screen, glyph); } rect->x_dst = x_glyph; -- 2.1.0 From alexdeucher at gmail.com Wed Sep 10 09:13:59 2014 From: alexdeucher at gmail.com (Alex Deucher) Date: Wed, 10 Sep 2014 12:13:59 -0400 Subject: [PATCH 1/4] glamor: Call glamor_glyphs_init from glamor_create_screen_resources In-Reply-To: <1410333648-5742-1-git-send-email-michel@daenzer.net> References: <1410333648-5742-1-git-send-email-michel@daenzer.net> Message-ID: On Wed, Sep 10, 2014 at 3:20 AM, Michel D?nzer wrote: > From: Michel D?nzer > > The comment above glamor_glyphs_init was already saying so. > > Signed-off-by: Michel D?nzer For the series: Reviewed-by: Alex Deucher > --- > glamor/glamor.c | 6 +++++- > 1 file changed, 5 insertions(+), 1 deletion(-) > > diff --git a/glamor/glamor.c b/glamor/glamor.c > index 521bc25..e582e50 100644 > --- a/glamor/glamor.c > +++ b/glamor/glamor.c > @@ -296,6 +296,11 @@ glamor_create_screen_resources(ScreenPtr screen) > ret = screen->CreateScreenResources(screen); > screen->CreateScreenResources = glamor_create_screen_resources; > > + if (!glamor_glyphs_init(screen)) { > + ErrorF("Failed to initialize glyphs\n"); > + ret = FALSE; > + } > + > if (!glamor_realize_glyph_caches(screen)) { > ErrorF("Failed to initialize glyph cache\n"); > ret = FALSE; > @@ -518,7 +523,6 @@ glamor_init(ScreenPtr screen, unsigned int flags) > glamor_init_gradient_shader(screen); > #endif > glamor_pixmap_init(screen); > - glamor_glyphs_init(screen); > glamor_sync_init(screen); > > glamor_priv->screen = screen; > -- > 2.1.0 > > _______________________________________________ > xorg-devel at lists.x.org: X.Org development > Archives: http://lists.x.org/archives/xorg-devel > Info: http://lists.x.org/mailman/listinfo/xorg-devel From jcristau at debian.org Wed Sep 10 11:35:39 2014 From: jcristau at debian.org (Julien Cristau) Date: Wed, 10 Sep 2014 20:35:39 +0200 Subject: [PATCH for 1.16 0/2] xfree86: Allow non-PCI devices as primary In-Reply-To: <540F5A77.8040801@redhat.com> References: <1409991271-3199-1-git-send-email-hdegoede@redhat.com> <20140908221259.GC19116@betterave.cristau.org> <540F5A77.8040801@redhat.com> Message-ID: <20140910183539.GE19116@betterave.cristau.org> On Tue, Sep 9, 2014 at 21:52:23 +0200, Hans de Goede wrote: > Hi, > > On 09/09/2014 12:12 AM, Julien Cristau wrote: > >On Sat, Sep 6, 2014 at 10:14:29 +0200, Hans de Goede wrote: > > > >>Hi All, > >> > >>When the support for automatically loading drivers for non-PCI devices > >>landed in 1.16, these 2 patches were missed, and without these 2 patches > >>the non-PCI device support does not work. > >> > >>This is a straight cherry pick from master, with one compile error due to > >>1.16 not having syspath directly in OdevAttributes fixed. > >> > >Care to give me the commit ids from master? > > Certainly: > > http://cgit.freedesktop.org/xorg/xserver/commit/?id=2f0183222b4279266e6ef60b923738ff55f0afba > http://cgit.freedesktop.org/xorg/xserver/commit/?id=5d133276de9c50146e80ffc69edd429c2afe98e6 > Thanks. To git.freedesktop.org:/git/xorg/xserver af2e9e3..fbe9779 server-1.16-branch -> server-1.16-branch I'll try to get 1.16.0.901 out this week. Cheers, Julien From keithp at keithp.com Wed Sep 10 14:01:59 2014 From: keithp at keithp.com (Keith Packard) Date: Wed, 10 Sep 2014 14:01:59 -0700 Subject: [PATCH] present: Clear pending flip pixmaps at CloseScreen Message-ID: <1410382919-27385-1-git-send-email-keithp@keithp.com> If a flip is active at server reset time, the associated window will get destroyed which will queue an unflip operation. If that isn't synchronous, then it won't have finished by the time CloseScreen is called. Calling present_flip_idle will signal the fence and remove the reference to the fence and pixmap, freeing these in the X server and allowing a DRM client to clean up as well. This also rewords other comments in present_flip_destroy, removing scary words about needing synchronous operation (everything in this function is synchronous now) and describing what effect we actually need from present_set_abort_flip. Signed-off-by: Keith Packard --- present/present.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/present/present.c b/present/present.c index f488e21..47d434b 100644 --- a/present/present.c +++ b/present/present.c @@ -935,11 +935,12 @@ present_flip_destroy(ScreenPtr screen) { present_screen_priv_ptr screen_priv = present_screen_priv(screen); - /* XXX this needs to be synchronous for server reset */ - - /* Do the actual cleanup once the flip has been performed by the hardware */ + /* Reset window pixmaps back to the screen pixmap */ if (screen_priv->flip_pending) present_set_abort_flip(screen); + + /* Drop reference to any pending flip or unflip pixmaps. */ + present_flip_idle(screen); } void -- 2.0.1 From keithp at keithp.com Wed Sep 10 14:02:13 2014 From: keithp at keithp.com (Keith Packard) Date: Wed, 10 Sep 2014 14:02:13 -0700 Subject: [PATCH] present: Support PresentOptionCopy Message-ID: <1410382933-27433-1-git-send-email-keithp@keithp.com> We added this option to the present protocol before 1.0 but somehow never implemented it in the server. It's pretty simple; just don't ever do flips if the application specifies Copy. Signed-off-by: Keith Packard --- present/present.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/present/present.c b/present/present.c index 47d434b..e838da7 100644 --- a/present/present.c +++ b/present/present.c @@ -837,7 +837,10 @@ present_pixmap(WindowPtr window, if (!screen_priv->info || !(screen_priv->info->capabilities & PresentCapabilityAsync)) vblank->sync_flip = TRUE; - if (pixmap && present_check_flip (target_crtc, window, pixmap, vblank->sync_flip, valid, x_off, y_off)) { + if (!(options & PresentOptionCopy) && + pixmap != NULL && + present_check_flip (target_crtc, window, pixmap, vblank->sync_flip, valid, x_off, y_off)) + { vblank->flip = TRUE; if (vblank->sync_flip) target_msc--; -- 2.0.1 From keithp at keithp.com Wed Sep 10 14:09:09 2014 From: keithp at keithp.com (Keith Packard) Date: Wed, 10 Sep 2014 14:09:09 -0700 Subject: [PATCH 2/2] Correct BO allocation alignment In-Reply-To: <1410383349-27678-1-git-send-email-keithp@keithp.com> References: <1410383349-27678-1-git-send-email-keithp@keithp.com> Message-ID: <1410383349-27678-3-git-send-email-keithp@keithp.com> BO allocations for pixmaps must be aligned to the tile height, but at some point the code was changed to align them to twice the tile height. This overallocates pixmaps, wasting memory, but more importantly, for buffers allocated by DRM and shared through DRI3, the stricter alignment check causes sharing to fail. >From reading through the history of the code and related bugs, it seems like this change was part of a set of changes trying to address what turned out to be a kernel regression. Reverting this change solves the DRI3 problem and saves a bit of memory for pixmap allocations. Signed-off-by: Keith Packard --- src/uxa/intel_uxa.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/uxa/intel_uxa.c b/src/uxa/intel_uxa.c index d33eca5..4ce6eae 100644 --- a/src/uxa/intel_uxa.c +++ b/src/uxa/intel_uxa.c @@ -206,7 +206,7 @@ intel_uxa_compute_size(struct intel_screen_private *intel, tile_height = 8; else tile_height = 32; - aligned_h = ALIGN(h, 2*tile_height); + aligned_h = ALIGN(h, tile_height); *stride = intel_get_fence_pitch(intel, ALIGN(pitch, 512), @@ -768,7 +768,7 @@ free_priv: else height = 32; - height = ALIGN(pixmap->drawable.height, 2*height); + height = ALIGN(pixmap->drawable.height, height); size = intel_get_fence_size(intel, priv->stride * height); } else size = priv->stride * pixmap->drawable.height; -- 2.0.1 From keithp at keithp.com Wed Sep 10 14:09:08 2014 From: keithp at keithp.com (Keith Packard) Date: Wed, 10 Sep 2014 14:09:08 -0700 Subject: [PATCH 1/2] Do not clear pending kernel events on mode switch In-Reply-To: <1410383349-27678-1-git-send-email-keithp@keithp.com> References: <1410383349-27678-1-git-send-email-keithp@keithp.com> Message-ID: <1410383349-27678-2-git-send-email-keithp@keithp.com> Let the kernel send these back to us so that DIX hears about them in the usual way. Mode setting while Present has a flip active will trigger an unflip before the mode is changed. The event from that unflip will not get processed before the mode switch is executed. Clearing the driver queue at mode switch time will discard the connection between the kernel event and the present callback so that DIX will never know that the flip pixmap is idle. Signed-off-by: Keith Packard --- src/uxa/intel_display.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/uxa/intel_display.c b/src/uxa/intel_display.c index 97af76d..8c43ae9 100644 --- a/src/uxa/intel_display.c +++ b/src/uxa/intel_display.c @@ -71,9 +71,6 @@ struct intel_drm_queue { intel_drm_abort_proc abort; }; -static void -intel_drm_abort_scrn(ScrnInfoPtr scrn); - static uint32_t intel_drm_seq; static struct list intel_drm_queue; @@ -398,7 +395,6 @@ intel_crtc_apply(xf86CrtcPtr crtc) if (scrn->pScreen) xf86_reload_cursors(scrn->pScreen); - intel_drm_abort_scrn(scrn); done: free(output_ids); -- 2.0.1 From keithp at keithp.com Wed Sep 10 14:09:07 2014 From: keithp at keithp.com (Keith Packard) Date: Wed, 10 Sep 2014 14:09:07 -0700 Subject: [PATCH 0/2 xf86-video-intel] Two DRI3/Present bug fixes for UXA Message-ID: <1410383349-27678-1-git-send-email-keithp@keithp.com> Here are a couple of small bug fixes which make DRI3/Present work better with UXA. [PATCH 1/2] Do not clear pending kernel events on mode switch This patch prevents GL-based compositing managers from wedging when performing video mode setting. The problem was that DIX was never receiving notification about page flips being completed when one was pending across a mode switch. [PATCH 2/2] Correct BO allocation alignment This patch makes UXA and Mesa agree about how buffers are allocated for images. Without this, UXA was requiring larger padding, which meant that converting some textures into pixmaps using DRI3 would fail. -keith From ran234 at gmail.com Wed Sep 10 15:36:24 2014 From: ran234 at gmail.com (Ran Benita) Date: Thu, 11 Sep 2014 01:36:24 +0300 Subject: [patch] xkbcomp: fixing an age-old warning In-Reply-To: <1410295038.4125921.165564561.7C3B4C05@webmail.messagingengine.com> References: <1410295038.4125921.165564561.7C3B4C05@webmail.messagingengine.com> Message-ID: <20140910223624.GA23611@ran> On Tue, Sep 09, 2014 at 10:37:18PM +0200, Benno Schulenberg wrote: > > Hi, > > For many keyboard layouts, starting X produces the following warning: > > Warning: Type "ONE_LEVEL" has 1 levels, but has 2 symbols > Ignoring extra symbols > > It is easily reproced with this command: > > $ setxkbmap -print | xkbcomp -w 1 - $DISPLAY > > The warning is given because in the loads of overlapping data that > setxkbmap provides to xkbcomp, the key first gets defined > with two symbols assigned to it [1], which automatically sets its > number of levels to 2, and then it gets redefined to the type of > ONE_LEVEL and with just one symbol assigned [2], but this redefining > mistakenly does not adjust the number of levels to 1. Attached patch > fixes this. The patch looks invasive, because it also inverts the if, > to make the condition more readable, but the basic change is this: > > - if (into->numLevels[group] >= from->numLevels[group]) > + if ((into->numLevels[group] >= from->numLevels[group]) && (from->defs.merge != MergeOverride)) > > This causes the number of levels to be forced to that of the new definition > when the merge is an Override (that is: a redefinition and not a real merge). > > The patch is a fix for bug #57242 > (https://bugs.freedesktop.org/show_bug.cgi?id=57242). Nice fix. You're right - MergeKeyGroups is called after MergeKeys had already picked the into-key's key type, so it is silly for MergeKeyGroups to add levels beyond the key type's width, only for them to be truncated later. It also makes no sense to use one's key type with the other's symbols... So In general this makes things more consistent with MergeKeys. One comment below. > Benno > > > [1] altwin: key { [ Alt_R, Meta_R ] }; > [2] level3: key { type[Group1]="ONE_LEVEL", symbols[Group1] = [ ISO_Level3_Shift ] }; > > -- > http://www.fastmail.fm - The professional email service > > From 3f06401794569fe6619a4eac107e9421a23326ba Mon Sep 17 00:00:00 2001 > From: Benno Schulenberg > Date: Sat, 21 Sep 2013 10:32:54 +0200 > Subject: [PATCH] When overriding a key, also adjust its number of levels. > > This gets rid of the age-old warning of the right Alt key being > ONE_LEVEL but having two symbols assigned. Reducing the number > of levels to that of the later definition takes away the cause > of the warning. > > Tested-by: Ren?? Herman > Tested-by: Knut Petersen > Signed-off-by: Benno Schulenberg > --- > symbols.c | 15 ++++++++------- > 1 files changed, 8 insertions(+), 7 deletions(-) > > diff --git a/symbols.c b/symbols.c > index d43ba9f..e32423d 100644 > --- a/symbols.c > +++ b/symbols.c > @@ -339,18 +339,19 @@ MergeKeyGroups(SymbolsInfo * info, > clobber = (from->defs.merge != MergeAugment); > report = (warningLevel > 9) || > ((into->defs.fileID == from->defs.fileID) && (warningLevel > 0)); > - if (into->numLevels[group] >= from->numLevels[group]) > - { > - resultSyms = into->syms[group]; > - resultActs = into->acts[group]; > - resultWidth = into->numLevels[group]; > - } > - else > + if ((from->numLevels[group] > into->numLevels[group]) > + || (from->defs.merge == MergeOverride)) You should use `clobber` here, so it also works for MergeReplace, and be consistent with MergeKeys (which uses the same condition as `clobber` to pick the key type). (And while you're here, a tab slipped in). With that you can add: Reviewed-by: Ran Benita (and hope it ever gets applied :) Ran > { > resultSyms = from->syms[group]; > resultActs = from->acts[group]; > resultWidth = from->numLevels[group]; > } > + else > + { > + resultSyms = into->syms[group]; > + resultActs = into->acts[group]; > + resultWidth = into->numLevels[group]; > + } > if (resultSyms == NULL) > { > resultSyms = uTypedCalloc(resultWidth, KeySym); > -- > 1.7.0.4 > > _______________________________________________ > xorg-devel at lists.x.org: X.Org development > Archives: http://lists.x.org/archives/xorg-devel > Info: http://lists.x.org/mailman/listinfo/xorg-devel From keithp at keithp.com Wed Sep 10 16:00:00 2014 From: keithp at keithp.com (Keith Packard) Date: Wed, 10 Sep 2014 16:00:00 -0700 Subject: [PATCH 1/3] test: Only build hashtable tests if building X-Resource extension In-Reply-To: <1410390002-12042-1-git-send-email-keithp@keithp.com> References: <1410390002-12042-1-git-send-email-keithp@keithp.com> Message-ID: <1410390002-12042-2-git-send-email-keithp@keithp.com> The hash table functions are only included in the server when the X-Resource extension is built, so don't try to build and test them unless the X-Resource extension is being built. Signed-off-by: Keith Packard --- test/Makefile.am | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/test/Makefile.am b/test/Makefile.am index 32edc7a..8344276 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -5,7 +5,10 @@ if XORG # Tests that require at least some DDX functions in order to fully link # For now, requires xf86 ddx, could be adjusted to use another SUBDIRS += xi2 -noinst_PROGRAMS += xkb input xtest misc fixes xfree86 hashtabletest os signal-logging touch +noinst_PROGRAMS += xkb input xtest misc fixes xfree86 os signal-logging touch +if RES +noinst_PROGRAMS += hashtabletest +endif endif check_LTLIBRARIES = libxservertest.la -- 2.0.1 From keithp at keithp.com Wed Sep 10 16:00:02 2014 From: keithp at keithp.com (Keith Packard) Date: Wed, 10 Sep 2014 16:00:02 -0700 Subject: [PATCH 3/3] Build required portions of registry.c automatically In-Reply-To: <1410390002-12042-1-git-send-email-keithp@keithp.com> References: <1410390002-12042-1-git-send-email-keithp@keithp.com> Message-ID: <1410390002-12042-4-git-send-email-keithp@keithp.com> Instead of making the inclusion of the registry code a global conditional, split the registry into two pieces; the bits required by the X-Resource extension (the resource names) and the bits required by the XCSECURITY extension (the protocol names). Build each set of code if the related extension is being built. Signed-off-by: Keith Packard --- configure.ac | 6 ------ dix/extension.c | 2 ++ dix/registry.c | 52 +++++++++++++++++++++++++++++++++++++++------------- dix/resource.c | 2 ++ include/registry.h | 31 +++++++------------------------ 5 files changed, 50 insertions(+), 43 deletions(-) diff --git a/configure.ac b/configure.ac index cba7d24..ce76baa 100644 --- a/configure.ac +++ b/configure.ac @@ -587,7 +587,6 @@ AC_ARG_WITH(khronos-spec-dir, AS_HELP_STRING([--with-khronos-spec-dir=PATH], [Pa [KHRONOS_SPEC_DIR=auto]) dnl Extensions. -AC_ARG_ENABLE(registry, AS_HELP_STRING([--disable-registry], [Build string registry module (default: enabled)]), [XREGISTRY=$enableval], [XREGISTRY=yes]) AC_ARG_ENABLE(composite, AS_HELP_STRING([--disable-composite], [Build Composite extension (default: enabled)]), [COMPOSITE=$enableval], [COMPOSITE=yes]) AC_ARG_ENABLE(mitshm, AS_HELP_STRING([--disable-mitshm], [Build SHM extension (default: auto)]), [MITSHM=$enableval], [MITSHM=auto]) AC_ARG_ENABLE(xres, AS_HELP_STRING([--disable-xres], [Build XRes extension (default: enabled)]), [RES=$enableval], [RES=yes]) @@ -1038,11 +1037,6 @@ if test "x$XVMC" = xyes; then AC_DEFINE(XvMCExtension, 1, [Build XvMC extension]) fi -AM_CONDITIONAL(XREGISTRY, [test "x$XREGISTRY" = xyes]) -if test "x$XREGISTRY" = xyes; then - AC_DEFINE(XREGISTRY, 1, [Build registry module]) -fi - AM_CONDITIONAL(COMPOSITE, [test "x$COMPOSITE" = xyes]) if test "x$COMPOSITE" = xyes; then AC_DEFINE(COMPOSITE, 1, [Support Composite Extension]) diff --git a/dix/extension.c b/dix/extension.c index ede4bf5..6fbaa0e 100644 --- a/dix/extension.c +++ b/dix/extension.c @@ -139,7 +139,9 @@ AddExtension(const char *name, int NumEvents, int NumErrors, ext->errorLast = 0; } +#ifdef XCSECURITY RegisterExtensionNames(ext); +#endif return ext; } diff --git a/dix/registry.c b/dix/registry.c index 8b76d56..7355990 100644 --- a/dix/registry.c +++ b/dix/registry.c @@ -21,8 +21,6 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include #endif -#ifdef XREGISTRY - #include #include #include @@ -31,6 +29,8 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include "registry.h" #define BASE_SIZE 16 + +#ifdef XCSECURITY #define CORE "X11" #define FILENAME SERVER_MISC_CONFIG_PATH "/protocol.txt" @@ -42,9 +42,15 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. static FILE *fh; static char ***requests, **events, **errors; +static unsigned nmajor, *nminor, nevent, nerror; +#endif + +#ifdef RES static const char **resources; -static unsigned nmajor, *nminor, nevent, nerror, nresource; +static unsigned nresource; +#endif +#if defined(RES) || defined(XCSECURITY) /* * File parsing routines */ @@ -72,7 +78,9 @@ double_size(void *p, unsigned n, unsigned size) memset(*ptr + s, 0, f - s); return TRUE; } +#endif +#ifdef XCSECURITY static void RegisterRequestName(unsigned major, unsigned minor, char *name) { @@ -196,7 +204,9 @@ RegisterExtensionNames(ExtensionEntry * extEntry) free(lineobj); } } +#endif /* XCSECURITY */ +#ifdef RES /* * Registration functions */ @@ -214,11 +224,14 @@ RegisterResourceName(RESTYPE resource, const char *name) resources[resource] = name; } +#endif /* RES */ /* * Lookup functions */ +#ifdef XCSECURITY + const char * LookupRequestName(int major, int minor) { @@ -269,7 +282,9 @@ LookupErrorName(int error) return errors[error] ? errors[error] : XREGISTRY_UNKNOWN; } +#endif /* XCSECURITY */ +#ifdef RES const char * LookupResourceName(RESTYPE resource) { @@ -279,10 +294,12 @@ LookupResourceName(RESTYPE resource) return resources[resource] ? resources[resource] : XREGISTRY_UNKNOWN; } +#endif /* RES */ void dixFreeRegistry(void) { +#ifdef XCSECURITY /* Free all memory */ while (nmajor--) { while (nminor[nmajor]) @@ -299,25 +316,30 @@ dixFreeRegistry(void) while (nerror--) free(errors[nerror]); free(errors); - - free(resources); - requests = NULL; nminor = NULL; events = NULL; errors = NULL; - resources = NULL; + nmajor = nevent = nerror = 0; +#endif + +#ifdef RES + free(resources); - nmajor = nevent = nerror = nresource = 0; + resources = NULL; + nresource = 0; +#endif } void dixCloseRegistry(void) { +#ifdef XCSECURITY if (fh) { fclose(fh); fh = NULL; } +#endif } /* @@ -326,16 +348,24 @@ dixCloseRegistry(void) void dixResetRegistry(void) { +#ifdef XCSECURITY ExtensionEntry extEntry = { .name = CORE }; +#endif dixFreeRegistry(); +#ifdef XCSECURITY /* Open the protocol file */ fh = fopen(FILENAME, "r"); if (!fh) LogMessage(X_WARNING, "Failed to open protocol names file " FILENAME "\n"); + /* Add the core protocol */ + RegisterExtensionNames(&extEntry); +#endif + +#ifdef RES /* Add built-in resources */ RegisterResourceName(RT_NONE, "NONE"); RegisterResourceName(RT_WINDOW, "WINDOW"); @@ -347,9 +377,5 @@ dixResetRegistry(void) RegisterResourceName(RT_CMAPENTRY, "COLORMAP ENTRY"); RegisterResourceName(RT_OTHERCLIENT, "OTHER CLIENT"); RegisterResourceName(RT_PASSIVEGRAB, "PASSIVE GRAB"); - - /* Add the core protocol */ - RegisterExtensionNames(&extEntry); +#endif } - -#endif /* XREGISTRY */ diff --git a/dix/resource.c b/dix/resource.c index 623d862..f0f5307 100644 --- a/dix/resource.c +++ b/dix/resource.c @@ -524,8 +524,10 @@ CreateNewResourceType(DeleteType deleteFunc, const char *name) resourceTypes[next].findSubResFunc = DefaultFindSubRes; resourceTypes[next].errorValue = BadValue; +#if RES /* Called even if name is NULL, to remove any previous entry */ RegisterResourceName(next, name); +#endif return next; } diff --git a/include/registry.h b/include/registry.h index 4e54bf6..244cef5 100644 --- a/include/registry.h +++ b/include/registry.h @@ -17,18 +17,18 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ #define XREGISTRY_UNKNOWN "" -#ifdef XREGISTRY - #include "resource.h" #include "extnsionst.h" /* Internal string registry - for auditing, debugging, security, etc. */ -/* - * Registration functions. The name string is not copied, so it must - * not be a stack variable. - */ +#ifdef RES +/* Functions used by the X-Resource extension */ extern _X_EXPORT void RegisterResourceName(RESTYPE type, const char *name); +extern _X_EXPORT const char *LookupResourceName(RESTYPE rtype); +#endif + +#ifdef XCSECURITY extern _X_EXPORT void RegisterExtensionNames(ExtensionEntry * ext); /* @@ -38,7 +38,7 @@ extern _X_EXPORT const char *LookupMajorName(int major); extern _X_EXPORT const char *LookupRequestName(int major, int minor); extern _X_EXPORT const char *LookupEventName(int event); extern _X_EXPORT const char *LookupErrorName(int error); -extern _X_EXPORT const char *LookupResourceName(RESTYPE rtype); +#endif /* * Setup and teardown @@ -47,21 +47,4 @@ extern _X_EXPORT void dixResetRegistry(void); extern _X_EXPORT void dixFreeRegistry(void); extern _X_EXPORT void dixCloseRegistry(void); -#else /* XREGISTRY */ - -/* Define calls away when the registry is not being built. */ - -#define RegisterResourceName(a, b) { ; } -#define RegisterExtensionNames(a) { ; } - -#define LookupMajorName(a) XREGISTRY_UNKNOWN -#define LookupRequestName(a, b) XREGISTRY_UNKNOWN -#define LookupEventName(a) XREGISTRY_UNKNOWN -#define LookupErrorName(a) XREGISTRY_UNKNOWN -#define LookupResourceName(a) XREGISTRY_UNKNOWN - -#define dixResetRegistry() { ; } -#define dixFreeRegistry() { ; } - -#endif /* XREGISTRY */ #endif /* DIX_REGISTRY_H */ -- 2.0.1 From keithp at keithp.com Wed Sep 10 16:00:01 2014 From: keithp at keithp.com (Keith Packard) Date: Wed, 10 Sep 2014 16:00:01 -0700 Subject: [PATCH 2/3] dix: Close protocol.txt after we're done loading extension names In-Reply-To: <1410390002-12042-1-git-send-email-keithp@keithp.com> References: <1410390002-12042-1-git-send-email-keithp@keithp.com> Message-ID: <1410390002-12042-3-git-send-email-keithp@keithp.com> Don't leave this file open during the whole server execution process; close it once all of the extensions are initialized. Signed-off-by: Keith Packard --- dix/main.c | 2 ++ dix/registry.c | 4 ++++ include/registry.h | 1 + 3 files changed, 7 insertions(+) diff --git a/dix/main.c b/dix/main.c index 7427e08..930a85f 100644 --- a/dix/main.c +++ b/dix/main.c @@ -269,6 +269,8 @@ dix_main(int argc, char *argv[], char *envp[]) dixSaveScreens(serverClient, SCREEN_SAVER_FORCER, ScreenSaverReset); + dixCloseRegistry(); + #ifdef PANORAMIX if (!noPanoramiXExtension) { if (!PanoramiXCreateConnectionBlock()) { diff --git a/dix/registry.c b/dix/registry.c index 82a3340..8b76d56 100644 --- a/dix/registry.c +++ b/dix/registry.c @@ -309,7 +309,11 @@ dixFreeRegistry(void) resources = NULL; nmajor = nevent = nerror = nresource = 0; +} +void +dixCloseRegistry(void) +{ if (fh) { fclose(fh); fh = NULL; diff --git a/include/registry.h b/include/registry.h index 96be87a..4e54bf6 100644 --- a/include/registry.h +++ b/include/registry.h @@ -45,6 +45,7 @@ extern _X_EXPORT const char *LookupResourceName(RESTYPE rtype); */ extern _X_EXPORT void dixResetRegistry(void); extern _X_EXPORT void dixFreeRegistry(void); +extern _X_EXPORT void dixCloseRegistry(void); #else /* XREGISTRY */ -- 2.0.1 From keithp at keithp.com Wed Sep 10 15:59:59 2014 From: keithp at keithp.com (Keith Packard) Date: Wed, 10 Sep 2014 15:59:59 -0700 Subject: [PATCH 0/3] Reduce registry.c resource usage Message-ID: <1410390002-12042-1-git-send-email-keithp@keithp.com> [PATCH 1/3] test: Only build hashtable tests if building X-Resource This fixes a build problem in the test code when compiling with --disable-xres [PATCH 2/3] dix: Close protocol.txt after we're done loading This one stops a file descriptor from being left open for the whole X server run by simply closing the file full of protocol names after it has been read. [PATCH 3/3] Build required portions of registry.c automatically This one makes the two bits of the registry depend on the related extensions (X-Resource and XCSECURITY) rather than being separately configured. -keith From chris at chris-wilson.co.uk Wed Sep 10 23:37:16 2014 From: chris at chris-wilson.co.uk (Chris Wilson) Date: Thu, 11 Sep 2014 07:37:16 +0100 Subject: [Intel-gfx] [PATCH 0/2 xf86-video-intel] Two DRI3/Present bug fixes for UXA In-Reply-To: <1410383349-27678-1-git-send-email-keithp@keithp.com> References: <1410383349-27678-1-git-send-email-keithp@keithp.com> Message-ID: <20140911063716.GB28332@nuc-i3427.alporthouse.com> On Wed, Sep 10, 2014 at 02:09:07PM -0700, Keith Packard wrote: > [PATCH 2/2] Correct BO allocation alignment > > This patch makes UXA and Mesa agree about how buffers are allocated > for images. Without this, UXA was requiring larger padding, which > meant that converting some textures into pixmaps using DRI3 would > fail. That extra alignment is due to gen2 and early gen3 (if (!intel->has_relaxed_fencing) covers them). -Chris -- Chris Wilson, Intel Open Source Technology Centre From jstpierre at mecheye.net Wed Sep 10 23:47:21 2014 From: jstpierre at mecheye.net (Jasper St. Pierre) Date: Thu, 11 Sep 2014 00:47:21 -0600 Subject: [Intel-gfx] [PATCH 0/2 xf86-video-intel] Two DRI3/Present bug fixes for UXA In-Reply-To: <20140911063716.GB28332@nuc-i3427.alporthouse.com> References: <1410383349-27678-1-git-send-email-keithp@keithp.com> <20140911063716.GB28332@nuc-i3427.alporthouse.com> Message-ID: Why doesn't mesa allocate buffers in the same way for those chips, then? Do you have any documentation about this? On Thu, Sep 11, 2014 at 12:37 AM, Chris Wilson wrote: > On Wed, Sep 10, 2014 at 02:09:07PM -0700, Keith Packard wrote: > > [PATCH 2/2] Correct BO allocation alignment > > > > This patch makes UXA and Mesa agree about how buffers are allocated > > for images. Without this, UXA was requiring larger padding, which > > meant that converting some textures into pixmaps using DRI3 would > > fail. > > That extra alignment is due to gen2 and early gen3 (if > (!intel->has_relaxed_fencing) covers them). > -Chris > > -- > Chris Wilson, Intel Open Source Technology Centre > _______________________________________________ > xorg-devel at lists.x.org: X.Org development > Archives: http://lists.x.org/archives/xorg-devel > Info: http://lists.x.org/mailman/listinfo/xorg-devel > -- Jasper -------------- next part -------------- An HTML attachment was scrubbed... URL: From chris at chris-wilson.co.uk Wed Sep 10 23:52:09 2014 From: chris at chris-wilson.co.uk (Chris Wilson) Date: Thu, 11 Sep 2014 07:52:09 +0100 Subject: [Intel-gfx] [PATCH 0/2 xf86-video-intel] Two DRI3/Present bug fixes for UXA In-Reply-To: References: <1410383349-27678-1-git-send-email-keithp@keithp.com> <20140911063716.GB28332@nuc-i3427.alporthouse.com> Message-ID: <20140911065209.GD28332@nuc-i3427.alporthouse.com> On Thu, Sep 11, 2014 at 12:47:21AM -0600, Jasper St. Pierre wrote: > Why doesn't mesa allocate buffers in the same way for those chips, then? Good question. -Chris -- Chris Wilson, Intel Open Source Technology Centre From ran234 at gmail.com Thu Sep 11 04:01:01 2014 From: ran234 at gmail.com (Ran Benita) Date: Thu, 11 Sep 2014 14:01:01 +0300 Subject: [patch] xkbcomp: fixing an age-old warning In-Reply-To: <20140910223624.GA23611@ran> References: <1410295038.4125921.165564561.7C3B4C05@webmail.messagingengine.com> <20140910223624.GA23611@ran> Message-ID: <20140911110101.GA22669@ran> On Thu, Sep 11, 2014 at 01:36:24AM +0300, Ran Benita wrote: > On Tue, Sep 09, 2014 at 10:37:18PM +0200, Benno Schulenberg wrote: > > > > Hi, > > > > For many keyboard layouts, starting X produces the following warning: > > > > Warning: Type "ONE_LEVEL" has 1 levels, but has 2 symbols > > Ignoring extra symbols > > > > It is easily reproced with this command: > > > > $ setxkbmap -print | xkbcomp -w 1 - $DISPLAY > > > > The warning is given because in the loads of overlapping data that > > setxkbmap provides to xkbcomp, the key first gets defined > > with two symbols assigned to it [1], which automatically sets its > > number of levels to 2, and then it gets redefined to the type of > > ONE_LEVEL and with just one symbol assigned [2], but this redefining > > mistakenly does not adjust the number of levels to 1. Attached patch > > fixes this. The patch looks invasive, because it also inverts the if, > > to make the condition more readable, but the basic change is this: > > > > - if (into->numLevels[group] >= from->numLevels[group]) > > + if ((into->numLevels[group] >= from->numLevels[group]) && (from->defs.merge != MergeOverride)) > > > > This causes the number of levels to be forced to that of the new definition > > when the merge is an Override (that is: a redefinition and not a real merge). > > > > The patch is a fix for bug #57242 > > (https://bugs.freedesktop.org/show_bug.cgi?id=57242). > > Nice fix. You're right - MergeKeyGroups is called after MergeKeys had > already picked the into-key's key type, so it is silly for > MergeKeyGroups to add levels beyond the key type's width, only for them > to be truncated later. It also makes no sense to use one's key type with > the other's symbols... So In general this makes things more consistent > with MergeKeys. > > One comment below. > > > Benno > > > > > > [1] altwin: key { [ Alt_R, Meta_R ] }; > > [2] level3: key { type[Group1]="ONE_LEVEL", symbols[Group1] = [ ISO_Level3_Shift ] }; > > > > -- > > http://www.fastmail.fm - The professional email service > > > > > From 3f06401794569fe6619a4eac107e9421a23326ba Mon Sep 17 00:00:00 2001 > > From: Benno Schulenberg > > Date: Sat, 21 Sep 2013 10:32:54 +0200 > > Subject: [PATCH] When overriding a key, also adjust its number of levels. > > > > This gets rid of the age-old warning of the right Alt key being > > ONE_LEVEL but having two symbols assigned. Reducing the number > > of levels to that of the later definition takes away the cause > > of the warning. > > > > Tested-by: Ren?? Herman > > Tested-by: Knut Petersen > > Signed-off-by: Benno Schulenberg > > --- > > symbols.c | 15 ++++++++------- > > 1 files changed, 8 insertions(+), 7 deletions(-) > > > > diff --git a/symbols.c b/symbols.c > > index d43ba9f..e32423d 100644 > > --- a/symbols.c > > +++ b/symbols.c > > @@ -339,18 +339,19 @@ MergeKeyGroups(SymbolsInfo * info, > > clobber = (from->defs.merge != MergeAugment); > > report = (warningLevel > 9) || > > ((into->defs.fileID == from->defs.fileID) && (warningLevel > 0)); > > - if (into->numLevels[group] >= from->numLevels[group]) > > - { > > - resultSyms = into->syms[group]; > > - resultActs = into->acts[group]; > > - resultWidth = into->numLevels[group]; > > - } > > - else > > + if ((from->numLevels[group] > into->numLevels[group]) > > + || (from->defs.merge == MergeOverride)) > > You should use `clobber` here, so it also works for MergeReplace, and be > consistent with MergeKeys (which uses the same condition as `clobber` to > pick the key type). (And while you're here, a tab slipped in). > > With that you can add: > > Reviewed-by: Ran Benita Actually I'm not so sure. The current behavior of a key-group override is per-symbol, e.g. override key { [ NoSymbol, B, C ]; }; Means: replace whatever is in the 2nd and 3rd levels with the symbols B and C (create them if they do not exist). "override" is almost always the default. Often, the key type for both `from` and `into` is not specified, so an automatic type is assigned (FindAutomaticType) at a later point. Now, if we have this: key { [1, 2, 3, 4]; } [...] override key { [ NoSymbol, B, C ]; }; With current code you get: [1, B, C, 4], with your patch: [1, B, C]. I think the current behavior is a bit more intuitive, and we should not change it. However, if you have an explicit type (which is the case for RALT with e.g. layout=us,variant=euro): key { [1, 2, 3, 4]; } [...] override key { type="THREE_LEVEL"; [ NoSymbol, B, C ]; }; You get [ 1, B, C ] also with the current code. However the "4" is only lost at a later point, which produces the warning. But eventually, you get what was intended. So if you want to get rid of the warning, I'd suggest either: 1. Change the test to if ((from->numLevels[group] > into->numLevels[group]) || (override && from->types[group] != None)) This means: if an overriding key-group specifies an explicit key type, always use its numLevels (as it will happen later anyway). 2. Just make the warning require a verbosity>0. It is not necessarily a problem if the truncation kicks in, so it should not be displayed to the user by default. However a keymap author would probably like to see it. Ran > > (and hope it ever gets applied :) > > Ran > > > { > > resultSyms = from->syms[group]; > > resultActs = from->acts[group]; > > resultWidth = from->numLevels[group]; > > } > > + else > > + { > > + resultSyms = into->syms[group]; > > + resultActs = into->acts[group]; > > + resultWidth = into->numLevels[group]; > > + } > > if (resultSyms == NULL) > > { > > resultSyms = uTypedCalloc(resultWidth, KeySym); > > -- > > 1.7.0.4 > > > > > _______________________________________________ > > xorg-devel at lists.x.org: X.Org development > > Archives: http://lists.x.org/archives/xorg-devel > > Info: http://lists.x.org/mailman/listinfo/xorg-devel > From keithp at keithp.com Thu Sep 11 12:53:30 2014 From: keithp at keithp.com (Keith Packard) Date: Thu, 11 Sep 2014 12:53:30 -0700 Subject: [Intel-gfx] [PATCH 0/2 xf86-video-intel] Two DRI3/Present bug fixes for UXA In-Reply-To: <20140911063716.GB28332@nuc-i3427.alporthouse.com> References: <1410383349-27678-1-git-send-email-keithp@keithp.com> <20140911063716.GB28332@nuc-i3427.alporthouse.com> Message-ID: <86r3ziorwl.fsf@hiro.keithp.com> Chris Wilson writes: > That extra alignment is due to gen2 and early gen3 (if > (!intel->has_relaxed_fencing) covers them). Here's the patch which changed the alignment requirment: commit 736b89504a32239a0c7dfb5961c1b8292dd744bd Author: Chris Wilson Date: Sun Dec 30 10:32:18 2012 +0000 uxa: Align surface allocations to even tile rows Align surface sizes to an even number of tile rows to cater for sampler prefetch. If we read beyond the last page we may catch the PTE in a state of flux and trigger a GPU hang. Also detected by enabling invalid PTE access checking. References: https://bugs.freedesktop.org/show_bug.cgi?id=56916 References: https://bugs.freedesktop.org/show_bug.cgi?id=55984 Signed-off-by: Chris Wilson Both of these bugs report regressions found past the 3.6 kernel, one on 965gm and the other on Ironlake. Are there additional bug reports on UXA which actually relate to this patch as it affects gen2 and gen3 hardware? Here's the patch that added the additional alignment restriction to SNA: commit 1b6c1a30723b1d13e9bd3df0b59a8d75639c89be Author: Chris Wilson Date: Fri Nov 30 09:27:57 2012 +0000 sna: Increase tiling alignment to an even tile Seems to help g4x. Signed-off-by: Chris Wilson Note that this does not reference gen2 or gen3 either. From the above two patches, all that I can learn is that both of these larger alignments were introduced to fix bugs on newer hardware, and that the larger alignment is now specifically disabled on that same hardware in the SNA code. Reading only this history, I felt reasonably confident that changing UXA back to what libdrm does was the best plan. If you have specific bug reports that were resolved by this patch, or specific hardware documentation which indicates that this patch is required, especially as it relates to gen2 and gen3 hardware, I'd love to see them. In any case, we've now got four versions of the pixmap alignment code (libdrm, uxa and sna in two varieties). They're all subtly different; one suspects that each one works on some set of problems and fails on others... Here's what the height alignment requirements are: libdrm uxa uxa sna sna +keithp >=2.6.38 <2.6.38 gen2 none 2 2 2 1 2 gen3 none 2 2 2 1 2 gen4+ none 2 2 2 1 1 gen2 X 16 16 32 16 32 gen3 X 8 8 16 8 16 gen4+ X 8 8 16 8 8 gen2 Y 16 16 32 16 32 i915 Y 8 32 64 8 16 i945 Y 32 32 64 8 16 gen4+ Y 32 32 64 32 32 It looks like the SNA alignment for untiled buffers is incorrect? 965 hardware is documented to read buffers in 2x2 chunks, so a failure to height align allocations to 2 can result in reads off the end of the buffer. For uxa's intel_set_pixmap_bo, and sna's sna_dri3_pixmap_from_fd, there's a clear requirement that the 2D driver impose no stricter alignment than libdrm, so that, buffer passing from Mesa to X will work. For pixmap allocations within the X server, we should ensure that the alignment requirements are at least as strict as those in libdrm so that pixmap passing from X to Mesa will work. Not that Mesa actually checks the provided buffer size at all, although it probably should.x It seems obvious to me that we should be doing this work in one place and sharing the code across the 2D and 3D drivers, and yet we never have. -- keith.packard at intel.com -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 810 bytes Desc: not available URL: From bensberg at justemail.net Thu Sep 11 13:18:52 2014 From: bensberg at justemail.net (Benno Schulenberg) Date: Thu, 11 Sep 2014 22:18:52 +0200 Subject: [patch] xkbcomp: fixing an age-old warning In-Reply-To: <20140911110101.GA22669@ran> References: <1410295038.4125921.165564561.7C3B4C05@webmail.messagingengine.com> <20140910223624.GA23611@ran> <20140911110101.GA22669@ran> Message-ID: <1410466732.1399333.166460833.2758EBD4@webmail.messagingengine.com> On Thu, Sep 11, 2014, at 13:01, Ran Benita wrote: > Actually I'm not so sure. The current behavior of a key-group override > is per-symbol, e.g. > > override key { > [ NoSymbol, B, C ]; > }; > > Means: replace whatever is in the 2nd and 3rd levels with the symbols B > and C (create them if they do not exist). "override" is almost always > the default. Often, the key type for both `from` and `into` is not > specified, so an automatic type is assigned (FindAutomaticType) at a > later point. > > Now, if we have this: > > key { > [1, 2, 3, 4]; > } > [...] > override key { > [ NoSymbol, B, C ]; > }; > > With current code you get: [1, B, C, 4], with your patch: [1, B, C]. > I think the current behavior is a bit more intuitive, Hmm. I wouldn't call that more intuitive, I would call it plain wrong. :) If I wanted an overridden key to retain a possible fourth symbol, I would write "[ any, B, C, any ]" instead of "[ any, B, C ]". > and we should not > change it. [...] Fair enough... let's assume that some definitions depend on the current behaviour. > So if you want to get rid of the warning, I'd suggest either: > > 1. Change the test to > > if ((from->numLevels[group] > into->numLevels[group]) > || (override && from->types[group] != None)) Implemented in the revised patch, attached. > 2. Just make the warning require a verbosity>0. It is not necessarily > a problem if the truncation kicks in, so it should not be displayed > to the user by default. However a keymap author would probably like > to see it. I would like to propose that solution for this warning: Warning: Symbol map for key redefined Using last definition for conflicting fields Thanks for the detailed review. Benno -- http://www.fastmail.fm - Or how I learned to stop worrying and love email again -------------- next part -------------- A non-text attachment was scrubbed... Name: 0001-When-overriding-a-key-adjust-also-its-number-of-leve.patch Type: text/x-diff Size: 1775 bytes Desc: not available URL: From keithp at keithp.com Thu Sep 11 17:40:03 2014 From: keithp at keithp.com (Keith Packard) Date: Thu, 11 Sep 2014 17:40:03 -0700 Subject: [PATCH] render: Add support for RENDER RGBA formats In-Reply-To: <540A4FA9.3050309@nvidia.com> References: <540A4FA9.3050309@nvidia.com> Message-ID: <861trh1xjw.fsf@hiro.keithp.com> Damien Leone writes: > diff --git a/render/picture.c b/render/picture.c > index 58535d4..d060bc2 100644 > --- a/render/picture.c > +++ b/render/picture.c > @@ -201,6 +201,12 @@ PictureCreateDefaultFormats(ScreenPtr pScreen, int *nformatp) > formats[nformats].format = PICT_b8g8r8x8; > formats[nformats].depth = 32; > nformats++; > + formats[nformats].format = PICT_r8g8b8a8; > + formats[nformats].depth = 32; > + nformats++; > + formats[nformats].format = PICT_r8g8b8x8; > + formats[nformats].depth = 32; > + nformats++; I don't think adding these as default formats is going to be as useful as you'd like; applications looking for a format with alpha will probably be using the Xrender libary 'standard' ARGB32 format or equivalent. Expecting applications to find RGBA and do the byte swapping on images themselves is probably asking too much. > @@ -672,12 +708,14 @@ PictureInit(ScreenPtr pScreen, PictFormatPtr formats, int nformats) > if ((formats[n].direct.redMask | > formats[n].direct.blueMask | formats[n].direct.greenMask) == 0) > type = PICT_TYPE_A; > - else if (formats[n].direct.red > formats[n].direct.blue) > + else if (formats[n].direct.blue == 0) > type = PICT_TYPE_ARGB; > else if (formats[n].direct.red == 0) > type = PICT_TYPE_ABGR; > - else > + else if (formats[n].direct.blue > formats[n].direct.red) > type = PICT_TYPE_BGRA; > + else > + type = PICT_TYPE_RGBA; yeah, that's kinda icky, but it looks like it will work for the formats we have today. I'd remove the standard format stuff and expect that your visuals will construct the necessary formats on the fly; otherwise, this looks OK to me. -- keith.packard at intel.com -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 810 bytes Desc: not available URL: From keithp at keithp.com Thu Sep 11 17:49:49 2014 From: keithp at keithp.com (Keith Packard) Date: Thu, 11 Sep 2014 17:49:49 -0700 Subject: [PATCH] render: Fix double-free on ARGB cursor error path In-Reply-To: <1408545626-8921-1-git-send-email-ajax@redhat.com> References: <1408545626-8921-1-git-send-email-ajax@redhat.com> Message-ID: <86y4tpzmqa.fsf@hiro.keithp.com> Adam Jackson writes: > The gotos deleted by this patch are the only way to get to the bail: > label here. In neither case do we need to free the cursor bits from the > caller; AllocARGBCursor will already do that on the failure path, > likewise AddResource will call the resource delete function on error. This patch points out an obvious bug, but the fix isn't correct yet (as commented on already). Do you want to hack on it some more so we can get it merged? -- keith.packard at intel.com -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 810 bytes Desc: not available URL: From keithp at keithp.com Thu Sep 11 17:50:39 2014 From: keithp at keithp.com (Keith Packard) Date: Thu, 11 Sep 2014 17:50:39 -0700 Subject: [PATCH] ephyr: Properly implement hardware cursors In-Reply-To: <1408650609.6640.17.camel@dmt> References: <1408555462-2036-1-git-send-email-ajax@redhat.com> <86oavdanl0.fsf@hiro.keithp.com> <1408650609.6640.17.camel@dmt> Message-ID: <86vbotzmow.fsf@hiro.keithp.com> Adam Jackson writes: > Thanks. There's an issue or two left with it, I'll resend. Haven't heard anything more about this patch; would be nice to get it merged. -- keith.packard at intel.com -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 810 bytes Desc: not available URL: From keithp at keithp.com Thu Sep 11 17:51:48 2014 From: keithp at keithp.com (Keith Packard) Date: Thu, 11 Sep 2014 17:51:48 -0700 Subject: [PATCH] glx: Fix 'y ' value in swrastGetDrawableInfo() In-Reply-To: <87y4ueertf.fsf@eliezer.anholt.net> References: <1408651096.4038.2.camel@ubuntu> <87y4ueertf.fsf@eliezer.anholt.net> Message-ID: <86sijxzmmz.fsf@hiro.keithp.com> Eric Anholt writes: > Maks Naumov writes: > >> Signed-off-by: Maks Naumov > > Reviewed-by: Eric Anholt Merged. 3a51418..e1cc0d3 master -> master -- keith.packard at intel.com -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 810 bytes Desc: not available URL: From keithp at keithp.com Thu Sep 11 17:54:27 2014 From: keithp at keithp.com (Keith Packard) Date: Thu, 11 Sep 2014 17:54:27 -0700 Subject: Merging the modesetting driver to the X Server In-Reply-To: <1409080764-21147-1-git-send-email-eric@anholt.net> References: <1409080764-21147-1-git-send-email-eric@anholt.net> Message-ID: <86ppf1zmik.fsf@hiro.keithp.com> Eric Anholt writes: > I've been threatening to do this for a year, and I'm sitting around at > debconf so I went ahead and did it. This code is available in > git://people.freedesktop.org/~anholt/xserver in the > "modesetting-import" branch. Here's the commit message for the merge, > which I didn't include as a patch since it's big: I like this plan, and haven't heard anyone complain about it. I'll go ahead and review the individual changes and plan on merging this unless I hear comments from other people with reservations about merging this code into the server tree. -- keith.packard at intel.com -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 810 bytes Desc: not available URL: From keithp at keithp.com Thu Sep 11 17:55:02 2014 From: keithp at keithp.com (Keith Packard) Date: Thu, 11 Sep 2014 17:55:02 -0700 Subject: [PATCH 1/8] modesetting: Merge modesetting's COPYING into the xserver's. In-Reply-To: <1409080764-21147-2-git-send-email-eric@anholt.net> References: <1409080764-21147-1-git-send-email-eric@anholt.net> <1409080764-21147-2-git-send-email-eric@anholt.net> Message-ID: <86mwa5zmhl.fsf@hiro.keithp.com> Eric Anholt writes: > --- > COPYING | 24 +++++++++++++++++++ > hw/xfree86/drivers/modesetting/COPYING | 44 ---------------------------------- > 2 files changed, 24 insertions(+), 44 deletions(-) > delete mode 100644 hw/xfree86/drivers/modesetting/COPYING Reviewed-by: Keith Packard -- keith.packard at intel.com -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 810 bytes Desc: not available URL: From keithp at keithp.com Thu Sep 11 18:01:24 2014 From: keithp at keithp.com (Keith Packard) Date: Thu, 11 Sep 2014 18:01:24 -0700 Subject: [PATCH 2/8] modesetting: unifdef MODESETTING_OUTPUT_SLAVE_SUPPORT In-Reply-To: <1409080764-21147-3-git-send-email-eric@anholt.net> References: <1409080764-21147-1-git-send-email-eric@anholt.net> <1409080764-21147-3-git-send-email-eric@anholt.net> Message-ID: <86k359zm6z.fsf@hiro.keithp.com> Eric Anholt writes: > The server will always have it. The server will, but this define also depends on libdrm exporting the drmPrimeFDToHandle function. Fortunately, the modesetting driver depends on a version of libdrm (2.4.46) far newer than when that function was added (2.4.38). So, this is Reviewed-by: Keith Packard -- keith.packard at intel.com -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 810 bytes Desc: not available URL: From keithp at keithp.com Thu Sep 11 18:02:18 2014 From: keithp at keithp.com (Keith Packard) Date: Thu, 11 Sep 2014 18:02:18 -0700 Subject: [PATCH 3/8] modesetting: xserver already checks XEXTPROTO >= 7.2.99.901. In-Reply-To: <1409080764-21147-4-git-send-email-eric@anholt.net> References: <1409080764-21147-1-git-send-email-eric@anholt.net> <1409080764-21147-4-git-send-email-eric@anholt.net> Message-ID: <86ha0dzm5h.fsf@hiro.keithp.com> Eric Anholt writes: > --- > hw/xfree86/drivers/modesetting/drmmode_display.c | 6 ------ > 1 file changed, 6 deletions(-) Reviewed-by: Keith Packard -- keith.packard at intel.com -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 810 bytes Desc: not available URL: From keithp at keithp.com Thu Sep 11 18:03:04 2014 From: keithp at keithp.com (Keith Packard) Date: Thu, 11 Sep 2014 18:03:04 -0700 Subject: [PATCH 4/8] modesetting: Drop use of "pointer" for "void *" In-Reply-To: <1409080764-21147-5-git-send-email-eric@anholt.net> References: <1409080764-21147-1-git-send-email-eric@anholt.net> <1409080764-21147-5-git-send-email-eric@anholt.net> Message-ID: <86egvhzm47.fsf@hiro.keithp.com> Eric Anholt writes: > The xserver doesn't have that typedef. Thank goodness. Reviewed-by: Keith Packard -- keith.packard at intel.com -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 810 bytes Desc: not available URL: From keithp at keithp.com Thu Sep 11 18:03:36 2014 From: keithp at keithp.com (Keith Packard) Date: Thu, 11 Sep 2014 18:03:36 -0700 Subject: [PATCH 5/8] modesetting: Update for the platform device API change. In-Reply-To: <1409080764-21147-6-git-send-email-eric@anholt.net> References: <1409080764-21147-1-git-send-email-eric@anholt.net> <1409080764-21147-6-git-send-email-eric@anholt.net> Message-ID: <86bnqlzm3b.fsf@hiro.keithp.com> Eric Anholt writes: > --- > hw/xfree86/drivers/modesetting/driver.c | 8 ++++---- > 1 file changed, 4 insertions(+), 4 deletions(-) Reviewed-by: Keith Packard -- keith.packard at intel.com -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 810 bytes Desc: not available URL: From keithp at keithp.com Thu Sep 11 18:06:27 2014 From: keithp at keithp.com (Keith Packard) Date: Thu, 11 Sep 2014 18:06:27 -0700 Subject: [PATCH 6/8] modesetting: Connect the driver to the build. In-Reply-To: <1409080764-21147-7-git-send-email-eric@anholt.net> References: <1409080764-21147-1-git-send-email-eric@anholt.net> <1409080764-21147-7-git-send-email-eric@anholt.net> Message-ID: <868ulpzlyk.fsf@hiro.keithp.com> Eric Anholt writes: > + if test "x$DRM" = xyes; then > + dnl 2.4.38 is required for drmPrimeFDToHandle(). > + PKG_CHECK_EXISTS(libdrm >= 2.4.38) > + XORG_DRIVER_MODESETTING=yes > + fi > + The existing code checks for 2.4.46. Have you verified that the driver actually works with 2.4.38? > @@ -144,7 +144,7 @@ static XF86ModuleVersionInfo VersRec = { > MODINFOSTRING1, > MODINFOSTRING2, > XORG_VERSION_CURRENT, > - PACKAGE_VERSION_MAJOR, PACKAGE_VERSION_MINOR, PACKAGE_VERSION_PATCHLEVEL, > + 1, 0, 0, These numbers seem fictional to me; is there some reason to *not* use the same version as the X server itself here? -- keith.packard at intel.com -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 810 bytes Desc: not available URL: From keithp at keithp.com Thu Sep 11 18:07:11 2014 From: keithp at keithp.com (Keith Packard) Date: Thu, 11 Sep 2014 18:07:11 -0700 Subject: [PATCH 7/8] modesetting: Drop use of compat-api.h In-Reply-To: <1409080764-21147-8-git-send-email-eric@anholt.net> References: <1409080764-21147-1-git-send-email-eric@anholt.net> <1409080764-21147-8-git-send-email-eric@anholt.net> Message-ID: <8661gtzlxc.fsf@hiro.keithp.com> Eric Anholt writes: > --- > hw/xfree86/drivers/modesetting/Makefile.am | 1 - > hw/xfree86/drivers/modesetting/compat-api.h | 94 ------------------------ > hw/xfree86/drivers/modesetting/driver.c | 50 ++++++------- > hw/xfree86/drivers/modesetting/drmmode_display.c | 1 - > 4 files changed, 21 insertions(+), 125 deletions(-) > delete mode 100644 hw/xfree86/drivers/modesetting/compat-api.h Reviewed-by: Keith Packard -- keith.packard at intel.com -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 810 bytes Desc: not available URL: From keithp at keithp.com Thu Sep 11 18:08:34 2014 From: keithp at keithp.com (Keith Packard) Date: Thu, 11 Sep 2014 18:08:34 -0700 Subject: [PATCH 8/8] modesetting: Drop remaining old-xserver compatibility. In-Reply-To: <1409080764-21147-9-git-send-email-eric@anholt.net> References: <1409080764-21147-1-git-send-email-eric@anholt.net> <1409080764-21147-9-git-send-email-eric@anholt.net> Message-ID: <8638bxzlv1.fsf@hiro.keithp.com> Eric Anholt writes: > --- > hw/xfree86/drivers/modesetting/driver.c | 6 ++---- > hw/xfree86/drivers/modesetting/drmmode_display.c | 15 +-------------- > hw/xfree86/drivers/modesetting/drmmode_display.h | 6 ------ > 3 files changed, 3 insertions(+), 24 deletions(-) Reviewed-by: Keith Packard -- keith.packard at intel.com -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 810 bytes Desc: not available URL: From keithp at keithp.com Thu Sep 11 18:13:24 2014 From: keithp at keithp.com (Keith Packard) Date: Thu, 11 Sep 2014 18:13:24 -0700 Subject: [PATCH] ephyr: Properly implement hardware cursors (v2) In-Reply-To: <1409156259-9213-1-git-send-email-ajax@redhat.com> References: <1409156259-9213-1-git-send-email-ajax@redhat.com> Message-ID: <86y4tpy72j.fsf@hiro.keithp.com> Adam Jackson writes: > When dix hands us a new cursor we proxy it through to the host server; > since we keep the host XID on the cursor bits private we can switch > among them with just ChangeWindowAttributes. Sorry for replying about your previous version; somehow I missed this in my queue. Only one small comment below... > + cursor_pxm = xcb_generate_id(HostX.conn); > + xcb_create_pixmap(HostX.conn, 1, cursor_pxm, HostX.winroot, 1, 1); > + HostX.empty_cursor = xcb_generate_id(HostX.conn); > + xcb_create_cursor(HostX.conn, > + HostX.empty_cursor, > + cursor_pxm, cursor_pxm, > + 0,0,0, > + 0,0,0, > + 1,1); > + xcb_free_pixmap(HostX.conn, cursor_pxm); Sadly, pixmap contents are not defined on creation. So, you'll have to actually clear this thing. Create a GC, set foreground to zero and fill rectangle (or draw a point; it's all the same :-) Otherwise, this is all Reviewed-by: Keith Packard -- keith.packard at intel.com -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 810 bytes Desc: not available URL: From keithp at keithp.com Thu Sep 11 18:16:56 2014 From: keithp at keithp.com (Keith Packard) Date: Thu, 11 Sep 2014 18:16:56 -0700 Subject: [PATCH] pixmap: fix reverse optimus support with multiple heads In-Reply-To: <20140829062823.GB3557@nuc-i3427.alporthouse.com> References: <1375156248-29797-1-git-send-email-airlied@gmail.com> <20140829062823.GB3557@nuc-i3427.alporthouse.com> Message-ID: <86vboty6wn.fsf@hiro.keithp.com> Chris Wilson writes: > On Tue, Jul 30, 2013 at 01:50:48PM +1000, Dave Airlie wrote: >> For doing reverese optimus to multiple outputs on a secondary GPU >> the GPU can store the blits into a large screen pixmap, unfortunately >> this means we need a destination offset into the dirty code, so >> add a new API that just adds this interface. >> >> Signed-off-by: Dave Airlie > Reviewed-by: Chris Wilson Merged. e1cc0d3..da4bad6 master -> master -- keith.packard at intel.com -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 810 bytes Desc: not available URL: From keithp at keithp.com Thu Sep 11 18:19:26 2014 From: keithp at keithp.com (Keith Packard) Date: Thu, 11 Sep 2014 18:19:26 -0700 Subject: [PATCH] os/log: adjust gcc version conditions for #pragma In-Reply-To: <1409688194-5733-1-git-send-email-thomas.petazzoni@free-electrons.com> References: <1409688194-5733-1-git-send-email-thomas.petazzoni@free-electrons.com> Message-ID: <86sijxy6sh.fsf@hiro.keithp.com> Thomas Petazzoni writes: > In commit e67f2d7e0f9189beb2907fa06cff5ecc7f35f922 ("gcc 4.2.1 doesn't > support #pragma GCC diagnostic ignored"), some compile time > conditionals were added around the #pragma usage. Those conditionals > ensure that the #pragma are not used on gcc <= 4.2. > > However, the usage of #pragma diagnostic inside functions was only > added in gcc 4.6, and a build failure is therefore experienced with > gcc 4.5: I've gone ahead and merged this; it doesn't appear to break my build, and could only increase warnings for compiler versions which actually do support it. da4bad6..7a0c79c master -> master -- keith.packard at intel.com -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 810 bytes Desc: not available URL: From keithp at keithp.com Thu Sep 11 18:20:19 2014 From: keithp at keithp.com (Keith Packard) Date: Thu, 11 Sep 2014 18:20:19 -0700 Subject: [PATCH] glx/present: Only send GLX_BufferSwapComplete for PresentCompleteKindPixmap In-Reply-To: <1409844967-19450-1-git-send-email-keithp@keithp.com> References: <1409844967-19450-1-git-send-email-keithp@keithp.com> Message-ID: <86ppf1y6r0.fsf@hiro.keithp.com> Keith Packard writes: > Present didn't provide the 'kind' argument to the > present_complete_notify hook that GLX uses to construct > GLX_BufferSwapComplete events, so GLX was reporting events for > PresentCompleteKindMSC notifications, which resulted in duplicate > GLX_BufferSwapComplete events and crashes in clutter. > > See the gnome bug: https://bugzilla.gnome.org/show_bug.cgi?id=733282 > > Signed-off-by: Keith Packard Merged. 7a0c79c..bf338ef master -> master -- keith.packard at intel.com -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 810 bytes Desc: not available URL: From keithp at keithp.com Thu Sep 11 18:24:55 2014 From: keithp at keithp.com (Keith Packard) Date: Thu, 11 Sep 2014 18:24:55 -0700 Subject: [PATCH] glx: Disable indirect GLX contexts by default. In-Reply-To: <1409853580-12555-1-git-send-email-eric@anholt.net> References: <1409853580-12555-1-git-send-email-eric@anholt.net> Message-ID: <86mwa5y6jc.fsf@hiro.keithp.com> Eric Anholt writes: > Almost every situation of someone running indirect GLX is a mistake > that results in X Server crashes. Indirect GLX is the cause of > regular security vulnerabilities, and rarely provides any capability > to the user. Just disable it unless someone wants to enable it for > their special use case (using +iglx on the command line). Hearing no dissent, this patch is acked and merged. bf338ef..d0da0e9 master -> master -- keith.packard at intel.com -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 810 bytes Desc: not available URL: From keithp at keithp.com Thu Sep 11 18:26:40 2014 From: keithp at keithp.com (Keith Packard) Date: Thu, 11 Sep 2014 18:26:40 -0700 Subject: [PATCH] Make list tests actually test lists In-Reply-To: <1409897883-28154-1-git-send-email-alan.coopersmith@oracle.com> References: <1409897883-28154-1-git-send-email-alan.coopersmith@oracle.com> Message-ID: <86k359y6gf.fsf@hiro.keithp.com> Alan Coopersmith writes: > Coverity scan detected that asserts were setting values, not checking them: > > CID 53252: Side effect in assertion (ASSERT_SIDE_EFFECT) > assignment_where_comparison_intended: Assignment item->b = i * 2 > has a side effect. This code will work differently in a non-debug build. > Did you intend to use a comparison ("==") instead? > > CID 53259: Side effect in assertion (ASSERT_SIDE_EFFECT) > assignment_where_comparison_intended: Assignment item->a = i > has a side effect. This code will work differently in a non-debug build. > Did you intend to use a comparison ("==") instead? > > CID 53260: Side effect in assertion (ASSERT_SIDE_EFFECT) > assignment_where_comparison_intended: Assignment item->a = i > has a side effect. This code will work differently in a non-debug build. > Did you intend to use a comparison ("==") instead? > > CID 53261: Side effect in assertion (ASSERT_SIDE_EFFECT) > assignment_where_comparison_intended: Assignment item->b = i * 2 > has a side effect. This code will work differently in a non-debug build. > Did you intend to use a comparison ("==") instead? > > Fixing those to be == caused test_nt_list_insert to start failing as > part assumed append order, part assumed insert order, so it had to be > fixed to use consistent ordering. > > Signed-off-by: Alan Coopersmith Merged (with review): d0da0e9..8f8dcfe master -> master -- keith.packard at intel.com -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 810 bytes Desc: not available URL: From keithp at keithp.com Thu Sep 11 18:28:10 2014 From: keithp at keithp.com (Keith Packard) Date: Thu, 11 Sep 2014 18:28:10 -0700 Subject: [PULL] hw/xwin patches In-Reply-To: <5409C74B.3030903@dronecode.org.uk> References: <5409C74B.3030903@dronecode.org.uk> Message-ID: <86fvfxy6dx.fsf@hiro.keithp.com> Jon TURNEY writes: > Jon TURNEY (10): > hw/xwin/glx: When generating shims, limit the considered features > to GL version <=1.2 > hw/xwin: Makefile.am cleanup > hw/xwin: Improve choice of display name used by internal clients > hw/xwin: Fix a potential crash in winRedrawScreenShadowDDNL() > hw/xwin: Add an idempotency guard to glwindows.h > hw/xwin/glx: Don't override the server supported GL extensions string. > hw/xwin/glx: Update .gitignore > hw/xwin/glx: Fix a couple of typo bugs in indirect.c > hw/xwin/glx: Downgrade "forcing window to exist" message to debug > hw/xwin/glx: Remove an incorrect assertion in glxWinDrawableSwapBuffers Merged. 8f8dcfe..54a1d4d master -> master -- keith.packard at intel.com -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 810 bytes Desc: not available URL: From keithp at keithp.com Thu Sep 11 18:31:56 2014 From: keithp at keithp.com (Keith Packard) Date: Thu, 11 Sep 2014 18:31:56 -0700 Subject: [PATCH 1/4] glamor: Call glamor_glyphs_init from glamor_create_screen_resources In-Reply-To: References: <1410333648-5742-1-git-send-email-michel@daenzer.net> Message-ID: <86d2b1y67n.fsf@hiro.keithp.com> Alex Deucher writes: >> Signed-off-by: Michel D?nzer > > For the series: > > Reviewed-by: Alex Deucher Merged. 54a1d4d..1d32004 master -> master -- keith.packard at intel.com -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 810 bytes Desc: not available URL: From keithp at keithp.com Thu Sep 11 18:34:59 2014 From: keithp at keithp.com (Keith Packard) Date: Thu, 11 Sep 2014 18:34:59 -0700 Subject: [PATCH 09/12] xfree86: Remove leaky /dev/mem checks from xf86OSInitVidMem In-Reply-To: <1406660419-21281-10-git-send-email-ajax@redhat.com> References: <1406660419-21281-1-git-send-email-ajax@redhat.com> <1406660419-21281-10-git-send-email-ajax@redhat.com> Message-ID: <86a965y62k.fsf@hiro.keithp.com> Adam Jackson writes: > This is mostly a no-op, the checks didn't have much effect since > pciaccess didn't end up using the fd we opened. Except for OpenBSD, > where you have to pass that in from above, which is sort of a weird API > decision. So this will break there until libpciaccess is made less > dumb. I'm probably missing something, but what's the status of this series? -- keith.packard at intel.com -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 810 bytes Desc: not available URL: From jstpierre at mecheye.net Thu Sep 11 20:59:26 2014 From: jstpierre at mecheye.net (Jasper St. Pierre) Date: Thu, 11 Sep 2014 21:59:26 -0600 Subject: [PULL] hw/xwayland patches Message-ID: The following changes since commit 1d32004ed5a3a20b2d5879867e213122dced69d0: glamor: Make glyph mask cache per-screen (2014-09-11 18:31:11 -0700) are available in the git repository at: https://github.com/magcius/xserver.git xwayland-work for you to fetch changes up to 08fabafac8b83ed0de90f9e27aa4b67f604b7e58: xwayland: Snap damage reports to the bounding box (2014-09-11 21:47:31 -0600) ---------------------------------------------------------------- Adam Jackson (1): xwayland: Snap damage reports to the bounding box Jasper St. Pierre (2): xwayland-input: Fix a crasher for a race with the Wayland compositor xwayland: Implement throttling for surfaces based on the frame event hw/xwayland/xwayland-input.c | 9 +++++++++ hw/xwayland/xwayland.c | 48 ++++++++++++++++++++++++++++++++++-------------- hw/xwayland/xwayland.h | 1 + 3 files changed, 44 insertions(+), 14 deletions(-) -- Jasper -------------- next part -------------- An HTML attachment was scrubbed... URL: From keithp at keithp.com Thu Sep 11 22:51:30 2014 From: keithp at keithp.com (Keith Packard) Date: Thu, 11 Sep 2014 22:51:30 -0700 Subject: [PULL] hw/xwayland patches In-Reply-To: References: Message-ID: <86vbotwfml.fsf@hiro.keithp.com> "Jasper St. Pierre" writes: > Adam Jackson (1): > xwayland: Snap damage reports to the bounding box > > Jasper St. Pierre (2): > xwayland-input: Fix a crasher for a race with the Wayland compositor > xwayland: Implement throttling for surfaces based on the frame event Merged. 1d32004..d342771 master -> master -- keith.packard at intel.com -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 810 bytes Desc: not available URL: From hdegoede at redhat.com Fri Sep 12 00:25:17 2014 From: hdegoede at redhat.com (Hans de Goede) Date: Fri, 12 Sep 2014 09:25:17 +0200 Subject: [PATCH xinit 0/1] startx: Pass "-nolisten tcp" by default Message-ID: <1410506718-3816-1-git-send-email-hdegoede@redhat.com> Hi All, After doing the 1.3.4 release yesterday, I've started working on updating the Fedora packages to 1.3.4. While looking at our open bug list against xinit, I found one bug which is not yet resolved in 1.3.4 . This patch fixes this, I realize that this is a behavior change, and as such may be a bit controversial, but I really believe that in this day and age "-nolisten tcp" by default is the right thing to do. Regards, Hans From hdegoede at redhat.com Fri Sep 12 00:25:18 2014 From: hdegoede at redhat.com (Hans de Goede) Date: Fri, 12 Sep 2014 09:25:18 +0200 Subject: [PATCH xinit] startx: Pass "-nolisten tcp" by default In-Reply-To: <1410506718-3816-1-git-send-email-hdegoede@redhat.com> References: <1410506718-3816-1-git-send-email-hdegoede@redhat.com> Message-ID: <1410506718-3816-2-git-send-email-hdegoede@redhat.com> Having servers started by startx listen on tcp by default is not a good idea in this time and age. Pass "-nolisten tcp" by default, and add a special -listen server option which can be used to disable this new default behavior. Signed-off-by: Hans de Goede --- man/startx.man | 7 +++++++ startx.cpp | 5 +++++ 2 files changed, 12 insertions(+) diff --git a/man/startx.man b/man/startx.man index 0405be0..fc2cbc3 100644 --- a/man/startx.man +++ b/man/startx.man @@ -39,6 +39,8 @@ startx \- initialize an X session .I server ] [ .I display +] [ +.I -listen ] .I options \&.\|.\|. ] @@ -56,6 +58,11 @@ command are used to start a client in the same manner as The special argument .RB '--' marks the end of client arguments and the beginning of server options. +By default startx passes +.RB '-nolisten\ tcp' +to the server, the special server option +.RB '-listen' +can be used to stop startx from doing this. It may be convenient to specify server options with startx to change on a per-session basis the default color depth, the server's notion of the number of dots-per-inch the diff --git a/startx.cpp b/startx.cpp index 1c6fce0..8612fa6 100644 --- a/startx.cpp +++ b/startx.cpp @@ -60,6 +60,7 @@ defaultdisplay=":0" clientargs="" serverargs="" vtarg="" +listenarg="-nolisten tcp" #ifdef __APPLE__ @@ -156,6 +157,8 @@ while [ x"$1" != x ]; do if [ x"$serverargs" = x ] && @@ expr "$1" : ':[0-9][0-9]*$' > /dev/null 2>&1; then display="$1" + elif [ "$1" = "-listen" ]; then + listenarg="" else serverargs="$serverargs $1" fi @@ -225,6 +228,8 @@ if [ "$have_vtarg" = "no" ]; then serverargs="$serverargs $vtarg" fi +serverargs="$serverargs $listenarg" + XCOMM if no display, use default if [ x"$display" = x ]; then display=$defaultdisplay -- 2.1.0 From colin.harrison at virgin.net Fri Sep 12 01:37:05 2014 From: colin.harrison at virgin.net (Colin Harrison) Date: Fri, 12 Sep 2014 09:37:05 +0100 Subject: [PATCH xinit 0/1] startx: Pass "-nolisten tcp" by default Message-ID: <000001cfce64$bcee0280$36ca0780$@virgin.net> Hi, 'this day and age' 'this time and age' Time is good: it allows evolution (or erosion) to slowly happen. But I for one vote that X11 network transparency remains default. Cheers, Colin Harrison From mark.kettenis at xs4all.nl Fri Sep 12 02:38:06 2014 From: mark.kettenis at xs4all.nl (Mark Kettenis) Date: Fri, 12 Sep 2014 11:38:06 +0200 (CEST) Subject: [PATCH xinit 0/1] startx: Pass "-nolisten tcp" by default In-Reply-To: <000001cfce64$bcee0280$36ca0780$@virgin.net> (colin.harrison@virgin.net) References: <000001cfce64$bcee0280$36ca0780$@virgin.net> Message-ID: <201409120938.s8C9c6Fa015550@glazunov.sibelius.xs4all.nl> > From: "Colin Harrison" > Date: Fri, 12 Sep 2014 09:37:05 +0100 > > Hi, > > 'this day and age' > 'this time and age' > > Time is good: it allows evolution (or erosion) to slowly happen. > > But I for one vote that X11 network transparency remains default. In this day^H^H^Htime and age sane people would use "ssh -X" to achieve X11 network transparency though. From mark.kettenis at xs4all.nl Fri Sep 12 02:12:19 2014 From: mark.kettenis at xs4all.nl (Mark Kettenis) Date: Fri, 12 Sep 2014 11:12:19 +0200 (CEST) Subject: [PATCH xinit 0/1] startx: Pass "-nolisten tcp" by default In-Reply-To: <1410506718-3816-1-git-send-email-hdegoede@redhat.com> (message from Hans de Goede on Fri, 12 Sep 2014 09:25:17 +0200) References: <1410506718-3816-1-git-send-email-hdegoede@redhat.com> Message-ID: <201409120912.s8C9CJC1028156@glazunov.sibelius.xs4all.nl> > From: Hans de Goede > Date: Fri, 12 Sep 2014 09:25:17 +0200 > > Hi All, > > After doing the 1.3.4 release yesterday, I've started working on updating the > Fedora packages to 1.3.4. While looking at our open bug list against xinit, > I found one bug which is not yet resolved in 1.3.4 . > > This patch fixes this, I realize that this is a behavior change, and as such > may be a bit controversial, but I really believe that in this day and age > "-nolisten tcp" by default is the right thing to do. You're probably right. However instead of fixing this in each and every bit of code that starts and X server, wouldn't it make more sense to simply change the default in the X server itself and add the -listen option there to override things? From hdegoede at redhat.com Fri Sep 12 03:17:24 2014 From: hdegoede at redhat.com (Hans de Goede) Date: Fri, 12 Sep 2014 12:17:24 +0200 Subject: [PATCH xinit 0/1] startx: Pass "-nolisten tcp" by default In-Reply-To: <201409120912.s8C9CJC1028156@glazunov.sibelius.xs4all.nl> References: <1410506718-3816-1-git-send-email-hdegoede@redhat.com> <201409120912.s8C9CJC1028156@glazunov.sibelius.xs4all.nl> Message-ID: <5412C834.8050001@redhat.com> Hi, On 09/12/2014 11:12 AM, Mark Kettenis wrote: >> From: Hans de Goede >> Date: Fri, 12 Sep 2014 09:25:17 +0200 >> >> Hi All, >> >> After doing the 1.3.4 release yesterday, I've started working on updating the >> Fedora packages to 1.3.4. While looking at our open bug list against xinit, >> I found one bug which is not yet resolved in 1.3.4 . >> >> This patch fixes this, I realize that this is a behavior change, and as such >> may be a bit controversial, but I really believe that in this day and age >> "-nolisten tcp" by default is the right thing to do. > > You're probably right. However instead of fixing this in each and > every bit of code that starts and X server, wouldn't it make more > sense to simply change the default in the X server itself and add the > -listen option there to override things? I was thinking the same thing while working on this patch, the problem is that most bits of code starting the xserver have already been patched to start it with "-nolisten tcp", and have their own config file options / cmdline options to override this. Changing the server would break all this, where as just changing startx keeps all of the existing other xserver "starters" working. Regards, Hans From colin.harrison at virgin.net Fri Sep 12 04:54:55 2014 From: colin.harrison at virgin.net (Colin Harrison) Date: Fri, 12 Sep 2014 12:54:55 +0100 Subject: [PATCH xinit 0/1] startx: Pass "-nolisten tcp" by default Message-ID: <000201cfce80$5fdbf4a0$1f93dde0$@virgin.net> Hi, Make Kettenis wrote: 'use "ssh -X" to achieve X11 network transparency' even that is old school... "ssh -2 -X" is surely the way to go? Encryption is good when you have control of the keys and protocols used (or know all who can access/use them)...but new school 'Apps' send your personal data, over public networks, without you knowing what is being encrypted, to massive 'potentially Orwellian' data centres. So I don't think X11 network transparency is much of a threat to your privacy, in 'this time and age', there is an elephant in the room! Reduction of the established/proven complexity of 'consumer' software potentially forces you to use 'cloud services' or rent on-line software to do real work (just look at the Teletubby GUIs of modern 'consumer' operating systems with their 'swarms' of useless highly intrusive apps) Fessing up: I have a vested interest in producing X servers for private companies and individuals, not producing databases and servers for huge anonymous data centres! Cheers, Colin Harrison From hdegoede at redhat.com Fri Sep 12 06:15:51 2014 From: hdegoede at redhat.com (Hans de Goede) Date: Fri, 12 Sep 2014 15:15:51 +0200 Subject: [PATCH xinit 0/1] startx: Pass "-nolisten tcp" by default In-Reply-To: <20140912141151.058fa01e@fornost.bigon.be> References: <1410506718-3816-1-git-send-email-hdegoede@redhat.com> <20140912141151.058fa01e@fornost.bigon.be> Message-ID: <5412F207.7080800@redhat.com> Hi, On 09/12/2014 02:11 PM, Laurent Bigonville wrote: > Le Fri, 12 Sep 2014 09:25:17 +0200, > Hans de Goede a ?crit : > >> Hi All, > > Hello, > >> After doing the 1.3.4 release yesterday, I've started working on >> updating the Fedora packages to 1.3.4. While looking at our open bug >> list against xinit, I found one bug which is not yet resolved in >> 1.3.4 . >> >> This patch fixes this, I realize that this is a behavior change, and >> as such may be a bit controversial, but I really believe that in this >> day and age "-nolisten tcp" by default is the right thing to do. > > On Debian we have the "-nolisten tcp" option set in the system-wide > xserverrc file since 2006 at least. Interesting, note though that startx will ignore xserverrc as soon as any server options, including a display, are passed, so a not untypical usage of: startx -- :1 Will "circumvent" this. > But isn't your patch preventing the user or local admin to explicitly > ask to listen on tcp in xserverrc or .xserverrc ? Which is why the actual commit message of the patch contains: "Pass "-nolisten tcp" by default, and add a special -listen server option which can be used to disable this new default behavior." As well as actually doing so, and documenting this in the man page :) Regards, Hans From mark.kettenis at xs4all.nl Fri Sep 12 06:46:08 2014 From: mark.kettenis at xs4all.nl (Mark Kettenis) Date: Fri, 12 Sep 2014 15:46:08 +0200 (CEST) Subject: [PATCH xinit 0/1] startx: Pass "-nolisten tcp" by default In-Reply-To: <5412C834.8050001@redhat.com> (message from Hans de Goede on Fri, 12 Sep 2014 12:17:24 +0200) References: <1410506718-3816-1-git-send-email-hdegoede@redhat.com> <201409120912.s8C9CJC1028156@glazunov.sibelius.xs4all.nl> <5412C834.8050001@redhat.com> Message-ID: <201409121346.s8CDk8ZM022897@glazunov.sibelius.xs4all.nl> > Date: Fri, 12 Sep 2014 12:17:24 +0200 > From: Hans de Goede > > Hi, > > On 09/12/2014 11:12 AM, Mark Kettenis wrote: > >> From: Hans de Goede > >> Date: Fri, 12 Sep 2014 09:25:17 +0200 > >> > >> Hi All, > >> > >> After doing the 1.3.4 release yesterday, I've started working on updating the > >> Fedora packages to 1.3.4. While looking at our open bug list against xinit, > >> I found one bug which is not yet resolved in 1.3.4 . > >> > >> This patch fixes this, I realize that this is a behavior change, and as such > >> may be a bit controversial, but I really believe that in this day and age > >> "-nolisten tcp" by default is the right thing to do. > > > > You're probably right. However instead of fixing this in each and > > every bit of code that starts and X server, wouldn't it make more > > sense to simply change the default in the X server itself and add the > > -listen option there to override things? > > I was thinking the same thing while working on this patch, the problem > is that most bits of code starting the xserver have already been patched > to start it with "-nolisten tcp", and have their own config file options / > cmdline options to override this. > > Changing the server would break all this, where as just changing startx > keeps all of the existing other xserver "starters" working. I don't see how this would break things. Just make sure that "-nolisten tcp" continues to be accepted by the xserver. It will become a no-op of course. Unless perhaps you do something silly as starting the xserver with "-listen tcp -nolisten tcp". From hdegoede at redhat.com Fri Sep 12 07:40:26 2014 From: hdegoede at redhat.com (Hans de Goede) Date: Fri, 12 Sep 2014 16:40:26 +0200 Subject: [PATCH xinit 0/1] startx: Pass "-nolisten tcp" by default In-Reply-To: <201409121346.s8CDk8ZM022897@glazunov.sibelius.xs4all.nl> References: <1410506718-3816-1-git-send-email-hdegoede@redhat.com> <201409120912.s8C9CJC1028156@glazunov.sibelius.xs4all.nl> <5412C834.8050001@redhat.com> <201409121346.s8CDk8ZM022897@glazunov.sibelius.xs4all.nl> Message-ID: <541305DA.5000709@redhat.com> Hi, On 09/12/2014 03:46 PM, Mark Kettenis wrote: >> Date: Fri, 12 Sep 2014 12:17:24 +0200 >> From: Hans de Goede >> >> Hi, >> >> On 09/12/2014 11:12 AM, Mark Kettenis wrote: >>>> From: Hans de Goede >>>> Date: Fri, 12 Sep 2014 09:25:17 +0200 >>>> >>>> Hi All, >>>> >>>> After doing the 1.3.4 release yesterday, I've started working on updating the >>>> Fedora packages to 1.3.4. While looking at our open bug list against xinit, >>>> I found one bug which is not yet resolved in 1.3.4 . >>>> >>>> This patch fixes this, I realize that this is a behavior change, and as such >>>> may be a bit controversial, but I really believe that in this day and age >>>> "-nolisten tcp" by default is the right thing to do. >>> >>> You're probably right. However instead of fixing this in each and >>> every bit of code that starts and X server, wouldn't it make more >>> sense to simply change the default in the X server itself and add the >>> -listen option there to override things? >> >> I was thinking the same thing while working on this patch, the problem >> is that most bits of code starting the xserver have already been patched >> to start it with "-nolisten tcp", and have their own config file options / >> cmdline options to override this. >> >> Changing the server would break all this, where as just changing startx >> keeps all of the existing other xserver "starters" working. > > I don't see how this would break things. User is using e.g. gdm to start the xserver, user wants the server to listen on tcp, has added necessary gdm magic to not make gdm pass "-nolisten tcp", user all of a sudden gets "-nolisten tcp" regardless because that is now the default. Fixing this would require patching gdm, to pass the new -listen option to the server when the user has requested to not pass -nolisten in gdm.conf. And then the same for any other app starting the xserver which already passes -nolisten tcp by default + and has an app specific way to tell the app to not do that. > Just make sure that > "-nolisten tcp" continues to be accepted by the xserver. It will > become a no-op of course. Unless perhaps you do something silly as > starting the xserver with "-listen tcp -nolisten tcp". There is no such option as -listen (at least not according to man Xserver), I've added one to startx, which negates startx's adding of "-nolisten tcp" Regards, Hans From hdegoede at redhat.com Fri Sep 12 07:43:20 2014 From: hdegoede at redhat.com (Hans de Goede) Date: Fri, 12 Sep 2014 16:43:20 +0200 Subject: [PATCH xinit] startx: Pass "-nolisten tcp" by default In-Reply-To: <541305C4.2000804@o2.pl> References: <1410506718-3816-1-git-send-email-hdegoede@redhat.com> <1410506718-3816-2-git-send-email-hdegoede@redhat.com> <541305C4.2000804@o2.pl> Message-ID: <54130688.4000509@redhat.com> Hi, On 09/12/2014 04:40 PM, Mateusz Jo?czyk wrote: > W dniu 12.09.2014 o 09:25, Hans de Goede pisze: >> Having servers started by startx listen on tcp by default is not a good idea >> in this time and age. Pass "-nolisten tcp" by default, and add a special >> -listen server option which can be used to disable this new default behavior. >> >> Signed-off-by: Hans de Goede >> --- >> man/startx.man | 7 +++++++ >> startx.cpp | 5 +++++ >> 2 files changed, 12 insertions(+) > > Hello, > This may generate a security threat in case some people will assume that xinit > uses "-nolisten tcp" by default and then do not pass this parameter on the > command line. > When that code will run will an older XServer version, it will expose the X > Server on a network. I don't think that adding warnings for security issues in older versions to man-pages is a good idea. If we do that each time we tweak a security related setting for better security by default man pages will become unreadable over time. Regards, Hans From mat.jonczyk at o2.pl Fri Sep 12 07:40:04 2014 From: mat.jonczyk at o2.pl (=?UTF-8?B?TWF0ZXVzeiBKb8WEY3p5aw==?=) Date: Fri, 12 Sep 2014 16:40:04 +0200 Subject: [PATCH xinit] startx: Pass "-nolisten tcp" by default In-Reply-To: <1410506718-3816-2-git-send-email-hdegoede@redhat.com> References: <1410506718-3816-1-git-send-email-hdegoede@redhat.com> <1410506718-3816-2-git-send-email-hdegoede@redhat.com> Message-ID: <541305C4.2000804@o2.pl> W dniu 12.09.2014 o 09:25, Hans de Goede pisze: > Having servers started by startx listen on tcp by default is not a good idea > in this time and age. Pass "-nolisten tcp" by default, and add a special > -listen server option which can be used to disable this new default behavior. > > Signed-off-by: Hans de Goede > --- > man/startx.man | 7 +++++++ > startx.cpp | 5 +++++ > 2 files changed, 12 insertions(+) Hello, This may generate a security threat in case some people will assume that xinit uses "-nolisten tcp" by default and then do not pass this parameter on the command line. When that code will run will an older XServer version, it will expose the X Server on a network. This should be at least documented in the man page. Greetings, Mateusz Jo?czyk From alan.coopersmith at oracle.com Fri Sep 12 08:43:37 2014 From: alan.coopersmith at oracle.com (Alan Coopersmith) Date: Fri, 12 Sep 2014 08:43:37 -0700 Subject: [PATCH xinit 0/1] startx: Pass "-nolisten tcp" by default In-Reply-To: <000201cfce80$5fdbf4a0$1f93dde0$@virgin.net> References: <000201cfce80$5fdbf4a0$1f93dde0$@virgin.net> Message-ID: <541314A9.2030009@oracle.com> On 09/12/14 04:54 AM, Colin Harrison wrote: > So I don't think > X11 network transparency is much of a threat to your privacy, in 'this time > and age', there is an elephant in the room! Frankly, privacy of the protocol data is less important to me than the huge number of bugs in our protocol encoding/decoding code. Allowing people to connect to your machine and throw crap at it to trigger all our overflows is simply stupid. -- -Alan Coopersmith- alan.coopersmith at oracle.com Oracle Solaris Engineering - http://blogs.oracle.com/alanc From colin.harrison at virgin.net Fri Sep 12 09:46:00 2014 From: colin.harrison at virgin.net (Colin Harrison) Date: Fri, 12 Sep 2014 17:46:00 +0100 Subject: [PATCH xinit 0/1] startx: Pass "-nolisten tcp" by default Message-ID: <000001cfcea9$0a32ccd0$1e986670$@virgin.net> Hi, Alan Coopersmith wrote: "Allowing people to connect to your machine and throw crap at it to trigger all our overflows is simply stupid." If they on your local private network (AKA your 'private cloud')...you at least know who they are, get bug reports and can maybe even help fix :) I would never propose using X11 network transparency over a public internet or even though a bridge or router. Anyway SSH exposes bugs as well. In fact any connection can! Thanks, Colin Harrison From keithp at keithp.com Fri Sep 12 11:33:12 2014 From: keithp at keithp.com (Keith Packard) Date: Fri, 12 Sep 2014 11:33:12 -0700 Subject: [PATCH libxtrans] Add TRANS(Listen) function to re-enable specific listen sockets Message-ID: <1410546792-31329-1-git-send-email-keithp@keithp.com> This will allow a server to disable listeners by default and then let later configuration re-enable them. In particular, this lets the X server disable inet and unix listen sockets by default while still providing a '-listen' command line option to re-enable them later on. Signed-off-by: Keith Packard --- Xtrans.c | 25 +++++++++++++++++++++++++ Xtrans.h | 4 ++++ 2 files changed, 29 insertions(+) diff --git a/Xtrans.c b/Xtrans.c index 2880803..bfba1ad 100644 --- a/Xtrans.c +++ b/Xtrans.c @@ -804,6 +804,31 @@ TRANS(NoListen) (const char * protocol) } int +TRANS(Listen) (const char * protocol) +{ + Xtransport *trans; + int i = 0, ret = 0; + + if ((trans = TRANS(SelectTransport)(protocol)) == NULL) + { + prmsg (1,"TransListen: unable to find transport: %s\n", + protocol); + + return -1; + } + if (trans->flags & TRANS_ALIAS) { + if (trans->nolisten) + while (trans->nolisten[i]) { + ret |= TRANS(Listen)(trans->nolisten[i]); + i++; + } + } + + trans->flags &= ~TRANS_NOLISTEN; + return ret; +} + +int TRANS(IsListening) (const char * protocol) { Xtransport *trans; diff --git a/Xtrans.h b/Xtrans.h index 6decc6b..026fbd7 100644 --- a/Xtrans.h +++ b/Xtrans.h @@ -311,6 +311,10 @@ int TRANS(NoListen) ( const char* /* protocol*/ ); +int TRANS(Listen) ( + const char* /* protocol*/ +); + int TRANS(IsListening) ( const char* /* protocol*/ ); -- 2.1.0 From keithp at keithp.com Fri Sep 12 11:35:41 2014 From: keithp at keithp.com (Keith Packard) Date: Fri, 12 Sep 2014 11:35:41 -0700 Subject: [PATCH] os: Don't listen to 'tcp' or 'unix' by default. Add '-listen' option. Message-ID: <1410546941-31486-1-git-send-email-keithp@keithp.com> This disables tcp and unix listen ports by default (the unix port is the non-abstract /tmp/.X11-unix port that xcb doesn't use). Then, it uses a new xtrans interface, TRANS(Listen), to provide a command line option to re-enable those if desired. Signed-off-by: Keith Packard --- os/utils.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/os/utils.c b/os/utils.c index c83f77d..ff1806b 100644 --- a/os/utils.c +++ b/os/utils.c @@ -646,6 +646,12 @@ VerifyDisplayName(const char *d) return 1; } +static const char *defaultNoListenList[] = { + "tcp", + "unix", + NULL +}; + /* * This function parses the command line. Handles device-independent fields * and allows ddx to handle additional fields. It is not allowed to modify @@ -664,6 +670,12 @@ ProcessCommandLine(int argc, char *argv[]) PartialNetwork = TRUE; #endif + for (i = 0; defaultNoListenList[i] != NULL; i++) { + if (_XSERVTransNoListen(defaultNoListenList[i])) + ErrorF("Failed to disable listen for %s transport", + defaultNoListenList[i]); + } + for (i = 1; i < argc; i++) { /* call ddx first, so it can peek/override if it wants */ if ((skip = ddxProcessArgument(argc, argv, i))) { @@ -849,6 +861,15 @@ ProcessCommandLine(int argc, char *argv[]) else UseMsg(); } + else if (strcmp(argv[i], "-listen") == 0) { + if (++i < argc) { + if (_XSERVTransListen(argv[i])) + ErrorF("Failed to enable listen for %s transport", + argv[i]); + } + else + UseMsg(); + } else if (strcmp(argv[i], "-noreset") == 0) { dispatchExceptionAtReset = 0; } -- 2.1.0 From keithp at keithp.com Fri Sep 12 11:40:04 2014 From: keithp at keithp.com (Keith Packard) Date: Fri, 12 Sep 2014 11:40:04 -0700 Subject: [PATCH xinit 0/1] startx: Pass "-nolisten tcp" by default In-Reply-To: <1410506718-3816-1-git-send-email-hdegoede@redhat.com> References: <1410506718-3816-1-git-send-email-hdegoede@redhat.com> Message-ID: <86ppf0wum3.fsf@hiro.keithp.com> Hans de Goede writes: > This patch fixes this, I realize that this is a behavior change, and as such > may be a bit controversial, but I really believe that in this day and age > "-nolisten tcp" by default is the right thing to do. I've posted patches to Xtrans and the X server that disable tcp and unix listener ports by default while providing a '-listen' command line option to re-enable them. Missing from these patches are a version bump to Xtrans and the associated version check in the X server. If the general form of these patches is acceptable, I'd bump the Xtrans version, do a release, and then make the X server depend on that. The 'unix' listener port uses a non-abstract socket, /tmp/.X11-unix/X0, which is subject to various security threats, and which xcb and Xlib don't use anymore. We could make the set of default no-listen ports configurable at compile time if desired. -- keith.packard at intel.com -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 810 bytes Desc: not available URL: From swestrup at gmail.com Fri Sep 12 11:59:11 2014 From: swestrup at gmail.com (Stirling Westrup) Date: Fri, 12 Sep 2014 14:59:11 -0400 Subject: Can't hook into the Double Buffer extension. Message-ID: I am writing a video driver for which I'd like to support the Double Buffer Extension. However I need to hook some of the calling functions described xorg/dbestruct.h, especially 'AllocateBackBuffer' and 'SwapBuffers'. However, the only way to access them is via the private key for dbe, and its not exported. Am I missing something, or is it really impossible to hook those functions? -- Stirling Westrup Programmer, Entrepreneur. https://www.linkedin.com/e/fpf/77228 http://www.linkedin.com/in/swestrup http://technaut.livejournal.com http://sourceforge.net/users/stirlingwestrup -------------- next part -------------- An HTML attachment was scrubbed... URL: From kenneth at whitecape.org Fri Sep 12 12:13:34 2014 From: kenneth at whitecape.org (Kenneth Graunke) Date: Fri, 12 Sep 2014 12:13:34 -0700 Subject: [Intel-gfx] [PATCH 0/2 xf86-video-intel] Two DRI3/Present bug fixes for UXA In-Reply-To: <1410383349-27678-1-git-send-email-keithp@keithp.com> References: <1410383349-27678-1-git-send-email-keithp@keithp.com> Message-ID: <14277694.1dBmA8vKT4@vakarian> On Wednesday, September 10, 2014 02:09:07 PM Keith Packard wrote: > Here are a couple of small bug fixes which make DRI3/Present work > better with UXA. > > [PATCH 1/2] Do not clear pending kernel events on mode switch > > This patch prevents GL-based compositing managers from wedging when > performing video mode setting. The problem was that DIX was never > receiving notification about page flips being completed when one was > pending across a mode switch. > > [PATCH 2/2] Correct BO allocation alignment > > This patch makes UXA and Mesa agree about how buffers are allocated > for images. Without this, UXA was requiring larger padding, which > meant that converting some textures into pixmaps using DRI3 would > fail. > > -keith > _______________________________________________ > Intel-gfx mailing list > Intel-gfx at lists.freedesktop.org > http://lists.freedesktop.org/mailman/listinfo/intel-gfx Both are: Tested-by: Kenneth Graunke I tested them using DRI3/Present + UXA and DRI3/Present + Glamor on Haswell GT3e. 1. Plug external 2560x1440 DisplayPort monitor into laptop. 2. echo 'exec startkde' > ~/.xinitrc 3. startx 4. xrandr --output DP1 --auto This used to result in DP1 switching to 2560x1440, but KWin getting stuck waiting on a buffer idle event that never came, so you'd only see a 1920x1080 screen in the top left corner of the display, with either black or white bars in the other area. Other than the mouse cursor, nothing worked. With these patches, X works as expected. Thanks for the fixes, Keith! -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: This is a digitally signed message part. URL: From mark.kettenis at xs4all.nl Fri Sep 12 14:54:58 2014 From: mark.kettenis at xs4all.nl (Mark Kettenis) Date: Fri, 12 Sep 2014 23:54:58 +0200 (CEST) Subject: [PATCH] os: Don't listen to 'tcp' or 'unix' by default. Add '-listen' option. In-Reply-To: <1410546941-31486-1-git-send-email-keithp@keithp.com> (message from Keith Packard on Fri, 12 Sep 2014 11:35:41 -0700) References: <1410546941-31486-1-git-send-email-keithp@keithp.com> Message-ID: <201409122154.s8CLswXu002238@glazunov.sibelius.xs4all.nl> > From: Keith Packard > Date: Fri, 12 Sep 2014 11:35:41 -0700 > > This disables tcp and unix listen ports by default (the unix port is > the non-abstract /tmp/.X11-unix port that xcb doesn't use). Then, it > uses a new xtrans interface, TRANS(Listen), to provide a command line > option to re-enable those if desired. Hi Keith, Looks like you're on my side of the fence on this issue ;). Unconditionally disabling the "unix" listen ports by default might be a step too far. Abstract sockets are only available on Linux. So on other architectures (or at least the ones where LOCALCONN isn't defined) this would leave us with no listen ports at all. I may have gotten lost in the #ifdef maze though... > Signed-off-by: Keith Packard > --- > os/utils.c | 21 +++++++++++++++++++++ > 1 file changed, 21 insertions(+) From keithp at keithp.com Fri Sep 12 15:19:53 2014 From: keithp at keithp.com (Keith Packard) Date: Fri, 12 Sep 2014 15:19:53 -0700 Subject: [PATCH] os: Don't listen to 'tcp' or 'unix' by default. Add '-listen' option. In-Reply-To: <201409122154.s8CLswXu002238@glazunov.sibelius.xs4all.nl> References: <1410546941-31486-1-git-send-email-keithp@keithp.com> <201409122154.s8CLswXu002238@glazunov.sibelius.xs4all.nl> Message-ID: <86iokswkfq.fsf@hiro.keithp.com> Mark Kettenis writes: > Looks like you're on my side of the fence on this issue ;). Absolutely -- TCP connections to X are archaic. > Unconditionally disabling the "unix" listen ports by default might be > a step too far. Abstract sockets are only available on Linux. Yes, of course. > So on other architectures (or at least the ones where LOCALCONN isn't > defined) this would leave us with no listen ports at all. I may have > gotten lost in the #ifdef maze though... It's a terrible maze in there; I have no idea whether disabling "unix" will actually disable local connections on BSD or not; I fear the best way to find out is for you to just run the X server with --nolisten unix and see what happens... If it's just a linux thing, we can add an #ifdef around the "unix" entry in the default no listen list. -- keith.packard at intel.com -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 810 bytes Desc: not available URL: From keithp at keithp.com Fri Sep 12 19:17:33 2014 From: keithp at keithp.com (Keith Packard) Date: Fri, 12 Sep 2014 19:17:33 -0700 Subject: [PATCH 04/18] Three minor warning and whitespace fixes In-Reply-To: <874mx0xuku.fsf@eliezer.anholt.net> References: <1408256001-18414-1-git-send-email-keithp@keithp.com> <1408256001-18414-5-git-send-email-keithp@keithp.com> <874mx0xuku.fsf@eliezer.anholt.net> Message-ID: <86a964w9fm.fsf@hiro.keithp.com> Eric Anholt writes: > Keith Packard writes: > >> Declare a constant string 'const', clean up some indentation whitespace > > I'm confused about these whitespace fixes -- the lines surrounding those > two are also tabs. I eliminated the whitespace changes and went ahead and pushed the 'const' change. -- keith.packard at intel.com -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 810 bytes Desc: not available URL: From chris at chris-wilson.co.uk Sat Sep 13 01:28:24 2014 From: chris at chris-wilson.co.uk (Chris Wilson) Date: Sat, 13 Sep 2014 09:28:24 +0100 Subject: [Intel-gfx] [PATCH 0/2 xf86-video-intel] Two DRI3/Present bug fixes for UXA In-Reply-To: <86r3ziorwl.fsf@hiro.keithp.com> References: <1410383349-27678-1-git-send-email-keithp@keithp.com> <20140911063716.GB28332@nuc-i3427.alporthouse.com> <86r3ziorwl.fsf@hiro.keithp.com> Message-ID: <20140913082824.GM16043@nuc-i3427.alporthouse.com> On Thu, Sep 11, 2014 at 12:53:30PM -0700, Keith Packard wrote: > Chris Wilson writes: > > > That extra alignment is due to gen2 and early gen3 (if > > (!intel->has_relaxed_fencing) covers them). > > Here's the patch which changed the alignment requirment: [snip commits picked at random] This is the root commit d21d781466785c317131a8a57606925867265dc8 Author: Daniel Vetter Date: Tue Feb 22 18:31:44 2011 +0100 Fix relaxed tiling on gen2 Later we went on to disable relaxed tiling even after believing we had fixed all the kernel bugs: commit 686018f283f1d131073ef5917213e6a8ac013f26 Author: Chris Wilson Date: Tue Apr 12 08:23:04 2011 +0100 Turn relaxed-fencing off by default for older (pre-G33) chipsets I believe the even-tile row alignment is still key to having gen2/gen3 function with relaxed fencing. > If you have specific bug reports that were resolved by this patch, or > specific hardware documentation which indicates that this patch is > required, especially as it relates to gen2 and gen3 hardware, I'd love > to see them. Try enabling relaxed fencing again. > In any case, we've now got four versions of the pixmap alignment code > (libdrm, uxa and sna in two varieties). They're all subtly different; > one suspects that each one works on some set of problems and fails on > others... > > Here's what the height alignment requirements are: > > libdrm uxa uxa sna sna > +keithp >=2.6.38 <2.6.38 > > gen2 none 2 2 2 1 2 > gen3 none 2 2 2 1 2 > gen4+ none 2 2 2 1 1 > > gen2 X 16 16 32 16 32 > gen3 X 8 8 16 8 16 > gen4+ X 8 8 16 8 8 > > gen2 Y 16 16 32 16 32 > i915 Y 8 32 64 8 16 > i945 Y 32 32 64 8 16 > gen4+ Y 32 32 64 32 32 > > It looks like the SNA alignment for untiled buffers is incorrect? 965 > hardware is documented to read buffers in 2x2 chunks, so a failure to > height align allocations to 2 can result in reads off the end of the > buffer. Reading from the scratch page is not a problem. Reading from neighbouring surfaces is of no concern. The allocation must be suitable and aligned appropriately for writes, but writes themselves are appropriately clipped. Otherwise one extra row doesn't save you from scribbling over anywhere in your gtt. > For uxa's intel_set_pixmap_bo, and sna's sna_dri3_pixmap_from_fd, > there's a clear requirement that the 2D driver impose no stricter > alignment than libdrm, so that, buffer passing from Mesa to X will work. No. The clearest requirement is that the ddx (or other display server) must treat incoming surfaces as tainted and validate them to be sure that they work with its code paths. If it can't we have a choice of either rejecting them outright, or staging them. -Chris -- Chris Wilson, Intel Open Source Technology Centre From hdegoede at redhat.com Sat Sep 13 03:35:51 2014 From: hdegoede at redhat.com (Hans de Goede) Date: Sat, 13 Sep 2014 12:35:51 +0200 Subject: [PATCH xinit 0/1] startx: Pass "-nolisten tcp" by default In-Reply-To: <86ppf0wum3.fsf@hiro.keithp.com> References: <1410506718-3816-1-git-send-email-hdegoede@redhat.com> <86ppf0wum3.fsf@hiro.keithp.com> Message-ID: <54141E07.6050905@redhat.com> Hi, On 09/12/2014 08:40 PM, Keith Packard wrote: > Hans de Goede writes: > >> This patch fixes this, I realize that this is a behavior change, and as such >> may be a bit controversial, but I really believe that in this day and age >> "-nolisten tcp" by default is the right thing to do. > > I've posted patches to Xtrans and the X server that disable tcp and unix > listener ports by default while providing a '-listen' command line > option to re-enable them. Missing from these patches are a version bump > to Xtrans and the associated version check in the X server. If the > general form of these patches is acceptable, I'd bump the Xtrans > version, do a release, and then make the X server depend on that. > > The 'unix' listener port uses a non-abstract socket, /tmp/.X11-unix/X0, > which is subject to various security threats, and which xcb and Xlib > don't use anymore. I was afraid that people would consider your solution a too big hammer, but since it seems that that is not the case I'm all in favor of this change. Also +1 for dropping /tmp/.X11-unix/X* on Linux. Question, could we somehow also get rid of /tmp/.X*-lock ? If we drop /tmp/.X11-unix/X* that would be another step to getting rid of things expected to be in a global /tmp namespace, which breaks having a private per user /tmp dir. Regards, Hans From hdegoede at redhat.com Sat Sep 13 03:41:02 2014 From: hdegoede at redhat.com (Hans de Goede) Date: Sat, 13 Sep 2014 12:41:02 +0200 Subject: [PATCH libxtrans] Add TRANS(Listen) function to re-enable specific listen sockets In-Reply-To: <1410546792-31329-1-git-send-email-keithp@keithp.com> References: <1410546792-31329-1-git-send-email-keithp@keithp.com> Message-ID: <54141F3E.6050804@redhat.com> Hi, On 09/12/2014 08:33 PM, Keith Packard wrote: > This will allow a server to disable listeners by default and then > let later configuration re-enable them. In particular, this lets the X > server disable inet and unix listen sockets by default while still > providing a '-listen' command line option to re-enable them later on. > > Signed-off-by: Keith Packard Looks good: Reviewed-by: Hans de Goede Regards, Hans > --- > Xtrans.c | 25 +++++++++++++++++++++++++ > Xtrans.h | 4 ++++ > 2 files changed, 29 insertions(+) > > diff --git a/Xtrans.c b/Xtrans.c > index 2880803..bfba1ad 100644 > --- a/Xtrans.c > +++ b/Xtrans.c > @@ -804,6 +804,31 @@ TRANS(NoListen) (const char * protocol) > } > > int > +TRANS(Listen) (const char * protocol) > +{ > + Xtransport *trans; > + int i = 0, ret = 0; > + > + if ((trans = TRANS(SelectTransport)(protocol)) == NULL) > + { > + prmsg (1,"TransListen: unable to find transport: %s\n", > + protocol); > + > + return -1; > + } > + if (trans->flags & TRANS_ALIAS) { > + if (trans->nolisten) > + while (trans->nolisten[i]) { > + ret |= TRANS(Listen)(trans->nolisten[i]); > + i++; > + } > + } > + > + trans->flags &= ~TRANS_NOLISTEN; > + return ret; > +} > + > +int > TRANS(IsListening) (const char * protocol) > { > Xtransport *trans; > diff --git a/Xtrans.h b/Xtrans.h > index 6decc6b..026fbd7 100644 > --- a/Xtrans.h > +++ b/Xtrans.h > @@ -311,6 +311,10 @@ int TRANS(NoListen) ( > const char* /* protocol*/ > ); > > +int TRANS(Listen) ( > + const char* /* protocol*/ > +); > + > int TRANS(IsListening) ( > const char* /* protocol*/ > ); > From hdegoede at redhat.com Sat Sep 13 03:41:59 2014 From: hdegoede at redhat.com (Hans de Goede) Date: Sat, 13 Sep 2014 12:41:59 +0200 Subject: [PATCH] os: Don't listen to 'tcp' or 'unix' by default. Add '-listen' option. In-Reply-To: <1410546941-31486-1-git-send-email-keithp@keithp.com> References: <1410546941-31486-1-git-send-email-keithp@keithp.com> Message-ID: <54141F77.2030007@redhat.com> Hi, On 09/12/2014 08:35 PM, Keith Packard wrote: > This disables tcp and unix listen ports by default (the unix port is > the non-abstract /tmp/.X11-unix port that xcb doesn't use). Then, it > uses a new xtrans interface, TRANS(Listen), to provide a command line > option to re-enable those if desired. > > Signed-off-by: Keith Packard We should probably put a #ifdef __linux__ around the "unix" in the defaultNoListenList, other then that this looks good: Reviewed-by: Hans de Goede Regards, Hans > --- > os/utils.c | 21 +++++++++++++++++++++ > 1 file changed, 21 insertions(+) > > diff --git a/os/utils.c b/os/utils.c > index c83f77d..ff1806b 100644 > --- a/os/utils.c > +++ b/os/utils.c > @@ -646,6 +646,12 @@ VerifyDisplayName(const char *d) > return 1; > } > > +static const char *defaultNoListenList[] = { > + "tcp", > + "unix", > + NULL > +}; > + > /* > * This function parses the command line. Handles device-independent fields > * and allows ddx to handle additional fields. It is not allowed to modify > @@ -664,6 +670,12 @@ ProcessCommandLine(int argc, char *argv[]) > PartialNetwork = TRUE; > #endif > > + for (i = 0; defaultNoListenList[i] != NULL; i++) { > + if (_XSERVTransNoListen(defaultNoListenList[i])) > + ErrorF("Failed to disable listen for %s transport", > + defaultNoListenList[i]); > + } > + > for (i = 1; i < argc; i++) { > /* call ddx first, so it can peek/override if it wants */ > if ((skip = ddxProcessArgument(argc, argv, i))) { > @@ -849,6 +861,15 @@ ProcessCommandLine(int argc, char *argv[]) > else > UseMsg(); > } > + else if (strcmp(argv[i], "-listen") == 0) { > + if (++i < argc) { > + if (_XSERVTransListen(argv[i])) > + ErrorF("Failed to enable listen for %s transport", > + argv[i]); > + } > + else > + UseMsg(); > + } > else if (strcmp(argv[i], "-noreset") == 0) { > dispatchExceptionAtReset = 0; > } > From mark.kettenis at xs4all.nl Sat Sep 13 05:41:46 2014 From: mark.kettenis at xs4all.nl (Mark Kettenis) Date: Sat, 13 Sep 2014 14:41:46 +0200 (CEST) Subject: [PATCH] os: Don't listen to 'tcp' or 'unix' by default. Add '-listen' option. In-Reply-To: <86iokswkfq.fsf@hiro.keithp.com> (message from Keith Packard on Fri, 12 Sep 2014 15:19:53 -0700) References: <1410546941-31486-1-git-send-email-keithp@keithp.com> <201409122154.s8CLswXu002238@glazunov.sibelius.xs4all.nl> <86iokswkfq.fsf@hiro.keithp.com> Message-ID: <201409131241.s8DCfkvb009104@glazunov.sibelius.xs4all.nl> > From: Keith Packard > Date: Fri, 12 Sep 2014 15:19:53 -0700 > > Mark Kettenis writes: > > > Unconditionally disabling the "unix" listen ports by default might be > > a step too far. Abstract sockets are only available on Linux. > > Yes, of course. > > > So on other architectures (or at least the ones where LOCALCONN isn't > > defined) this would leave us with no listen ports at all. I may have > > gotten lost in the #ifdef maze though... > > It's a terrible maze in there; I have no idea whether disabling "unix" > will actually disable local connections on BSD or not; I fear the best > way to find out is for you to just run the X server with --nolisten unix > and see what happens... Running with "-nolisten unix" on OpenBSD indeed disables local connections. From mark.kettenis at xs4all.nl Sat Sep 13 05:54:27 2014 From: mark.kettenis at xs4all.nl (Mark Kettenis) Date: Sat, 13 Sep 2014 14:54:27 +0200 (CEST) Subject: [PATCH] os: Don't listen to 'tcp' or 'unix' by default. Add '-listen' option. In-Reply-To: <1410546941-31486-1-git-send-email-keithp@keithp.com> (message from Keith Packard on Fri, 12 Sep 2014 11:35:41 -0700) References: <1410546941-31486-1-git-send-email-keithp@keithp.com> Message-ID: <201409131254.s8DCsRBv021180@glazunov.sibelius.xs4all.nl> > From: Keith Packard > Date: Fri, 12 Sep 2014 11:35:41 -0700 > > This disables tcp and unix listen ports by default (the unix port is > the non-abstract /tmp/.X11-unix port that xcb doesn't use). Then, it > uses a new xtrans interface, TRANS(Listen), to provide a command line > option to re-enable those if desired. Just looked at OpenSSH, and it doesn't use the xtrans code to connect to the server when doing X11 forwarding, but has its own implementation instead. This implementation only supports "unix" and "tcp" and has no support for abstract sockets. So I don't think you want to disable unix listen ports by default even on Linux. From bigon at debian.org Fri Sep 12 05:11:51 2014 From: bigon at debian.org (Laurent Bigonville) Date: Fri, 12 Sep 2014 14:11:51 +0200 Subject: [PATCH xinit 0/1] startx: Pass "-nolisten tcp" by default In-Reply-To: <1410506718-3816-1-git-send-email-hdegoede@redhat.com> References: <1410506718-3816-1-git-send-email-hdegoede@redhat.com> Message-ID: <20140912141151.058fa01e@fornost.bigon.be> Le Fri, 12 Sep 2014 09:25:17 +0200, Hans de Goede a ?crit : > Hi All, Hello, > After doing the 1.3.4 release yesterday, I've started working on > updating the Fedora packages to 1.3.4. While looking at our open bug > list against xinit, I found one bug which is not yet resolved in > 1.3.4 . > > This patch fixes this, I realize that this is a behavior change, and > as such may be a bit controversial, but I really believe that in this > day and age "-nolisten tcp" by default is the right thing to do. On Debian we have the "-nolisten tcp" option set in the system-wide xserverrc file since 2006 at least. But isn't your patch preventing the user or local admin to explicitly ask to listen on tcp in xserverrc or .xserverrc ? Cheers, Laurent Bigonville From keithp at keithp.com Sat Sep 13 09:49:44 2014 From: keithp at keithp.com (Keith Packard) Date: Sat, 13 Sep 2014 09:49:44 -0700 Subject: [PATCH] os: Don't listen to 'tcp' or 'unix' by default. Add '-listen' option. In-Reply-To: <201409131241.s8DCfkvb009104@glazunov.sibelius.xs4all.nl> References: <1410546941-31486-1-git-send-email-keithp@keithp.com> <201409122154.s8CLswXu002238@glazunov.sibelius.xs4all.nl> <86iokswkfq.fsf@hiro.keithp.com> <201409131241.s8DCfkvb009104@glazunov.sibelius.xs4all.nl> Message-ID: <86ppezsbx3.fsf@hiro.keithp.com> Mark Kettenis writes: > Running with "-nolisten unix" on OpenBSD indeed disables local > connections. Ok, good to know. -- keith.packard at intel.com -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 810 bytes Desc: not available URL: From keithp at keithp.com Sat Sep 13 09:51:55 2014 From: keithp at keithp.com (Keith Packard) Date: Sat, 13 Sep 2014 09:51:55 -0700 Subject: [PATCH] os: Don't listen to 'tcp' or 'unix' by default. Add '-listen' option. In-Reply-To: <201409131254.s8DCsRBv021180@glazunov.sibelius.xs4all.nl> References: <1410546941-31486-1-git-send-email-keithp@keithp.com> <201409131254.s8DCsRBv021180@glazunov.sibelius.xs4all.nl> Message-ID: <86mwa3sbtg.fsf@hiro.keithp.com> Mark Kettenis writes: > Just looked at OpenSSH, and it doesn't use the xtrans code to connect > to the server when doing X11 forwarding, but has its own > implementation instead. This implementation only supports "unix" and > "tcp" and has no support for abstract sockets. So I don't think you > want to disable unix listen ports by default even on Linux. At least not until we see OpenSSH get fixed and that become fairly widespread. Sounds like we should make it a configuration option and leave it disabled for now. Distributions with fixed SSH implementations could enable it later on. -- keith.packard at intel.com -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 810 bytes Desc: not available URL: From keithp at keithp.com Sat Sep 13 10:09:30 2014 From: keithp at keithp.com (Keith Packard) Date: Sat, 13 Sep 2014 10:09:30 -0700 Subject: [PATCH xinit 0/1] startx: Pass "-nolisten tcp" by default In-Reply-To: <54141E07.6050905@redhat.com> References: <1410506718-3816-1-git-send-email-hdegoede@redhat.com> <86ppf0wum3.fsf@hiro.keithp.com> <54141E07.6050905@redhat.com> Message-ID: <86k357sb05.fsf@hiro.keithp.com> Hans de Goede writes: > Also +1 for dropping /tmp/.X11-unix/X* on Linux. Mark discovered that OpenSSH doesn't use abstract sockets on Linux, so we'll need to get that fixed before we can disable the file system socket. We can add a configure option to disable this for systems that have a fixed OpenSSH installed. -- keith.packard at intel.com -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 810 bytes Desc: not available URL: From arekm at maven.pl Sat Sep 13 10:17:12 2014 From: arekm at maven.pl (Arkadiusz =?utf-8?q?Mi=C5=9Bkiewicz?=) Date: Sat, 13 Sep 2014 19:17:12 +0200 Subject: [PATCH xinit 0/1] startx: Pass "-nolisten tcp" by default In-Reply-To: <86k357sb05.fsf@hiro.keithp.com> References: <1410506718-3816-1-git-send-email-hdegoede@redhat.com> <54141E07.6050905@redhat.com> <86k357sb05.fsf@hiro.keithp.com> Message-ID: <201409131917.12244.arekm@maven.pl> On Saturday 13 of September 2014, Keith Packard wrote: > Hans de Goede writes: > > Also +1 for dropping /tmp/.X11-unix/X* on Linux. > > Mark discovered that OpenSSH doesn't use abstract sockets on Linux, so > we'll need to get that fixed before we can disable the file system > socket. We can add a configure option to disable this for systems that > have a fixed OpenSSH installed. https://bugzilla.mindrot.org/show_bug.cgi?id=1789 there is even some patch... but all that from 2010 and no progress since. -- Arkadiusz Mi?kiewicz, arekm / maven.pl From keithp at keithp.com Sat Sep 13 10:31:28 2014 From: keithp at keithp.com (Keith Packard) Date: Sat, 13 Sep 2014 10:31:28 -0700 Subject: [Intel-gfx] [PATCH 0/2 xf86-video-intel] Two DRI3/Present bug fixes for UXA In-Reply-To: <20140913082824.GM16043@nuc-i3427.alporthouse.com> References: <1410383349-27678-1-git-send-email-keithp@keithp.com> <20140911063716.GB28332@nuc-i3427.alporthouse.com> <86r3ziorwl.fsf@hiro.keithp.com> <20140913082824.GM16043@nuc-i3427.alporthouse.com> Message-ID: <86ha0bs9zj.fsf@hiro.keithp.com> Chris Wilson writes: > commit d21d781466785c317131a8a57606925867265dc8 > Author: Daniel Vetter > Date: Tue Feb 22 18:31:44 2011 +0100 > > Fix relaxed tiling on gen2 This one matches libdrm in using 16 for the tile height alignment on gen2. > Try enabling relaxed fencing again. > No. The clearest requirement is that the ddx (or other display server) > must treat incoming surfaces as tainted and validate them to be sure > that they work with its code paths. If it can't we have a choice of > either rejecting them outright, or staging them. If there's a stricter alignment requirement, then we must fix both the 2D driver and libdrm. Otherwise, the user's session will simply crash at startup. However, I still see absolutely no evidence that gen2 requires tile alignment to 32 rows, or that gen3+ requires tile alignment to 16 rows in any software configuration at all. -- keith.packard at intel.com -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 810 bytes Desc: not available URL: From keithp at keithp.com Sat Sep 13 11:00:06 2014 From: keithp at keithp.com (Keith Packard) Date: Sat, 13 Sep 2014 11:00:06 -0700 Subject: [PATCH libxtrans] Add TRANS(Listen) function to re-enable specific listen sockets In-Reply-To: <54141F3E.6050804@redhat.com> References: <1410546792-31329-1-git-send-email-keithp@keithp.com> <54141F3E.6050804@redhat.com> Message-ID: <868ulns8nt.fsf@hiro.keithp.com> Hans de Goede writes: >> Signed-off-by: Keith Packard > > Looks good: > > Reviewed-by: Hans de Goede I've pushed this to master. We'll need a release before we can use it in the X server. You did the last release of that library; feel free to do another if you please :-) -- keith.packard at intel.com -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 810 bytes Desc: not available URL: From keithp at keithp.com Sat Sep 13 11:03:10 2014 From: keithp at keithp.com (Keith Packard) Date: Sat, 13 Sep 2014 11:03:10 -0700 Subject: [PATCH xinit 0/1] startx: Pass "-nolisten tcp" by default In-Reply-To: <201409131917.12244.arekm@maven.pl> References: <1410506718-3816-1-git-send-email-hdegoede@redhat.com> <54141E07.6050905@redhat.com> <86k357sb05.fsf@hiro.keithp.com> <201409131917.12244.arekm@maven.pl> Message-ID: <8661grs8ip.fsf@hiro.keithp.com> Arkadiusz Mi?kiewicz writes: > https://bugzilla.mindrot.org/show_bug.cgi?id=1789 > > there is even some patch... but all that from 2010 and no progress > since. The comments from upstream aren't very encouraging. Perhaps someone with a clue about the security implications of using abstract sockets vs file system sockets might chime in and explain why using abstract sockets is safer than file system sockets... -- keith.packard at intel.com -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 810 bytes Desc: not available URL: From hdegoede at redhat.com Sat Sep 13 11:04:46 2014 From: hdegoede at redhat.com (Hans de Goede) Date: Sat, 13 Sep 2014 20:04:46 +0200 Subject: [PATCH libxtrans] Add TRANS(Listen) function to re-enable specific listen sockets In-Reply-To: <868ulns8nt.fsf@hiro.keithp.com> References: <1410546792-31329-1-git-send-email-keithp@keithp.com> <54141F3E.6050804@redhat.com> <868ulns8nt.fsf@hiro.keithp.com> Message-ID: <5414873E.80004@redhat.com> Hi, On 09/13/2014 08:00 PM, Keith Packard wrote: > Hans de Goede writes: > >>> Signed-off-by: Keith Packard >> >> Looks good: >> >> Reviewed-by: Hans de Goede > > I've pushed this to master. We'll need a release before we can use it in > the X server. You did the last release of that library; feel free to do > another if you please :-) I've been rather swamped with work, and I'm finally slowly climbing out of the hole I was drowning in. So if possible I would prefer for someone else to pick this up. Regards, Hans From ran234 at gmail.com Sat Sep 13 13:13:25 2014 From: ran234 at gmail.com (Ran Benita) Date: Sat, 13 Sep 2014 23:13:25 +0300 Subject: [patch] xkbcomp: fixing an age-old warning In-Reply-To: <1410466732.1399333.166460833.2758EBD4@webmail.messagingengine.com> References: <1410295038.4125921.165564561.7C3B4C05@webmail.messagingengine.com> <20140910223624.GA23611@ran> <20140911110101.GA22669@ran> <1410466732.1399333.166460833.2758EBD4@webmail.messagingengine.com> Message-ID: <20140913201325.GA20684@ran> On Thu, Sep 11, 2014 at 10:18:52PM +0200, Benno Schulenberg wrote: > On Thu, Sep 11, 2014, at 13:01, Ran Benita wrote: > > Actually I'm not so sure. The current behavior of a key-group override > > is per-symbol, e.g. > > > > override key { > > [ NoSymbol, B, C ]; > > }; > > > > Means: replace whatever is in the 2nd and 3rd levels with the symbols B > > and C (create them if they do not exist). "override" is almost always > > the default. Often, the key type for both `from` and `into` is not > > specified, so an automatic type is assigned (FindAutomaticType) at a > > later point. > > > > Now, if we have this: > > > > key { > > [1, 2, 3, 4]; > > } > > [...] > > override key { > > [ NoSymbol, B, C ]; > > }; > > > > With current code you get: [1, B, C, 4], with your patch: [1, B, C]. > > I think the current behavior is a bit more intuitive, > > Hmm. I wouldn't call that more intuitive, I would call it plain wrong. :) > If I wanted an overridden key to retain a possible fourth symbol, I would > write "[ any, B, C, any ]" instead of "[ any, B, C ]". If you want to outright replace the key, you should use Replace (see the beginning of MergeKeys() - haven't tried it though). Override in this case means to do the merge per-level. So if I put [ NoSymbol, B, C ] it shouldn't touch the other levels IMO. But if you override the *type* then it obviously affects the levels. > > and we should not > > change it. [...] > > Fair enough... let's assume that some definitions depend on the current > behaviour. > > > So if you want to get rid of the warning, I'd suggest either: > > > > 1. Change the test to > > > > if ((from->numLevels[group] > into->numLevels[group]) > > || (override && from->types[group] != None)) > > Implemented in the revised patch, attached. Looks good. > > 2. Just make the warning require a verbosity>0. It is not necessarily > > a problem if the truncation kicks in, so it should not be displayed > > to the user by default. However a keymap author would probably like > > to see it. > > I would like to propose that solution for this warning: > Warning: Symbol map for key redefined > Using last definition for conflicting fields If you send a patch I will review it :) (but you will have to get someone to apply it). Ran > Thanks for the detailed review. > > Benno From alan.coopersmith at oracle.com Sun Sep 14 13:09:43 2014 From: alan.coopersmith at oracle.com (Alan Coopersmith) Date: Sun, 14 Sep 2014 13:09:43 -0700 Subject: [PATCH:libICE] spec: Convert troff \*Q..\*U to DocBook ... Message-ID: <1410725383-18022-1-git-send-email-alan.coopersmith@oracle.com> Reported-by: Jasper St. Pierre Signed-off-by: Alan Coopersmith --- specs/ice.xml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/specs/ice.xml b/specs/ice.xml index 439c2f6..44b7c79 100644 --- a/specs/ice.xml +++ b/specs/ice.xml @@ -95,8 +95,8 @@ allow them to share the same transport layer connection. Through some mechanism outside ICE, two parties make themselves known to each other and agree that they would like to communicate using an ICE subprotocol. ICE assumes that this negotation includes some notion by which -the parties will decide which is the \*Qoriginating\*U party and which is -the \*Qanswering\*U party. The negotiation will also need to provide the +the parties will decide which is the originating party and which is +the answering party. The negotiation will also need to provide the originating party with a name or address of the answering party. Examples of mechanisms by which parties can make themselves known to each other are the X selection mechanism, environment @@ -227,7 +227,7 @@ the initial connection messages; in general data is sent in the sender's byte order and the receiver is required to swap it appropriately. In order to support 64-bit machines, ICE messages are padded to multiples of 8 bytes. All messages are designed so that -fields are \*Qnaturally\*U aligned on 16-, 32-, and 64-bit boundaries. +fields are naturally aligned on 16-, 32-, and 64-bit boundaries. The following formula gives the number of bytes necessary to pad E bytes to the next multiple of b: @@ -485,7 +485,7 @@ header and the length field is computed accordingly. -In the following message descriptions, \*QExpected errors\*U indicates +In the following message descriptions, Expected errors indicates errors that may occur in the normal course of events. Other errors (in particular BadMajor @@ -1465,7 +1465,7 @@ but it does not affect the existing registration. The major opcode specified was already registered. This is -fatal to the \*Qnew\*U protocol being set up by +fatal to the new protocol being set up by ProtocolSetup but it does not affect the existing registration. -- 1.7.9.2 From ran234 at gmail.com Sun Sep 14 13:44:33 2014 From: ran234 at gmail.com (Ran Benita) Date: Sun, 14 Sep 2014 23:44:33 +0300 Subject: xlocale-config Message-ID: <1410727479-12160-1-git-send-email-ran234@gmail.com> This set of patches splits the locale data (the nls/ directory and a couple of related patches) from Xlib to a separate repository, "xlocale-config" (the insparation is xkeyboard-config which I think has worked out well). Xlib is made to depend on xlocale-config. The reason for doing this is to be able to use the Compose files without depending on Xlib. To correctly use the Compose files, the rest of the locale data is also needed. My own interest is for a Compose implementation in libxkbcommon, but other projects also have Compose implementations independent of Xlib (Qt5 and probably others). Some distributions such as Debian already have a split libx11-data package. But I think this is better done upstream, and I don't think many other distribution which do something similar. Note: when we discussed this on IRC, we agreed to leave the nls/*/XI18N_OBJS files in the libX11 repo. Having tried that, it causes a lot of duplication and fragility, and it would make it harder to e.g. add new locales. This could potentially create a circular dependency if some change in Xlib necessitates a change in the XI18N_OBJS files. >From looking at git log something like that was never necessary besides (maybe?) one case: http://cgit.freedesktop.org/xorg/lib/libX11/commit/?id=0e45f64766c0557c8e99a979c70ca6f55664dae7 Finally, the xlocale-config copies over the files from libX11. If you prefer to preserve the git history it is not a problem (I wanted to avoid having duplicate history with different SHAs in two live repos). Some patches are snipped due to large size (and for deletions I used --irreversible-delete). You can find them here: https://github.com/bluetech/libX11/ (xlocale-config branch) https://github.com/bluetech/xlocale-config Thanks, Ran From ran234 at gmail.com Sun Sep 14 13:44:34 2014 From: ran234 at gmail.com (Ran Benita) Date: Sun, 14 Sep 2014 23:44:34 +0300 Subject: [PATCH xlocale-config 1/6] New module In-Reply-To: <1410727479-12160-1-git-send-email-ran234@gmail.com> References: <1410727479-12160-1-git-send-email-ran234@gmail.com> Message-ID: <1410727479-12160-2-git-send-email-ran234@gmail.com> The files (besides README) were adapted from libX11 as of commit 6101b967b641355dd863fd1ce52c6a7d58bcbe68. Signed-off-by: Ran Benita --- .gitignore | 82 ++++++ COPYING | 942 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Makefile.am | 11 + README | 31 ++ autogen.sh | 14 + configure.ac | 18 ++ 6 files changed, 1098 insertions(+) create mode 100644 .gitignore create mode 100644 COPYING create mode 100644 Makefile.am create mode 100644 README create mode 100755 autogen.sh create mode 100644 configure.ac diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..f471454 --- /dev/null +++ b/.gitignore @@ -0,0 +1,82 @@ +# +# X.Org module default exclusion patterns +# The next section if for module specific patterns +# +# Do not edit the following section +# GNU Build System (Autotools) +aclocal.m4 +autom4te.cache/ +autoscan.log +ChangeLog +compile +config.guess +config.h +config.h.in +config.log +config-ml.in +config.py +config.status +config.status.lineno +config.sub +configure +configure.scan +depcomp +.deps/ +INSTALL +install-sh +.libs/ +libtool +libtool.m4 +ltmain.sh +lt~obsolete.m4 +ltoptions.m4 +ltsugar.m4 +ltversion.m4 +Makefile +Makefile.in +mdate-sh +missing +mkinstalldirs +*.pc +py-compile +stamp-h? +symlink-tree +texinfo.tex +ylwrap + +# Do not edit the following section +# Edit Compile Debug Document Distribute +*~ +*.[0-9] +*.[0-9]x +*.bak +*.bin +core +*.dll +*.exe +*-ISO*.bdf +*-JIS*.bdf +*-KOI8*.bdf +*.kld +*.ko +*.ko.cmd +*.lai +*.l[oa] +*.[oa] +*.obj +*.patch +*.so +*.pcf.gz +*.pdb +*.tar.bz2 +*.tar.gz +# +# Add & Override patterns for xlocale-config +# +# Edit the following section as needed +# For example, !report.pc overrides *.pc. See 'man gitignore' +# +test-driver +*.log +*.trs +test-suite.log diff --git a/COPYING b/COPYING new file mode 100644 index 0000000..b065516 --- /dev/null +++ b/COPYING @@ -0,0 +1,942 @@ +The following is the 'standard copyright' agreed upon by most contributors, +and is currently the canonical license preferred by the X.Org Foundation. +This is a slight variant of the common MIT license form published by the +Open Source Initiative at http://www.opensource.org/licenses/mit-license.php + +Copyright holders of new code should use this license statement where +possible, and insert their name to this list. Please sort by surname +for people, and by the full name for other entities (e.g. Juliusz +Chroboczek sorts before Intel Corporation sorts before Daniel Stone). + +See each individual source file or directory for the license that applies +to that file. + +Copyright (C) 2003-2006,2008 Jamey Sharp, Josh Triplett +Copyright ? 2009 Red Hat, Inc. +Copyright 1990-1992,1999,2000,2004,2009,2010 Oracle and/or its affiliates. +All rights reserved. + +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 (including the next +paragraph) 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. + + ---------------------------------------------------------------------- + +The following licenses are 'legacy' - usually MIT/X11 licenses with the name +of the copyright holder(s) in the license statement: + +Copyright 1984-1994, 1998 The Open Group + +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. + +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 +OPEN GROUP 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. + +Except as contained in this notice, the name of The Open Group shall not be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from The Open Group. + +X Window System is a trademark of The Open Group. + + ---------------------------------------- + +Copyright 1985, 1986, 1987, 1988, 1989, 1990, 1991, 1994, 1996 X Consortium +Copyright 2000 The XFree86 Project, Inc. + +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 X CONSORTIUM 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. + +Except as contained in this notice, the name of the X Consortium shall +not be used in advertising or otherwise to promote the sale, use or +other dealings in this Software without prior written authorization +from the X Consortium. + +Copyright 1985, 1986, 1987, 1988, 1989, 1990, 1991 by +Digital Equipment Corporation + +Portions Copyright 1990, 1991 by Tektronix, Inc. + +Permission to use, copy, modify and distribute this documentation for +any purpose and without fee is hereby granted, provided that the above +copyright notice appears in all copies and that both that copyright notice +and this permission notice appear in all copies, and that the names of +Digital and Tektronix not be used in in advertising or publicity pertaining +to this documentation without specific, written prior permission. +Digital and Tektronix makes no representations about the suitability +of this documentation for any purpose. +It is provided ``as is'' without express or implied warranty. + + ---------------------------------------- + +Copyright (c) 1999-2000 Free Software Foundation, Inc. + +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 +FREE SOFTWARE FOUNDATION 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. + +Except as contained in this notice, the name of the Free Software Foundation +shall not be used in advertising or otherwise to promote the sale, use or +other dealings in this Software without prior written authorization from the +Free Software Foundation. + + ---------------------------------------- + +Code and supporting documentation (c) Copyright 1990 1991 Tektronix, Inc. + All Rights Reserved + +This file is a component of an X Window System-specific implementation +of Xcms based on the TekColor Color Management System. TekColor is a +trademark of Tektronix, Inc. The term "TekHVC" designates a particular +color space that is the subject of U.S. Patent No. 4,985,853 (equivalent +foreign patents pending). Permission is hereby granted to use, copy, +modify, sell, and otherwise distribute this software and its +documentation for any purpose and without fee, provided that: + +1. This copyright, permission, and disclaimer notice is reproduced in + all copies of this software and any modification thereof and in + supporting documentation; +2. Any color-handling application which displays TekHVC color + cooordinates identifies these as TekHVC color coordinates in any + interface that displays these coordinates and in any associated + documentation; +3. The term "TekHVC" is always used, and is only used, in association + with the mathematical derivations of the TekHVC Color Space, + including those provided in this file and any equivalent pathways and + mathematical derivations, regardless of digital (e.g., floating point + or integer) representation. + +Tektronix makes no representation about the suitability of this software +for any purpose. It is provided "as is" and with all faults. + +TEKTRONIX DISCLAIMS ALL WARRANTIES APPLICABLE TO THIS SOFTWARE, +INCLUDING THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A +PARTICULAR PURPOSE. IN NO EVENT SHALL TEKTRONIX BE LIABLE FOR ANY +SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER +RESULTING FROM LOSS OF USE, DATA, OR PROFITS, WHETHER IN AN ACTION OF +CONTRACT, NEGLIGENCE, OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN +CONNECTION WITH THE USE OR THE PERFORMANCE OF THIS SOFTWARE. + + ---------------------------------------- + +(c) Copyright 1995 FUJITSU LIMITED +This is source code modified by FUJITSU LIMITED under the Joint +Development Agreement for the CDE/Motif PST. + + ---------------------------------------- + +Copyright 1992 by Oki Technosystems Laboratory, Inc. +Copyright 1992 by Fuji Xerox Co., Ltd. + +Permission to use, copy, modify, distribute, and sell this software +and its documentation for any purpose is hereby granted without fee, +provided that the above copyright notice appear in all copies and +that both that copyright notice and this permission notice appear +in supporting documentation, and that the name of Oki Technosystems +Laboratory and Fuji Xerox not be used in advertising or publicity +pertaining to distribution of the software without specific, written +prior permission. +Oki Technosystems Laboratory and Fuji Xerox make no representations +about the suitability of this software for any purpose. It is provided +"as is" without express or implied warranty. + +OKI TECHNOSYSTEMS LABORATORY AND FUJI XEROX DISCLAIM ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL OKI TECHNOSYSTEMS +LABORATORY AND FUJI XEROX BE LIABLE FOR ANY SPECIAL, INDIRECT OR +CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS +OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE +OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE +OR PERFORMANCE OF THIS SOFTWARE. + + ---------------------------------------- + +Copyright 1990, 1991, 1992, 1993, 1994 by FUJITSU LIMITED + +Permission to use, copy, modify, distribute, and sell this software +and its documentation for any purpose is hereby granted without fee, +provided that the above copyright notice appear in all copies and +that both that copyright notice and this permission notice appear +in supporting documentation, and that the name of FUJITSU LIMITED +not be used in advertising or publicity pertaining to distribution +of the software without specific, written prior permission. +FUJITSU LIMITED makes no representations about the suitability of +this software for any purpose. +It is provided "as is" without express or implied warranty. + +FUJITSU LIMITED DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, +INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO +EVENT SHALL FUJITSU LIMITED BE LIABLE FOR ANY SPECIAL, INDIRECT OR +CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF +USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. + + ---------------------------------------- + + +Copyright (c) 1995 David E. Wexelblat. All rights reserved + +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 DAVID E. WEXELBLAT 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. + +Except as contained in this notice, the name of David E. Wexelblat shall +not be used in advertising or otherwise to promote the sale, use or +other dealings in this Software without prior written authorization +from David E. Wexelblat. + + ---------------------------------------- + +Copyright 1990, 1991 by OMRON Corporation + +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation, and that the name OMRON not be used in +advertising or publicity pertaining to distribution of the software without +specific, written prior permission. OMRON makes no representations +about the suitability of this software for any purpose. It is provided +"as is" without express or implied warranty. + +OMRON DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, +INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO +EVENT SHALL OMRON BE LIABLE FOR ANY SPECIAL, INDIRECT OR +CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, +DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER +TORTUOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. + + ---------------------------------------- + +Copyright 1985, 1986, 1987, 1988, 1989, 1990, 1991 by +Digital Equipment Corporation + +Portions Copyright 1990, 1991 by Tektronix, Inc + +Rewritten for X.org by Chris Lee + +Permission to use, copy, modify, distribute, and sell this documentation +for any purpose and without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. +Chris Lee makes no representations about the suitability for any purpose +of the information in this document. It is provided \`\`as-is'' without +express or implied warranty. + + ---------------------------------------- + +Copyright 1993 by Digital Equipment Corporation, Maynard, Massachusetts, +Copyright 1994 by FUJITSU LIMITED +Copyright 1994 by Sony Corporation + + All Rights Reserved + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the names of Digital, FUJITSU +LIMITED and Sony Corporation not be used in advertising or publicity +pertaining to distribution of the software without specific, written +prior permission. + +DIGITAL, FUJITSU LIMITED AND SONY CORPORATION DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL DIGITAL, FUJITSU LIMITED +AND SONY CORPORATION BE LIABLE FOR ANY SPECIAL, INDIRECT OR +CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF +USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. + + ---------------------------------------- + + +Copyright 1991 by the Open Software Foundation + +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation, and that the name of Open Software Foundation +not be used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. Open Software +Foundation makes no representations about the suitability of this +software for any purpose. It is provided "as is" without express or +implied warranty. + +OPEN SOFTWARE FOUNDATION DISCLAIMS ALL WARRANTIES WITH REGARD TO +THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS, IN NO EVENT SHALL OPEN SOFTWARE FOUNDATIONN BE +LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + + ---------------------------------------- + +Copyright 1990, 1991, 1992,1993, 1994 by FUJITSU LIMITED +Copyright 1993, 1994 by Sony Corporation + +Permission to use, copy, modify, distribute, and sell this software and +its documentation for any purpose is hereby granted without fee, provided +that the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation, and that the name of FUJITSU LIMITED and Sony Corporation +not be used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. FUJITSU LIMITED and +Sony Corporation makes no representations about the suitability of this +software for any purpose. It is provided "as is" without express or +implied warranty. + +FUJITSU LIMITED AND SONY CORPORATION DISCLAIMS ALL WARRANTIES WITH REGARD +TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS, IN NO EVENT SHALL FUJITSU LIMITED OR SONY CORPORATION BE LIABLE +FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER +RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, +NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE +USE OR PERFORMANCE OF THIS SOFTWARE. + + ---------------------------------------- + +Copyright (c) 1993, 1995 by Silicon Graphics Computer Systems, Inc. + +Permission to use, copy, modify, and distribute this +software and its documentation for any purpose and without +fee is hereby granted, provided that the above copyright +notice appear in all copies and that both that copyright +notice and this permission notice appear in supporting +documentation, and that the name of Silicon Graphics not be +used in advertising or publicity pertaining to distribution +of the software without specific prior written permission. +Silicon Graphics makes no representation about the suitability +of this software for any purpose. It is provided "as is" +without any express or implied warranty. + +SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS +SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON +GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL +DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, +DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE +OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH +THE USE OR PERFORMANCE OF THIS SOFTWARE. + + ---------------------------------------- + +Copyright 1991, 1992, 1993, 1994 by FUJITSU LIMITED +Copyright 1993 by Digital Equipment Corporation + +Permission to use, copy, modify, distribute, and sell this software +and its documentation for any purpose is hereby granted without fee, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of FUJITSU LIMITED and +Digital Equipment Corporation not be used in advertising or publicity +pertaining to distribution of the software without specific, written +prior permission. FUJITSU LIMITED and Digital Equipment Corporation +makes no representations about the suitability of this software for +any purpose. It is provided "as is" without express or implied +warranty. + +FUJITSU LIMITED AND DIGITAL EQUIPMENT CORPORATION DISCLAIM ALL +WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL +FUJITSU LIMITED AND DIGITAL EQUIPMENT CORPORATION BE LIABLE FOR +ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER +IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF +THIS SOFTWARE. + + ---------------------------------------- + +Copyright 1992, 1993 by FUJITSU LIMITED +Copyright 1993 by Fujitsu Open Systems Solutions, Inc. +Copyright 1994 by Sony Corporation + +Permission to use, copy, modify, distribute and sell this software +and its documentation for any purpose is hereby granted without fee, +provided that the above copyright notice appear in all copies and +that both that copyright notice and this permission notice appear +in supporting documentation, and that the name of FUJITSU LIMITED, +Fujitsu Open Systems Solutions, Inc. and Sony Corporation not be +used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. +FUJITSU LIMITED, Fujitsu Open Systems Solutions, Inc. and +Sony Corporation make no representations about the suitability of +this software for any purpose. It is provided "as is" without +express or implied warranty. + +FUJITSU LIMITED, FUJITSU OPEN SYSTEMS SOLUTIONS, INC. AND SONY +CORPORATION DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, +INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, +IN NO EVENT SHALL FUJITSU OPEN SYSTEMS SOLUTIONS, INC., FUJITSU LIMITED +AND SONY CORPORATION BE LIABLE FOR ANY SPECIAL, INDIRECT OR +CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS +OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE +OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE +OR PERFORMANCE OF THIS SOFTWARE. + + ---------------------------------------- + +Copyright 1987, 1988, 1990, 1993 by Digital Equipment Corporation, +Maynard, Massachusetts, + + All Rights Reserved + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of Digital not be +used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. + +DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL +DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR +ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +SOFTWARE. + + ---------------------------------------- + +Copyright 1993 by SunSoft, Inc. +Copyright 1999-2000 by Bruno Haible + +Permission to use, copy, modify, distribute, and sell this software +and its documentation for any purpose is hereby granted without fee, +provided that the above copyright notice appear in all copies and +that both that copyright notice and this permission notice appear +in supporting documentation, and that the names of SunSoft, Inc. and +Bruno Haible not be used in advertising or publicity pertaining to +distribution of the software without specific, written prior +permission. SunSoft, Inc. and Bruno Haible make no representations +about the suitability of this software for any purpose. It is +provided "as is" without express or implied warranty. + +SunSoft Inc. AND Bruno Haible DISCLAIM ALL WARRANTIES WITH REGARD +TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS, IN NO EVENT SHALL SunSoft, Inc. OR Bruno Haible BE LIABLE +FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT +OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + + ---------------------------------------- + +Copyright 1991 by the Open Software Foundation +Copyright 1993 by the TOSHIBA Corp. + +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation, and that the names of Open Software Foundation and TOSHIBA +not be used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. Open Software +Foundation and TOSHIBA make no representations about the suitability of this +software for any purpose. It is provided "as is" without express or +implied warranty. + +OPEN SOFTWARE FOUNDATION AND TOSHIBA DISCLAIM ALL WARRANTIES WITH REGARD TO +THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS, IN NO EVENT SHALL OPEN SOFTWARE FOUNDATIONN OR TOSHIBA BE +LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + + ---------------------------------------- + +Copyright 1988 by Wyse Technology, Inc., San Jose, Ca., + + All Rights Reserved + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name Wyse not be +used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. + +WYSE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL +DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR +ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +SOFTWARE. + + ---------------------------------------- + + +Copyright 1991 by the Open Software Foundation +Copyright 1993, 1994 by the Sony Corporation + +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation, and that the names of Open Software Foundation and +Sony Corporation not be used in advertising or publicity pertaining to +distribution of the software without specific, written prior permission. +Open Software Foundation and Sony Corporation make no +representations about the suitability of this software for any purpose. +It is provided "as is" without express or implied warranty. + +OPEN SOFTWARE FOUNDATION AND SONY CORPORATION DISCLAIM ALL +WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL OPEN +SOFTWARE FOUNDATIONN OR SONY CORPORATION BE LIABLE FOR ANY SPECIAL, +INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE +OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. + + ---------------------------------------- + +Copyright 1992, 1993 by FUJITSU LIMITED +Copyright 1993 by Fujitsu Open Systems Solutions, Inc. + +Permission to use, copy, modify, distribute and sell this software +and its documentation for any purpose is hereby granted without fee, +provided that the above copyright notice appear in all copies and +that both that copyright notice and this permission notice appear +in supporting documentation, and that the name of FUJITSU LIMITED and +Fujitsu Open Systems Solutions, Inc. not be used in advertising or +publicity pertaining to distribution of the software without specific, +written prior permission. +FUJITSU LIMITED and Fujitsu Open Systems Solutions, Inc. makes no +representations about the suitability of this software for any purpose. +It is provided "as is" without express or implied warranty. + +FUJITSU LIMITED AND FUJITSU OPEN SYSTEMS SOLUTIONS, INC. DISCLAIMS ALL +WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL FUJITSU OPEN SYSTEMS +SOLUTIONS, INC. AND FUJITSU LIMITED BE LIABLE FOR ANY SPECIAL, INDIRECT +OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF +USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER +TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE +OF THIS SOFTWARE. + + ---------------------------------------- + +Copyright 1993, 1994 by Sony Corporation + +Permission to use, copy, modify, distribute, and sell this software +and its documentation for any purpose is hereby granted without fee, +provided that the above copyright notice appear in all copies and +that both that copyright notice and this permission notice appear +in supporting documentation, and that the name of Sony Corporation +not be used in advertising or publicity pertaining to distribution +of the software without specific, written prior permission. +Sony Corporation makes no representations about the suitability of +this software for any purpose. It is provided "as is" without +express or implied warranty. + +SONY CORPORATION DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, +INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO +EVENT SHALL SONY CORPORATION BE LIABLE FOR ANY SPECIAL, INDIRECT OR +CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF +USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. + + ---------------------------------------- + +Copyright 1986, 1998 The Open Group +Copyright (c) 2000 The XFree86 Project, Inc. + +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. + +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 +X CONSORTIUM OR THE XFREE86 PROJECT 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. + +Except as contained in this notice, the name of the X Consortium or of the +XFree86 Project shall not be used in advertising or otherwise to promote the +sale, use or other dealings in this Software without prior written +authorization from the X Consortium and the XFree86 Project. + + ---------------------------------------- + +Copyright 1990, 1991 by OMRON Corporation, NTT Software Corporation, + and Nippon Telegraph and Telephone Corporation +Copyright 1991 by the Open Software Foundation +Copyright 1993 by the FUJITSU LIMITED + +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation, and that the names of OMRON, NTT Software, NTT, and +Open Software Foundation not be used in advertising or publicity +pertaining to distribution of the software without specific, +written prior permission. OMRON, NTT Software, NTT, and Open Software +Foundation make no representations about the suitability of this +software for any purpose. It is provided "as is" without express or +implied warranty. + +OMRON, NTT SOFTWARE, NTT, AND OPEN SOFTWARE FOUNDATION +DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT +SHALL OMRON, NTT SOFTWARE, NTT, OR OPEN SOFTWARE FOUNDATION BE +LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + + ---------------------------------------- + +Copyright 1988 by Wyse Technology, Inc., San Jose, Ca, +Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts, + + All Rights Reserved + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name Digital not be +used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. + +DIGITAL AND WYSE DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, +INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO +EVENT SHALL DIGITAL OR WYSE BE LIABLE FOR ANY SPECIAL, INDIRECT OR +CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF +USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. + + ---------------------------------------- + + +Copyright 1991, 1992 by Fuji Xerox Co., Ltd. +Copyright 1992, 1993, 1994 by FUJITSU LIMITED + +Permission to use, copy, modify, distribute, and sell this software +and its documentation for any purpose is hereby granted without fee, +provided that the above copyright notice appear in all copies and +that both that copyright notice and this permission notice appear +in supporting documentation, and that the name of Fuji Xerox, +FUJITSU LIMITED not be used in advertising or publicity pertaining +to distribution of the software without specific, written prior +permission. Fuji Xerox, FUJITSU LIMITED make no representations +about the suitability of this software for any purpose. +It is provided "as is" without express or implied warranty. + +FUJI XEROX, FUJITSU LIMITED DISCLAIM ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL FUJI XEROX, +FUJITSU LIMITED BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL +DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA +OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER +TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. + + ---------------------------------------- + +Copyright 2006 Josh Triplett + +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 X CONSORTIUM 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. + + ---------------------------------------- + +(c) Copyright 1996 by Sebastien Marineau and Holger Veit + + + +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 +HOLGER VEIT 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. + +Except as contained in this notice, the name of Sebastien Marineau or Holger Veit +shall not be used in advertising or otherwise to promote the sale, use or other +dealings in this Software without prior written authorization from Holger Veit or +Sebastien Marineau. + + ---------------------------------------- + +Copyright 1990, 1991 by OMRON Corporation, NTT Software Corporation, + and Nippon Telegraph and Telephone Corporation +Copyright 1991 by the Open Software Foundation +Copyright 1993 by the TOSHIBA Corp. +Copyright 1993, 1994 by Sony Corporation +Copyright 1993, 1994 by the FUJITSU LIMITED + +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation, and that the names of OMRON, NTT Software, NTT, Open +Software Foundation, and Sony Corporation not be used in advertising +or publicity pertaining to distribution of the software without specific, +written prior permission. OMRON, NTT Software, NTT, Open Software +Foundation, and Sony Corporation make no representations about the +suitability of this software for any purpose. It is provided "as is" +without express or implied warranty. + +OMRON, NTT SOFTWARE, NTT, OPEN SOFTWARE FOUNDATION, AND SONY +CORPORATION DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT +SHALL OMRON, NTT SOFTWARE, NTT, OPEN SOFTWARE FOUNDATION, OR SONY +CORPORATION BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR +ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER +IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT +OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + + ---------------------------------------- + +Copyright 2000 by Bruno Haible + +Permission to use, copy, modify, distribute, and sell this software +and its documentation for any purpose is hereby granted without fee, +provided that the above copyright notice appear in all copies and +that both that copyright notice and this permission notice appear +in supporting documentation, and that the name of Bruno Haible not +be used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. Bruno Haible +makes no representations about the suitability of this software for +any purpose. It is provided "as is" without express or implied +warranty. + +Bruno Haible DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, +INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN +NO EVENT SHALL Bruno Haible BE LIABLE FOR ANY SPECIAL, INDIRECT OR +CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS +OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE +OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE +OR PERFORMANCE OF THIS SOFTWARE. + + ---------------------------------------- + +Copyright ? 2003 Keith Packard + +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation, and that the name of Keith Packard not be used in +advertising or publicity pertaining to distribution of the software without +specific, written prior permission. Keith Packard makes no +representations about the suitability of this software for any purpose. It +is provided "as is" without express or implied warranty. + +KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, +INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO +EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR +CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, +DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER +TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. + + ---------------------------------------- + +Copyright (c) 2007-2009, Troy D. Hanson +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "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 COPYRIGHT OWNER +OR CONTRIBUTORS 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. + + ---------------------------------------- + +Copyright 1992, 1993 by TOSHIBA Corp. + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, provided +that the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation, and that the name of TOSHIBA not be used in advertising +or publicity pertaining to distribution of the software without specific, +written prior permission. TOSHIBA make no representations about the +suitability of this software for any purpose. It is provided "as is" +without express or implied warranty. + +TOSHIBA DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL +TOSHIBA BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR +ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +SOFTWARE. + + + ---------------------------------------- + +Copyright IBM Corporation 1993 + +All Rights Reserved + +License to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of IBM not be +used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. + +IBM DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +ALL IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS, AND +NONINFRINGEMENT OF THIRD PARTY RIGHTS, IN NO EVENT SHALL +IBM BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR +ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +SOFTWARE. + + ---------------------------------------- + +Copyright 1990, 1991 by OMRON Corporation, NTT Software Corporation, + and Nippon Telegraph and Telephone Corporation + +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation, and that the names of OMRON, NTT Software, and NTT +not be used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. OMRON, NTT Software, +and NTT make no representations about the suitability of this +software for any purpose. It is provided "as is" without express or +implied warranty. + +OMRON, NTT SOFTWARE, AND NTT, DISCLAIM ALL WARRANTIES WITH REGARD +TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS, IN NO EVENT SHALL OMRON, NTT SOFTWARE, OR NTT, BE +LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + diff --git a/Makefile.am b/Makefile.am new file mode 100644 index 0000000..801fc5a --- /dev/null +++ b/Makefile.am @@ -0,0 +1,11 @@ +MAINTAINERCLEANFILES = ChangeLog INSTALL + +.PHONY: ChangeLog INSTALL + +INSTALL: + $(INSTALL_CMD) + +ChangeLog: + $(CHANGELOG_CMD) + +dist-hook: ChangeLog INSTALL diff --git a/README b/README new file mode 100644 index 0000000..6f67956 --- /dev/null +++ b/README @@ -0,0 +1,31 @@ + X Locale Configuration Data + +This module contains locale configuration and data files for the X Window +System. Primarily, it provides per-locale descriptors and Compose files. + +The data in this module used to be distributed as part of libX11, and was +later split to its own repository. + + +All questions regarding this software should be directed at the +Xorg mailing list: + + http://lists.freedesktop.org/mailman/listinfo/xorg + +Please submit bug reports to the Xorg bugzilla: + + https://bugs.freedesktop.org/enter_bug.cgi?product=xorg + +The master development code repository can be found at: + + git://anongit.freedesktop.org/git/xorg/data/xlocale-config + + http://cgit.freedesktop.org/xorg/data/xlocale-config + +For patch submission instructions, see: + + http://www.x.org/wiki/Development/Documentation/SubmittingPatches + +For more information on the git code manager, see: + + http://wiki.x.org/wiki/GitPage diff --git a/autogen.sh b/autogen.sh new file mode 100755 index 0000000..fc34bd5 --- /dev/null +++ b/autogen.sh @@ -0,0 +1,14 @@ +#! /bin/sh + +srcdir=`dirname $0` +test -z "$srcdir" && srcdir=. + +ORIGDIR=`pwd` +cd $srcdir + +autoreconf -v --install || exit 1 +cd $ORIGDIR || exit $? + +if test -z "$NOCONFIGURE"; then + $srcdir/configure "$@" +fi diff --git a/configure.ac b/configure.ac new file mode 100644 index 0000000..16a2937 --- /dev/null +++ b/configure.ac @@ -0,0 +1,18 @@ +# Initialize Autoconf +AC_PREREQ([2.60]) +AC_INIT([xlocale-config], [0.0.0], + [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], [xlocale-config]) +AC_CONFIG_SRCDIR([Makefile.am]) + +# Initialize Automake +AM_INIT_AUTOMAKE([foreign dist-bzip2]) + +m4_ifndef([XORG_MACROS_VERSION], + [m4_fatal([must install xorg-macros 1.15 or later before running autoconf/autogen])]) +XORG_MACROS_VERSION(1.15) +XORG_RELEASE_VERSION +XORG_CHANGELOG +XORG_INSTALL + +AC_CONFIG_FILES([Makefile]) +AC_OUTPUT -- 2.1.0 From ran234 at gmail.com Sun Sep 14 13:44:35 2014 From: ran234 at gmail.com (Ran Benita) Date: Sun, 14 Sep 2014 23:44:35 +0300 Subject: [PATCH xlocale-config 2/6] Import nls/ from libX11 In-Reply-To: <1410727479-12160-1-git-send-email-ran234@gmail.com> References: <1410727479-12160-1-git-send-email-ran234@gmail.com> Message-ID: <1410727479-12160-3-git-send-email-ran234@gmail.com> This is a verbatim copy of the nls/ directory from libX11 as of commit 6101b967b641355dd863fd1ce52c6a7d58bcbe68. Signed-off-by: Ran Benita --- nls/.gitignore | 12 + nls/C/Compose.pre | 0 nls/C/XI18N_OBJS | 8 + nls/C/XLC_LOCALE.pre | 59 + nls/Makefile.am | 52 + nls/am_ET.UTF-8/Compose.pre | 360 +++ nls/am_ET.UTF-8/XI18N_OBJS | 0 nls/am_ET.UTF-8/XLC_LOCALE.pre | 0 nls/armscii-8/Compose.pre | 14 + nls/armscii-8/XI18N_OBJS | 7 + nls/armscii-8/XLC_LOCALE.pre | 77 + nls/compose-check.pl | 161 + nls/compose.dir.pre | 473 +++ nls/cs_CZ.UTF-8/Compose.pre | 12 + nls/cs_CZ.UTF-8/XI18N_OBJS | 0 nls/cs_CZ.UTF-8/XLC_LOCALE.pre | 0 nls/el_GR.UTF-8/Compose.pre | 1981 ++++++++++++ nls/el_GR.UTF-8/XI18N_OBJS | 0 nls/el_GR.UTF-8/XLC_LOCALE.pre | 0 nls/en_US.UTF-8/Compose.pre | 6009 +++++++++++++++++++++++++++++++++++ nls/en_US.UTF-8/XI18N_OBJS | 7 + nls/en_US.UTF-8/XLC_LOCALE.pre | 300 ++ nls/fi_FI.UTF-8/Compose.pre | 427 +++ nls/fi_FI.UTF-8/XI18N_OBJS | 0 nls/fi_FI.UTF-8/XLC_LOCALE.pre | 0 nls/georgian-academy/Compose.pre | 14 + nls/georgian-academy/XI18N_OBJS | 7 + nls/georgian-academy/XLC_LOCALE.pre | 77 + nls/georgian-ps/Compose.pre | 14 + nls/georgian-ps/XI18N_OBJS | 7 + nls/georgian-ps/XLC_LOCALE.pre | 77 + nls/ibm-cp1133/Compose.pre | 14 + nls/ibm-cp1133/XI18N_OBJS | 7 + nls/ibm-cp1133/XLC_LOCALE.pre | 77 + nls/iscii-dev/Compose.pre | 0 nls/iscii-dev/XI18N_OBJS | 7 + nls/iscii-dev/XLC_LOCALE.pre | 77 + nls/isiri-3342/Compose.pre | 0 nls/isiri-3342/XI18N_OBJS | 7 + nls/isiri-3342/XLC_LOCALE.pre | 77 + nls/iso8859-1/Compose.pre | 843 +++++ nls/iso8859-1/XI18N_OBJS | 8 + nls/iso8859-1/XLC_LOCALE.pre | 69 + nls/iso8859-10/Compose.pre | 14 + nls/iso8859-10/XI18N_OBJS | 7 + nls/iso8859-10/XLC_LOCALE.pre | 70 + nls/iso8859-11/Compose.pre | 0 nls/iso8859-11/XI18N_OBJS | 8 + nls/iso8859-11/XLC_LOCALE.pre | 70 + nls/iso8859-13/Compose.pre | 432 +++ nls/iso8859-13/XI18N_OBJS | 8 + nls/iso8859-13/XLC_LOCALE.pre | 70 + nls/iso8859-14/Compose.pre | 509 +++ nls/iso8859-14/XI18N_OBJS | 7 + nls/iso8859-14/XLC_LOCALE.pre | 70 + nls/iso8859-15/Compose.pre | 476 +++ nls/iso8859-15/XI18N_OBJS | 7 + nls/iso8859-15/XLC_LOCALE.pre | 76 + nls/iso8859-2/Compose.pre | 535 ++++ nls/iso8859-2/XI18N_OBJS | 8 + nls/iso8859-2/XLC_LOCALE.pre | 70 + nls/iso8859-3/Compose.pre | 483 +++ nls/iso8859-3/XI18N_OBJS | 7 + nls/iso8859-3/XLC_LOCALE.pre | 70 + nls/iso8859-4/Compose.pre | 374 +++ nls/iso8859-4/XI18N_OBJS | 7 + nls/iso8859-4/XLC_LOCALE.pre | 70 + nls/iso8859-5/Compose.pre | 14 + nls/iso8859-5/XI18N_OBJS | 8 + nls/iso8859-5/XLC_LOCALE.pre | 70 + nls/iso8859-6/Compose.pre | 14 + nls/iso8859-6/XI18N_OBJS | 7 + nls/iso8859-6/XLC_LOCALE.pre | 70 + nls/iso8859-7/Compose.pre | 222 ++ nls/iso8859-7/XI18N_OBJS | 8 + nls/iso8859-7/XLC_LOCALE.pre | 70 + nls/iso8859-8/Compose.pre | 14 + nls/iso8859-8/XI18N_OBJS | 7 + nls/iso8859-8/XLC_LOCALE.pre | 70 + nls/iso8859-9/Compose.pre | 481 +++ nls/iso8859-9/XI18N_OBJS | 8 + nls/iso8859-9/XLC_LOCALE.pre | 70 + nls/iso8859-9e/Compose.pre | 493 +++ nls/iso8859-9e/XI18N_OBJS | 7 + nls/iso8859-9e/XLC_LOCALE.pre | 82 + nls/ja.JIS/Compose.pre | 14 + nls/ja.JIS/XI18N_OBJS | 7 + nls/ja.JIS/XLC_LOCALE.pre | 122 + nls/ja.SJIS/Compose.pre | 14 + nls/ja.SJIS/XI18N_OBJS | 10 + nls/ja.SJIS/XLC_LOCALE.pre | 382 +++ nls/ja/Compose.pre | 14 + nls/ja/XI18N_OBJS | 11 + nls/ja/XLC_LOCALE.pre | 122 + nls/ja_JP.UTF-8/Compose.pre | 1 + nls/ja_JP.UTF-8/XI18N_OBJS | 8 + nls/ja_JP.UTF-8/XLC_LOCALE.pre | 149 + nls/km_KH.UTF-8/Compose.pre | 8 + nls/km_KH.UTF-8/XI18N_OBJS | 8 + nls/km_KH.UTF-8/XLC_LOCALE.pre | 0 nls/ko/Compose.pre | 14 + nls/ko/XI18N_OBJS | 7 + nls/ko/XLC_LOCALE.pre | 69 + nls/ko_KR.UTF-8/Compose.pre | 1 + nls/ko_KR.UTF-8/XI18N_OBJS | 8 + nls/ko_KR.UTF-8/XLC_LOCALE.pre | 147 + nls/koi8-c/Compose.pre | 122 + nls/koi8-c/XI18N_OBJS | 7 + nls/koi8-c/XLC_LOCALE.pre | 77 + nls/koi8-r/Compose.pre | 14 + nls/koi8-r/XI18N_OBJS | 7 + nls/koi8-r/XLC_LOCALE.pre | 78 + nls/koi8-u/Compose.pre | 14 + nls/koi8-u/XI18N_OBJS | 7 + nls/koi8-u/XLC_LOCALE.pre | 77 + nls/locale.alias.pre | 1390 ++++++++ nls/locale.dir.pre | 473 +++ nls/microsoft-cp1251/Compose.pre | 0 nls/microsoft-cp1251/XI18N_OBJS | 7 + nls/microsoft-cp1251/XLC_LOCALE.pre | 83 + nls/microsoft-cp1255/Compose.pre | 0 nls/microsoft-cp1255/XI18N_OBJS | 7 + nls/microsoft-cp1255/XLC_LOCALE.pre | 83 + nls/microsoft-cp1256/Compose.pre | 0 nls/microsoft-cp1256/XI18N_OBJS | 7 + nls/microsoft-cp1256/XLC_LOCALE.pre | 83 + nls/mulelao-1/Compose.pre | 14 + nls/mulelao-1/XI18N_OBJS | 7 + nls/mulelao-1/XLC_LOCALE.pre | 77 + nls/nokhchi-1/Compose.pre | 0 nls/nokhchi-1/XI18N_OBJS | 7 + nls/nokhchi-1/XLC_LOCALE.pre | 77 + nls/pt_BR.UTF-8/Compose.pre | 34 + nls/pt_BR.UTF-8/XI18N_OBJS | 7 + nls/pt_BR.UTF-8/XLC_LOCALE.pre | 142 + nls/ru_RU.UTF-8/Compose.pre | 1 + nls/ru_RU.UTF-8/XI18N_OBJS | 7 + nls/ru_RU.UTF-8/XLC_LOCALE.pre | 169 + nls/sr_CS.UTF-8/Compose.pre | 128 + nls/sr_CS.UTF-8/XI18N_OBJS | 8 + nls/sr_CS.UTF-8/XLC_LOCALE.pre | 0 nls/tatar-cyr/Compose.pre | 0 nls/tatar-cyr/XI18N_OBJS | 7 + nls/tatar-cyr/XLC_LOCALE.pre | 83 + nls/th_TH.UTF-8/Compose.pre | 1 + nls/th_TH.UTF-8/XI18N_OBJS | 8 + nls/th_TH.UTF-8/XLC_LOCALE.pre | 79 + nls/th_TH/Compose.pre | 0 nls/th_TH/XI18N_OBJS | 7 + nls/th_TH/XLC_LOCALE.pre | 63 + nls/tscii-0/Compose.pre | 0 nls/tscii-0/XI18N_OBJS | 7 + nls/tscii-0/XLC_LOCALE.pre | 77 + nls/vi_VN.tcvn/Compose.pre | 135 + nls/vi_VN.tcvn/XI18N_OBJS | 7 + nls/vi_VN.tcvn/XLC_LOCALE.pre | 77 + nls/vi_VN.viscii/Compose.pre | 135 + nls/vi_VN.viscii/XI18N_OBJS | 7 + nls/vi_VN.viscii/XLC_LOCALE.pre | 77 + nls/zh_CN.UTF-8/Compose.pre | 1 + nls/zh_CN.UTF-8/XI18N_OBJS | 8 + nls/zh_CN.UTF-8/XLC_LOCALE.pre | 107 + nls/zh_CN.gb18030/Compose.pre | 14 + nls/zh_CN.gb18030/XI18N_OBJS | 7 + nls/zh_CN.gb18030/XLC_LOCALE.pre | 106 + nls/zh_CN.gbk/Compose.pre | 14 + nls/zh_CN.gbk/XI18N_OBJS | 7 + nls/zh_CN.gbk/XLC_LOCALE.pre | 70 + nls/zh_CN/Compose.pre | 14 + nls/zh_CN/XI18N_OBJS | 8 + nls/zh_CN/XLC_LOCALE.pre | 60 + nls/zh_HK.UTF-8/Compose.pre | 1 + nls/zh_HK.UTF-8/XI18N_OBJS | 7 + nls/zh_HK.UTF-8/XLC_LOCALE.pre | 96 + nls/zh_HK.big5/Compose.pre | 13 + nls/zh_HK.big5/XI18N_OBJS | 7 + nls/zh_HK.big5/XLC_LOCALE.pre | 69 + nls/zh_HK.big5hkscs/Compose.pre | 13 + nls/zh_HK.big5hkscs/XI18N_OBJS | 7 + nls/zh_HK.big5hkscs/XLC_LOCALE.pre | 71 + nls/zh_TW.UTF-8/Compose.pre | 1 + nls/zh_TW.UTF-8/XI18N_OBJS | 7 + nls/zh_TW.UTF-8/XLC_LOCALE.pre | 91 + nls/zh_TW.big5/Compose.pre | 14 + nls/zh_TW.big5/XI18N_OBJS | 7 + nls/zh_TW.big5/XLC_LOCALE.pre | 91 + nls/zh_TW/Compose.pre | 14 + nls/zh_TW/XI18N_OBJS | 7 + nls/zh_TW/XLC_LOCALE.pre | 140 + 189 files changed, 22676 insertions(+) create mode 100644 nls/.gitignore create mode 100644 nls/C/Compose.pre create mode 100644 nls/C/XI18N_OBJS create mode 100644 nls/C/XLC_LOCALE.pre create mode 100644 nls/Makefile.am create mode 100644 nls/am_ET.UTF-8/Compose.pre create mode 100644 nls/am_ET.UTF-8/XI18N_OBJS create mode 100644 nls/am_ET.UTF-8/XLC_LOCALE.pre create mode 100644 nls/armscii-8/Compose.pre create mode 100644 nls/armscii-8/XI18N_OBJS create mode 100644 nls/armscii-8/XLC_LOCALE.pre create mode 100755 nls/compose-check.pl create mode 100644 nls/compose.dir.pre create mode 100644 nls/cs_CZ.UTF-8/Compose.pre create mode 100644 nls/cs_CZ.UTF-8/XI18N_OBJS create mode 100644 nls/cs_CZ.UTF-8/XLC_LOCALE.pre create mode 100644 nls/el_GR.UTF-8/Compose.pre create mode 100644 nls/el_GR.UTF-8/XI18N_OBJS create mode 100644 nls/el_GR.UTF-8/XLC_LOCALE.pre create mode 100644 nls/en_US.UTF-8/Compose.pre create mode 100644 nls/en_US.UTF-8/XI18N_OBJS create mode 100644 nls/en_US.UTF-8/XLC_LOCALE.pre create mode 100644 nls/fi_FI.UTF-8/Compose.pre create mode 100644 nls/fi_FI.UTF-8/XI18N_OBJS create mode 100644 nls/fi_FI.UTF-8/XLC_LOCALE.pre create mode 100644 nls/georgian-academy/Compose.pre create mode 100644 nls/georgian-academy/XI18N_OBJS create mode 100644 nls/georgian-academy/XLC_LOCALE.pre create mode 100644 nls/georgian-ps/Compose.pre create mode 100644 nls/georgian-ps/XI18N_OBJS create mode 100644 nls/georgian-ps/XLC_LOCALE.pre create mode 100644 nls/ibm-cp1133/Compose.pre create mode 100644 nls/ibm-cp1133/XI18N_OBJS create mode 100644 nls/ibm-cp1133/XLC_LOCALE.pre create mode 100644 nls/iscii-dev/Compose.pre create mode 100644 nls/iscii-dev/XI18N_OBJS create mode 100644 nls/iscii-dev/XLC_LOCALE.pre create mode 100644 nls/isiri-3342/Compose.pre create mode 100644 nls/isiri-3342/XI18N_OBJS create mode 100644 nls/isiri-3342/XLC_LOCALE.pre create mode 100644 nls/iso8859-1/Compose.pre create mode 100644 nls/iso8859-1/XI18N_OBJS create mode 100644 nls/iso8859-1/XLC_LOCALE.pre create mode 100644 nls/iso8859-10/Compose.pre create mode 100644 nls/iso8859-10/XI18N_OBJS create mode 100644 nls/iso8859-10/XLC_LOCALE.pre create mode 100644 nls/iso8859-11/Compose.pre create mode 100644 nls/iso8859-11/XI18N_OBJS create mode 100644 nls/iso8859-11/XLC_LOCALE.pre create mode 100644 nls/iso8859-13/Compose.pre create mode 100644 nls/iso8859-13/XI18N_OBJS create mode 100644 nls/iso8859-13/XLC_LOCALE.pre create mode 100644 nls/iso8859-14/Compose.pre create mode 100644 nls/iso8859-14/XI18N_OBJS create mode 100644 nls/iso8859-14/XLC_LOCALE.pre create mode 100644 nls/iso8859-15/Compose.pre create mode 100644 nls/iso8859-15/XI18N_OBJS create mode 100644 nls/iso8859-15/XLC_LOCALE.pre create mode 100644 nls/iso8859-2/Compose.pre create mode 100644 nls/iso8859-2/XI18N_OBJS create mode 100644 nls/iso8859-2/XLC_LOCALE.pre create mode 100644 nls/iso8859-3/Compose.pre create mode 100644 nls/iso8859-3/XI18N_OBJS create mode 100644 nls/iso8859-3/XLC_LOCALE.pre create mode 100644 nls/iso8859-4/Compose.pre create mode 100644 nls/iso8859-4/XI18N_OBJS create mode 100644 nls/iso8859-4/XLC_LOCALE.pre create mode 100644 nls/iso8859-5/Compose.pre create mode 100644 nls/iso8859-5/XI18N_OBJS create mode 100644 nls/iso8859-5/XLC_LOCALE.pre create mode 100644 nls/iso8859-6/Compose.pre create mode 100644 nls/iso8859-6/XI18N_OBJS create mode 100644 nls/iso8859-6/XLC_LOCALE.pre create mode 100644 nls/iso8859-7/Compose.pre create mode 100644 nls/iso8859-7/XI18N_OBJS create mode 100644 nls/iso8859-7/XLC_LOCALE.pre create mode 100644 nls/iso8859-8/Compose.pre create mode 100644 nls/iso8859-8/XI18N_OBJS create mode 100644 nls/iso8859-8/XLC_LOCALE.pre create mode 100644 nls/iso8859-9/Compose.pre create mode 100644 nls/iso8859-9/XI18N_OBJS create mode 100644 nls/iso8859-9/XLC_LOCALE.pre create mode 100644 nls/iso8859-9e/Compose.pre create mode 100644 nls/iso8859-9e/XI18N_OBJS create mode 100644 nls/iso8859-9e/XLC_LOCALE.pre create mode 100644 nls/ja.JIS/Compose.pre create mode 100644 nls/ja.JIS/XI18N_OBJS create mode 100644 nls/ja.JIS/XLC_LOCALE.pre create mode 100644 nls/ja.SJIS/Compose.pre create mode 100644 nls/ja.SJIS/XI18N_OBJS create mode 100644 nls/ja.SJIS/XLC_LOCALE.pre create mode 100644 nls/ja/Compose.pre create mode 100644 nls/ja/XI18N_OBJS create mode 100644 nls/ja/XLC_LOCALE.pre create mode 100644 nls/ja_JP.UTF-8/Compose.pre create mode 100644 nls/ja_JP.UTF-8/XI18N_OBJS create mode 100644 nls/ja_JP.UTF-8/XLC_LOCALE.pre create mode 100644 nls/km_KH.UTF-8/Compose.pre create mode 100644 nls/km_KH.UTF-8/XI18N_OBJS create mode 100644 nls/km_KH.UTF-8/XLC_LOCALE.pre create mode 100644 nls/ko/Compose.pre create mode 100644 nls/ko/XI18N_OBJS create mode 100644 nls/ko/XLC_LOCALE.pre create mode 100644 nls/ko_KR.UTF-8/Compose.pre create mode 100644 nls/ko_KR.UTF-8/XI18N_OBJS create mode 100644 nls/ko_KR.UTF-8/XLC_LOCALE.pre create mode 100644 nls/koi8-c/Compose.pre create mode 100644 nls/koi8-c/XI18N_OBJS create mode 100644 nls/koi8-c/XLC_LOCALE.pre create mode 100644 nls/koi8-r/Compose.pre create mode 100644 nls/koi8-r/XI18N_OBJS create mode 100644 nls/koi8-r/XLC_LOCALE.pre create mode 100644 nls/koi8-u/Compose.pre create mode 100644 nls/koi8-u/XI18N_OBJS create mode 100644 nls/koi8-u/XLC_LOCALE.pre create mode 100644 nls/locale.alias.pre create mode 100644 nls/locale.dir.pre create mode 100644 nls/microsoft-cp1251/Compose.pre create mode 100644 nls/microsoft-cp1251/XI18N_OBJS create mode 100644 nls/microsoft-cp1251/XLC_LOCALE.pre create mode 100644 nls/microsoft-cp1255/Compose.pre create mode 100644 nls/microsoft-cp1255/XI18N_OBJS create mode 100644 nls/microsoft-cp1255/XLC_LOCALE.pre create mode 100644 nls/microsoft-cp1256/Compose.pre create mode 100644 nls/microsoft-cp1256/XI18N_OBJS create mode 100644 nls/microsoft-cp1256/XLC_LOCALE.pre create mode 100644 nls/mulelao-1/Compose.pre create mode 100644 nls/mulelao-1/XI18N_OBJS create mode 100644 nls/mulelao-1/XLC_LOCALE.pre create mode 100644 nls/nokhchi-1/Compose.pre create mode 100644 nls/nokhchi-1/XI18N_OBJS create mode 100644 nls/nokhchi-1/XLC_LOCALE.pre create mode 100644 nls/pt_BR.UTF-8/Compose.pre create mode 100644 nls/pt_BR.UTF-8/XI18N_OBJS create mode 100644 nls/pt_BR.UTF-8/XLC_LOCALE.pre create mode 100644 nls/ru_RU.UTF-8/Compose.pre create mode 100644 nls/ru_RU.UTF-8/XI18N_OBJS create mode 100644 nls/ru_RU.UTF-8/XLC_LOCALE.pre create mode 100644 nls/sr_CS.UTF-8/Compose.pre create mode 100644 nls/sr_CS.UTF-8/XI18N_OBJS create mode 100644 nls/sr_CS.UTF-8/XLC_LOCALE.pre create mode 100644 nls/tatar-cyr/Compose.pre create mode 100644 nls/tatar-cyr/XI18N_OBJS create mode 100644 nls/tatar-cyr/XLC_LOCALE.pre create mode 100644 nls/th_TH.UTF-8/Compose.pre create mode 100644 nls/th_TH.UTF-8/XI18N_OBJS create mode 100644 nls/th_TH.UTF-8/XLC_LOCALE.pre create mode 100644 nls/th_TH/Compose.pre create mode 100644 nls/th_TH/XI18N_OBJS create mode 100644 nls/th_TH/XLC_LOCALE.pre create mode 100644 nls/tscii-0/Compose.pre create mode 100644 nls/tscii-0/XI18N_OBJS create mode 100644 nls/tscii-0/XLC_LOCALE.pre create mode 100644 nls/vi_VN.tcvn/Compose.pre create mode 100644 nls/vi_VN.tcvn/XI18N_OBJS create mode 100644 nls/vi_VN.tcvn/XLC_LOCALE.pre create mode 100644 nls/vi_VN.viscii/Compose.pre create mode 100644 nls/vi_VN.viscii/XI18N_OBJS create mode 100644 nls/vi_VN.viscii/XLC_LOCALE.pre create mode 100644 nls/zh_CN.UTF-8/Compose.pre create mode 100644 nls/zh_CN.UTF-8/XI18N_OBJS create mode 100644 nls/zh_CN.UTF-8/XLC_LOCALE.pre create mode 100644 nls/zh_CN.gb18030/Compose.pre create mode 100644 nls/zh_CN.gb18030/XI18N_OBJS create mode 100644 nls/zh_CN.gb18030/XLC_LOCALE.pre create mode 100644 nls/zh_CN.gbk/Compose.pre create mode 100644 nls/zh_CN.gbk/XI18N_OBJS create mode 100644 nls/zh_CN.gbk/XLC_LOCALE.pre create mode 100644 nls/zh_CN/Compose.pre create mode 100644 nls/zh_CN/XI18N_OBJS create mode 100644 nls/zh_CN/XLC_LOCALE.pre create mode 100644 nls/zh_HK.UTF-8/Compose.pre create mode 100644 nls/zh_HK.UTF-8/XI18N_OBJS create mode 100644 nls/zh_HK.UTF-8/XLC_LOCALE.pre create mode 100644 nls/zh_HK.big5/Compose.pre create mode 100644 nls/zh_HK.big5/XI18N_OBJS create mode 100644 nls/zh_HK.big5/XLC_LOCALE.pre create mode 100644 nls/zh_HK.big5hkscs/Compose.pre create mode 100644 nls/zh_HK.big5hkscs/XI18N_OBJS create mode 100644 nls/zh_HK.big5hkscs/XLC_LOCALE.pre create mode 100644 nls/zh_TW.UTF-8/Compose.pre create mode 100644 nls/zh_TW.UTF-8/XI18N_OBJS create mode 100644 nls/zh_TW.UTF-8/XLC_LOCALE.pre create mode 100644 nls/zh_TW.big5/Compose.pre create mode 100644 nls/zh_TW.big5/XI18N_OBJS create mode 100644 nls/zh_TW.big5/XLC_LOCALE.pre create mode 100644 nls/zh_TW/Compose.pre create mode 100644 nls/zh_TW/XI18N_OBJS create mode 100644 nls/zh_TW/XLC_LOCALE.pre [diff trimmed due to length] From ran234 at gmail.com Sun Sep 14 13:44:36 2014 From: ran234 at gmail.com (Ran Benita) Date: Sun, 14 Sep 2014 23:44:36 +0300 Subject: [PATCH xlocale-config 3/6] Hook up nls/ to the build In-Reply-To: <1410727479-12160-1-git-send-email-ran234@gmail.com> References: <1410727479-12160-1-git-send-email-ran234@gmail.com> Message-ID: <1410727479-12160-4-git-send-email-ran234@gmail.com> Adapted from libX11 as of commit 6101b967b641355dd863fd1ce52c6a7d58bcbe68. The various files mention the following preprocessor definitions: WIN32 WCHAR32 SVR4 sun VeryOldFreeBSD INCLUDE_ru_SU __uxp__ USE_CTRL_SHIFT_T_SEQS Besides WCHAR32, libX11 does not define any of these itself, so the resulting files are the same. Signed-off-by: Ran Benita --- Makefile.am | 4 ++++ configure.ac | 38 +++++++++++++++++++++++++++++++++++++- cpprules.in | 30 ++++++++++++++++++++++++++++++ m4/ax_define_dir.m4 | 49 +++++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 120 insertions(+), 1 deletion(-) create mode 100644 cpprules.in create mode 100644 m4/ax_define_dir.m4 diff --git a/Makefile.am b/Makefile.am index 801fc5a..07dce46 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,3 +1,7 @@ +SUBDIRS=nls + +ACLOCAL_AMFLAGS = -I m4 + MAINTAINERCLEANFILES = ChangeLog INSTALL .PHONY: ChangeLog INSTALL diff --git a/configure.ac b/configure.ac index 16a2937..b89e141 100644 --- a/configure.ac +++ b/configure.ac @@ -3,6 +3,8 @@ AC_PREREQ([2.60]) AC_INIT([xlocale-config], [0.0.0], [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], [xlocale-config]) AC_CONFIG_SRCDIR([Makefile.am]) +AC_CONFIG_MACRO_DIR([m4]) +AC_CANONICAL_HOST # Initialize Automake AM_INIT_AUTOMAKE([foreign dist-bzip2]) @@ -13,6 +15,40 @@ XORG_MACROS_VERSION(1.15) XORG_RELEASE_VERSION XORG_CHANGELOG XORG_INSTALL +XORG_PROG_RAWCPP +XORG_WITH_PERL -AC_CONFIG_FILES([Makefile]) +# arch specific things +WCHAR32="1" +case $host_os in + os2*) WCHAR32="0" ;; + *) ;; +esac +AC_SUBST(WCHAR32) + +X11_DATADIR="${datadir}/X11" +AX_DEFINE_DIR(X11_DATADIR, X11_DATADIR, [Location of X11 data]) +AC_SUBST(X11_DATADIR) + +X11_LOCALEDATADIR="${X11_DATADIR}/locale" +AX_DEFINE_DIR(XLOCALEDATADIR, X11_LOCALEDATADIR, [Location of X11 locale data]) +AC_SUBST(X11_LOCALEDATADIR) + +locales="\ + am_ET.UTF-8 armscii-8 C cs_CZ.UTF-8 el_GR.UTF-8 en_US.UTF-8 \ + fi_FI.UTF-8 georgian-academy georgian-ps ibm-cp1133 iscii-dev \ + isiri-3342 iso8859-1 iso8859-10 iso8859-11 iso8859-13 iso8859-14 \ + iso8859-15 iso8859-2 iso8859-3 iso8859-4 iso8859-5 iso8859-6 \ + iso8859-7 iso8859-8 iso8859-9 iso8859-9e ja ja.JIS \ + ja_JP.UTF-8 ja.SJIS km_KH.UTF-8 ko koi8-c koi8-r \ + koi8-u ko_KR.UTF-8 microsoft-cp1251 microsoft-cp1255 \ + microsoft-cp1256 mulelao-1 nokhchi-1 pt_BR.UTF-8 ru_RU.UTF-8 \ + sr_CS.UTF-8 tatar-cyr th_TH th_TH.UTF-8 tscii-0 vi_VN.tcvn \ + vi_VN.viscii zh_CN zh_CN.gb18030 zh_CN.gbk zh_CN.UTF-8 \ + zh_HK.big5 zh_HK.big5hkscs zh_HK.UTF-8 zh_TW zh_TW.big5 \ + zh_TW.UTF-8" +AC_SUBST(locales) + +AC_CONFIG_FILES([Makefile + nls/Makefile]) AC_OUTPUT diff --git a/cpprules.in b/cpprules.in new file mode 100644 index 0000000..03d6701 --- /dev/null +++ b/cpprules.in @@ -0,0 +1,30 @@ +# -*- Makefile -*- +# Rules for generating files using the C pre-processor +# (Replaces CppFileTarget from Imake) + +SED = LC_CTYPE=C sed + +SUFFIXES += .pre + +WCHAR32_FLAGS = -DWCHAR32=@WCHAR32@ + +CPP_FILES_FLAGS = $(WCHAR32_FLAGS) + +# Translate XCOMM into pound sign with sed, rather than passing -DXCOMM=XCOMM +# to cpp, because that trick does not work on all ANSI C preprocessors. +# Delete line numbers from the cpp output (-P is not portable, I guess). +# Allow XCOMM to be preceded by whitespace and provide a means of generating +# output lines with trailing backslashes. +# Allow XHASH to always be substituted, even in cases where XCOMM isn't. + +CPP_SED_MAGIC = $(SED) -e '/^\# *[0-9][0-9]* *.*$$/d' \ + -e '/^\#line *[0-9][0-9]* *.*$$/d' \ + -e '/^[ ]*XCOMM$$/s/XCOMM/\#/' \ + -e '/^[ ]*XCOMM[^a-zA-Z0-9_]/s/XCOMM/\#/' \ + -e '/^[ ]*XHASH/s/XHASH/\#/' \ + -e 's,X11_LOCALEDATADIR,$(X11_LOCALEDATADIR),g' \ + -e '/\@\@$$/s/\@\@$$/\\/' + +.pre: + @$(MKDIR_P) $(@D) + $(AM_V_GEN)$(RAWCPP) $(RAWCPPFLAGS) $(CPP_FILES_FLAGS) < $< | $(CPP_SED_MAGIC) > $@ diff --git a/m4/ax_define_dir.m4 b/m4/ax_define_dir.m4 new file mode 100644 index 0000000..b74d155 --- /dev/null +++ b/m4/ax_define_dir.m4 @@ -0,0 +1,49 @@ +# =========================================================================== +# http://www.gnu.org/software/autoconf-archive/ax_define_dir.html +# =========================================================================== +# +# SYNOPSIS +# +# AX_DEFINE_DIR(VARNAME, DIR [, DESCRIPTION]) +# +# DESCRIPTION +# +# This macro sets VARNAME to the expansion of the DIR variable, taking +# care of fixing up ${prefix} and such. +# +# VARNAME is then offered as both an output variable and a C preprocessor +# symbol. +# +# Example: +# +# AX_DEFINE_DIR([DATADIR], [datadir], [Where data are placed to.]) +# +# LICENSE +# +# Copyright (c) 2008 Stepan Kasal +# Copyright (c) 2008 Andreas Schwab +# Copyright (c) 2008 Guido U. Draheim +# Copyright (c) 2008 Alexandre Oliva +# +# Copying and distribution of this file, with or without modification, are +# permitted in any medium without royalty provided the copyright notice +# and this notice are preserved. This file is offered as-is, without any +# warranty. + +#serial 6 + +AU_ALIAS([AC_DEFINE_DIR], [AX_DEFINE_DIR]) +AC_DEFUN([AX_DEFINE_DIR], [ + prefix_NONE= + exec_prefix_NONE= + test "x$prefix" = xNONE && prefix_NONE=yes && prefix=$ac_default_prefix + test "x$exec_prefix" = xNONE && exec_prefix_NONE=yes && exec_prefix=$prefix +dnl In Autoconf 2.60, ${datadir} refers to ${datarootdir}, which in turn +dnl refers to ${prefix}. Thus we have to use `eval' twice. + eval ax_define_dir="\"[$]$2\"" + eval ax_define_dir="\"$ax_define_dir\"" + AC_SUBST($1, "$ax_define_dir") + AC_DEFINE_UNQUOTED($1, "$ax_define_dir", [$3]) + test "$prefix_NONE" && prefix=NONE + test "$exec_prefix_NONE" && exec_prefix=NONE +]) -- 2.1.0 From ran234 at gmail.com Sun Sep 14 13:44:37 2014 From: ran234 at gmail.com (Ran Benita) Date: Sun, 14 Sep 2014 23:44:37 +0300 Subject: [PATCH xlocale-config 4/6] Import compose and localedb specs from libX11 In-Reply-To: <1410727479-12160-1-git-send-email-ran234@gmail.com> References: <1410727479-12160-1-git-send-email-ran234@gmail.com> Message-ID: <1410727479-12160-5-git-send-email-ran234@gmail.com> Copied (almost) verbatim from libX11 as of commit 6101b967b641355dd863fd1ce52c6a7d58bcbe68. The added Makefile.am files had extraneous SUBDIRS entries removed. Signed-off-by: Ran Benita --- specs/.gitignore | 5 + specs/Makefile.am | 24 ++ specs/i18n/Makefile.am | 24 ++ specs/i18n/compose/.gitignore | 2 + specs/i18n/compose/Makefile.am | 20 + specs/i18n/compose/compose-chart.pl | 388 ++++++++++++++++++ specs/i18n/compose/docbook-nl.am | 128 ++++++ specs/i18n/localedb/Makefile.am | 13 + specs/i18n/localedb/localedb.xml | 786 ++++++++++++++++++++++++++++++++++++ 9 files changed, 1390 insertions(+) create mode 100644 specs/.gitignore create mode 100644 specs/Makefile.am create mode 100644 specs/i18n/Makefile.am create mode 100644 specs/i18n/compose/.gitignore create mode 100644 specs/i18n/compose/Makefile.am create mode 100755 specs/i18n/compose/compose-chart.pl create mode 100644 specs/i18n/compose/docbook-nl.am create mode 100644 specs/i18n/localedb/Makefile.am create mode 100644 specs/i18n/localedb/localedb.xml [diff trimmed due to length] From ran234 at gmail.com Sun Sep 14 13:44:38 2014 From: ran234 at gmail.com (Ran Benita) Date: Sun, 14 Sep 2014 23:44:38 +0300 Subject: [PATCH xlocale-config 5/6] Hook up specs/ to the build In-Reply-To: <1410727479-12160-1-git-send-email-ran234@gmail.com> References: <1410727479-12160-1-git-send-email-ran234@gmail.com> Message-ID: <1410727479-12160-6-git-send-email-ran234@gmail.com> Adapted from libX11 as of commit 6101b967b641355dd863fd1ce52c6a7d58bcbe68. Signed-off-by: Ran Benita --- Makefile.am | 2 +- configure.ac | 11 ++++++- docbook.am | 105 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 116 insertions(+), 2 deletions(-) create mode 100644 docbook.am diff --git a/Makefile.am b/Makefile.am index 07dce46..5d163e8 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,4 +1,4 @@ -SUBDIRS=nls +SUBDIRS=nls specs ACLOCAL_AMFLAGS = -I m4 diff --git a/configure.ac b/configure.ac index b89e141..76e0fce 100644 --- a/configure.ac +++ b/configure.ac @@ -15,6 +15,11 @@ XORG_MACROS_VERSION(1.15) XORG_RELEASE_VERSION XORG_CHANGELOG XORG_INSTALL +XORG_ENABLE_SPECS +XORG_WITH_XMLTO(0.0.22) +XORG_WITH_FOP([],[no]) +XORG_WITH_XSLTPROC +XORG_CHECK_SGML_DOCTOOLS(1.10) XORG_PROG_RAWCPP XORG_WITH_PERL @@ -50,5 +55,9 @@ locales="\ AC_SUBST(locales) AC_CONFIG_FILES([Makefile - nls/Makefile]) + nls/Makefile + specs/Makefile + specs/i18n/Makefile + specs/i18n/compose/Makefile + specs/i18n/localedb/Makefile]) AC_OUTPUT diff --git a/docbook.am b/docbook.am new file mode 100644 index 0000000..bba4d54 --- /dev/null +++ b/docbook.am @@ -0,0 +1,105 @@ +# +# Generate output formats for a single DocBook/XML with/without chapters +# +# Variables set by the calling Makefile: +# shelfdir: the location where the docs/specs are installed. Typically $(docdir) +# docbook: the main DocBook/XML file, no chapters, appendix or image files +# chapters: all files pulled in by an XInclude statement and images. +# + +# +# This makefile is intended for Users Documentation and Functional Specifications. +# Do not use for Developer Documentation which is not installed and does not require olink. +# Refer to http://www.x.org/releases/X11R7.6/doc/xorg-docs/ReleaseNotes.html#id2584393 +# for an explanation on documents classification. +# + +# DocBook/XML generated output formats to be installed +shelf_DATA = + +# DocBook/XML file with chapters, appendix and images it includes +dist_shelf_DATA = $(docbook) $(chapters) + +if HAVE_XMLTO +if HAVE_STYLESHEETS + +XMLTO_SEARCHPATH_FLAGS = \ + --searchpath "$(XORG_SGML_PATH)/X11" \ + --searchpath "$(abs_top_builddir)" +XMLTO_HTML_OLINK_FLAGS = \ + --stringparam target.database.document=$(XORG_SGML_PATH)/X11/dbs/masterdb.html.xml \ + --stringparam current.docid="$(<:.xml=)" +XMLTO_HTML_STYLESHEET_FLAGS = -x $(STYLESHEET_SRCDIR)/xorg-xhtml.xsl +XMLTO_HTML_FLAGS = \ + $(XMLTO_SEARCHPATH_FLAGS) \ + $(XMLTO_HTML_STYLESHEET_FLAGS) \ + $(XMLTO_HTML_OLINK_FLAGS) + +shelf_DATA += $(docbook:.xml=.html) +%.html: %.xml $(chapters) + $(AM_V_GEN)$(XMLTO) $(XMLTO_HTML_FLAGS) xhtml-nochunks $< + +if HAVE_XMLTO_TEXT + +shelf_DATA += $(docbook:.xml=.txt) +%.txt: %.xml $(chapters) + $(AM_V_GEN)$(XMLTO) $(XMLTO_HTML_FLAGS) txt $< +endif HAVE_XMLTO_TEXT + +if HAVE_FOP +XMLTO_FO_IMAGEPATH_FLAGS = --stringparam img.src.path=$(abs_builddir)/ +XMLTO_PDF_OLINK_FLAGS = \ + --stringparam target.database.document=$(XORG_SGML_PATH)/X11/dbs/masterdb.pdf.xml \ + --stringparam current.docid="$(<:.xml=)" +XMLTO_FO_STYLESHEET_FLAGS = -x $(STYLESHEET_SRCDIR)/xorg-fo.xsl + +XMLTO_FO_FLAGS = \ + $(XMLTO_SEARCHPATH_FLAGS) \ + $(XMLTO_FO_STYLESHEET_FLAGS) \ + $(XMLTO_FO_IMAGEPATH_FLAGS) \ + $(XMLTO_PDF_OLINK_FLAGS) + +shelf_DATA += $(docbook:.xml=.pdf) +%.pdf: %.xml $(chapters) + $(AM_V_GEN)$(XMLTO) $(XMLTO_FO_FLAGS) --with-fop pdf $< + +shelf_DATA += $(docbook:.xml=.ps) +%.ps: %.xml $(chapters) + $(AM_V_GEN)$(XMLTO) $(XMLTO_FO_FLAGS) --with-fop ps $< +endif HAVE_FOP + +# Generate documents cross-reference target databases +if HAVE_XSLTPROC + +XSLT_SEARCHPATH_FLAGS = \ + --path "$(XORG_SGML_PATH)/X11" \ + --path "$(abs_top_builddir)" +XSLT_OLINK_FLAGS = \ + --stringparam targets.filename "$@" \ + --stringparam collect.xref.targets "only" \ + --stringparam olink.base.uri "$(@:.db=)" + +XSLT_HTML_FLAGS = \ + $(XSLT_SEARCHPATH_FLAGS) \ + $(XSLT_OLINK_FLAGS) \ + --nonet --xinclude \ + $(STYLESHEET_SRCDIR)/xorg-xhtml.xsl +XSLT_PDF_FLAGS = \ + $(XSLT_SEARCHPATH_FLAGS) \ + $(XSLT_OLINK_FLAGS) \ + --nonet --xinclude \ + $(STYLESHEET_SRCDIR)/xorg-fo.xsl + +shelf_DATA += $(docbook:.xml=.html.db) +%.html.db: %.xml $(chapters) + $(AM_V_GEN)$(XSLTPROC) $(XSLT_HTML_FLAGS) $< + +shelf_DATA += $(docbook:.xml=.pdf.db) +%.pdf.db: %.xml $(chapters) + $(AM_V_GEN)$(XSLTPROC) $(XSLT_PDF_FLAGS) $< + +endif HAVE_XSLTPROC +endif HAVE_STYLESHEETS +endif HAVE_XMLTO + +CLEANFILES = $(shelf_DATA) -- 2.1.0 From ran234 at gmail.com Sun Sep 14 13:44:39 2014 From: ran234 at gmail.com (Ran Benita) Date: Sun, 14 Sep 2014 23:44:39 +0300 Subject: [PATCH xlocale-config 6/6] Add pkg-config file In-Reply-To: <1410727479-12160-1-git-send-email-ran234@gmail.com> References: <1410727479-12160-1-git-send-email-ran234@gmail.com> Message-ID: <1410727479-12160-7-git-send-email-ran234@gmail.com> Besides the usual stuff, a "xlocaledatadir" variable is added; this is very useful for programs who wish to use the files without doing guesswork or requiring explicit configure flags. Signed-off-by: Ran Benita --- Makefile.am | 3 +++ configure.ac | 3 ++- xlocale-config.pc.in | 8 ++++++++ 3 files changed, 13 insertions(+), 1 deletion(-) create mode 100644 xlocale-config.pc.in diff --git a/Makefile.am b/Makefile.am index 5d163e8..0826e15 100644 --- a/Makefile.am +++ b/Makefile.am @@ -2,6 +2,9 @@ SUBDIRS=nls specs ACLOCAL_AMFLAGS = -I m4 +pkgconfigdir = $(datadir)/pkgconfig +pkgconfig_DATA = xlocale-config.pc + MAINTAINERCLEANFILES = ChangeLog INSTALL .PHONY: ChangeLog INSTALL diff --git a/configure.ac b/configure.ac index 76e0fce..9b599c8 100644 --- a/configure.ac +++ b/configure.ac @@ -59,5 +59,6 @@ AC_CONFIG_FILES([Makefile specs/Makefile specs/i18n/Makefile specs/i18n/compose/Makefile - specs/i18n/localedb/Makefile]) + specs/i18n/localedb/Makefile + xlocale-config.pc]) AC_OUTPUT diff --git a/xlocale-config.pc.in b/xlocale-config.pc.in new file mode 100644 index 0000000..ec902ab --- /dev/null +++ b/xlocale-config.pc.in @@ -0,0 +1,8 @@ +prefix=@prefix@ +datarootdir=@datarootdir@ +datadir=@datadir@ +xlocaledatadir=@X11_LOCALEDATADIR@ + +Name: xlocale-config +Description: X locale configuration data +Version: @VERSION@ -- 2.1.0 From ran234 at gmail.com Sun Sep 14 13:45:48 2014 From: ran234 at gmail.com (Ran Benita) Date: Sun, 14 Sep 2014 23:45:48 +0300 Subject: [PATCH 1/4] build: use xlocale-config for things which have moved there In-Reply-To: <1410727479-12160-1-git-send-email-ran234@gmail.com> References: <1410727479-12160-1-git-send-email-ran234@gmail.com> Message-ID: <1410727551-12759-1-git-send-email-ran234@gmail.com> The nls/ directory and the compose and localedb specs were split to a separate repository, xlocale-config. The locale directory path (usually /usr/share/X11/locale) is now obtained from the xlocale-config pkg-config file. Signed-off-by: Ran Benita --- Makefile.am | 3 +-- configure.ac | 39 +++++---------------------------------- specs/i18n/Makefile.am | 2 +- 3 files changed, 7 insertions(+), 37 deletions(-) diff --git a/Makefile.am b/Makefile.am index 39e4bd9..8e13c1b 100644 --- a/Makefile.am +++ b/Makefile.am @@ -3,8 +3,7 @@ ORDER=src modules else ORDER=modules src endif -# Order: nls before specs -SUBDIRS=include $(ORDER) nls man specs +SUBDIRS=include $(ORDER) man specs ACLOCAL_AMFLAGS = -I m4 diff --git a/configure.ac b/configure.ac index 047917d..df5b126 100644 --- a/configure.ac +++ b/configure.ac @@ -29,7 +29,6 @@ XORG_WITH_XMLTO(0.0.22) XORG_WITH_FOP([],[no]) XORG_WITH_XSLTPROC XORG_CHECK_SGML_DOCTOOLS(1.10) -XORG_PROG_RAWCPP XORG_WITH_PERL # Required when PKG_CHECK_MODULES called within an if statement @@ -68,7 +67,7 @@ AC_SUBST(LDFLAGS_FOR_BUILD) # Checks for pkg-config packages # Always required -X11_REQUIRES='xproto >= 7.0.17 xextproto xtrans xcb >= 1.1.92' +X11_REQUIRES='xproto >= 7.0.17 xextproto xtrans xcb >= 1.1.92 xlocale-config' X11_EXTRA_DEPS="xcb >= 1.1.92" PKG_PROG_PKG_CONFIG() @@ -237,12 +236,10 @@ AC_CHECK_FUNC([shmat], AC_DEFINE(HAS_SHM,1,[Has shm*() functions])) # AC_PATH_XTRA # arch specific things -WCHAR32="1" case $host_os in - os2*) os2="true" ; WCHAR32="0" ;; + os2*) os2="true" ;; *) ;; esac -AC_SUBST(WCHAR32) AM_CONDITIONAL(OS2, test x$os2 = xtrue) @@ -407,16 +404,8 @@ AC_SUBST(X11_LIBDIR) PKG_CHECK_MODULES(X11, [$X11_REQUIRES]) X11_CFLAGS="$X11_CFLAGS $XTHREAD_CFLAGS" -# -# Yes, it would be nice to put the locale data in -# /usr/share, but the locale stuff includes loadable -# libraries which must be located in the same directory -# as the other locale data, so for now, everything lives -# in ${libdir} -# - -X11_LOCALEDATADIR="${X11_DATADIR}/locale" -AX_DEFINE_DIR(XLOCALEDATADIR, X11_LOCALEDATADIR, [Location of libX11 locale data]) +X11_LOCALEDATADIR=`$PKG_CONFIG --variable=xlocaledatadir xlocale-config` +AX_DEFINE_DIR(XLOCALEDATADIR, X11_LOCALEDATADIR, [Location of X locale data]) AC_SUBST(X11_LOCALEDATADIR) AC_ARG_WITH(locale-lib-dir, AS_HELP_STRING([--with-locale-lib-dir=DIR], @@ -427,24 +416,9 @@ AX_DEFINE_DIR(XLOCALELIBDIR, X11_LOCALELIBDIR, [Location of libX11 locale librar AC_SUBST(X11_LOCALELIBDIR) X11_LOCALEDIR="${X11_LOCALEDATADIR}" -AX_DEFINE_DIR(XLOCALEDIR, X11_LOCALEDIR, [Location of libX11 locale data]) +AX_DEFINE_DIR(XLOCALEDIR, X11_LOCALEDIR, [Location of X locale data]) AC_SUBST(X11_LOCALEDIR) -locales="\ - am_ET.UTF-8 armscii-8 C cs_CZ.UTF-8 el_GR.UTF-8 en_US.UTF-8 \ - fi_FI.UTF-8 georgian-academy georgian-ps ibm-cp1133 iscii-dev \ - isiri-3342 iso8859-1 iso8859-10 iso8859-11 iso8859-13 iso8859-14 \ - iso8859-15 iso8859-2 iso8859-3 iso8859-4 iso8859-5 iso8859-6 \ - iso8859-7 iso8859-8 iso8859-9 iso8859-9e ja ja.JIS \ - ja_JP.UTF-8 ja.SJIS km_KH.UTF-8 ko koi8-c koi8-r \ - koi8-u ko_KR.UTF-8 microsoft-cp1251 microsoft-cp1255 \ - microsoft-cp1256 mulelao-1 nokhchi-1 pt_BR.UTF-8 ru_RU.UTF-8 \ - sr_CS.UTF-8 tatar-cyr th_TH th_TH.UTF-8 tscii-0 vi_VN.tcvn \ - vi_VN.viscii zh_CN zh_CN.gb18030 zh_CN.gbk zh_CN.UTF-8 \ - zh_HK.big5 zh_HK.big5hkscs zh_HK.UTF-8 zh_TW zh_TW.big5 \ - zh_TW.UTF-8" -AC_SUBST(locales) - XKEYSYMDB="${X11_DATADIR}/XKeysymDB" AX_DEFINE_DIR(XKEYSYMDB, XKEYSYMDB, [Location of keysym database]) @@ -471,12 +445,9 @@ AC_CONFIG_FILES([Makefile modules/om/Makefile modules/om/generic/Makefile src/xkb/Makefile - nls/Makefile specs/Makefile specs/i18n/Makefile - specs/i18n/compose/Makefile specs/i18n/framework/Makefile - specs/i18n/localedb/Makefile specs/i18n/trans/Makefile specs/libX11/Makefile specs/XIM/Makefile diff --git a/specs/i18n/Makefile.am b/specs/i18n/Makefile.am index a69a51e..55a3eb8 100644 --- a/specs/i18n/Makefile.am +++ b/specs/i18n/Makefile.am @@ -21,4 +21,4 @@ # DEALINGS IN THE SOFTWARE. # -SUBDIRS=compose framework localedb trans +SUBDIRS=framework trans -- 2.1.0 From ran234 at gmail.com Sun Sep 14 13:45:49 2014 From: ran234 at gmail.com (Ran Benita) Date: Sun, 14 Sep 2014 23:45:49 +0300 Subject: [PATCH 2/4] Remove nls/ directory In-Reply-To: <1410727551-12759-1-git-send-email-ran234@gmail.com> References: <1410727479-12160-1-git-send-email-ran234@gmail.com> <1410727551-12759-1-git-send-email-ran234@gmail.com> Message-ID: <1410727551-12759-2-git-send-email-ran234@gmail.com> The locale configuration has moved to a separate repository, xlocale-config. Signed-off-by: Ran Benita --- nls/.gitignore | 12 - nls/C/Compose.pre | 0 nls/C/XI18N_OBJS | 8 - nls/C/XLC_LOCALE.pre | 59 - nls/Makefile.am | 52 - nls/am_ET.UTF-8/Compose.pre | 360 --- nls/am_ET.UTF-8/XI18N_OBJS | 0 nls/am_ET.UTF-8/XLC_LOCALE.pre | 0 nls/armscii-8/Compose.pre | 14 - nls/armscii-8/XI18N_OBJS | 7 - nls/armscii-8/XLC_LOCALE.pre | 77 - nls/compose-check.pl | 161 - nls/compose.dir.pre | 473 --- nls/cs_CZ.UTF-8/Compose.pre | 12 - nls/cs_CZ.UTF-8/XI18N_OBJS | 0 nls/cs_CZ.UTF-8/XLC_LOCALE.pre | 0 nls/el_GR.UTF-8/Compose.pre | 1981 ------------ nls/el_GR.UTF-8/XI18N_OBJS | 0 nls/el_GR.UTF-8/XLC_LOCALE.pre | 0 nls/en_US.UTF-8/Compose.pre | 6009 ----------------------------------- nls/en_US.UTF-8/XI18N_OBJS | 7 - nls/en_US.UTF-8/XLC_LOCALE.pre | 300 -- nls/fi_FI.UTF-8/Compose.pre | 427 --- nls/fi_FI.UTF-8/XI18N_OBJS | 0 nls/fi_FI.UTF-8/XLC_LOCALE.pre | 0 nls/georgian-academy/Compose.pre | 14 - nls/georgian-academy/XI18N_OBJS | 7 - nls/georgian-academy/XLC_LOCALE.pre | 77 - nls/georgian-ps/Compose.pre | 14 - nls/georgian-ps/XI18N_OBJS | 7 - nls/georgian-ps/XLC_LOCALE.pre | 77 - nls/ibm-cp1133/Compose.pre | 14 - nls/ibm-cp1133/XI18N_OBJS | 7 - nls/ibm-cp1133/XLC_LOCALE.pre | 77 - nls/iscii-dev/Compose.pre | 0 nls/iscii-dev/XI18N_OBJS | 7 - nls/iscii-dev/XLC_LOCALE.pre | 77 - nls/isiri-3342/Compose.pre | 0 nls/isiri-3342/XI18N_OBJS | 7 - nls/isiri-3342/XLC_LOCALE.pre | 77 - nls/iso8859-1/Compose.pre | 843 ----- nls/iso8859-1/XI18N_OBJS | 8 - nls/iso8859-1/XLC_LOCALE.pre | 69 - nls/iso8859-10/Compose.pre | 14 - nls/iso8859-10/XI18N_OBJS | 7 - nls/iso8859-10/XLC_LOCALE.pre | 70 - nls/iso8859-11/Compose.pre | 0 nls/iso8859-11/XI18N_OBJS | 8 - nls/iso8859-11/XLC_LOCALE.pre | 70 - nls/iso8859-13/Compose.pre | 432 --- nls/iso8859-13/XI18N_OBJS | 8 - nls/iso8859-13/XLC_LOCALE.pre | 70 - nls/iso8859-14/Compose.pre | 509 --- nls/iso8859-14/XI18N_OBJS | 7 - nls/iso8859-14/XLC_LOCALE.pre | 70 - nls/iso8859-15/Compose.pre | 476 --- nls/iso8859-15/XI18N_OBJS | 7 - nls/iso8859-15/XLC_LOCALE.pre | 76 - nls/iso8859-2/Compose.pre | 535 ---- nls/iso8859-2/XI18N_OBJS | 8 - nls/iso8859-2/XLC_LOCALE.pre | 70 - nls/iso8859-3/Compose.pre | 483 --- nls/iso8859-3/XI18N_OBJS | 7 - nls/iso8859-3/XLC_LOCALE.pre | 70 - nls/iso8859-4/Compose.pre | 374 --- nls/iso8859-4/XI18N_OBJS | 7 - nls/iso8859-4/XLC_LOCALE.pre | 70 - nls/iso8859-5/Compose.pre | 14 - nls/iso8859-5/XI18N_OBJS | 8 - nls/iso8859-5/XLC_LOCALE.pre | 70 - nls/iso8859-6/Compose.pre | 14 - nls/iso8859-6/XI18N_OBJS | 7 - nls/iso8859-6/XLC_LOCALE.pre | 70 - nls/iso8859-7/Compose.pre | 222 -- nls/iso8859-7/XI18N_OBJS | 8 - nls/iso8859-7/XLC_LOCALE.pre | 70 - nls/iso8859-8/Compose.pre | 14 - nls/iso8859-8/XI18N_OBJS | 7 - nls/iso8859-8/XLC_LOCALE.pre | 70 - nls/iso8859-9/Compose.pre | 481 --- nls/iso8859-9/XI18N_OBJS | 8 - nls/iso8859-9/XLC_LOCALE.pre | 70 - nls/iso8859-9e/Compose.pre | 493 --- nls/iso8859-9e/XI18N_OBJS | 7 - nls/iso8859-9e/XLC_LOCALE.pre | 82 - nls/ja.JIS/Compose.pre | 14 - nls/ja.JIS/XI18N_OBJS | 7 - nls/ja.JIS/XLC_LOCALE.pre | 122 - nls/ja.SJIS/Compose.pre | 14 - nls/ja.SJIS/XI18N_OBJS | 10 - nls/ja.SJIS/XLC_LOCALE.pre | 382 --- nls/ja/Compose.pre | 14 - nls/ja/XI18N_OBJS | 11 - nls/ja/XLC_LOCALE.pre | 122 - nls/ja_JP.UTF-8/Compose.pre | 1 - nls/ja_JP.UTF-8/XI18N_OBJS | 8 - nls/ja_JP.UTF-8/XLC_LOCALE.pre | 149 - nls/km_KH.UTF-8/Compose.pre | 8 - nls/km_KH.UTF-8/XI18N_OBJS | 8 - nls/km_KH.UTF-8/XLC_LOCALE.pre | 0 nls/ko/Compose.pre | 14 - nls/ko/XI18N_OBJS | 7 - nls/ko/XLC_LOCALE.pre | 69 - nls/ko_KR.UTF-8/Compose.pre | 1 - nls/ko_KR.UTF-8/XI18N_OBJS | 8 - nls/ko_KR.UTF-8/XLC_LOCALE.pre | 147 - nls/koi8-c/Compose.pre | 122 - nls/koi8-c/XI18N_OBJS | 7 - nls/koi8-c/XLC_LOCALE.pre | 77 - nls/koi8-r/Compose.pre | 14 - nls/koi8-r/XI18N_OBJS | 7 - nls/koi8-r/XLC_LOCALE.pre | 78 - nls/koi8-u/Compose.pre | 14 - nls/koi8-u/XI18N_OBJS | 7 - nls/koi8-u/XLC_LOCALE.pre | 77 - nls/locale.alias.pre | 1390 -------- nls/locale.dir.pre | 473 --- nls/microsoft-cp1251/Compose.pre | 0 nls/microsoft-cp1251/XI18N_OBJS | 7 - nls/microsoft-cp1251/XLC_LOCALE.pre | 83 - nls/microsoft-cp1255/Compose.pre | 0 nls/microsoft-cp1255/XI18N_OBJS | 7 - nls/microsoft-cp1255/XLC_LOCALE.pre | 83 - nls/microsoft-cp1256/Compose.pre | 0 nls/microsoft-cp1256/XI18N_OBJS | 7 - nls/microsoft-cp1256/XLC_LOCALE.pre | 83 - nls/mulelao-1/Compose.pre | 14 - nls/mulelao-1/XI18N_OBJS | 7 - nls/mulelao-1/XLC_LOCALE.pre | 77 - nls/nokhchi-1/Compose.pre | 0 nls/nokhchi-1/XI18N_OBJS | 7 - nls/nokhchi-1/XLC_LOCALE.pre | 77 - nls/pt_BR.UTF-8/Compose.pre | 34 - nls/pt_BR.UTF-8/XI18N_OBJS | 7 - nls/pt_BR.UTF-8/XLC_LOCALE.pre | 142 - nls/ru_RU.UTF-8/Compose.pre | 1 - nls/ru_RU.UTF-8/XI18N_OBJS | 7 - nls/ru_RU.UTF-8/XLC_LOCALE.pre | 169 - nls/sr_CS.UTF-8/Compose.pre | 128 - nls/sr_CS.UTF-8/XI18N_OBJS | 8 - nls/sr_CS.UTF-8/XLC_LOCALE.pre | 0 nls/tatar-cyr/Compose.pre | 0 nls/tatar-cyr/XI18N_OBJS | 7 - nls/tatar-cyr/XLC_LOCALE.pre | 83 - nls/th_TH.UTF-8/Compose.pre | 1 - nls/th_TH.UTF-8/XI18N_OBJS | 8 - nls/th_TH.UTF-8/XLC_LOCALE.pre | 79 - nls/th_TH/Compose.pre | 0 nls/th_TH/XI18N_OBJS | 7 - nls/th_TH/XLC_LOCALE.pre | 63 - nls/tscii-0/Compose.pre | 0 nls/tscii-0/XI18N_OBJS | 7 - nls/tscii-0/XLC_LOCALE.pre | 77 - nls/vi_VN.tcvn/Compose.pre | 135 - nls/vi_VN.tcvn/XI18N_OBJS | 7 - nls/vi_VN.tcvn/XLC_LOCALE.pre | 77 - nls/vi_VN.viscii/Compose.pre | 135 - nls/vi_VN.viscii/XI18N_OBJS | 7 - nls/vi_VN.viscii/XLC_LOCALE.pre | 77 - nls/zh_CN.UTF-8/Compose.pre | 1 - nls/zh_CN.UTF-8/XI18N_OBJS | 8 - nls/zh_CN.UTF-8/XLC_LOCALE.pre | 107 - nls/zh_CN.gb18030/Compose.pre | 14 - nls/zh_CN.gb18030/XI18N_OBJS | 7 - nls/zh_CN.gb18030/XLC_LOCALE.pre | 106 - nls/zh_CN.gbk/Compose.pre | 14 - nls/zh_CN.gbk/XI18N_OBJS | 7 - nls/zh_CN.gbk/XLC_LOCALE.pre | 70 - nls/zh_CN/Compose.pre | 14 - nls/zh_CN/XI18N_OBJS | 8 - nls/zh_CN/XLC_LOCALE.pre | 60 - nls/zh_HK.UTF-8/Compose.pre | 1 - nls/zh_HK.UTF-8/XI18N_OBJS | 7 - nls/zh_HK.UTF-8/XLC_LOCALE.pre | 96 - nls/zh_HK.big5/Compose.pre | 13 - nls/zh_HK.big5/XI18N_OBJS | 7 - nls/zh_HK.big5/XLC_LOCALE.pre | 69 - nls/zh_HK.big5hkscs/Compose.pre | 13 - nls/zh_HK.big5hkscs/XI18N_OBJS | 7 - nls/zh_HK.big5hkscs/XLC_LOCALE.pre | 71 - nls/zh_TW.UTF-8/Compose.pre | 1 - nls/zh_TW.UTF-8/XI18N_OBJS | 7 - nls/zh_TW.UTF-8/XLC_LOCALE.pre | 91 - nls/zh_TW.big5/Compose.pre | 14 - nls/zh_TW.big5/XI18N_OBJS | 7 - nls/zh_TW.big5/XLC_LOCALE.pre | 91 - nls/zh_TW/Compose.pre | 14 - nls/zh_TW/XI18N_OBJS | 7 - nls/zh_TW/XLC_LOCALE.pre | 140 - 189 files changed, 22676 deletions(-) delete mode 100644 nls/.gitignore delete mode 100644 nls/C/Compose.pre delete mode 100644 nls/C/XI18N_OBJS delete mode 100644 nls/C/XLC_LOCALE.pre delete mode 100644 nls/Makefile.am delete mode 100644 nls/am_ET.UTF-8/Compose.pre delete mode 100644 nls/am_ET.UTF-8/XI18N_OBJS delete mode 100644 nls/am_ET.UTF-8/XLC_LOCALE.pre delete mode 100644 nls/armscii-8/Compose.pre delete mode 100644 nls/armscii-8/XI18N_OBJS delete mode 100644 nls/armscii-8/XLC_LOCALE.pre delete mode 100755 nls/compose-check.pl delete mode 100644 nls/compose.dir.pre delete mode 100644 nls/cs_CZ.UTF-8/Compose.pre delete mode 100644 nls/cs_CZ.UTF-8/XI18N_OBJS delete mode 100644 nls/cs_CZ.UTF-8/XLC_LOCALE.pre delete mode 100644 nls/el_GR.UTF-8/Compose.pre delete mode 100644 nls/el_GR.UTF-8/XI18N_OBJS delete mode 100644 nls/el_GR.UTF-8/XLC_LOCALE.pre delete mode 100644 nls/en_US.UTF-8/Compose.pre delete mode 100644 nls/en_US.UTF-8/XI18N_OBJS delete mode 100644 nls/en_US.UTF-8/XLC_LOCALE.pre delete mode 100644 nls/fi_FI.UTF-8/Compose.pre delete mode 100644 nls/fi_FI.UTF-8/XI18N_OBJS delete mode 100644 nls/fi_FI.UTF-8/XLC_LOCALE.pre delete mode 100644 nls/georgian-academy/Compose.pre delete mode 100644 nls/georgian-academy/XI18N_OBJS delete mode 100644 nls/georgian-academy/XLC_LOCALE.pre delete mode 100644 nls/georgian-ps/Compose.pre delete mode 100644 nls/georgian-ps/XI18N_OBJS delete mode 100644 nls/georgian-ps/XLC_LOCALE.pre delete mode 100644 nls/ibm-cp1133/Compose.pre delete mode 100644 nls/ibm-cp1133/XI18N_OBJS delete mode 100644 nls/ibm-cp1133/XLC_LOCALE.pre delete mode 100644 nls/iscii-dev/Compose.pre delete mode 100644 nls/iscii-dev/XI18N_OBJS delete mode 100644 nls/iscii-dev/XLC_LOCALE.pre delete mode 100644 nls/isiri-3342/Compose.pre delete mode 100644 nls/isiri-3342/XI18N_OBJS delete mode 100644 nls/isiri-3342/XLC_LOCALE.pre delete mode 100644 nls/iso8859-1/Compose.pre delete mode 100644 nls/iso8859-1/XI18N_OBJS delete mode 100644 nls/iso8859-1/XLC_LOCALE.pre delete mode 100644 nls/iso8859-10/Compose.pre delete mode 100644 nls/iso8859-10/XI18N_OBJS delete mode 100644 nls/iso8859-10/XLC_LOCALE.pre delete mode 100644 nls/iso8859-11/Compose.pre delete mode 100644 nls/iso8859-11/XI18N_OBJS delete mode 100644 nls/iso8859-11/XLC_LOCALE.pre delete mode 100644 nls/iso8859-13/Compose.pre delete mode 100644 nls/iso8859-13/XI18N_OBJS delete mode 100644 nls/iso8859-13/XLC_LOCALE.pre delete mode 100644 nls/iso8859-14/Compose.pre delete mode 100644 nls/iso8859-14/XI18N_OBJS delete mode 100644 nls/iso8859-14/XLC_LOCALE.pre delete mode 100644 nls/iso8859-15/Compose.pre delete mode 100644 nls/iso8859-15/XI18N_OBJS delete mode 100644 nls/iso8859-15/XLC_LOCALE.pre delete mode 100644 nls/iso8859-2/Compose.pre delete mode 100644 nls/iso8859-2/XI18N_OBJS delete mode 100644 nls/iso8859-2/XLC_LOCALE.pre delete mode 100644 nls/iso8859-3/Compose.pre delete mode 100644 nls/iso8859-3/XI18N_OBJS delete mode 100644 nls/iso8859-3/XLC_LOCALE.pre delete mode 100644 nls/iso8859-4/Compose.pre delete mode 100644 nls/iso8859-4/XI18N_OBJS delete mode 100644 nls/iso8859-4/XLC_LOCALE.pre delete mode 100644 nls/iso8859-5/Compose.pre delete mode 100644 nls/iso8859-5/XI18N_OBJS delete mode 100644 nls/iso8859-5/XLC_LOCALE.pre delete mode 100644 nls/iso8859-6/Compose.pre delete mode 100644 nls/iso8859-6/XI18N_OBJS delete mode 100644 nls/iso8859-6/XLC_LOCALE.pre delete mode 100644 nls/iso8859-7/Compose.pre delete mode 100644 nls/iso8859-7/XI18N_OBJS delete mode 100644 nls/iso8859-7/XLC_LOCALE.pre delete mode 100644 nls/iso8859-8/Compose.pre delete mode 100644 nls/iso8859-8/XI18N_OBJS delete mode 100644 nls/iso8859-8/XLC_LOCALE.pre delete mode 100644 nls/iso8859-9/Compose.pre delete mode 100644 nls/iso8859-9/XI18N_OBJS delete mode 100644 nls/iso8859-9/XLC_LOCALE.pre delete mode 100644 nls/iso8859-9e/Compose.pre delete mode 100644 nls/iso8859-9e/XI18N_OBJS delete mode 100644 nls/iso8859-9e/XLC_LOCALE.pre delete mode 100644 nls/ja.JIS/Compose.pre delete mode 100644 nls/ja.JIS/XI18N_OBJS delete mode 100644 nls/ja.JIS/XLC_LOCALE.pre delete mode 100644 nls/ja.SJIS/Compose.pre delete mode 100644 nls/ja.SJIS/XI18N_OBJS delete mode 100644 nls/ja.SJIS/XLC_LOCALE.pre delete mode 100644 nls/ja/Compose.pre delete mode 100644 nls/ja/XI18N_OBJS delete mode 100644 nls/ja/XLC_LOCALE.pre delete mode 100644 nls/ja_JP.UTF-8/Compose.pre delete mode 100644 nls/ja_JP.UTF-8/XI18N_OBJS delete mode 100644 nls/ja_JP.UTF-8/XLC_LOCALE.pre delete mode 100644 nls/km_KH.UTF-8/Compose.pre delete mode 100644 nls/km_KH.UTF-8/XI18N_OBJS delete mode 100644 nls/km_KH.UTF-8/XLC_LOCALE.pre delete mode 100644 nls/ko/Compose.pre delete mode 100644 nls/ko/XI18N_OBJS delete mode 100644 nls/ko/XLC_LOCALE.pre delete mode 100644 nls/ko_KR.UTF-8/Compose.pre delete mode 100644 nls/ko_KR.UTF-8/XI18N_OBJS delete mode 100644 nls/ko_KR.UTF-8/XLC_LOCALE.pre delete mode 100644 nls/koi8-c/Compose.pre delete mode 100644 nls/koi8-c/XI18N_OBJS delete mode 100644 nls/koi8-c/XLC_LOCALE.pre delete mode 100644 nls/koi8-r/Compose.pre delete mode 100644 nls/koi8-r/XI18N_OBJS delete mode 100644 nls/koi8-r/XLC_LOCALE.pre delete mode 100644 nls/koi8-u/Compose.pre delete mode 100644 nls/koi8-u/XI18N_OBJS delete mode 100644 nls/koi8-u/XLC_LOCALE.pre delete mode 100644 nls/locale.alias.pre delete mode 100644 nls/locale.dir.pre delete mode 100644 nls/microsoft-cp1251/Compose.pre delete mode 100644 nls/microsoft-cp1251/XI18N_OBJS delete mode 100644 nls/microsoft-cp1251/XLC_LOCALE.pre delete mode 100644 nls/microsoft-cp1255/Compose.pre delete mode 100644 nls/microsoft-cp1255/XI18N_OBJS delete mode 100644 nls/microsoft-cp1255/XLC_LOCALE.pre delete mode 100644 nls/microsoft-cp1256/Compose.pre delete mode 100644 nls/microsoft-cp1256/XI18N_OBJS delete mode 100644 nls/microsoft-cp1256/XLC_LOCALE.pre delete mode 100644 nls/mulelao-1/Compose.pre delete mode 100644 nls/mulelao-1/XI18N_OBJS delete mode 100644 nls/mulelao-1/XLC_LOCALE.pre delete mode 100644 nls/nokhchi-1/Compose.pre delete mode 100644 nls/nokhchi-1/XI18N_OBJS delete mode 100644 nls/nokhchi-1/XLC_LOCALE.pre delete mode 100644 nls/pt_BR.UTF-8/Compose.pre delete mode 100644 nls/pt_BR.UTF-8/XI18N_OBJS delete mode 100644 nls/pt_BR.UTF-8/XLC_LOCALE.pre delete mode 100644 nls/ru_RU.UTF-8/Compose.pre delete mode 100644 nls/ru_RU.UTF-8/XI18N_OBJS delete mode 100644 nls/ru_RU.UTF-8/XLC_LOCALE.pre delete mode 100644 nls/sr_CS.UTF-8/Compose.pre delete mode 100644 nls/sr_CS.UTF-8/XI18N_OBJS delete mode 100644 nls/sr_CS.UTF-8/XLC_LOCALE.pre delete mode 100644 nls/tatar-cyr/Compose.pre delete mode 100644 nls/tatar-cyr/XI18N_OBJS delete mode 100644 nls/tatar-cyr/XLC_LOCALE.pre delete mode 100644 nls/th_TH.UTF-8/Compose.pre delete mode 100644 nls/th_TH.UTF-8/XI18N_OBJS delete mode 100644 nls/th_TH.UTF-8/XLC_LOCALE.pre delete mode 100644 nls/th_TH/Compose.pre delete mode 100644 nls/th_TH/XI18N_OBJS delete mode 100644 nls/th_TH/XLC_LOCALE.pre delete mode 100644 nls/tscii-0/Compose.pre delete mode 100644 nls/tscii-0/XI18N_OBJS delete mode 100644 nls/tscii-0/XLC_LOCALE.pre delete mode 100644 nls/vi_VN.tcvn/Compose.pre delete mode 100644 nls/vi_VN.tcvn/XI18N_OBJS delete mode 100644 nls/vi_VN.tcvn/XLC_LOCALE.pre delete mode 100644 nls/vi_VN.viscii/Compose.pre delete mode 100644 nls/vi_VN.viscii/XI18N_OBJS delete mode 100644 nls/vi_VN.viscii/XLC_LOCALE.pre delete mode 100644 nls/zh_CN.UTF-8/Compose.pre delete mode 100644 nls/zh_CN.UTF-8/XI18N_OBJS delete mode 100644 nls/zh_CN.UTF-8/XLC_LOCALE.pre delete mode 100644 nls/zh_CN.gb18030/Compose.pre delete mode 100644 nls/zh_CN.gb18030/XI18N_OBJS delete mode 100644 nls/zh_CN.gb18030/XLC_LOCALE.pre delete mode 100644 nls/zh_CN.gbk/Compose.pre delete mode 100644 nls/zh_CN.gbk/XI18N_OBJS delete mode 100644 nls/zh_CN.gbk/XLC_LOCALE.pre delete mode 100644 nls/zh_CN/Compose.pre delete mode 100644 nls/zh_CN/XI18N_OBJS delete mode 100644 nls/zh_CN/XLC_LOCALE.pre delete mode 100644 nls/zh_HK.UTF-8/Compose.pre delete mode 100644 nls/zh_HK.UTF-8/XI18N_OBJS delete mode 100644 nls/zh_HK.UTF-8/XLC_LOCALE.pre delete mode 100644 nls/zh_HK.big5/Compose.pre delete mode 100644 nls/zh_HK.big5/XI18N_OBJS delete mode 100644 nls/zh_HK.big5/XLC_LOCALE.pre delete mode 100644 nls/zh_HK.big5hkscs/Compose.pre delete mode 100644 nls/zh_HK.big5hkscs/XI18N_OBJS delete mode 100644 nls/zh_HK.big5hkscs/XLC_LOCALE.pre delete mode 100644 nls/zh_TW.UTF-8/Compose.pre delete mode 100644 nls/zh_TW.UTF-8/XI18N_OBJS delete mode 100644 nls/zh_TW.UTF-8/XLC_LOCALE.pre delete mode 100644 nls/zh_TW.big5/Compose.pre delete mode 100644 nls/zh_TW.big5/XI18N_OBJS delete mode 100644 nls/zh_TW.big5/XLC_LOCALE.pre delete mode 100644 nls/zh_TW/Compose.pre delete mode 100644 nls/zh_TW/XI18N_OBJS delete mode 100644 nls/zh_TW/XLC_LOCALE.pre diff --git a/nls/.gitignore b/nls/.gitignore deleted file mode 100644 index cdb8fee..0000000 diff --git a/nls/C/Compose.pre b/nls/C/Compose.pre deleted file mode 100644 index e69de29..0000000 diff --git a/nls/C/XI18N_OBJS b/nls/C/XI18N_OBJS deleted file mode 100644 index 3a9a1bb..0000000 diff --git a/nls/C/XLC_LOCALE.pre b/nls/C/XLC_LOCALE.pre deleted file mode 100644 index 8334363..0000000 diff --git a/nls/Makefile.am b/nls/Makefile.am deleted file mode 100644 index 0c544f6..0000000 diff --git a/nls/am_ET.UTF-8/Compose.pre b/nls/am_ET.UTF-8/Compose.pre deleted file mode 100644 index 760d946..0000000 diff --git a/nls/am_ET.UTF-8/XI18N_OBJS b/nls/am_ET.UTF-8/XI18N_OBJS deleted file mode 100644 index e69de29..0000000 diff --git a/nls/am_ET.UTF-8/XLC_LOCALE.pre b/nls/am_ET.UTF-8/XLC_LOCALE.pre deleted file mode 100644 index e69de29..0000000 diff --git a/nls/armscii-8/Compose.pre b/nls/armscii-8/Compose.pre deleted file mode 100644 index f9ac7de..0000000 diff --git a/nls/armscii-8/XI18N_OBJS b/nls/armscii-8/XI18N_OBJS deleted file mode 100644 index 02d87c6..0000000 diff --git a/nls/armscii-8/XLC_LOCALE.pre b/nls/armscii-8/XLC_LOCALE.pre deleted file mode 100644 index 4fab639..0000000 diff --git a/nls/compose-check.pl b/nls/compose-check.pl deleted file mode 100755 index 399bfa9..0000000 diff --git a/nls/compose.dir.pre b/nls/compose.dir.pre deleted file mode 100644 index 455070f..0000000 diff --git a/nls/cs_CZ.UTF-8/Compose.pre b/nls/cs_CZ.UTF-8/Compose.pre deleted file mode 100644 index 022753e..0000000 diff --git a/nls/cs_CZ.UTF-8/XI18N_OBJS b/nls/cs_CZ.UTF-8/XI18N_OBJS deleted file mode 100644 index e69de29..0000000 diff --git a/nls/cs_CZ.UTF-8/XLC_LOCALE.pre b/nls/cs_CZ.UTF-8/XLC_LOCALE.pre deleted file mode 100644 index e69de29..0000000 diff --git a/nls/el_GR.UTF-8/Compose.pre b/nls/el_GR.UTF-8/Compose.pre deleted file mode 100644 index ad90337..0000000 diff --git a/nls/el_GR.UTF-8/XI18N_OBJS b/nls/el_GR.UTF-8/XI18N_OBJS deleted file mode 100644 index e69de29..0000000 diff --git a/nls/el_GR.UTF-8/XLC_LOCALE.pre b/nls/el_GR.UTF-8/XLC_LOCALE.pre deleted file mode 100644 index e69de29..0000000 diff --git a/nls/en_US.UTF-8/Compose.pre b/nls/en_US.UTF-8/Compose.pre deleted file mode 100644 index 4a96570..0000000 diff --git a/nls/en_US.UTF-8/XI18N_OBJS b/nls/en_US.UTF-8/XI18N_OBJS deleted file mode 100644 index 97b30b9..0000000 diff --git a/nls/en_US.UTF-8/XLC_LOCALE.pre b/nls/en_US.UTF-8/XLC_LOCALE.pre deleted file mode 100644 index 35d009f..0000000 diff --git a/nls/fi_FI.UTF-8/Compose.pre b/nls/fi_FI.UTF-8/Compose.pre deleted file mode 100644 index f4d6a4a..0000000 diff --git a/nls/fi_FI.UTF-8/XI18N_OBJS b/nls/fi_FI.UTF-8/XI18N_OBJS deleted file mode 100644 index e69de29..0000000 diff --git a/nls/fi_FI.UTF-8/XLC_LOCALE.pre b/nls/fi_FI.UTF-8/XLC_LOCALE.pre deleted file mode 100644 index e69de29..0000000 diff --git a/nls/georgian-academy/Compose.pre b/nls/georgian-academy/Compose.pre deleted file mode 100644 index 1f9b450..0000000 diff --git a/nls/georgian-academy/XI18N_OBJS b/nls/georgian-academy/XI18N_OBJS deleted file mode 100644 index c4f7ffa..0000000 diff --git a/nls/georgian-academy/XLC_LOCALE.pre b/nls/georgian-academy/XLC_LOCALE.pre deleted file mode 100644 index 50bc3c8..0000000 diff --git a/nls/georgian-ps/Compose.pre b/nls/georgian-ps/Compose.pre deleted file mode 100644 index 672835b..0000000 diff --git a/nls/georgian-ps/XI18N_OBJS b/nls/georgian-ps/XI18N_OBJS deleted file mode 100644 index 558452d..0000000 diff --git a/nls/georgian-ps/XLC_LOCALE.pre b/nls/georgian-ps/XLC_LOCALE.pre deleted file mode 100644 index 9f03ebb..0000000 diff --git a/nls/ibm-cp1133/Compose.pre b/nls/ibm-cp1133/Compose.pre deleted file mode 100644 index ef0f59a..0000000 diff --git a/nls/ibm-cp1133/XI18N_OBJS b/nls/ibm-cp1133/XI18N_OBJS deleted file mode 100644 index 02ca83b..0000000 diff --git a/nls/ibm-cp1133/XLC_LOCALE.pre b/nls/ibm-cp1133/XLC_LOCALE.pre deleted file mode 100644 index cdc543a..0000000 diff --git a/nls/iscii-dev/Compose.pre b/nls/iscii-dev/Compose.pre deleted file mode 100644 index e69de29..0000000 diff --git a/nls/iscii-dev/XI18N_OBJS b/nls/iscii-dev/XI18N_OBJS deleted file mode 100644 index 0dbaed5..0000000 diff --git a/nls/iscii-dev/XLC_LOCALE.pre b/nls/iscii-dev/XLC_LOCALE.pre deleted file mode 100644 index e863156..0000000 diff --git a/nls/isiri-3342/Compose.pre b/nls/isiri-3342/Compose.pre deleted file mode 100644 index e69de29..0000000 diff --git a/nls/isiri-3342/XI18N_OBJS b/nls/isiri-3342/XI18N_OBJS deleted file mode 100644 index 028d847..0000000 diff --git a/nls/isiri-3342/XLC_LOCALE.pre b/nls/isiri-3342/XLC_LOCALE.pre deleted file mode 100644 index 4ec74f8..0000000 diff --git a/nls/iso8859-1/Compose.pre b/nls/iso8859-1/Compose.pre deleted file mode 100644 index c726ecf..0000000 diff --git a/nls/iso8859-1/XI18N_OBJS b/nls/iso8859-1/XI18N_OBJS deleted file mode 100644 index 3a9a1bb..0000000 diff --git a/nls/iso8859-1/XLC_LOCALE.pre b/nls/iso8859-1/XLC_LOCALE.pre deleted file mode 100644 index 11772b8..0000000 diff --git a/nls/iso8859-10/Compose.pre b/nls/iso8859-10/Compose.pre deleted file mode 100644 index 12fa7f6..0000000 diff --git a/nls/iso8859-10/XI18N_OBJS b/nls/iso8859-10/XI18N_OBJS deleted file mode 100644 index 7e3b854..0000000 diff --git a/nls/iso8859-10/XLC_LOCALE.pre b/nls/iso8859-10/XLC_LOCALE.pre deleted file mode 100644 index e6fc488..0000000 diff --git a/nls/iso8859-11/Compose.pre b/nls/iso8859-11/Compose.pre deleted file mode 100644 index e69de29..0000000 diff --git a/nls/iso8859-11/XI18N_OBJS b/nls/iso8859-11/XI18N_OBJS deleted file mode 100644 index 168ccc0..0000000 diff --git a/nls/iso8859-11/XLC_LOCALE.pre b/nls/iso8859-11/XLC_LOCALE.pre deleted file mode 100644 index ee5073d..0000000 diff --git a/nls/iso8859-13/Compose.pre b/nls/iso8859-13/Compose.pre deleted file mode 100644 index 3e02ca9..0000000 diff --git a/nls/iso8859-13/XI18N_OBJS b/nls/iso8859-13/XI18N_OBJS deleted file mode 100644 index f20902a..0000000 diff --git a/nls/iso8859-13/XLC_LOCALE.pre b/nls/iso8859-13/XLC_LOCALE.pre deleted file mode 100644 index 82a5a0a..0000000 diff --git a/nls/iso8859-14/Compose.pre b/nls/iso8859-14/Compose.pre deleted file mode 100644 index 911a1eb..0000000 diff --git a/nls/iso8859-14/XI18N_OBJS b/nls/iso8859-14/XI18N_OBJS deleted file mode 100644 index ebd00a6..0000000 diff --git a/nls/iso8859-14/XLC_LOCALE.pre b/nls/iso8859-14/XLC_LOCALE.pre deleted file mode 100644 index 05bbd24..0000000 diff --git a/nls/iso8859-15/Compose.pre b/nls/iso8859-15/Compose.pre deleted file mode 100644 index ec75cfe..0000000 diff --git a/nls/iso8859-15/XI18N_OBJS b/nls/iso8859-15/XI18N_OBJS deleted file mode 100644 index 1e4f6cc..0000000 diff --git a/nls/iso8859-15/XLC_LOCALE.pre b/nls/iso8859-15/XLC_LOCALE.pre deleted file mode 100644 index 09ce32d..0000000 diff --git a/nls/iso8859-2/Compose.pre b/nls/iso8859-2/Compose.pre deleted file mode 100644 index 876e82c..0000000 diff --git a/nls/iso8859-2/XI18N_OBJS b/nls/iso8859-2/XI18N_OBJS deleted file mode 100644 index f20902a..0000000 diff --git a/nls/iso8859-2/XLC_LOCALE.pre b/nls/iso8859-2/XLC_LOCALE.pre deleted file mode 100644 index d7c6170..0000000 diff --git a/nls/iso8859-3/Compose.pre b/nls/iso8859-3/Compose.pre deleted file mode 100644 index 6238d5c..0000000 diff --git a/nls/iso8859-3/XI18N_OBJS b/nls/iso8859-3/XI18N_OBJS deleted file mode 100644 index 1f39eba..0000000 diff --git a/nls/iso8859-3/XLC_LOCALE.pre b/nls/iso8859-3/XLC_LOCALE.pre deleted file mode 100644 index 5a79380..0000000 diff --git a/nls/iso8859-4/Compose.pre b/nls/iso8859-4/Compose.pre deleted file mode 100644 index 7448045..0000000 diff --git a/nls/iso8859-4/XI18N_OBJS b/nls/iso8859-4/XI18N_OBJS deleted file mode 100644 index 7404dab..0000000 diff --git a/nls/iso8859-4/XLC_LOCALE.pre b/nls/iso8859-4/XLC_LOCALE.pre deleted file mode 100644 index c349a6f..0000000 diff --git a/nls/iso8859-5/Compose.pre b/nls/iso8859-5/Compose.pre deleted file mode 100644 index 01ee440..0000000 diff --git a/nls/iso8859-5/XI18N_OBJS b/nls/iso8859-5/XI18N_OBJS deleted file mode 100644 index f20902a..0000000 diff --git a/nls/iso8859-5/XLC_LOCALE.pre b/nls/iso8859-5/XLC_LOCALE.pre deleted file mode 100644 index f271c6d..0000000 diff --git a/nls/iso8859-6/Compose.pre b/nls/iso8859-6/Compose.pre deleted file mode 100644 index cb03315..0000000 diff --git a/nls/iso8859-6/XI18N_OBJS b/nls/iso8859-6/XI18N_OBJS deleted file mode 100644 index ab2d300..0000000 diff --git a/nls/iso8859-6/XLC_LOCALE.pre b/nls/iso8859-6/XLC_LOCALE.pre deleted file mode 100644 index c2a5107..0000000 diff --git a/nls/iso8859-7/Compose.pre b/nls/iso8859-7/Compose.pre deleted file mode 100644 index c79b277..0000000 diff --git a/nls/iso8859-7/XI18N_OBJS b/nls/iso8859-7/XI18N_OBJS deleted file mode 100644 index f20902a..0000000 diff --git a/nls/iso8859-7/XLC_LOCALE.pre b/nls/iso8859-7/XLC_LOCALE.pre deleted file mode 100644 index e1099ba..0000000 diff --git a/nls/iso8859-8/Compose.pre b/nls/iso8859-8/Compose.pre deleted file mode 100644 index 1ca90c7..0000000 diff --git a/nls/iso8859-8/XI18N_OBJS b/nls/iso8859-8/XI18N_OBJS deleted file mode 100644 index e85b513..0000000 diff --git a/nls/iso8859-8/XLC_LOCALE.pre b/nls/iso8859-8/XLC_LOCALE.pre deleted file mode 100644 index 7c4ed31..0000000 diff --git a/nls/iso8859-9/Compose.pre b/nls/iso8859-9/Compose.pre deleted file mode 100644 index 83122a2..0000000 diff --git a/nls/iso8859-9/XI18N_OBJS b/nls/iso8859-9/XI18N_OBJS deleted file mode 100644 index f20902a..0000000 diff --git a/nls/iso8859-9/XLC_LOCALE.pre b/nls/iso8859-9/XLC_LOCALE.pre deleted file mode 100644 index 2e0e66b..0000000 diff --git a/nls/iso8859-9e/Compose.pre b/nls/iso8859-9e/Compose.pre deleted file mode 100644 index 9681531..0000000 diff --git a/nls/iso8859-9e/XI18N_OBJS b/nls/iso8859-9e/XI18N_OBJS deleted file mode 100644 index a0d710b..0000000 diff --git a/nls/iso8859-9e/XLC_LOCALE.pre b/nls/iso8859-9e/XLC_LOCALE.pre deleted file mode 100644 index 8c252f1..0000000 diff --git a/nls/ja.JIS/Compose.pre b/nls/ja.JIS/Compose.pre deleted file mode 100644 index b1f8e55..0000000 diff --git a/nls/ja.JIS/XI18N_OBJS b/nls/ja.JIS/XI18N_OBJS deleted file mode 100644 index 0cf97ee..0000000 diff --git a/nls/ja.JIS/XLC_LOCALE.pre b/nls/ja.JIS/XLC_LOCALE.pre deleted file mode 100644 index be03777..0000000 diff --git a/nls/ja.SJIS/Compose.pre b/nls/ja.SJIS/Compose.pre deleted file mode 100644 index a6c75ef..0000000 diff --git a/nls/ja.SJIS/XI18N_OBJS b/nls/ja.SJIS/XI18N_OBJS deleted file mode 100644 index 29dffff..0000000 diff --git a/nls/ja.SJIS/XLC_LOCALE.pre b/nls/ja.SJIS/XLC_LOCALE.pre deleted file mode 100644 index 5064f15..0000000 diff --git a/nls/ja/Compose.pre b/nls/ja/Compose.pre deleted file mode 100644 index 2604257..0000000 diff --git a/nls/ja/XI18N_OBJS b/nls/ja/XI18N_OBJS deleted file mode 100644 index 50b51fe..0000000 diff --git a/nls/ja/XLC_LOCALE.pre b/nls/ja/XLC_LOCALE.pre deleted file mode 100644 index 0e205a4..0000000 diff --git a/nls/ja_JP.UTF-8/Compose.pre b/nls/ja_JP.UTF-8/Compose.pre deleted file mode 100644 index 6c2c411..0000000 diff --git a/nls/ja_JP.UTF-8/XI18N_OBJS b/nls/ja_JP.UTF-8/XI18N_OBJS deleted file mode 100644 index 9159b67..0000000 diff --git a/nls/ja_JP.UTF-8/XLC_LOCALE.pre b/nls/ja_JP.UTF-8/XLC_LOCALE.pre deleted file mode 100644 index 0f5ebe2..0000000 diff --git a/nls/km_KH.UTF-8/Compose.pre b/nls/km_KH.UTF-8/Compose.pre deleted file mode 100644 index dc89119..0000000 diff --git a/nls/km_KH.UTF-8/XI18N_OBJS b/nls/km_KH.UTF-8/XI18N_OBJS deleted file mode 100644 index f201bf4..0000000 diff --git a/nls/km_KH.UTF-8/XLC_LOCALE.pre b/nls/km_KH.UTF-8/XLC_LOCALE.pre deleted file mode 100644 index e69de29..0000000 diff --git a/nls/ko/Compose.pre b/nls/ko/Compose.pre deleted file mode 100644 index 4297871..0000000 diff --git a/nls/ko/XI18N_OBJS b/nls/ko/XI18N_OBJS deleted file mode 100644 index 5ee5237..0000000 diff --git a/nls/ko/XLC_LOCALE.pre b/nls/ko/XLC_LOCALE.pre deleted file mode 100644 index dc79e66..0000000 diff --git a/nls/ko_KR.UTF-8/Compose.pre b/nls/ko_KR.UTF-8/Compose.pre deleted file mode 100644 index 6c2c411..0000000 diff --git a/nls/ko_KR.UTF-8/XI18N_OBJS b/nls/ko_KR.UTF-8/XI18N_OBJS deleted file mode 100644 index 96e753c..0000000 diff --git a/nls/ko_KR.UTF-8/XLC_LOCALE.pre b/nls/ko_KR.UTF-8/XLC_LOCALE.pre deleted file mode 100644 index b3db89d..0000000 diff --git a/nls/koi8-c/Compose.pre b/nls/koi8-c/Compose.pre deleted file mode 100644 index c15a3bb..0000000 diff --git a/nls/koi8-c/XI18N_OBJS b/nls/koi8-c/XI18N_OBJS deleted file mode 100644 index a6374f3..0000000 diff --git a/nls/koi8-c/XLC_LOCALE.pre b/nls/koi8-c/XLC_LOCALE.pre deleted file mode 100644 index adf5db0..0000000 diff --git a/nls/koi8-r/Compose.pre b/nls/koi8-r/Compose.pre deleted file mode 100644 index d44893e..0000000 diff --git a/nls/koi8-r/XI18N_OBJS b/nls/koi8-r/XI18N_OBJS deleted file mode 100644 index b704fec..0000000 diff --git a/nls/koi8-r/XLC_LOCALE.pre b/nls/koi8-r/XLC_LOCALE.pre deleted file mode 100644 index 1c487d7..0000000 diff --git a/nls/koi8-u/Compose.pre b/nls/koi8-u/Compose.pre deleted file mode 100644 index fab51ed..0000000 diff --git a/nls/koi8-u/XI18N_OBJS b/nls/koi8-u/XI18N_OBJS deleted file mode 100644 index dd2c992..0000000 diff --git a/nls/koi8-u/XLC_LOCALE.pre b/nls/koi8-u/XLC_LOCALE.pre deleted file mode 100644 index 0516d98..0000000 diff --git a/nls/locale.alias.pre b/nls/locale.alias.pre deleted file mode 100644 index 1319492..0000000 diff --git a/nls/locale.dir.pre b/nls/locale.dir.pre deleted file mode 100644 index ab1bace..0000000 diff --git a/nls/microsoft-cp1251/Compose.pre b/nls/microsoft-cp1251/Compose.pre deleted file mode 100644 index e69de29..0000000 diff --git a/nls/microsoft-cp1251/XI18N_OBJS b/nls/microsoft-cp1251/XI18N_OBJS deleted file mode 100644 index 98c5ef5..0000000 diff --git a/nls/microsoft-cp1251/XLC_LOCALE.pre b/nls/microsoft-cp1251/XLC_LOCALE.pre deleted file mode 100644 index c96d908..0000000 diff --git a/nls/microsoft-cp1255/Compose.pre b/nls/microsoft-cp1255/Compose.pre deleted file mode 100644 index e69de29..0000000 diff --git a/nls/microsoft-cp1255/XI18N_OBJS b/nls/microsoft-cp1255/XI18N_OBJS deleted file mode 100644 index 3d0d9a5..0000000 diff --git a/nls/microsoft-cp1255/XLC_LOCALE.pre b/nls/microsoft-cp1255/XLC_LOCALE.pre deleted file mode 100644 index c1b009b..0000000 diff --git a/nls/microsoft-cp1256/Compose.pre b/nls/microsoft-cp1256/Compose.pre deleted file mode 100644 index e69de29..0000000 diff --git a/nls/microsoft-cp1256/XI18N_OBJS b/nls/microsoft-cp1256/XI18N_OBJS deleted file mode 100644 index e58719d..0000000 diff --git a/nls/microsoft-cp1256/XLC_LOCALE.pre b/nls/microsoft-cp1256/XLC_LOCALE.pre deleted file mode 100644 index 6165fee..0000000 diff --git a/nls/mulelao-1/Compose.pre b/nls/mulelao-1/Compose.pre deleted file mode 100644 index 89302cc..0000000 diff --git a/nls/mulelao-1/XI18N_OBJS b/nls/mulelao-1/XI18N_OBJS deleted file mode 100644 index 10d7248..0000000 diff --git a/nls/mulelao-1/XLC_LOCALE.pre b/nls/mulelao-1/XLC_LOCALE.pre deleted file mode 100644 index 24af6d8..0000000 diff --git a/nls/nokhchi-1/Compose.pre b/nls/nokhchi-1/Compose.pre deleted file mode 100644 index e69de29..0000000 diff --git a/nls/nokhchi-1/XI18N_OBJS b/nls/nokhchi-1/XI18N_OBJS deleted file mode 100644 index 58b1d01..0000000 diff --git a/nls/nokhchi-1/XLC_LOCALE.pre b/nls/nokhchi-1/XLC_LOCALE.pre deleted file mode 100644 index 6f231cd..0000000 diff --git a/nls/pt_BR.UTF-8/Compose.pre b/nls/pt_BR.UTF-8/Compose.pre deleted file mode 100644 index 29846c6..0000000 diff --git a/nls/pt_BR.UTF-8/XI18N_OBJS b/nls/pt_BR.UTF-8/XI18N_OBJS deleted file mode 100644 index 8eac6d8..0000000 diff --git a/nls/pt_BR.UTF-8/XLC_LOCALE.pre b/nls/pt_BR.UTF-8/XLC_LOCALE.pre deleted file mode 100644 index e53dd50..0000000 diff --git a/nls/ru_RU.UTF-8/Compose.pre b/nls/ru_RU.UTF-8/Compose.pre deleted file mode 100644 index 6c2c411..0000000 diff --git a/nls/ru_RU.UTF-8/XI18N_OBJS b/nls/ru_RU.UTF-8/XI18N_OBJS deleted file mode 100644 index 842fc27..0000000 diff --git a/nls/ru_RU.UTF-8/XLC_LOCALE.pre b/nls/ru_RU.UTF-8/XLC_LOCALE.pre deleted file mode 100644 index d2f397e..0000000 diff --git a/nls/sr_CS.UTF-8/Compose.pre b/nls/sr_CS.UTF-8/Compose.pre deleted file mode 100644 index b2397f7..0000000 diff --git a/nls/sr_CS.UTF-8/XI18N_OBJS b/nls/sr_CS.UTF-8/XI18N_OBJS deleted file mode 100644 index f201bf4..0000000 diff --git a/nls/sr_CS.UTF-8/XLC_LOCALE.pre b/nls/sr_CS.UTF-8/XLC_LOCALE.pre deleted file mode 100644 index e69de29..0000000 diff --git a/nls/tatar-cyr/Compose.pre b/nls/tatar-cyr/Compose.pre deleted file mode 100644 index e69de29..0000000 diff --git a/nls/tatar-cyr/XI18N_OBJS b/nls/tatar-cyr/XI18N_OBJS deleted file mode 100644 index 074f2a1..0000000 diff --git a/nls/tatar-cyr/XLC_LOCALE.pre b/nls/tatar-cyr/XLC_LOCALE.pre deleted file mode 100644 index c7c5581..0000000 diff --git a/nls/th_TH.UTF-8/Compose.pre b/nls/th_TH.UTF-8/Compose.pre deleted file mode 100644 index 6c2c411..0000000 diff --git a/nls/th_TH.UTF-8/XI18N_OBJS b/nls/th_TH.UTF-8/XI18N_OBJS deleted file mode 100644 index dec38b0..0000000 diff --git a/nls/th_TH.UTF-8/XLC_LOCALE.pre b/nls/th_TH.UTF-8/XLC_LOCALE.pre deleted file mode 100644 index f79091a..0000000 diff --git a/nls/th_TH/Compose.pre b/nls/th_TH/Compose.pre deleted file mode 100644 index e69de29..0000000 diff --git a/nls/th_TH/XI18N_OBJS b/nls/th_TH/XI18N_OBJS deleted file mode 100644 index d677a00..0000000 diff --git a/nls/th_TH/XLC_LOCALE.pre b/nls/th_TH/XLC_LOCALE.pre deleted file mode 100644 index 3508c28..0000000 diff --git a/nls/tscii-0/Compose.pre b/nls/tscii-0/Compose.pre deleted file mode 100644 index e69de29..0000000 diff --git a/nls/tscii-0/XI18N_OBJS b/nls/tscii-0/XI18N_OBJS deleted file mode 100644 index 237a337..0000000 diff --git a/nls/tscii-0/XLC_LOCALE.pre b/nls/tscii-0/XLC_LOCALE.pre deleted file mode 100644 index bffffe4..0000000 diff --git a/nls/vi_VN.tcvn/Compose.pre b/nls/vi_VN.tcvn/Compose.pre deleted file mode 100644 index 0f2279d..0000000 diff --git a/nls/vi_VN.tcvn/XI18N_OBJS b/nls/vi_VN.tcvn/XI18N_OBJS deleted file mode 100644 index cff66df..0000000 diff --git a/nls/vi_VN.tcvn/XLC_LOCALE.pre b/nls/vi_VN.tcvn/XLC_LOCALE.pre deleted file mode 100644 index 90324fd..0000000 diff --git a/nls/vi_VN.viscii/Compose.pre b/nls/vi_VN.viscii/Compose.pre deleted file mode 100644 index 59cdb83..0000000 diff --git a/nls/vi_VN.viscii/XI18N_OBJS b/nls/vi_VN.viscii/XI18N_OBJS deleted file mode 100644 index 5f4b3b6..0000000 diff --git a/nls/vi_VN.viscii/XLC_LOCALE.pre b/nls/vi_VN.viscii/XLC_LOCALE.pre deleted file mode 100644 index 730996b..0000000 diff --git a/nls/zh_CN.UTF-8/Compose.pre b/nls/zh_CN.UTF-8/Compose.pre deleted file mode 100644 index 6c2c411..0000000 diff --git a/nls/zh_CN.UTF-8/XI18N_OBJS b/nls/zh_CN.UTF-8/XI18N_OBJS deleted file mode 100644 index 29dd53a..0000000 diff --git a/nls/zh_CN.UTF-8/XLC_LOCALE.pre b/nls/zh_CN.UTF-8/XLC_LOCALE.pre deleted file mode 100644 index 6f05d7a..0000000 diff --git a/nls/zh_CN.gb18030/Compose.pre b/nls/zh_CN.gb18030/Compose.pre deleted file mode 100644 index a9e259f..0000000 diff --git a/nls/zh_CN.gb18030/XI18N_OBJS b/nls/zh_CN.gb18030/XI18N_OBJS deleted file mode 100644 index a92b403..0000000 diff --git a/nls/zh_CN.gb18030/XLC_LOCALE.pre b/nls/zh_CN.gb18030/XLC_LOCALE.pre deleted file mode 100644 index f9544c7..0000000 diff --git a/nls/zh_CN.gbk/Compose.pre b/nls/zh_CN.gbk/Compose.pre deleted file mode 100644 index c95d9ac..0000000 diff --git a/nls/zh_CN.gbk/XI18N_OBJS b/nls/zh_CN.gbk/XI18N_OBJS deleted file mode 100644 index 197a3e1..0000000 diff --git a/nls/zh_CN.gbk/XLC_LOCALE.pre b/nls/zh_CN.gbk/XLC_LOCALE.pre deleted file mode 100644 index 302818b..0000000 diff --git a/nls/zh_CN/Compose.pre b/nls/zh_CN/Compose.pre deleted file mode 100644 index 2f04b42..0000000 diff --git a/nls/zh_CN/XI18N_OBJS b/nls/zh_CN/XI18N_OBJS deleted file mode 100644 index 24d066b..0000000 diff --git a/nls/zh_CN/XLC_LOCALE.pre b/nls/zh_CN/XLC_LOCALE.pre deleted file mode 100644 index 2e95d30..0000000 diff --git a/nls/zh_HK.UTF-8/Compose.pre b/nls/zh_HK.UTF-8/Compose.pre deleted file mode 100644 index 6c2c411..0000000 diff --git a/nls/zh_HK.UTF-8/XI18N_OBJS b/nls/zh_HK.UTF-8/XI18N_OBJS deleted file mode 100644 index e9d5ef8..0000000 diff --git a/nls/zh_HK.UTF-8/XLC_LOCALE.pre b/nls/zh_HK.UTF-8/XLC_LOCALE.pre deleted file mode 100644 index c088032..0000000 diff --git a/nls/zh_HK.big5/Compose.pre b/nls/zh_HK.big5/Compose.pre deleted file mode 100644 index 79dd3a0..0000000 diff --git a/nls/zh_HK.big5/XI18N_OBJS b/nls/zh_HK.big5/XI18N_OBJS deleted file mode 100644 index 826c798..0000000 diff --git a/nls/zh_HK.big5/XLC_LOCALE.pre b/nls/zh_HK.big5/XLC_LOCALE.pre deleted file mode 100644 index 03f9d08..0000000 diff --git a/nls/zh_HK.big5hkscs/Compose.pre b/nls/zh_HK.big5hkscs/Compose.pre deleted file mode 100644 index a06611f..0000000 diff --git a/nls/zh_HK.big5hkscs/XI18N_OBJS b/nls/zh_HK.big5hkscs/XI18N_OBJS deleted file mode 100644 index 29dc216..0000000 diff --git a/nls/zh_HK.big5hkscs/XLC_LOCALE.pre b/nls/zh_HK.big5hkscs/XLC_LOCALE.pre deleted file mode 100644 index dc19438..0000000 diff --git a/nls/zh_TW.UTF-8/Compose.pre b/nls/zh_TW.UTF-8/Compose.pre deleted file mode 100644 index 6c2c411..0000000 diff --git a/nls/zh_TW.UTF-8/XI18N_OBJS b/nls/zh_TW.UTF-8/XI18N_OBJS deleted file mode 100644 index a3a644b..0000000 diff --git a/nls/zh_TW.UTF-8/XLC_LOCALE.pre b/nls/zh_TW.UTF-8/XLC_LOCALE.pre deleted file mode 100644 index d5b19c0..0000000 diff --git a/nls/zh_TW.big5/Compose.pre b/nls/zh_TW.big5/Compose.pre deleted file mode 100644 index 3c0dbb7..0000000 diff --git a/nls/zh_TW.big5/XI18N_OBJS b/nls/zh_TW.big5/XI18N_OBJS deleted file mode 100644 index 6937f61..0000000 diff --git a/nls/zh_TW.big5/XLC_LOCALE.pre b/nls/zh_TW.big5/XLC_LOCALE.pre deleted file mode 100644 index b8866e8..0000000 diff --git a/nls/zh_TW/Compose.pre b/nls/zh_TW/Compose.pre deleted file mode 100644 index 79be290..0000000 diff --git a/nls/zh_TW/XI18N_OBJS b/nls/zh_TW/XI18N_OBJS deleted file mode 100644 index 0f471dd..0000000 diff --git a/nls/zh_TW/XLC_LOCALE.pre b/nls/zh_TW/XLC_LOCALE.pre deleted file mode 100644 index ffbb462..0000000 -- 2.1.0 From ran234 at gmail.com Sun Sep 14 13:45:50 2014 From: ran234 at gmail.com (Ran Benita) Date: Sun, 14 Sep 2014 23:45:50 +0300 Subject: [PATCH 3/4] Remove specs/i18n/compose and specs/i18n/localedb In-Reply-To: <1410727551-12759-1-git-send-email-ran234@gmail.com> References: <1410727479-12160-1-git-send-email-ran234@gmail.com> <1410727551-12759-1-git-send-email-ran234@gmail.com> Message-ID: <1410727551-12759-3-git-send-email-ran234@gmail.com> These specs have moved to a separate repository, xlocale-config. Signed-off-by: Ran Benita --- specs/i18n/compose/.gitignore | 2 - specs/i18n/compose/Makefile.am | 20 - specs/i18n/compose/compose-chart.pl | 388 ------------------ specs/i18n/compose/docbook-nl.am | 128 ------ specs/i18n/localedb/Makefile.am | 13 - specs/i18n/localedb/localedb.xml | 786 ------------------------------------ 6 files changed, 1337 deletions(-) delete mode 100644 specs/i18n/compose/.gitignore delete mode 100644 specs/i18n/compose/Makefile.am delete mode 100755 specs/i18n/compose/compose-chart.pl delete mode 100644 specs/i18n/compose/docbook-nl.am delete mode 100644 specs/i18n/localedb/Makefile.am delete mode 100644 specs/i18n/localedb/localedb.xml diff --git a/specs/i18n/compose/.gitignore b/specs/i18n/compose/.gitignore deleted file mode 100644 index c8f2485..0000000 diff --git a/specs/i18n/compose/Makefile.am b/specs/i18n/compose/Makefile.am deleted file mode 100644 index 9e3a26d..0000000 diff --git a/specs/i18n/compose/compose-chart.pl b/specs/i18n/compose/compose-chart.pl deleted file mode 100755 index e2ac850..0000000 diff --git a/specs/i18n/compose/docbook-nl.am b/specs/i18n/compose/docbook-nl.am deleted file mode 100644 index 95860c2..0000000 diff --git a/specs/i18n/localedb/Makefile.am b/specs/i18n/localedb/Makefile.am deleted file mode 100644 index 68a917c..0000000 diff --git a/specs/i18n/localedb/localedb.xml b/specs/i18n/localedb/localedb.xml deleted file mode 100644 index ed90007..0000000 -- 2.1.0 From ran234 at gmail.com Sun Sep 14 13:45:51 2014 From: ran234 at gmail.com (Ran Benita) Date: Sun, 14 Sep 2014 23:45:51 +0300 Subject: [PATCH 4/4] Remove cpprules.in In-Reply-To: <1410727551-12759-1-git-send-email-ran234@gmail.com> References: <1410727479-12160-1-git-send-email-ran234@gmail.com> <1410727551-12759-1-git-send-email-ran234@gmail.com> Message-ID: <1410727551-12759-4-git-send-email-ran234@gmail.com> It was only used in nls/, which was removed. Signed-off-by: Ran Benita --- cpprules.in | 30 ------------------------------ 1 file changed, 30 deletions(-) delete mode 100644 cpprules.in diff --git a/cpprules.in b/cpprules.in deleted file mode 100644 index 03d6701..0000000 -- 2.1.0 From ran234 at gmail.com Sun Sep 14 13:46:39 2014 From: ran234 at gmail.com (Ran Benita) Date: Sun, 14 Sep 2014 23:46:39 +0300 Subject: [PATCH modular] Add xlocale-config module In-Reply-To: <1410727479-12160-1-git-send-email-ran234@gmail.com> References: <1410727479-12160-1-git-send-email-ran234@gmail.com> Message-ID: <1410727599-12988-1-git-send-email-ran234@gmail.com> Signed-off-by: Ran Benita --- build.sh | 1 + xorg.modules | 13 +++++++++++++ 2 files changed, 14 insertions(+) diff --git a/build.sh b/build.sh index 6eac65d..7b41112 100755 --- a/build.sh +++ b/build.sh @@ -1022,6 +1022,7 @@ build_all_modules() { build xcb util-keysyms build xcb util-renderutil build xcb util-wm + build data xlocale-config build lib libX11 build lib libXext case $HOST_OS in diff --git a/xorg.modules b/xorg.modules index 7216192..fa45cbc 100644 --- a/xorg.modules +++ b/xorg.modules @@ -692,6 +692,7 @@ + @@ -3270,6 +3271,18 @@ + + + + + + + + + + + References: <1410727479-12160-1-git-send-email-ran234@gmail.com> Message-ID: <20140914205201.GA13479@ran> On Sun, Sep 14, 2014 at 11:44:33PM +0300, Ran Benita wrote: > > This set of patches splits the locale data (the nls/ directory and a > couple of related patches) from Xlib to a separate repository, Oops - this meant to say couple of specs. And the non-prefixed patches are meant for libX11. And one thing I forgot - it would also be nice to move the Compose(5) man page to xlocale-config, but it's somewhat too Xlib specific as-is. Ran From jstpierre at mecheye.net Sun Sep 14 14:16:10 2014 From: jstpierre at mecheye.net (Jasper St. Pierre) Date: Sun, 14 Sep 2014 15:16:10 -0600 Subject: [PATCH:libICE] spec: Convert troff \*Q..\*U to DocBook ... In-Reply-To: <1410725383-18022-1-git-send-email-alan.coopersmith@oracle.com> References: <1410725383-18022-1-git-send-email-alan.coopersmith@oracle.com> Message-ID: Looks good. Reviewed-by: Jasper St. Pierre On Sun, Sep 14, 2014 at 2:09 PM, Alan Coopersmith < alan.coopersmith at oracle.com> wrote: > Reported-by: Jasper St. Pierre > Signed-off-by: Alan Coopersmith > --- > specs/ice.xml | 10 +++++----- > 1 file changed, 5 insertions(+), 5 deletions(-) > > diff --git a/specs/ice.xml b/specs/ice.xml > index 439c2f6..44b7c79 100644 > --- a/specs/ice.xml > +++ b/specs/ice.xml > @@ -95,8 +95,8 @@ allow them to share the same transport layer > connection. > Through some mechanism outside ICE, two parties make themselves > known to > each other and agree that they would like to communicate using an ICE > subprotocol. ICE assumes that this negotation includes some notion by > which > -the parties will decide which is the \*Qoriginating\*U party and which is > -the \*Qanswering\*U party. The negotiation will also need to provide the > +the parties will decide which is the originating party and > which is > +the answering party. The negotiation will also need to > provide the > originating party with a name or address of the answering party. Examples > of mechanisms by which parties can make themselves known to each other are > the X selection mechanism, environment > @@ -227,7 +227,7 @@ the initial connection messages; in general data is > sent in the sender's > byte order and the receiver is required to swap it appropriately. > In order to support 64-bit machines, ICE messages > are padded to multiples of 8 bytes. All messages are designed so that > -fields are \*Qnaturally\*U aligned on 16-, 32-, and 64-bit boundaries. > +fields are naturally aligned on 16-, 32-, and 64-bit > boundaries. > The following formula gives the number of bytes necessary > to pad E bytes to the next multiple of > b: > @@ -485,7 +485,7 @@ header and the length field is computed accordingly. > > > > -In the following message descriptions, \*QExpected errors\*U indicates > +In the following message descriptions, Expected errors > indicates > errors that may occur in the normal course of events. Other errors > (in particular > BadMajor > @@ -1465,7 +1465,7 @@ but it does not affect the existing registration. > > > The major opcode specified was already registered. This is > -fatal to the \*Qnew\*U protocol being set up by > +fatal to the new protocol being set up by > ProtocolSetup but it does not affect the > existing registration. > > -- > 1.7.9.2 > > _______________________________________________ > xorg-devel at lists.x.org: X.Org development > Archives: http://lists.x.org/archives/xorg-devel > Info: http://lists.x.org/mailman/listinfo/xorg-devel > -- Jasper -------------- next part -------------- An HTML attachment was scrubbed... URL: From peter.hutterer at who-t.net Sun Sep 14 19:03:38 2014 From: peter.hutterer at who-t.net (Peter Hutterer) Date: Mon, 15 Sep 2014 12:03:38 +1000 Subject: [PATCH synaptics 1/4] Mark some switch case fallthroughs with comments Message-ID: <1410746621-31412-1-git-send-email-peter.hutterer@who-t.net> Just to make it explicit Signed-off-by: Peter Hutterer --- src/ps2comm.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/ps2comm.c b/src/ps2comm.c index ed2f751..c474c07 100644 --- a/src/ps2comm.c +++ b/src/ps2comm.c @@ -582,12 +582,15 @@ PS2ReadHwStateProto(InputInfoPtr pInfo, case 8: hw->multi[7] = ((buf[5] & 0x08)) ? 1 : 0; hw->multi[6] = ((buf[4] & 0x08)) ? 1 : 0; + /* fallthrough */ case 6: hw->multi[5] = ((buf[5] & 0x04)) ? 1 : 0; hw->multi[4] = ((buf[4] & 0x04)) ? 1 : 0; + /* fallthrough */ case 4: hw->multi[3] = ((buf[5] & 0x02)) ? 1 : 0; hw->multi[2] = ((buf[4] & 0x02)) ? 1 : 0; + /* fallthrough */ case 2: hw->multi[1] = ((buf[5] & 0x01)) ? 1 : 0; hw->multi[0] = ((buf[4] & 0x01)) ? 1 : 0; -- 1.9.3 From peter.hutterer at who-t.net Sun Sep 14 19:03:39 2014 From: peter.hutterer at who-t.net (Peter Hutterer) Date: Mon, 15 Sep 2014 12:03:39 +1000 Subject: [PATCH synaptics 2/4] Shut up a coverity warning In-Reply-To: <1410746621-31412-1-git-send-email-peter.hutterer@who-t.net> References: <1410746621-31412-1-git-send-email-peter.hutterer@who-t.net> Message-ID: <1410746621-31412-2-git-send-email-peter.hutterer@who-t.net> xf86-input-synaptics-1.8.0/src/synaptics.c:498: var_compare_op: Comparing "end_str" to null implies that "end_str" might be null. end_str can't be null, so no need for this check and no need to get Coverity all confused. Signed-off-by: Peter Hutterer --- src/synaptics.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/synaptics.c b/src/synaptics.c index e8a08d2..ace0ec7 100644 --- a/src/synaptics.c +++ b/src/synaptics.c @@ -495,7 +495,7 @@ set_softbutton_areas_option(InputInfoPtr pInfo, char *option_name, int offset) values[i] = value; if (next_num != end_str) { - if (end_str && *end_str == '%') { + if (*end_str == '%') { in_percent |= 1 << i; end_str++; } -- 1.9.3 From peter.hutterer at who-t.net Sun Sep 14 19:03:40 2014 From: peter.hutterer at who-t.net (Peter Hutterer) Date: Mon, 15 Sep 2014 12:03:40 +1000 Subject: [PATCH synaptics 3/4] eventcomm: add missing axis labels to avoid array overrun In-Reply-To: <1410746621-31412-1-git-send-email-peter.hutterer@who-t.net> References: <1410746621-31412-1-git-send-email-peter.hutterer@who-t.net> Message-ID: <1410746621-31412-3-git-send-email-peter.hutterer@who-t.net> And warn when we run out of labels. Signed-off-by: Peter Hutterer --- src/eventcomm.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/eventcomm.c b/src/eventcomm.c index faaa57d..e789f0e 100644 --- a/src/eventcomm.c +++ b/src/eventcomm.c @@ -843,7 +843,7 @@ event_query_touch(InputInfoPtr pInfo) if (priv->has_touch) { int axnum; - static const char *labels[] = { + static const char *labels[ABS_MT_MAX] = { AXIS_LABEL_PROP_ABS_MT_TOUCH_MAJOR, AXIS_LABEL_PROP_ABS_MT_TOUCH_MINOR, AXIS_LABEL_PROP_ABS_MT_WIDTH_MAJOR, @@ -855,6 +855,9 @@ event_query_touch(InputInfoPtr pInfo) AXIS_LABEL_PROP_ABS_MT_BLOB_ID, AXIS_LABEL_PROP_ABS_MT_TRACKING_ID, AXIS_LABEL_PROP_ABS_MT_PRESSURE, + AXIS_LABEL_PROP_ABS_MT_DISTANCE, + AXIS_LABEL_PROP_ABS_MT_TOOL_X, + AXIS_LABEL_PROP_ABS_MT_TOOL_Y, }; priv->max_touches = libevdev_get_num_slots(dev); @@ -888,7 +891,13 @@ event_query_touch(InputInfoPtr pInfo) break; default: - priv->touch_axes[axnum].label = labels[axis_idx]; + if (axis_idx >= sizeof(labels)/sizeof(labels[0])) { + xf86IDrvMsg(pInfo, X_ERROR, + "Axis %d out of label range. This is a bug\n", + axis); + priv->touch_axes[axnum].label = NULL; + } else + priv->touch_axes[axnum].label = labels[axis_idx]; priv->touch_axes[axnum].min = libevdev_get_abs_minimum(dev, axis); priv->touch_axes[axnum].max = libevdev_get_abs_maximum(dev, axis); /* Kernel provides units/mm, X wants units/m */ -- 1.9.3 From peter.hutterer at who-t.net Sun Sep 14 19:03:41 2014 From: peter.hutterer at who-t.net (Peter Hutterer) Date: Mon, 15 Sep 2014 12:03:41 +1000 Subject: [PATCH synaptics 4/4] When resetting, reset the open slots to -1 In-Reply-To: <1410746621-31412-1-git-send-email-peter.hutterer@who-t.net> References: <1410746621-31412-1-git-send-email-peter.hutterer@who-t.net> Message-ID: <1410746621-31412-4-git-send-email-peter.hutterer@who-t.net> open_slots holds the slot index, resetting it to 0 is a bad idea. And make sure that we do reset after DEVICE_INIT. We already do so on DEVICE_CLOSE, but after the first DEVICE_ON the data could still be random. Signed-off-by: Peter Hutterer --- src/synaptics.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/synaptics.c b/src/synaptics.c index ace0ec7..8e6022a 100644 --- a/src/synaptics.c +++ b/src/synaptics.c @@ -1026,6 +1026,8 @@ error: static void SynapticsReset(SynapticsPrivate * priv) { + int i; + SynapticsResetHwState(priv->hwState); SynapticsResetHwState(priv->local_hw_state); SynapticsResetHwState(priv->comm.hwState); @@ -1055,7 +1057,9 @@ SynapticsReset(SynapticsPrivate * priv) priv->prev_z = 0; priv->prevFingers = 0; priv->num_active_touches = 0; - memset(priv->open_slots, 0, priv->num_slots * sizeof(int)); + + for (i = 0; i < priv->num_slots; i++) + priv->open_slots[i] = -1; } static int @@ -1352,6 +1356,8 @@ DeviceInit(DeviceIntPtr dev) InitDeviceProperties(pInfo); XIRegisterPropertyHandler(pInfo->dev, SetProperty, NULL, NULL); + SynapticsReset(priv); + return Success; fail: -- 1.9.3 From keithp at keithp.com Sun Sep 14 22:32:18 2014 From: keithp at keithp.com (Keith Packard) Date: Sun, 14 Sep 2014 22:32:18 -0700 Subject: [PATCH synaptics 4/4] When resetting, reset the open slots to -1 In-Reply-To: <1410746621-31412-4-git-send-email-peter.hutterer@who-t.net> References: <1410746621-31412-1-git-send-email-peter.hutterer@who-t.net> <1410746621-31412-4-git-send-email-peter.hutterer@who-t.net> Message-ID: <86fvftphy5.fsf@hiro.keithp.com> Peter Hutterer writes: > open_slots holds the slot index, resetting it to 0 is a bad idea. And make > sure that we do reset after DEVICE_INIT. We already do so on DEVICE_CLOSE, but > after the first DEVICE_ON the data could still be random. > > Signed-off-by: Peter Hutterer For the series: Reviewed-by: Keith Packard -- keith.packard at intel.com -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 810 bytes Desc: not available URL: From keithp at keithp.com Mon Sep 15 08:42:30 2014 From: keithp at keithp.com (Keith Packard) Date: Mon, 15 Sep 2014 08:42:30 -0700 Subject: [PATCH] os: Don't listen to 'tcp' by default. Add '-listen' option. [v2] In-Reply-To: <1410546941-31486-1-git-send-email-keithp@keithp.com> References: <1410546941-31486-1-git-send-email-keithp@keithp.com> Message-ID: <1410795750-12393-1-git-send-email-keithp@keithp.com> This disables the tcp listen socket by default. Then, it uses a new xtrans interface, TRANS(Listen), to provide a command line option to re-enable those if desired. v2: Leave unix socket enabled by default. Add configure options. Signed-off-by: Keith Packard --- configure.ac | 20 ++++++++++++++++++++ include/dix-config.h.in | 9 +++++++++ man/Xserver.man | 7 +++++++ os/utils.c | 29 +++++++++++++++++++++++++++++ 4 files changed, 65 insertions(+) diff --git a/configure.ac b/configure.ac index cba7d24..a7bd8bd 100644 --- a/configure.ac +++ b/configure.ac @@ -484,6 +484,16 @@ AC_ARG_WITH(os-vendor, AS_HELP_STRING([--with-os-vendor=OSVENDOR], [Name o AC_ARG_WITH(builderstring, AS_HELP_STRING([--with-builderstring=BUILDERSTRING], [Additional builder string]), [ BUILDERSTRING="$withval" ] [ ]) +AC_ARG_ENABLE(listen-tcp, AS_HELP_STRING([--enable-listen-tcp], + [Listen on TCP by default (default:disabled)]), + [LISTEN_TCP=$enableval], [LISTEN_TCP=no]) +AC_ARG_ENABLE(listen-unix, AS_HELP_STRING([--disable-listen-unix], + [Listen on Unix by default (default:enabled)]), + [LISTEN_UNIX=$enableval], [LISTEN_UNIX=yes]) + +AC_ARG_ENABLE(listen-local, AS_HELP_STRING([--disable-listen-local], + [Listen on local by default (default:enabled)]), + [LISTEN_LOCAL=$enableval], [LISTEN_LOCAL=yes]) dnl Determine font path XORG_FONTROOTDIR @@ -1081,6 +1091,16 @@ if test "x$RES" = xyes; then SDK_REQUIRED_MODULES="$SDK_REQUIRED_MODULES $RESOURCEPROTO" fi +if test "x$LISTEN_TCP" = xyes; then + AC_DEFINE(LISTEN_TCP, 1, [Listen on TCP socket]) +fi +if test "x$LISTEN_UNIX" = xyes; then + AC_DEFINE(LISTEN_UNIX, 1, [Listen on Unix socket]) +fi +if test "x$LISTEN_LOCAL" = xyes; then + AC_DEFINE(LISTEN_LOCAL, 1, [Listen on local socket]) +fi + # The XRes extension may support client ID tracking only if it has # been specifically enabled. Client ID tracking is implicitly not # supported if XRes extension is disabled. diff --git a/include/dix-config.h.in b/include/dix-config.h.in index 2203f82..41b6a22 100644 --- a/include/dix-config.h.in +++ b/include/dix-config.h.in @@ -496,4 +496,13 @@ /* byte order */ #undef X_BYTE_ORDER +/* Listen on TCP socket */ +#undef LISTEN_TCP + +/* Listen on Unix socket */ +#undef LISTEN_UNIX + +/* Listen on local socket */ +#undef LISTEN_LOCAL + #endif /* _DIX_CONFIG_H_ */ diff --git a/man/Xserver.man b/man/Xserver.man index 7a74e85..c03830c 100644 --- a/man/Xserver.man +++ b/man/Xserver.man @@ -196,6 +196,13 @@ with This option may be issued multiple times to disable listening to different transport types. .TP 8 +.B \-listen \fItrans-type\fP +enables a transport type. For example, TCP/IP connections can be enabled +with +.BR "\-listen tcp" . +This option may be issued multiple times to enable listening to different +transport types. +.TP 8 .B \-noreset prevents a server reset when the last client connection is closed. This overrides a previous diff --git a/os/utils.c b/os/utils.c index c83f77d..82fc621 100644 --- a/os/utils.c +++ b/os/utils.c @@ -557,6 +557,7 @@ UseMsg(void) ErrorF("-nolock disable the locking mechanism\n"); #endif ErrorF("-nolisten string don't listen on protocol\n"); + ErrorF("-listen string listen on protocol\n"); ErrorF("-noreset don't reset after last client exists\n"); ErrorF("-background [none] create root window with no background\n"); ErrorF("-reset reset after last client exists\n"); @@ -646,6 +647,19 @@ VerifyDisplayName(const char *d) return 1; } +static const char *defaultNoListenList[] = { +#ifndef LISTEN_TCP + "tcp", +#endif +#ifndef LISTEN_UNIX + "unix", +#endif +#ifndef LISTEN_LOCAL + "local", +#endif + NULL +}; + /* * This function parses the command line. Handles device-independent fields * and allows ddx to handle additional fields. It is not allowed to modify @@ -664,6 +678,12 @@ ProcessCommandLine(int argc, char *argv[]) PartialNetwork = TRUE; #endif + for (i = 0; defaultNoListenList[i] != NULL; i++) { + if (_XSERVTransNoListen(defaultNoListenList[i])) + ErrorF("Failed to disable listen for %s transport", + defaultNoListenList[i]); + } + for (i = 1; i < argc; i++) { /* call ddx first, so it can peek/override if it wants */ if ((skip = ddxProcessArgument(argc, argv, i))) { @@ -849,6 +869,15 @@ ProcessCommandLine(int argc, char *argv[]) else UseMsg(); } + else if (strcmp(argv[i], "-listen") == 0) { + if (++i < argc) { + if (_XSERVTransListen(argv[i])) + ErrorF("Failed to enable listen for %s transport", + argv[i]); + } + else + UseMsg(); + } else if (strcmp(argv[i], "-noreset") == 0) { dispatchExceptionAtReset = 0; } -- 2.1.0 From keithp at keithp.com Mon Sep 15 09:18:13 2014 From: keithp at keithp.com (Keith Packard) Date: Mon, 15 Sep 2014 09:18:13 -0700 Subject: [PATCH] Build required portions of registry.c automatically [v2] In-Reply-To: <1410390002-12042-4-git-send-email-keithp@keithp.com> References: <1410390002-12042-4-git-send-email-keithp@keithp.com> Message-ID: <1410797893-6124-1-git-send-email-keithp@keithp.com> Instead of making the inclusion of the registry code a global conditional, split the registry into two pieces; the bits required by the X-Resource extension (the resource names) and the bits required by the XCSECURITY extension (the protocol names). Build each set of code if the related extension is being built. v2: Check for both XCSECURITY and XSELINUX. Signed-off-by: Keith Packard --- configure.ac | 6 ---- dix/extension.c | 2 ++ dix/registry.c | 90 +++++++++++++++++++++++++++++++++--------------------- dix/resource.c | 2 ++ include/registry.h | 39 +++++++++-------------- 5 files changed, 74 insertions(+), 65 deletions(-) diff --git a/configure.ac b/configure.ac index cba7d24..ce76baa 100644 --- a/configure.ac +++ b/configure.ac @@ -587,7 +587,6 @@ AC_ARG_WITH(khronos-spec-dir, AS_HELP_STRING([--with-khronos-spec-dir=PATH], [Pa [KHRONOS_SPEC_DIR=auto]) dnl Extensions. -AC_ARG_ENABLE(registry, AS_HELP_STRING([--disable-registry], [Build string registry module (default: enabled)]), [XREGISTRY=$enableval], [XREGISTRY=yes]) AC_ARG_ENABLE(composite, AS_HELP_STRING([--disable-composite], [Build Composite extension (default: enabled)]), [COMPOSITE=$enableval], [COMPOSITE=yes]) AC_ARG_ENABLE(mitshm, AS_HELP_STRING([--disable-mitshm], [Build SHM extension (default: auto)]), [MITSHM=$enableval], [MITSHM=auto]) AC_ARG_ENABLE(xres, AS_HELP_STRING([--disable-xres], [Build XRes extension (default: enabled)]), [RES=$enableval], [RES=yes]) @@ -1038,11 +1037,6 @@ if test "x$XVMC" = xyes; then AC_DEFINE(XvMCExtension, 1, [Build XvMC extension]) fi -AM_CONDITIONAL(XREGISTRY, [test "x$XREGISTRY" = xyes]) -if test "x$XREGISTRY" = xyes; then - AC_DEFINE(XREGISTRY, 1, [Build registry module]) -fi - AM_CONDITIONAL(COMPOSITE, [test "x$COMPOSITE" = xyes]) if test "x$COMPOSITE" = xyes; then AC_DEFINE(COMPOSITE, 1, [Support Composite Extension]) diff --git a/dix/extension.c b/dix/extension.c index ede4bf5..e43291e 100644 --- a/dix/extension.c +++ b/dix/extension.c @@ -139,7 +139,9 @@ AddExtension(const char *name, int NumEvents, int NumErrors, ext->errorLast = 0; } +#ifdef X_REGISTRY_REQUEST RegisterExtensionNames(ext); +#endif return ext; } diff --git a/dix/registry.c b/dix/registry.c index 8b76d56..84d48b4 100644 --- a/dix/registry.c +++ b/dix/registry.c @@ -21,8 +21,6 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include #endif -#ifdef XREGISTRY - #include #include #include @@ -31,6 +29,8 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include "registry.h" #define BASE_SIZE 16 + +#ifdef X_REGISTRY_REQUEST #define CORE "X11" #define FILENAME SERVER_MISC_CONFIG_PATH "/protocol.txt" @@ -42,9 +42,15 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. static FILE *fh; static char ***requests, **events, **errors; +static unsigned nmajor, *nminor, nevent, nerror; +#endif + +#ifdef X_REGISTRY_RESOURCE static const char **resources; -static unsigned nmajor, *nminor, nevent, nerror, nresource; +static unsigned nresource; +#endif +#if defined(X_REGISTRY_RESOURCE) || defined(X_REGISTRY_REQUEST) /* * File parsing routines */ @@ -72,7 +78,12 @@ double_size(void *p, unsigned n, unsigned size) memset(*ptr + s, 0, f - s); return TRUE; } +#endif +#ifdef X_REGISTRY_REQUEST +/* + * Request/event/error registry functions + */ static void RegisterRequestName(unsigned major, unsigned minor, char *name) { @@ -197,28 +208,6 @@ RegisterExtensionNames(ExtensionEntry * extEntry) } } -/* - * Registration functions - */ - -void -RegisterResourceName(RESTYPE resource, const char *name) -{ - resource &= TypeMask; - - while (resource >= nresource) { - if (!double_size(&resources, nresource, sizeof(char *))) - return; - nresource = nresource ? nresource * 2 : BASE_SIZE; - } - - resources[resource] = name; -} - -/* - * Lookup functions - */ - const char * LookupRequestName(int major, int minor) { @@ -269,6 +258,26 @@ LookupErrorName(int error) return errors[error] ? errors[error] : XREGISTRY_UNKNOWN; } +#endif /* X_REGISTRY_REQUEST */ + +#ifdef X_REGISTRY_RESOURCE +/* + * Resource registry functions + */ + +void +RegisterResourceName(RESTYPE resource, const char *name) +{ + resource &= TypeMask; + + while (resource >= nresource) { + if (!double_size(&resources, nresource, sizeof(char *))) + return; + nresource = nresource ? nresource * 2 : BASE_SIZE; + } + + resources[resource] = name; +} const char * LookupResourceName(RESTYPE resource) @@ -279,10 +288,12 @@ LookupResourceName(RESTYPE resource) return resources[resource] ? resources[resource] : XREGISTRY_UNKNOWN; } +#endif /* X_REGISTRY_RESOURCE */ void dixFreeRegistry(void) { +#ifdef X_REGISTRY_REQUEST /* Free all memory */ while (nmajor--) { while (nminor[nmajor]) @@ -299,25 +310,30 @@ dixFreeRegistry(void) while (nerror--) free(errors[nerror]); free(errors); - - free(resources); - requests = NULL; nminor = NULL; events = NULL; errors = NULL; - resources = NULL; + nmajor = nevent = nerror = 0; +#endif + +#ifdef X_REGISTRY_RESOURCE + free(resources); - nmajor = nevent = nerror = nresource = 0; + resources = NULL; + nresource = 0; +#endif } void dixCloseRegistry(void) { +#ifdef X_REGISTRY_REQUEST if (fh) { fclose(fh); fh = NULL; } +#endif } /* @@ -326,16 +342,24 @@ dixCloseRegistry(void) void dixResetRegistry(void) { +#ifdef X_REGISTRY_REQUEST ExtensionEntry extEntry = { .name = CORE }; +#endif dixFreeRegistry(); +#ifdef X_REGISTRY_REQUEST /* Open the protocol file */ fh = fopen(FILENAME, "r"); if (!fh) LogMessage(X_WARNING, "Failed to open protocol names file " FILENAME "\n"); + /* Add the core protocol */ + RegisterExtensionNames(&extEntry); +#endif + +#ifdef X_REGISTRY_RESOURCE /* Add built-in resources */ RegisterResourceName(RT_NONE, "NONE"); RegisterResourceName(RT_WINDOW, "WINDOW"); @@ -347,9 +371,5 @@ dixResetRegistry(void) RegisterResourceName(RT_CMAPENTRY, "COLORMAP ENTRY"); RegisterResourceName(RT_OTHERCLIENT, "OTHER CLIENT"); RegisterResourceName(RT_PASSIVEGRAB, "PASSIVE GRAB"); - - /* Add the core protocol */ - RegisterExtensionNames(&extEntry); +#endif } - -#endif /* XREGISTRY */ diff --git a/dix/resource.c b/dix/resource.c index 623d862..c254244 100644 --- a/dix/resource.c +++ b/dix/resource.c @@ -524,8 +524,10 @@ CreateNewResourceType(DeleteType deleteFunc, const char *name) resourceTypes[next].findSubResFunc = DefaultFindSubRes; resourceTypes[next].errorValue = BadValue; +#if X_REGISTRY_RESOURCE /* Called even if name is NULL, to remove any previous entry */ RegisterResourceName(next, name); +#endif return next; } diff --git a/include/registry.h b/include/registry.h index 4e54bf6..43c3db3 100644 --- a/include/registry.h +++ b/include/registry.h @@ -17,18 +17,26 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ #define XREGISTRY_UNKNOWN "" -#ifdef XREGISTRY - #include "resource.h" #include "extnsionst.h" +#if defined(XSELINUX) || defined(RES) +#define X_REGISTRY_RESOURCE 1 +#endif + +#if defined(XSELINUX) || defined(XCSECURITY) +#define X_REGISTRY_REQUEST 1 +#endif + /* Internal string registry - for auditing, debugging, security, etc. */ -/* - * Registration functions. The name string is not copied, so it must - * not be a stack variable. - */ +#ifdef X_REGISTRY_RESOURCE +/* Functions used by the X-Resource extension */ extern _X_EXPORT void RegisterResourceName(RESTYPE type, const char *name); +extern _X_EXPORT const char *LookupResourceName(RESTYPE rtype); +#endif + +#ifdef X_REGISTRY_REQUEST extern _X_EXPORT void RegisterExtensionNames(ExtensionEntry * ext); /* @@ -38,7 +46,7 @@ extern _X_EXPORT const char *LookupMajorName(int major); extern _X_EXPORT const char *LookupRequestName(int major, int minor); extern _X_EXPORT const char *LookupEventName(int event); extern _X_EXPORT const char *LookupErrorName(int error); -extern _X_EXPORT const char *LookupResourceName(RESTYPE rtype); +#endif /* * Setup and teardown @@ -47,21 +55,4 @@ extern _X_EXPORT void dixResetRegistry(void); extern _X_EXPORT void dixFreeRegistry(void); extern _X_EXPORT void dixCloseRegistry(void); -#else /* XREGISTRY */ - -/* Define calls away when the registry is not being built. */ - -#define RegisterResourceName(a, b) { ; } -#define RegisterExtensionNames(a) { ; } - -#define LookupMajorName(a) XREGISTRY_UNKNOWN -#define LookupRequestName(a, b) XREGISTRY_UNKNOWN -#define LookupEventName(a) XREGISTRY_UNKNOWN -#define LookupErrorName(a) XREGISTRY_UNKNOWN -#define LookupResourceName(a) XREGISTRY_UNKNOWN - -#define dixResetRegistry() { ; } -#define dixFreeRegistry() { ; } - -#endif /* XREGISTRY */ #endif /* DIX_REGISTRY_H */ -- 2.1.0 From hdegoede at redhat.com Mon Sep 15 11:04:27 2014 From: hdegoede at redhat.com (Hans de Goede) Date: Mon, 15 Sep 2014 20:04:27 +0200 Subject: [PATCH] os: Don't listen to 'tcp' by default. Add '-listen' option. [v2] In-Reply-To: <1410795750-12393-1-git-send-email-keithp@keithp.com> References: <1410546941-31486-1-git-send-email-keithp@keithp.com> <1410795750-12393-1-git-send-email-keithp@keithp.com> Message-ID: <54172A2B.7060006@redhat.com> Hi, On 09/15/2014 05:42 PM, Keith Packard wrote: > This disables the tcp listen socket by default. Then, it > uses a new xtrans interface, TRANS(Listen), to provide a command line > option to re-enable those if desired. > > v2: Leave unix socket enabled by default. Add configure options. > > Signed-off-by: Keith Packard Looks good: Reviewed-by: Hans de Goede Regards, Hans > --- > configure.ac | 20 ++++++++++++++++++++ > include/dix-config.h.in | 9 +++++++++ > man/Xserver.man | 7 +++++++ > os/utils.c | 29 +++++++++++++++++++++++++++++ > 4 files changed, 65 insertions(+) > > diff --git a/configure.ac b/configure.ac > index cba7d24..a7bd8bd 100644 > --- a/configure.ac > +++ b/configure.ac > @@ -484,6 +484,16 @@ AC_ARG_WITH(os-vendor, AS_HELP_STRING([--with-os-vendor=OSVENDOR], [Name o > AC_ARG_WITH(builderstring, AS_HELP_STRING([--with-builderstring=BUILDERSTRING], [Additional builder string]), > [ BUILDERSTRING="$withval" ] > [ ]) > +AC_ARG_ENABLE(listen-tcp, AS_HELP_STRING([--enable-listen-tcp], > + [Listen on TCP by default (default:disabled)]), > + [LISTEN_TCP=$enableval], [LISTEN_TCP=no]) > +AC_ARG_ENABLE(listen-unix, AS_HELP_STRING([--disable-listen-unix], > + [Listen on Unix by default (default:enabled)]), > + [LISTEN_UNIX=$enableval], [LISTEN_UNIX=yes]) > + > +AC_ARG_ENABLE(listen-local, AS_HELP_STRING([--disable-listen-local], > + [Listen on local by default (default:enabled)]), > + [LISTEN_LOCAL=$enableval], [LISTEN_LOCAL=yes]) > > dnl Determine font path > XORG_FONTROOTDIR > @@ -1081,6 +1091,16 @@ if test "x$RES" = xyes; then > SDK_REQUIRED_MODULES="$SDK_REQUIRED_MODULES $RESOURCEPROTO" > fi > > +if test "x$LISTEN_TCP" = xyes; then > + AC_DEFINE(LISTEN_TCP, 1, [Listen on TCP socket]) > +fi > +if test "x$LISTEN_UNIX" = xyes; then > + AC_DEFINE(LISTEN_UNIX, 1, [Listen on Unix socket]) > +fi > +if test "x$LISTEN_LOCAL" = xyes; then > + AC_DEFINE(LISTEN_LOCAL, 1, [Listen on local socket]) > +fi > + > # The XRes extension may support client ID tracking only if it has > # been specifically enabled. Client ID tracking is implicitly not > # supported if XRes extension is disabled. > diff --git a/include/dix-config.h.in b/include/dix-config.h.in > index 2203f82..41b6a22 100644 > --- a/include/dix-config.h.in > +++ b/include/dix-config.h.in > @@ -496,4 +496,13 @@ > /* byte order */ > #undef X_BYTE_ORDER > > +/* Listen on TCP socket */ > +#undef LISTEN_TCP > + > +/* Listen on Unix socket */ > +#undef LISTEN_UNIX > + > +/* Listen on local socket */ > +#undef LISTEN_LOCAL > + > #endif /* _DIX_CONFIG_H_ */ > diff --git a/man/Xserver.man b/man/Xserver.man > index 7a74e85..c03830c 100644 > --- a/man/Xserver.man > +++ b/man/Xserver.man > @@ -196,6 +196,13 @@ with > This option may be issued multiple times to disable listening to different > transport types. > .TP 8 > +.B \-listen \fItrans-type\fP > +enables a transport type. For example, TCP/IP connections can be enabled > +with > +.BR "\-listen tcp" . > +This option may be issued multiple times to enable listening to different > +transport types. > +.TP 8 > .B \-noreset > prevents a server reset when the last client connection is closed. This > overrides a previous > diff --git a/os/utils.c b/os/utils.c > index c83f77d..82fc621 100644 > --- a/os/utils.c > +++ b/os/utils.c > @@ -557,6 +557,7 @@ UseMsg(void) > ErrorF("-nolock disable the locking mechanism\n"); > #endif > ErrorF("-nolisten string don't listen on protocol\n"); > + ErrorF("-listen string listen on protocol\n"); > ErrorF("-noreset don't reset after last client exists\n"); > ErrorF("-background [none] create root window with no background\n"); > ErrorF("-reset reset after last client exists\n"); > @@ -646,6 +647,19 @@ VerifyDisplayName(const char *d) > return 1; > } > > +static const char *defaultNoListenList[] = { > +#ifndef LISTEN_TCP > + "tcp", > +#endif > +#ifndef LISTEN_UNIX > + "unix", > +#endif > +#ifndef LISTEN_LOCAL > + "local", > +#endif > + NULL > +}; > + > /* > * This function parses the command line. Handles device-independent fields > * and allows ddx to handle additional fields. It is not allowed to modify > @@ -664,6 +678,12 @@ ProcessCommandLine(int argc, char *argv[]) > PartialNetwork = TRUE; > #endif > > + for (i = 0; defaultNoListenList[i] != NULL; i++) { > + if (_XSERVTransNoListen(defaultNoListenList[i])) > + ErrorF("Failed to disable listen for %s transport", > + defaultNoListenList[i]); > + } > + > for (i = 1; i < argc; i++) { > /* call ddx first, so it can peek/override if it wants */ > if ((skip = ddxProcessArgument(argc, argv, i))) { > @@ -849,6 +869,15 @@ ProcessCommandLine(int argc, char *argv[]) > else > UseMsg(); > } > + else if (strcmp(argv[i], "-listen") == 0) { > + if (++i < argc) { > + if (_XSERVTransListen(argv[i])) > + ErrorF("Failed to enable listen for %s transport", > + argv[i]); > + } > + else > + UseMsg(); > + } > else if (strcmp(argv[i], "-noreset") == 0) { > dispatchExceptionAtReset = 0; > } > From jnsptrsn1 at gmail.com Mon Sep 15 12:31:03 2014 From: jnsptrsn1 at gmail.com (Jonas Petersen) Date: Mon, 15 Sep 2014 21:31:03 +0200 Subject: [Xcb] [PATCH libX11] xcb_io: Fix Xlib 32-bit request number wrapping bug In-Reply-To: <86vby65cmq.fsf@miki.keithp.com> References: <1387148814-22819-1-git-send-email-jnsptrsn1@gmail.com> <86vby65cmq.fsf@miki.keithp.com> Message-ID: <54173E77.80609@gmail.com> Hi Keith, (2nd try) I went back in time and found your last post regarding this topic. You did make some suggestions that got lost, probably due to my discontinuing. Sorry about that. So let me pick it up again from there, in order to hopefully get the case going. I will post an updated patch including your suggestions. Please see my inline comments in this mail, particularly on your last point. I tested the patch against a fresh Ubuntu Desktop 14.04.1 i386 (libx11-1.6.2). I verified that your test (nop.c) will fail before and succeed after applying the patch. Am 30.12.2013 um 21:04 schrieb Keith Packard: > Jonas Petersen writes: > >> By design, on 32-bit systems, the Xlib internal 32-bit request sequence >> numbers may wrap. There is two locations within xcb_io.c that are not >> wrap-safe though. The value of last_flushed relies on request to be >> sequential all the time. This is not given in the moment when the sequence >> has just wrapped. Applications may then crash with a "Fatal IO error 11 >> (Resource temporarily unavailable)". >> >> This patch fixes this by "unwrapping" the sequence number when needed to >> retain the sequence relative to last_flushed. > Reviewed-by: Keith Packard > > There are some subtleties here which might be mentioned in comments: > >> + unwrapped_request = dpy->request; >> + /* If there was a sequence number wrap since our last flush, >> + * make sure the sequence number we use, stays in sequence >> + * with dpy->xcb->last_flush. */ >> + if (sizeof(uint64_t) > sizeof(unsigned long) && dpy->request < dpy->xcb->last_flushed) >> + unwrapped_request += UINT64_C(1) << 32; > The sizeof(uint64_t) > sizeof (unsigned long) test is an optimization; > dpy->request will *never* be less than last_flushed on a 64-bit system > (well, until we have to deal with 64-bit wrap). However, the check is > also useful to understand the append_pending_request call below. Yes, it's an optimization. It will have an effect at compile time and it will make it end up only in 32-bit binaries. Actually there was some discussion about that at some other branch of this topic. > >> uint64_t sequence; >> - for(sequence = dpy->xcb->last_flushed + 1; sequence <= dpy->request; ++sequence) >> + for(sequence = dpy->xcb->last_flushed + 1; sequence <= unwrapped_request; ++sequence) >> append_pending_request(dpy, sequence); > Here, we're passing a 64-bit sequence which may be 'unwrapped', in that > it can contain values above the maximum possible unsigned long sequence > number. However, that only happens (see check above) where unsigned long > is 32 bits. The 'sequence' formal in append_pending_request is an > unsigned long, and so any time the sequence passed might have a high > sequence value, it will get trimmed off by the type conversion. > > Do we want an '(unsigned long)' cast in the actual here? It would be > strictly for documentation. Probably best to just mention what's > happening in a comment instead Agreed, I will add a comment. >> } >> - requests = dpy->request - dpy->xcb->last_flushed; >> + requests = unwrapped_request - dpy->xcb->last_flushed; >> dpy->xcb->last_flushed = dpy->request; > I think last_flushed should be changed from uint64_t to unsigned long to > match all of the Xlib types. By examining the usages of last_flushed, I'd say it makes a lot of sense changing it to unsigned long. Added it to the patch. > That would require a cast in the loop > above: > > + for(sequence = (uint64_t) dpy->xcb->last_flushed + 1; sequence <= unwrapped_request; ++sequence) Added that as well. > I think there's also a problem in require_socket -- it compares a 64-bit > value from xcb with a 32-bit local value. I think we need to change that > to: > > uint64_t sent64; > unsigned long sent; > > sent = sent64 > > if ((long) (sent - dpy->last_request_read) < 0) > throw_thread_fail_assert("sequence wrapped") > > This would only allow for 31-bit differences. Here I'm not sure if I really get what you mean. So you would introduce another local variable instead of casting where appropriate? Please see my patch if I applied that right. By the way, the line following next... dpy->xcb->last_flushed = dpy->request = sent; ...now also is much more obvious. Because before it was a 64-32-64-bit assignment. Now it is 32-32-32. In my ealier patches I had added a comment to that line (which now would be obsolete): /* Note: The following line will truncate the 64bit 'sent' * to 32bit for 'dpy->request'. This truncated value will * then be assigned to the 64-bit 'dpy->xcb->last_flushed' * (which is intended). */ dpy->xcb->last_flushed = dpy->request = sent; Regards Jonas -------------- next part -------------- An HTML attachment was scrubbed... URL: From jnsptrsn1 at gmail.com Mon Sep 15 12:31:19 2014 From: jnsptrsn1 at gmail.com (Jonas Petersen) Date: Mon, 15 Sep 2014 21:31:19 +0200 Subject: [PATCH libX11] xcb_io: Fix Xlib 32-bit request number issues Message-ID: <1410809479-3979-1-git-send-email-jnsptrsn1@gmail.com> By design, on 32-bit systems, the Xlib internal 32-bit request sequence numbers may wrap. There is some locations within xcb_io.c that are not wrap-safe though. The value of last_flushed relies on request to be sequential all the time. This is not given in the moment when the sequence has just wrapped. Applications may then crash with a "Fatal IO error 11 (Resource temporarily unavailable)". This patch fixes this by "unwrapping" the sequence number when needed to retain the sequence relative to last_flushed. It also contains some additional optimizations. Signed-off-by: Jonas Petersen --- src/Xxcbint.h | 2 +- src/xcb_io.c | 27 +++++++++++++++++++++------ 2 files changed, 22 insertions(+), 7 deletions(-) diff --git a/src/Xxcbint.h b/src/Xxcbint.h index bf41c23..feee775 100644 --- a/src/Xxcbint.h +++ b/src/Xxcbint.h @@ -31,7 +31,7 @@ typedef struct _X11XCBPrivate { char *reply_data; int reply_length; int reply_consumed; - uint64_t last_flushed; + unsigned long last_flushed; enum XEventQueueOwner event_owner; XID next_xid; diff --git a/src/xcb_io.c b/src/xcb_io.c index 5987329..03af1f9 100644 --- a/src/xcb_io.c +++ b/src/xcb_io.c @@ -59,15 +59,19 @@ static void require_socket(Display *dpy) { if(dpy->bufmax == dpy->buffer) { - uint64_t sent; + uint64_t sent64; + unsigned long sent; int flags = 0; /* if we don't own the event queue, we have to ask XCB * to set our errors aside for us. */ if(dpy->xcb->event_owner != XlibOwnsEventQueue) flags = XCB_REQUEST_CHECKED; if(!xcb_take_socket(dpy->xcb->connection, return_socket, dpy, - flags, &sent)) + flags, &sent64)) _XIOError(dpy); + + sent = sent64; + /* Xlib uses unsigned long for sequence numbers. XCB * uses 64-bit internally, but currently exposes an * unsigned int API. If these differ, Xlib cannot track @@ -77,7 +81,7 @@ static void require_socket(Display *dpy) * 64-bit sequence numbers. */ if (sizeof(unsigned long) > sizeof(unsigned int) && dpy->xcb->event_owner == XlibOwnsEventQueue && - (sent - dpy->last_request_read >= (UINT64_C(1) << 32))) { + (long) (sent - dpy->last_request_read) < 0) { throw_thread_fail_assert("Sequence number wrapped " "beyond 32 bits while Xlib " "did not own the socket", @@ -455,7 +459,7 @@ void _XSend(Display *dpy, const char *data, long size) static const xReq dummy_request; static char const pad[3]; struct iovec vec[3]; - uint64_t requests; + uint64_t requests, unwrapped_request; _XExtension *ext; xcb_connection_t *c = dpy->xcb->connection; if(dpy->flags & XlibDisplayIOError) @@ -464,6 +468,13 @@ void _XSend(Display *dpy, const char *data, long size) if(dpy->bufptr == dpy->buffer && !size) return; + unwrapped_request = dpy->request; + /* If there was a sequence number wrap since our last flush, + * make sure the sequence number we use, stays in sequence + * with dpy->xcb->last_flush. */ + if (sizeof(uint64_t) > sizeof(unsigned long) && dpy->request < dpy->xcb->last_flushed) + unwrapped_request += UINT64_C(1) << 32; + /* iff we asked XCB to set aside errors, we must pick those up * eventually. iff there are async handlers, we may have just * issued requests that will generate replies. in either case, @@ -471,10 +482,14 @@ void _XSend(Display *dpy, const char *data, long size) if(dpy->xcb->event_owner != XlibOwnsEventQueue || dpy->async_handlers) { uint64_t sequence; - for(sequence = dpy->xcb->last_flushed + 1; sequence <= dpy->request; ++sequence) + for(sequence = (uint64_t) dpy->xcb->last_flushed + 1; sequence <= unwrapped_request; ++sequence) + /* On systems where unsigned long is 32 bits, the 64-bit sequence + * passed to append_pending_request might get trimmed off. + * This is logically correct and expected, as it's simply + * 're-wrapping' the 'unwrapped' sequence number. */ append_pending_request(dpy, sequence); } - requests = dpy->request - dpy->xcb->last_flushed; + requests = unwrapped_request - dpy->xcb->last_flushed; dpy->xcb->last_flushed = dpy->request; vec[0].iov_base = dpy->buffer; -- 1.9.1 From eric at anholt.net Mon Sep 15 12:59:55 2014 From: eric at anholt.net (Eric Anholt) Date: Mon, 15 Sep 2014 12:59:55 -0700 Subject: [PATCH 6/8 v2] modesetting: Connect the driver to the build. In-Reply-To: References: Message-ID: <1410811195-6578-1-git-send-email-eric@anholt.net> v2: Fix libdrm version check, and use XORG_VERSION_* instead of a static 1.0.0 version for the driver module. Signed-off-by: Eric Anholt --- Thanks for the review! I've added my s-o-bs (oops), and added your review to the rest of the patches. modesetting-import branch updated. configure.ac | 10 +++++++++ hw/xfree86/Makefile.am | 2 +- hw/xfree86/drivers/Makefile.am | 5 +++++ hw/xfree86/drivers/modesetting/Makefile.am | 27 ++++++++++++++++++++++-- hw/xfree86/drivers/modesetting/driver.c | 10 +++++---- hw/xfree86/drivers/modesetting/drmmode_display.c | 4 ++-- 6 files changed, 49 insertions(+), 9 deletions(-) create mode 100644 hw/xfree86/drivers/Makefile.am diff --git a/configure.ac b/configure.ac index cba7d24..ae3327d 100644 --- a/configure.ac +++ b/configure.ac @@ -863,6 +863,7 @@ fi PKG_CHECK_MODULES(UDEV, $LIBUDEV, [HAVE_LIBUDEV=yes], [HAVE_LIBUDEV=no]) if test "x$CONFIG_UDEV" = xauto; then CONFIG_UDEV="$HAVE_LIBUDEV" + AC_DEFINE(HAVE_LIBUDEV, 1, [Define to 1 if libudev is available.]) fi AM_CONDITIONAL(CONFIG_UDEV, [test "x$CONFIG_UDEV" = xyes]) if test "x$CONFIG_UDEV" = xyes; then @@ -2039,6 +2040,12 @@ if test "x$XORG" = xyes; then XORG_SYS_LIBS="$XORG_SYS_LIBS $XORG_MODULES_LIBS" fi + if test "x$DRM" = xyes; then + dnl 2.4.46 is required for cursor hotspot support. + PKG_CHECK_EXISTS(libdrm >= 2.4.46) + XORG_DRIVER_MODESETTING=yes + fi + AC_SUBST([XORG_LIBS]) AC_SUBST([XORG_SYS_LIBS]) AC_SUBST([XORG_INCS]) @@ -2109,6 +2116,7 @@ AM_CONDITIONAL([SOLARIS_VT], [test "x$solaris_vt" = xyes]) AM_CONDITIONAL([DGA], [test "x$DGA" = xyes]) AM_CONDITIONAL([XF86VIDMODE], [test "x$XF86VIDMODE" = xyes]) AM_CONDITIONAL([XORG_BUS_PLATFORM], [test "x$CONFIG_UDEV_KMS" = xyes]) +AM_CONDITIONAL([XORG_DRIVER_MODESETTING], [test "x$XORG_DRIVER_MODESETTING" = xyes]) dnl glamor AM_CONDITIONAL([GLAMOR], [test "x$GLAMOR" = xyes]) @@ -2554,6 +2562,8 @@ hw/xfree86/dixmods/Makefile hw/xfree86/doc/Makefile hw/xfree86/dri/Makefile hw/xfree86/dri2/Makefile +hw/xfree86/drivers/Makefile +hw/xfree86/drivers/modesetting/Makefile hw/xfree86/exa/Makefile hw/xfree86/exa/man/Makefile hw/xfree86/fbdevhw/Makefile diff --git a/hw/xfree86/Makefile.am b/hw/xfree86/Makefile.am index c5992c3..30f7c8f 100644 --- a/hw/xfree86/Makefile.am +++ b/hw/xfree86/Makefile.am @@ -38,7 +38,7 @@ SUBDIRS = common ddc x86emu $(INT10_SUBDIR) os-support parser \ ramdac $(VGAHW_SUBDIR) loader modes $(DRI_SUBDIR) \ $(DRI2_SUBDIR) . $(VBE_SUBDIR) i2c dixmods \ fbdevhw shadowfb exa $(XF86UTILS_SUBDIR) doc man \ - $(GLAMOR_EGL_SUBDIR) + $(GLAMOR_EGL_SUBDIR) drivers DIST_SUBDIRS = common ddc i2c x86emu int10 fbdevhw os-support \ parser ramdac shadowfb vbe vgahw \ diff --git a/hw/xfree86/drivers/Makefile.am b/hw/xfree86/drivers/Makefile.am new file mode 100644 index 0000000..04d787f --- /dev/null +++ b/hw/xfree86/drivers/Makefile.am @@ -0,0 +1,5 @@ +SUBDIRS = + +if XORG_DRIVER_MODESETTING +SUBDIRS += modesetting +endif diff --git a/hw/xfree86/drivers/modesetting/Makefile.am b/hw/xfree86/drivers/modesetting/Makefile.am index 3cc4624..f6c6041 100644 --- a/hw/xfree86/drivers/modesetting/Makefile.am +++ b/hw/xfree86/drivers/modesetting/Makefile.am @@ -24,11 +24,20 @@ # _ladir passes a dummy rpath to libtool so the thing will actually link # TODO: -nostdlib/-Bstatic/-lgcc platform magic, not installing the .a, etc. -AM_CFLAGS = $(XORG_CFLAGS) $(DRM_CFLAGS) $(UDEV_CFLAGS) $(CWARNFLAGS) +AM_CFLAGS = $(DIX_CFLAGS) $(XORG_CFLAGS) $(LIBDRM_CFLAGS) $(UDEV_CFLAGS) $(CWARNFLAGS) + +AM_CPPFLAGS = \ + $(XORG_INCS) \ + -I$(srcdir)/../../ddc \ + -I$(srcdir)/../../i2c \ + -I$(srcdir)/../../modes \ + -I$(srcdir)/../../parser \ + -I$(srcdir)/../../ramdac \ + $(NULL) modesetting_drv_la_LTLIBRARIES = modesetting_drv.la modesetting_drv_la_LDFLAGS = -module -avoid-version -modesetting_drv_la_LIBADD = @UDEV_LIBS@ @DRM_LIBS@ +modesetting_drv_la_LIBADD = $(UDEV_LIBS) $(DRM_LIBS) modesetting_drv_ladir = @moduledir@/drivers modesetting_drv_la_SOURCES = \ @@ -37,3 +46,17 @@ modesetting_drv_la_SOURCES = \ driver.h \ drmmode_display.c \ drmmode_display.h + +drivermandir = $(DRIVER_MAN_DIR) +driverman_PRE = modesetting.man +driverman_DATA = $(driverman_PRE:man=@DRIVER_MAN_SUFFIX@) + +EXTRA_DIST = modesetting.man + +CLEANFILES = $(driverman_DATA) + +# String replacements in MAN_SUBSTS now come from xorg-macros.m4 via configure +SUFFIXES = .$(DRIVER_MAN_SUFFIX) .man + +.man.$(DRIVER_MAN_SUFFIX): + $(AM_V_GEN)$(SED) $(MAN_SUBSTS) < $< > $@ diff --git a/hw/xfree86/drivers/modesetting/driver.c b/hw/xfree86/drivers/modesetting/driver.c index eaa3a0f..b30c32c 100644 --- a/hw/xfree86/drivers/modesetting/driver.c +++ b/hw/xfree86/drivers/modesetting/driver.c @@ -29,8 +29,8 @@ * */ -#ifdef HAVE_CONFIG_H -#include "config.h" +#ifdef HAVE_DIX_CONFIG_H +#include "dix-config.h" #endif #include @@ -51,7 +51,7 @@ #include "shadow.h" #include "xf86xv.h" #include -#include +#include #ifdef XSERVER_PLATFORM_BUS #include "xf86platformBus.h" #endif @@ -144,7 +144,9 @@ static XF86ModuleVersionInfo VersRec = { MODINFOSTRING1, MODINFOSTRING2, XORG_VERSION_CURRENT, - PACKAGE_VERSION_MAJOR, PACKAGE_VERSION_MINOR, PACKAGE_VERSION_PATCHLEVEL, + XORG_VERSION_MAJOR, + XORG_VERSION_MINOR, + XORG_VERSION_PATCH, ABI_CLASS_VIDEODRV, ABI_VIDEODRV_VERSION, MOD_CLASS_VIDEODRV, diff --git a/hw/xfree86/drivers/modesetting/drmmode_display.c b/hw/xfree86/drivers/modesetting/drmmode_display.c index 31c39a2..d55157b 100644 --- a/hw/xfree86/drivers/modesetting/drmmode_display.c +++ b/hw/xfree86/drivers/modesetting/drmmode_display.c @@ -25,8 +25,8 @@ * */ -#ifdef HAVE_CONFIG_H -#include "config.h" +#ifdef HAVE_DIX_CONFIG_H +#include "dix-config.h" #endif #include -- 2.1.0 From keithp at keithp.com Mon Sep 15 16:01:33 2014 From: keithp at keithp.com (Keith Packard) Date: Mon, 15 Sep 2014 16:01:33 -0700 Subject: [PATCH 6/8 v2] modesetting: Connect the driver to the build. In-Reply-To: <1410811195-6578-1-git-send-email-eric@anholt.net> References: <868ulpzlyk.fsf@hiro.keithp.com> <1410811195-6578-1-git-send-email-eric@anholt.net> Message-ID: <867g1432uq.fsf@hiro.keithp.com> Eric Anholt writes: > v2: Fix libdrm version check, and use XORG_VERSION_* instead of a > static 1.0.0 version for the driver module. > > Signed-off-by: Eric Anholt Reviewed-by: Keith Packard Looks like that was the last of the patches; do you want to send a pull request along? -- keith.packard at intel.com -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 810 bytes Desc: not available URL: From peter.hutterer at who-t.net Mon Sep 15 18:08:28 2014 From: peter.hutterer at who-t.net (Peter Hutterer) Date: Tue, 16 Sep 2014 11:08:28 +1000 Subject: [PATCH synaptics] Limit the movement to 20 mm per event Message-ID: <20140916010828.GA20356@jelly.redhat.com> Touchpads are limited by a fixed sampling rate (usually 80Hz). Some finger changes may happen too fast for this sampling rate, resulting in two distinct event sequences: * finger 1 up and finger 2 down in the same EV_SYN frame. Synaptics sees one finger down before and after and the changed coordinates * finger 1 up and finger 2 down _between_ two EV_SYN frames. Synaptics sees one touchpoint move from f1 position to f2 position. That move causes a large cursor jump. The former could be solved (with difficulty) by adding fake EV_SYN handling after releasing touchpoints but that won't fix the latter case. So as a solution for now limit the finger movement to 20mm per event. Tests on a T440 and an x220 showed that this is just above what a reasonable finger movement would trigger. If a movement is greater than that limit, reset it to 0/0. On devices without resolution, use 0.25 the touchpad's diagonal instead. Signed-off-by: Peter Hutterer --- See the git repo below for a simple script to verify valid movement deltas on your device if you feel like it: https://github.com/whot/input-data-analysis/tree/master/touchpad-max-delta Max I got was 9mm on the x220 and 17mm on the T440s but the latter was really ripping the cursor around the screen beyond what I'd deem useful. src/synaptics.c | 33 +++++++++++++++++++++++++++++++++ src/synapticsstr.h | 2 ++ 2 files changed, 35 insertions(+) diff --git a/src/synaptics.c b/src/synaptics.c index 2e3ad0c..756751d 100644 --- a/src/synaptics.c +++ b/src/synaptics.c @@ -780,6 +780,23 @@ set_default_parameters(InputInfoPtr pInfo) pars->resolution_vert = 1; } + /* Touchpad sampling rate is too low to detect all movements. + A user may lift one finger and put another one down within the same + EV_SYN or even between samplings so the driver doesn't notice at all. + + We limit the movement to 20 mm within one event, that is more than + recordings showed is needed (17mm on a T440). + */ + if (pars->resolution_horiz > 1 && + pars->resolution_vert > 1) + pars->maxDeltaMM = 20; + else { + /* on devices without resolution set the vector length to 0.25 of + the touchpad diagonal */ + pars->maxDeltaMM = diag * 0.25; + } + + /* Warn about (and fix) incorrectly configured TopEdge/BottomEdge parameters */ if (pars->top_edge > pars->bottom_edge) { int tmp = pars->top_edge; @@ -2229,6 +2246,13 @@ get_delta(SynapticsPrivate *priv, const struct SynapticsHwState *hw, *dy = integral; } +/* Vector length, but not sqrt'ed, we only need it for comparison */ +static inline double +vlenpow2(double x, double y) +{ + return x * x + y * y; +} + /** * Compute relative motion ('deltas') including edge motion. */ @@ -2238,6 +2262,7 @@ ComputeDeltas(SynapticsPrivate * priv, const struct SynapticsHwState *hw, { enum MovingState moving_state; double dx, dy; + double vlen; int delay = 1000000000; dx = dy = 0; @@ -2283,6 +2308,14 @@ ComputeDeltas(SynapticsPrivate * priv, const struct SynapticsHwState *hw, out: priv->prevFingers = hw->numFingers; + vlen = vlenpow2(dx/priv->synpara.resolution_horiz, + dy/priv->synpara.resolution_vert); + + if (vlen > priv->synpara.maxDeltaMM * priv->synpara.maxDeltaMM) { + dx = 0; + dy = 0; + } + *dxP = dx; *dyP = dy; diff --git a/src/synapticsstr.h b/src/synapticsstr.h index 4bd32ac..75f52d5 100644 --- a/src/synapticsstr.h +++ b/src/synapticsstr.h @@ -226,6 +226,8 @@ typedef struct _SynapticsParameters { int area_left_edge, area_right_edge, area_top_edge, area_bottom_edge; /* area coordinates absolute */ int softbutton_areas[4][4]; /* soft button area coordinates, 0 => right, 1 => middle , 2 => secondary right, 3 => secondary middle button */ int hyst_x, hyst_y; /* x and y width of hysteresis box */ + + int maxDeltaMM; /* maximum delta movement (vector length) in mm */ } SynapticsParameters; struct _SynapticsPrivateRec { -- 1.9.3 From patrakov at gmail.com Mon Sep 15 19:57:56 2014 From: patrakov at gmail.com (Alexander E. Patrakov) Date: Tue, 16 Sep 2014 08:57:56 +0600 Subject: [PATCH synaptics] Limit the movement to 20 mm per event In-Reply-To: <20140916010828.GA20356@jelly.redhat.com> References: <20140916010828.GA20356@jelly.redhat.com> Message-ID: <5417A734.1080809@gmail.com> 16.09.2014 07:08, Peter Hutterer wrote: > Touchpads are limited by a fixed sampling rate (usually 80Hz). Some finger > changes may happen too fast for this sampling rate, resulting in two distinct > event sequences: > * finger 1 up and finger 2 down in the same EV_SYN frame. Synaptics sees one > finger down before and after and the changed coordinates > * finger 1 up and finger 2 down _between_ two EV_SYN frames. Synaptics sees one > touchpoint move from f1 position to f2 position. > > That move causes a large cursor jump. The former could be solved (with > difficulty) by adding fake EV_SYN handling after releasing touchpoints but > that won't fix the latter case. Hello. Thanks for recognizing the problem and opting for a simple criterion for detecting such jumps. However, AFAICS, the patch just discards the motion without telling the FSM that it is in fact a new touch. So it may be bad for gestures. Attached is a patch that I use to work around this issue since July that does attempt to tell the FSM about a different finger. > So as a solution for now limit the finger movement to 20mm per event. > Tests on a T440 and an x220 showed that this is just above what a reasonable > finger movement would trigger. If a movement is greater than that limit, reset > it to 0/0. > > On devices without resolution, use 0.25 the touchpad's diagonal instead. I have no objection to the resolution-aware threshold. My patch doesn't have it, but you can obviously replace the heuristic there with your version. > > Signed-off-by: Peter Hutterer > --- > See the git repo below for a simple script to verify valid movement deltas > on your device if you feel like it: > https://github.com/whot/input-data-analysis/tree/master/touchpad-max-delta > Max I got was 9mm on the x220 and 17mm on the T440s but the latter was > really ripping the cursor around the screen beyond what I'd deem useful. > > src/synaptics.c | 33 +++++++++++++++++++++++++++++++++ > src/synapticsstr.h | 2 ++ > 2 files changed, 35 insertions(+) > > diff --git a/src/synaptics.c b/src/synaptics.c > index 2e3ad0c..756751d 100644 > --- a/src/synaptics.c > +++ b/src/synaptics.c > @@ -780,6 +780,23 @@ set_default_parameters(InputInfoPtr pInfo) > pars->resolution_vert = 1; > } > > + /* Touchpad sampling rate is too low to detect all movements. > + A user may lift one finger and put another one down within the same > + EV_SYN or even between samplings so the driver doesn't notice at all. > + > + We limit the movement to 20 mm within one event, that is more than > + recordings showed is needed (17mm on a T440). > + */ > + if (pars->resolution_horiz > 1 && > + pars->resolution_vert > 1) > + pars->maxDeltaMM = 20; > + else { > + /* on devices without resolution set the vector length to 0.25 of > + the touchpad diagonal */ > + pars->maxDeltaMM = diag * 0.25; > + } > + > + > /* Warn about (and fix) incorrectly configured TopEdge/BottomEdge parameters */ > if (pars->top_edge > pars->bottom_edge) { > int tmp = pars->top_edge; > @@ -2229,6 +2246,13 @@ get_delta(SynapticsPrivate *priv, const struct SynapticsHwState *hw, > *dy = integral; > } > > +/* Vector length, but not sqrt'ed, we only need it for comparison */ > +static inline double > +vlenpow2(double x, double y) > +{ > + return x * x + y * y; > +} > + > /** > * Compute relative motion ('deltas') including edge motion. > */ > @@ -2238,6 +2262,7 @@ ComputeDeltas(SynapticsPrivate * priv, const struct SynapticsHwState *hw, > { > enum MovingState moving_state; > double dx, dy; > + double vlen; > int delay = 1000000000; > > dx = dy = 0; > @@ -2283,6 +2308,14 @@ ComputeDeltas(SynapticsPrivate * priv, const struct SynapticsHwState *hw, > out: > priv->prevFingers = hw->numFingers; > > + vlen = vlenpow2(dx/priv->synpara.resolution_horiz, > + dy/priv->synpara.resolution_vert); > + > + if (vlen > priv->synpara.maxDeltaMM * priv->synpara.maxDeltaMM) { > + dx = 0; > + dy = 0; > + } > + > *dxP = dx; > *dyP = dy; > > diff --git a/src/synapticsstr.h b/src/synapticsstr.h > index 4bd32ac..75f52d5 100644 > --- a/src/synapticsstr.h > +++ b/src/synapticsstr.h > @@ -226,6 +226,8 @@ typedef struct _SynapticsParameters { > int area_left_edge, area_right_edge, area_top_edge, area_bottom_edge; /* area coordinates absolute */ > int softbutton_areas[4][4]; /* soft button area coordinates, 0 => right, 1 => middle , 2 => secondary right, 3 => secondary middle button */ > int hyst_x, hyst_y; /* x and y width of hysteresis box */ > + > + int maxDeltaMM; /* maximum delta movement (vector length) in mm */ > } SynapticsParameters; > > struct _SynapticsPrivateRec { > -------------- next part -------------- A non-text attachment was scrubbed... Name: 0001-Detect-and-discard-huge-coordinate-jumps-on-touchpad.patch Type: text/x-patch Size: 3418 bytes Desc: not available URL: From patrakov at gmail.com Mon Sep 15 20:17:12 2014 From: patrakov at gmail.com (Alexander E. Patrakov) Date: Tue, 16 Sep 2014 09:17:12 +0600 Subject: [PATCH synaptics] Limit the movement to 20 mm per event In-Reply-To: <5417A734.1080809@gmail.com> References: <20140916010828.GA20356@jelly.redhat.com> <5417A734.1080809@gmail.com> Message-ID: <5417ABB8.9000201@gmail.com> Oops, sorry. I really must sleep more. I replied with a libinput patch to a synaptics patch. As I no longer use synaptics and don't want to figure out whether the code there allows to say "this is a new finger", I just slap an ACK on the original patch. 16.09.2014 08:57, Alexander E. Patrakov wrote: > 16.09.2014 07:08, Peter Hutterer wrote: >> Touchpads are limited by a fixed sampling rate (usually 80Hz). Some >> finger >> changes may happen too fast for this sampling rate, resulting in two >> distinct >> event sequences: >> * finger 1 up and finger 2 down in the same EV_SYN frame. Synaptics >> sees one >> finger down before and after and the changed coordinates >> * finger 1 up and finger 2 down _between_ two EV_SYN frames. Synaptics >> sees one >> touchpoint move from f1 position to f2 position. >> >> That move causes a large cursor jump. The former could be solved (with >> difficulty) by adding fake EV_SYN handling after releasing touchpoints >> but >> that won't fix the latter case. > > Hello. > > Thanks for recognizing the problem and opting for a simple criterion for > detecting such jumps. > > However, AFAICS, the patch just discards the motion without telling the > FSM that it is in fact a new touch. So it may be bad for gestures. > > Attached is a patch that I use to work around this issue since July that > does attempt to tell the FSM about a different finger. > >> So as a solution for now limit the finger movement to 20mm per event. >> Tests on a T440 and an x220 showed that this is just above what a >> reasonable >> finger movement would trigger. If a movement is greater than that >> limit, reset >> it to 0/0. >> >> On devices without resolution, use 0.25 the touchpad's diagonal instead. > > I have no objection to the resolution-aware threshold. My patch doesn't > have it, but you can obviously replace the heuristic there with your > version. > >> >> Signed-off-by: Peter Hutterer >> --- >> See the git repo below for a simple script to verify valid movement >> deltas >> on your device if you feel like it: >> https://github.com/whot/input-data-analysis/tree/master/touchpad-max-delta >> >> Max I got was 9mm on the x220 and 17mm on the T440s but the latter was >> really ripping the cursor around the screen beyond what I'd deem useful. >> >> src/synaptics.c | 33 +++++++++++++++++++++++++++++++++ >> src/synapticsstr.h | 2 ++ >> 2 files changed, 35 insertions(+) >> >> diff --git a/src/synaptics.c b/src/synaptics.c >> index 2e3ad0c..756751d 100644 >> --- a/src/synaptics.c >> +++ b/src/synaptics.c >> @@ -780,6 +780,23 @@ set_default_parameters(InputInfoPtr pInfo) >> pars->resolution_vert = 1; >> } >> >> + /* Touchpad sampling rate is too low to detect all movements. >> + A user may lift one finger and put another one down within the >> same >> + EV_SYN or even between samplings so the driver doesn't notice >> at all. >> + >> + We limit the movement to 20 mm within one event, that is more >> than >> + recordings showed is needed (17mm on a T440). >> + */ >> + if (pars->resolution_horiz > 1 && >> + pars->resolution_vert > 1) >> + pars->maxDeltaMM = 20; >> + else { >> + /* on devices without resolution set the vector length to >> 0.25 of >> + the touchpad diagonal */ >> + pars->maxDeltaMM = diag * 0.25; >> + } >> + >> + >> /* Warn about (and fix) incorrectly configured >> TopEdge/BottomEdge parameters */ >> if (pars->top_edge > pars->bottom_edge) { >> int tmp = pars->top_edge; >> @@ -2229,6 +2246,13 @@ get_delta(SynapticsPrivate *priv, const struct >> SynapticsHwState *hw, >> *dy = integral; >> } >> >> +/* Vector length, but not sqrt'ed, we only need it for comparison */ >> +static inline double >> +vlenpow2(double x, double y) >> +{ >> + return x * x + y * y; >> +} >> + >> /** >> * Compute relative motion ('deltas') including edge motion. >> */ >> @@ -2238,6 +2262,7 @@ ComputeDeltas(SynapticsPrivate * priv, const >> struct SynapticsHwState *hw, >> { >> enum MovingState moving_state; >> double dx, dy; >> + double vlen; >> int delay = 1000000000; >> >> dx = dy = 0; >> @@ -2283,6 +2308,14 @@ ComputeDeltas(SynapticsPrivate * priv, const >> struct SynapticsHwState *hw, >> out: >> priv->prevFingers = hw->numFingers; >> >> + vlen = vlenpow2(dx/priv->synpara.resolution_horiz, >> + dy/priv->synpara.resolution_vert); >> + >> + if (vlen > priv->synpara.maxDeltaMM * priv->synpara.maxDeltaMM) { >> + dx = 0; >> + dy = 0; >> + } >> + >> *dxP = dx; >> *dyP = dy; >> >> diff --git a/src/synapticsstr.h b/src/synapticsstr.h >> index 4bd32ac..75f52d5 100644 >> --- a/src/synapticsstr.h >> +++ b/src/synapticsstr.h >> @@ -226,6 +226,8 @@ typedef struct _SynapticsParameters { >> int area_left_edge, area_right_edge, area_top_edge, >> area_bottom_edge; /* area coordinates absolute */ >> int softbutton_areas[4][4]; /* soft button area coordinates, 0 >> => right, 1 => middle , 2 => secondary right, 3 => secondary middle >> button */ >> int hyst_x, hyst_y; /* x and y width of hysteresis box */ >> + >> + int maxDeltaMM; /* maximum delta movement (vector >> length) in mm */ >> } SynapticsParameters; >> >> struct _SynapticsPrivateRec { >> From peter.hutterer at who-t.net Mon Sep 15 20:24:35 2014 From: peter.hutterer at who-t.net (Peter Hutterer) Date: Tue, 16 Sep 2014 13:24:35 +1000 Subject: [PATCH synaptics] Limit the movement to 20 mm per event In-Reply-To: <5417ABB8.9000201@gmail.com> References: <20140916010828.GA20356@jelly.redhat.com> <5417A734.1080809@gmail.com> <5417ABB8.9000201@gmail.com> Message-ID: <20140916032435.GA25489@jelly.redhat.com> On Tue, Sep 16, 2014 at 09:17:12AM +0600, Alexander E. Patrakov wrote: > Oops, sorry. I really must sleep more. I replied with a libinput patch to a > synaptics patch. > > As I no longer use synaptics and don't want to figure out whether the code > there allows to say "this is a new finger", I just slap an ACK on the > original patch. Thanks. I tried a couple of attempts at doing that, but they all ended in madness. The only reasonable way to handle this in synaptics is to have a buffer for all events within the frame and be able to look ahead of the current event. That, or a bigger rewrite which I'm not really keen on. Cheers, Peter From peter.hutterer at who-t.net Mon Sep 15 20:29:26 2014 From: peter.hutterer at who-t.net (Peter Hutterer) Date: Tue, 16 Sep 2014 13:29:26 +1000 Subject: [PATCH synaptics] Limit the movement to 20 mm per event In-Reply-To: <5417A734.1080809@gmail.com> References: <20140916010828.GA20356@jelly.redhat.com> <5417A734.1080809@gmail.com> Message-ID: <20140916032926.GB25489@jelly.redhat.com> On Tue, Sep 16, 2014 at 08:57:56AM +0600, Alexander E. Patrakov wrote: > 16.09.2014 07:08, Peter Hutterer wrote: > >Touchpads are limited by a fixed sampling rate (usually 80Hz). Some finger > >changes may happen too fast for this sampling rate, resulting in two distinct > >event sequences: > >* finger 1 up and finger 2 down in the same EV_SYN frame. Synaptics sees one > > finger down before and after and the changed coordinates > >* finger 1 up and finger 2 down _between_ two EV_SYN frames. Synaptics sees one > > touchpoint move from f1 position to f2 position. > > > >That move causes a large cursor jump. The former could be solved (with > >difficulty) by adding fake EV_SYN handling after releasing touchpoints but > >that won't fix the latter case. > > Hello. > > Thanks for recognizing the problem and opting for a simple criterion for > detecting such jumps. yeah, sorry about the delay. I needed poking from multiple sides (and freeing up of some time) to finally get to this issue. > However, AFAICS, the patch just discards the motion without telling the FSM > that it is in fact a new touch. So it may be bad for gestures. > > Attached is a patch that I use to work around this issue since July that > does attempt to tell the FSM about a different finger. Thanks, I haven't yet started on the libinput patch yet anyway, so I'll take yours as a baseline. > >So as a solution for now limit the finger movement to 20mm per event. > >Tests on a T440 and an x220 showed that this is just above what a reasonable > >finger movement would trigger. If a movement is greater than that limit, reset > >it to 0/0. > > > >On devices without resolution, use 0.25 the touchpad's diagonal instead. > > I have no objection to the resolution-aware threshold. My patch doesn't have > it, but you can obviously replace the heuristic there with your version. IMO the resolution-aware threshold is needed. e.g. the x220 has different vert/horiz resolutions, if you just go by propotion you get different thresholds depending on the position of the two fingers. That can be quite confusing, though it's hard to guess how often that would be triggered. Cheers, Peter > > > > >Signed-off-by: Peter Hutterer > >--- > >See the git repo below for a simple script to verify valid movement deltas > >on your device if you feel like it: > >https://github.com/whot/input-data-analysis/tree/master/touchpad-max-delta > >Max I got was 9mm on the x220 and 17mm on the T440s but the latter was > >really ripping the cursor around the screen beyond what I'd deem useful. > > > > src/synaptics.c | 33 +++++++++++++++++++++++++++++++++ > > src/synapticsstr.h | 2 ++ > > 2 files changed, 35 insertions(+) > > > >diff --git a/src/synaptics.c b/src/synaptics.c > >index 2e3ad0c..756751d 100644 > >--- a/src/synaptics.c > >+++ b/src/synaptics.c > >@@ -780,6 +780,23 @@ set_default_parameters(InputInfoPtr pInfo) > > pars->resolution_vert = 1; > > } > > > >+ /* Touchpad sampling rate is too low to detect all movements. > >+ A user may lift one finger and put another one down within the same > >+ EV_SYN or even between samplings so the driver doesn't notice at all. > >+ > >+ We limit the movement to 20 mm within one event, that is more than > >+ recordings showed is needed (17mm on a T440). > >+ */ > >+ if (pars->resolution_horiz > 1 && > >+ pars->resolution_vert > 1) > >+ pars->maxDeltaMM = 20; > >+ else { > >+ /* on devices without resolution set the vector length to 0.25 of > >+ the touchpad diagonal */ > >+ pars->maxDeltaMM = diag * 0.25; > >+ } > >+ > >+ > > /* Warn about (and fix) incorrectly configured TopEdge/BottomEdge parameters */ > > if (pars->top_edge > pars->bottom_edge) { > > int tmp = pars->top_edge; > >@@ -2229,6 +2246,13 @@ get_delta(SynapticsPrivate *priv, const struct SynapticsHwState *hw, > > *dy = integral; > > } > > > >+/* Vector length, but not sqrt'ed, we only need it for comparison */ > >+static inline double > >+vlenpow2(double x, double y) > >+{ > >+ return x * x + y * y; > >+} > >+ > > /** > > * Compute relative motion ('deltas') including edge motion. > > */ > >@@ -2238,6 +2262,7 @@ ComputeDeltas(SynapticsPrivate * priv, const struct SynapticsHwState *hw, > > { > > enum MovingState moving_state; > > double dx, dy; > >+ double vlen; > > int delay = 1000000000; > > > > dx = dy = 0; > >@@ -2283,6 +2308,14 @@ ComputeDeltas(SynapticsPrivate * priv, const struct SynapticsHwState *hw, > > out: > > priv->prevFingers = hw->numFingers; > > > >+ vlen = vlenpow2(dx/priv->synpara.resolution_horiz, > >+ dy/priv->synpara.resolution_vert); > >+ > >+ if (vlen > priv->synpara.maxDeltaMM * priv->synpara.maxDeltaMM) { > >+ dx = 0; > >+ dy = 0; > >+ } > >+ > > *dxP = dx; > > *dyP = dy; > > > >diff --git a/src/synapticsstr.h b/src/synapticsstr.h > >index 4bd32ac..75f52d5 100644 > >--- a/src/synapticsstr.h > >+++ b/src/synapticsstr.h > >@@ -226,6 +226,8 @@ typedef struct _SynapticsParameters { > > int area_left_edge, area_right_edge, area_top_edge, area_bottom_edge; /* area coordinates absolute */ > > int softbutton_areas[4][4]; /* soft button area coordinates, 0 => right, 1 => middle , 2 => secondary right, 3 => secondary middle button */ > > int hyst_x, hyst_y; /* x and y width of hysteresis box */ > >+ > >+ int maxDeltaMM; /* maximum delta movement (vector length) in mm */ > > } SynapticsParameters; > > > > struct _SynapticsPrivateRec { > > > From 0ffca2abdd53a278e93fc2ef38e223d1a200f2d0 Mon Sep 17 00:00:00 2001 > From: "Alexander E. Patrakov" > Date: Fri, 28 Mar 2014 23:57:56 +0600 > Subject: [PATCH] Detect and discard huge coordinate jumps on touchpads. > > Such jumps are usually consequences of the touchpad firmware > failing to notice that a different finger is in fact touching the > touchpad. If not discarded, such events lead to sudden pointer > jumps into screen corners. > > BugLink: https://bugs.freedesktop.org/show_bug.cgi?id=76722 > Signed-off-by: Alexander E. Patrakov > --- > src/evdev-mt-touchpad.c | 47 +++++++++++++++++++++++++++++++++++++++++++++++ > src/evdev-mt-touchpad.h | 3 +++ > 2 files changed, 50 insertions(+) > > diff --git a/src/evdev-mt-touchpad.c b/src/evdev-mt-touchpad.c > index d831b83..1ef40b8 100644 > --- a/src/evdev-mt-touchpad.c > +++ b/src/evdev-mt-touchpad.c > @@ -31,6 +31,7 @@ > > #define DEFAULT_ACCEL_NUMERATOR 1200.0 > #define DEFAULT_HYSTERESIS_MARGIN_DENOMINATOR 700.0 > +#define DEFAULT_JUMP_DETECTION_DENOMINATOR 8.0 > > static inline int > tp_hysteresis(int in, int center, int margin) > @@ -160,6 +161,47 @@ tp_end_touch(struct tp_dispatch *tp, struct tp_touch *t, uint64_t time) > tp->queued |= TOUCHPAD_EVENT_MOTION; > } > > +static inline void > +tp_disrupt_touch(struct tp_dispatch *tp, struct tp_touch *t, uint64_t time) > +{ > + if (t->state == TOUCH_NONE) > + return; > + > + tp_end_touch(tp, t, time); > + t->state = TOUCH_DISRUPT; > +} > + > +static inline void > +tp_undisrupt_touch(struct tp_dispatch *tp, struct tp_touch *t, uint64_t time) > +{ > + if (t->state != TOUCH_DISRUPT) > + return; > + > + tp_begin_touch(tp, t, time); > +} > + > +static inline void > +tp_detect_jumps(struct tp_dispatch *tp, struct tp_touch *t, uint64_t time) > +{ > + /* Motivation: https://bugs.freedesktop.org/show_bug.cgi?id=76722 */ > + > + struct tp_motion *oldpos; > + int dx, dy; > + > + if (t->history.count == 0) > + return; > + > + /* This is called before tp_motion_history_push(), > + so the latest historical datum is at offset 0. > + */ > + oldpos = tp_motion_history_offset(t, 0); > + dx = abs(t->x - oldpos->x); > + dy = abs(t->y - oldpos->y); > + > + if (dx > tp->jump_threshold || dy > tp->jump_threshold) > + tp_disrupt_touch(tp, t, time); > +} > + > static double > tp_estimate_delta(int x0, int x1, int x2, int x3) > { > @@ -423,6 +465,7 @@ tp_process_state(struct tp_dispatch *tp, uint64_t time) > > tp_palm_detect(tp, t, time); > > + tp_detect_jumps(tp, t, time); > tp_motion_hysteresis(tp, t); > tp_motion_history_push(t); > > @@ -451,6 +494,8 @@ tp_post_process_state(struct tp_dispatch *tp, uint64_t time) > if (!t->dirty) > continue; > > + tp_undisrupt_touch(tp, t, time); > + > if (t->state == TOUCH_END) > t->state = TOUCH_NONE; > else if (t->state == TOUCH_BEGIN) > @@ -809,6 +854,8 @@ tp_init(struct tp_dispatch *tp, > tp->hysteresis.margin_y = > diagonal / DEFAULT_HYSTERESIS_MARGIN_DENOMINATOR; > > + tp->jump_threshold = diagonal / DEFAULT_JUMP_DETECTION_DENOMINATOR; > + > if (tp_init_scroll(tp) != 0) > return -1; > > diff --git a/src/evdev-mt-touchpad.h b/src/evdev-mt-touchpad.h > index 83edf4f..0ee5fda 100644 > --- a/src/evdev-mt-touchpad.h > +++ b/src/evdev-mt-touchpad.h > @@ -46,6 +46,7 @@ enum touch_state { > TOUCH_NONE = 0, > TOUCH_BEGIN, > TOUCH_UPDATE, > + TOUCH_DISRUPT, > TOUCH_END > }; > > @@ -167,6 +168,8 @@ struct tp_dispatch { > int32_t margin_y; > } hysteresis; > > + int32_t jump_threshold; > + > struct motion_filter *filter; > > struct { > -- > 2.0.4 > From hdegoede at redhat.com Tue Sep 16 00:20:10 2014 From: hdegoede at redhat.com (Hans de Goede) Date: Tue, 16 Sep 2014 09:20:10 +0200 Subject: [PATCH synaptics] Limit the movement to 20 mm per event In-Reply-To: <20140916010828.GA20356@jelly.redhat.com> References: <20140916010828.GA20356@jelly.redhat.com> Message-ID: <5417E4AA.30401@redhat.com> Hi, On 09/16/2014 03:08 AM, Peter Hutterer wrote: > Touchpads are limited by a fixed sampling rate (usually 80Hz). Some finger > changes may happen too fast for this sampling rate, resulting in two distinct > event sequences: > * finger 1 up and finger 2 down in the same EV_SYN frame. Synaptics sees one > finger down before and after and the changed coordinates > * finger 1 up and finger 2 down _between_ two EV_SYN frames. Synaptics sees one > touchpoint move from f1 position to f2 position. > > That move causes a large cursor jump. The former could be solved (with > difficulty) by adding fake EV_SYN handling after releasing touchpoints but > that won't fix the latter case. > > So as a solution for now limit the finger movement to 20mm per event. > Tests on a T440 and an x220 showed that this is just above what a reasonable > finger movement would trigger. If a movement is greater than that limit, reset > it to 0/0. > > On devices without resolution, use 0.25 the touchpad's diagonal instead. > > Signed-off-by: Peter Hutterer Looks good to me: Reviewed-by: Hans de Goede Regards, Hans > --- > See the git repo below for a simple script to verify valid movement deltas > on your device if you feel like it: > https://github.com/whot/input-data-analysis/tree/master/touchpad-max-delta > Max I got was 9mm on the x220 and 17mm on the T440s but the latter was > really ripping the cursor around the screen beyond what I'd deem useful. > > src/synaptics.c | 33 +++++++++++++++++++++++++++++++++ > src/synapticsstr.h | 2 ++ > 2 files changed, 35 insertions(+) > > diff --git a/src/synaptics.c b/src/synaptics.c > index 2e3ad0c..756751d 100644 > --- a/src/synaptics.c > +++ b/src/synaptics.c > @@ -780,6 +780,23 @@ set_default_parameters(InputInfoPtr pInfo) > pars->resolution_vert = 1; > } > > + /* Touchpad sampling rate is too low to detect all movements. > + A user may lift one finger and put another one down within the same > + EV_SYN or even between samplings so the driver doesn't notice at all. > + > + We limit the movement to 20 mm within one event, that is more than > + recordings showed is needed (17mm on a T440). > + */ > + if (pars->resolution_horiz > 1 && > + pars->resolution_vert > 1) > + pars->maxDeltaMM = 20; > + else { > + /* on devices without resolution set the vector length to 0.25 of > + the touchpad diagonal */ > + pars->maxDeltaMM = diag * 0.25; > + } > + > + > /* Warn about (and fix) incorrectly configured TopEdge/BottomEdge parameters */ > if (pars->top_edge > pars->bottom_edge) { > int tmp = pars->top_edge; > @@ -2229,6 +2246,13 @@ get_delta(SynapticsPrivate *priv, const struct SynapticsHwState *hw, > *dy = integral; > } > > +/* Vector length, but not sqrt'ed, we only need it for comparison */ > +static inline double > +vlenpow2(double x, double y) > +{ > + return x * x + y * y; > +} > + > /** > * Compute relative motion ('deltas') including edge motion. > */ > @@ -2238,6 +2262,7 @@ ComputeDeltas(SynapticsPrivate * priv, const struct SynapticsHwState *hw, > { > enum MovingState moving_state; > double dx, dy; > + double vlen; > int delay = 1000000000; > > dx = dy = 0; > @@ -2283,6 +2308,14 @@ ComputeDeltas(SynapticsPrivate * priv, const struct SynapticsHwState *hw, > out: > priv->prevFingers = hw->numFingers; > > + vlen = vlenpow2(dx/priv->synpara.resolution_horiz, > + dy/priv->synpara.resolution_vert); > + > + if (vlen > priv->synpara.maxDeltaMM * priv->synpara.maxDeltaMM) { > + dx = 0; > + dy = 0; > + } > + > *dxP = dx; > *dyP = dy; > > diff --git a/src/synapticsstr.h b/src/synapticsstr.h > index 4bd32ac..75f52d5 100644 > --- a/src/synapticsstr.h > +++ b/src/synapticsstr.h > @@ -226,6 +226,8 @@ typedef struct _SynapticsParameters { > int area_left_edge, area_right_edge, area_top_edge, area_bottom_edge; /* area coordinates absolute */ > int softbutton_areas[4][4]; /* soft button area coordinates, 0 => right, 1 => middle , 2 => secondary right, 3 => secondary middle button */ > int hyst_x, hyst_y; /* x and y width of hysteresis box */ > + > + int maxDeltaMM; /* maximum delta movement (vector length) in mm */ > } SynapticsParameters; > > struct _SynapticsPrivateRec { > From daniel at quora.org Tue Sep 16 05:27:52 2014 From: daniel at quora.org (Daniel J Blueman) Date: Tue, 16 Sep 2014 20:27:52 +0800 Subject: Xephyr/alternatives and touchscreen Message-ID: Has anyone had any success with Xephyr and touch input devices? >From what I see with strace -e open, when starting Xephyr, it doesn't load any X config files, so we only have the -mouse and -keybd arguments to specify input devices, right? If not, are there any alternatives for using touchscreen with multiseat on one GPU? Thanks! Daniel -- Daniel J Blueman -------------- next part -------------- An HTML attachment was scrubbed... URL: From jon.turney at dronecode.org.uk Tue Sep 16 07:33:18 2014 From: jon.turney at dronecode.org.uk (Jon TURNEY) Date: Tue, 16 Sep 2014 15:33:18 +0100 Subject: [PATCH] glx: Disable indirect GLX contexts by default. In-Reply-To: <1409853580-12555-1-git-send-email-eric@anholt.net> References: <1409853580-12555-1-git-send-email-eric@anholt.net> Message-ID: <54184A2E.2030602@dronecode.org.uk> On 04/09/2014 18:59, Eric Anholt wrote: > Almost every situation of someone running indirect GLX is a mistake > that results in X Server crashes. Indirect GLX is the cause of > regular security vulnerabilities, and rarely provides any capability > to the user. Just disable it unless someone wants to enable it for > their special use case (using +iglx on the command line). > > --- > > I kept saying I as going to send out this patch, and since I just > crashed my server a few times from trying to run Xephyr -glamor with a > broken driver, it's probably time. > > os/utils.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/os/utils.c b/os/utils.c > index f319743..c83f77d 100644 > --- a/os/utils.c > +++ b/os/utils.c > @@ -194,7 +194,7 @@ Bool noGEExtension = FALSE; > > Bool CoreDump; > > -Bool enableIndirectGLX = TRUE; > +Bool enableIndirectGLX = FALSE; > > #ifdef PANORAMIX > Bool PanoramiXExtensionDisabledHack = FALSE; > I think the text in os/utils.c which says +iglx is the default needs to be removed or updated as well. Patch attached. -------------- next part -------------- From 29806e9ad431377b0ada4b453668ca3c16a4f817 Mon Sep 17 00:00:00 2001 From: Jon TURNEY Date: Tue, 16 Sep 2014 15:15:11 +0100 Subject: [PATCH] Update help text since -iglx is now the default Update help text to align with d0da0e9c3bb8fe0cd4879ecb24d21715bfaa209b Signed-off-by: Jon TURNEY --- os/utils.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/os/utils.c b/os/utils.c index c83f77d..2d02f92 100644 --- a/os/utils.c +++ b/os/utils.c @@ -541,8 +541,8 @@ UseMsg(void) ErrorF("-fn string default font name\n"); ErrorF("-fp string default font path\n"); ErrorF("-help prints message with these options\n"); - ErrorF("+iglx Allow creating indirect GLX contexts (default)\n"); - ErrorF("-iglx Prohibit creating indirect GLX contexts\n"); + ErrorF("+iglx Allow creating indirect GLX contexts\n"); + ErrorF("-iglx Prohibit creating indirect GLX contexts (default)\n"); ErrorF("-I ignore all remaining arguments\n"); #ifdef RLIMIT_DATA ErrorF("-ld int limit data space to N Kb\n"); -- 2.1.0 From ajax at redhat.com Tue Sep 16 07:47:56 2014 From: ajax at redhat.com (Adam Jackson) Date: Tue, 16 Sep 2014 10:47:56 -0400 Subject: [PATCH] ephyr: Properly implement hardware cursors (v2) In-Reply-To: <86y4tpy72j.fsf@hiro.keithp.com> References: <1409156259-9213-1-git-send-email-ajax@redhat.com> <86y4tpy72j.fsf@hiro.keithp.com> Message-ID: <1410878876.9541.12.camel@dmt> On Thu, 2014-09-11 at 18:13 -0700, Keith Packard wrote: > Adam Jackson writes: > > + cursor_pxm = xcb_generate_id(HostX.conn); > > + xcb_create_pixmap(HostX.conn, 1, cursor_pxm, HostX.winroot, 1, 1); > > + HostX.empty_cursor = xcb_generate_id(HostX.conn); > > + xcb_create_cursor(HostX.conn, > > + HostX.empty_cursor, > > + cursor_pxm, cursor_pxm, > > + 0,0,0, > > + 0,0,0, > > + 1,1); > > + xcb_free_pixmap(HostX.conn, cursor_pxm); > > Sadly, pixmap contents are not defined on creation. So, you'll have to > actually clear this thing. Create a GC, set foreground to zero and fill > rectangle (or draw a point; it's all the same :-) I refuse to take the blame for code I merely outdented, but I suppose I do still need to fix it. v3 in a moment. - ajax From ajax at redhat.com Tue Sep 16 08:10:58 2014 From: ajax at redhat.com (Adam Jackson) Date: Tue, 16 Sep 2014 11:10:58 -0400 Subject: [PATCH] ephyr: Properly implement hardware cursors (v3) Message-ID: <1410880258-4419-1-git-send-email-ajax@redhat.com> When dix hands us a new cursor we proxy it through to the host server; since we keep the host XID on the cursor bits private we can switch among them with just ChangeWindowAttributes. v2: Use xcb-renderutil for argb format lookup (Uli, Keith) Fall back to core cursors for host RENDER < 0.5 (Keith) Drop useless ephyrEnableCursor Consistently create/destroy the cursor image GC on both paths Treat null cursor from dix as invisible v3: Initialize the invisible cursor's image (Keith) Signed-off-by: Adam Jackson --- configure.ac | 2 +- hw/kdrive/ephyr/Makefile.am | 1 + hw/kdrive/ephyr/ephyr.h | 2 - hw/kdrive/ephyr/ephyrcursor.c | 262 ++++++++++++++++++++++++++++++++++++++++++ hw/kdrive/ephyr/ephyrinit.c | 67 +---------- hw/kdrive/ephyr/hostx.c | 39 +++++-- hw/kdrive/ephyr/hostx.h | 4 + 7 files changed, 296 insertions(+), 81 deletions(-) create mode 100644 hw/kdrive/ephyr/ephyrcursor.c diff --git a/configure.ac b/configure.ac index cba7d24..3201c8a 100644 --- a/configure.ac +++ b/configure.ac @@ -2364,7 +2364,7 @@ if test "$KDRIVE" = yes; then AC_DEFINE(KDRIVE_MOUSE, 1, [Enable KDrive mouse driver]) fi - XEPHYR_REQUIRED_LIBS="xau xdmcp xcb xcb-shape xcb-aux xcb-image xcb-icccm xcb-shm xcb-keysyms xcb-randr" + XEPHYR_REQUIRED_LIBS="xau xdmcp xcb xcb-shape xcb-render xcb-renderutil xcb-aux xcb-image xcb-icccm xcb-shm xcb-keysyms xcb-randr" if test "x$XV" = xyes; then XEPHYR_REQUIRED_LIBS="$XEPHYR_REQUIRED_LIBS xcb-xv" fi diff --git a/hw/kdrive/ephyr/Makefile.am b/hw/kdrive/ephyr/Makefile.am index 10c5917..155e11e 100644 --- a/hw/kdrive/ephyr/Makefile.am +++ b/hw/kdrive/ephyr/Makefile.am @@ -68,6 +68,7 @@ Xephyr_SOURCES = \ ephyr_draw.c \ os.c \ ephyrinit.c \ + ephyrcursor.c \ hostx.c \ hostx.h \ $(XV_SRCS) \ diff --git a/hw/kdrive/ephyr/ephyr.h b/hw/kdrive/ephyr/ephyr.h index 4e753f1..f3a3c8e 100644 --- a/hw/kdrive/ephyr/ephyr.h +++ b/hw/kdrive/ephyr/ephyr.h @@ -197,8 +197,6 @@ extern KdOsFuncs EphyrOsFuncs; extern Bool ephyrCursorInit(ScreenPtr pScreen); -extern void ephyrCursorEnable(ScreenPtr pScreen); - extern int ephyrBufferHeight(KdScreenInfo * screen); /* ephyr_draw.c */ diff --git a/hw/kdrive/ephyr/ephyrcursor.c b/hw/kdrive/ephyr/ephyrcursor.c new file mode 100644 index 0000000..852be33 --- /dev/null +++ b/hw/kdrive/ephyr/ephyrcursor.c @@ -0,0 +1,262 @@ +/* + * Copyright ? 2014 Red Hat, Inc. + * + * 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 (including the next + * paragraph) 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. + * + * Author: + * Adam Jackson + */ + +#ifdef HAVE_CONFIG_H +#include +#endif +#include "ephyr.h" +#include "ephyrlog.h" +#include "hostx.h" +#include "cursorstr.h" +#include +#include + +static DevPrivateKeyRec ephyrCursorPrivateKey; + +typedef struct _ephyrCursor { + xcb_cursor_t cursor; +} ephyrCursorRec, *ephyrCursorPtr; + +static ephyrCursorPtr +ephyrGetCursor(CursorPtr cursor) +{ + return dixGetPrivateAddr(&cursor->devPrivates, &ephyrCursorPrivateKey); +} + +static void +ephyrRealizeCoreCursor(EphyrScrPriv *scr, CursorPtr cursor) +{ + ephyrCursorPtr hw = ephyrGetCursor(cursor); + xcb_connection_t *conn = hostx_get_xcbconn(); + xcb_pixmap_t source, mask; + xcb_image_t *image; + xcb_gcontext_t gc; + int w = cursor->bits->width, h = cursor->bits->height; + uint32_t gcmask = XCB_GC_FUNCTION | + XCB_GC_PLANE_MASK | + XCB_GC_FOREGROUND | + XCB_GC_BACKGROUND | + XCB_GC_CLIP_MASK; + uint32_t val[] = { + XCB_GX_COPY, /* function */ + ~0, /* planemask */ + 1L, /* foreground */ + 0L, /* background */ + None, /* clipmask */ + }; + + source = xcb_generate_id(conn); + mask = xcb_generate_id(conn); + xcb_create_pixmap(conn, 1, source, scr->win, w, h); + xcb_create_pixmap(conn, 1, mask, scr->win, w, h); + + gc = xcb_generate_id(conn); + xcb_create_gc(conn, gc, source, gcmask, val); + + image = xcb_image_create_native(conn, w, h, XCB_IMAGE_FORMAT_XY_BITMAP, + 1, NULL, ~0, NULL); + image->data = cursor->bits->source; + xcb_image_put(conn, source, gc, image, 0, 0, 0); + xcb_image_destroy(image); + + image = xcb_image_create_native(conn, w, h, XCB_IMAGE_FORMAT_XY_BITMAP, + 1, NULL, ~0, NULL); + image->data = cursor->bits->mask; + xcb_image_put(conn, mask, gc, image, 0, 0, 0); + xcb_image_destroy(image); + + xcb_free_gc(conn, gc); + + hw->cursor = xcb_generate_id(conn); + xcb_create_cursor(conn, hw->cursor, source, mask, + cursor->foreRed, cursor->foreGreen, cursor->foreBlue, + cursor->backRed, cursor->backGreen, cursor->backBlue, + cursor->bits->xhot, cursor->bits->yhot); + + xcb_free_pixmap(conn, source); + xcb_free_pixmap(conn, mask); +} + +#ifdef ARGB_CURSOR +static xcb_render_pictformat_t +get_argb_format(void) +{ + static xcb_render_pictformat_t format; + if (format == None) { + xcb_connection_t *conn = hostx_get_xcbconn(); + xcb_render_query_pict_formats_cookie_t cookie; + xcb_render_query_pict_formats_reply_t *formats; + + cookie = xcb_render_query_pict_formats(conn); + formats = + xcb_render_query_pict_formats_reply(conn, cookie, NULL); + + format = + xcb_render_util_find_standard_format(formats, + XCB_PICT_STANDARD_ARGB_32)->id; + + free(formats); + } + + return format; +} + +static void +ephyrRealizeARGBCursor(EphyrScrPriv *scr, CursorPtr cursor) +{ + ephyrCursorPtr hw = ephyrGetCursor(cursor); + xcb_connection_t *conn = hostx_get_xcbconn(); + xcb_gcontext_t gc; + xcb_pixmap_t source; + xcb_render_picture_t picture; + xcb_image_t *image; + int w = cursor->bits->width, h = cursor->bits->height; + + /* dix' storage is PICT_a8r8g8b8 */ + source = xcb_generate_id(conn); + xcb_create_pixmap(conn, 32, source, scr->win, w, h); + + gc = xcb_generate_id(conn); + xcb_create_gc(conn, gc, source, 0, NULL); + image = xcb_image_create_native(conn, w, h, XCB_IMAGE_FORMAT_Z_PIXMAP, + 32, NULL, ~0, NULL); + image->data = (void *)cursor->bits->argb; + xcb_image_put(conn, source, gc, image, 0, 0, 0); + xcb_free_gc(conn, gc); + xcb_image_destroy(image); + + picture = xcb_generate_id(conn); + xcb_render_create_picture(conn, picture, source, get_argb_format(), + 0, NULL); + xcb_free_pixmap(conn, source); + + hw->cursor = xcb_generate_id(conn); + xcb_render_create_cursor(conn, hw->cursor, picture, + cursor->bits->xhot, cursor->bits->yhot); + + xcb_render_free_picture(conn, picture); +} + +static Bool +can_argb_cursor(void) +{ + static const xcb_render_query_version_reply_t *v; + + if (!v) + v = xcb_render_util_query_version(hostx_get_xcbconn()); + + return v->major_version == 0 && v->minor_version >= 5; +} +#endif + +static Bool +ephyrRealizeCursor(DeviceIntPtr dev, ScreenPtr screen, CursorPtr cursor) +{ + KdScreenPriv(screen); + KdScreenInfo *kscr = pScreenPriv->screen; + EphyrScrPriv *scr = kscr->driver; + +#ifdef ARGB_CURSOR + if (cursor->bits->argb && can_argb_cursor()) + ephyrRealizeARGBCursor(scr, cursor); + else +#endif + { + ephyrRealizeCoreCursor(scr, cursor); + } + return TRUE; +} + +static Bool +ephyrUnrealizeCursor(DeviceIntPtr dev, ScreenPtr screen, CursorPtr cursor) +{ + ephyrCursorPtr hw = ephyrGetCursor(cursor); + + if (hw->cursor) { + xcb_free_cursor(hostx_get_xcbconn(), hw->cursor); + hw->cursor = None; + } + + return TRUE; +} + +static void +ephyrSetCursor(DeviceIntPtr dev, ScreenPtr screen, CursorPtr cursor, int x, + int y) +{ + KdScreenPriv(screen); + KdScreenInfo *kscr = pScreenPriv->screen; + EphyrScrPriv *scr = kscr->driver; + uint32_t attr = None; + + if (cursor) + attr = ephyrGetCursor(cursor)->cursor; + else + attr = hostx_get_empty_cursor(); + + xcb_change_window_attributes(hostx_get_xcbconn(), scr->win, + XCB_CW_CURSOR, &attr); + xcb_flush(hostx_get_xcbconn()); +} + +static void +ephyrMoveCursor(DeviceIntPtr dev, ScreenPtr screen, int x, int y) +{ +} + +static Bool +ephyrDeviceCursorInitialize(DeviceIntPtr dev, ScreenPtr screen) +{ + return TRUE; +} + +static void +ephyrDeviceCursorCleanup(DeviceIntPtr dev, ScreenPtr screen) +{ +} + +miPointerSpriteFuncRec EphyrPointerSpriteFuncs = { + ephyrRealizeCursor, + ephyrUnrealizeCursor, + ephyrSetCursor, + ephyrMoveCursor, + ephyrDeviceCursorInitialize, + ephyrDeviceCursorCleanup +}; + +Bool +ephyrCursorInit(ScreenPtr screen) +{ + if (!dixRegisterPrivateKey(&ephyrCursorPrivateKey, PRIVATE_CURSOR_BITS, + sizeof(ephyrCursorRec))) + return FALSE; + + miPointerInitialize(screen, + &EphyrPointerSpriteFuncs, + &ephyrPointerScreenFuncs, FALSE); + + return TRUE; +} diff --git a/hw/kdrive/ephyr/ephyrinit.c b/hw/kdrive/ephyr/ephyrinit.c index 38acc52..3693531 100644 --- a/hw/kdrive/ephyr/ephyrinit.c +++ b/hw/kdrive/ephyr/ephyrinit.c @@ -369,77 +369,12 @@ OsVendorInit(void) { EPHYR_DBG("mark"); - if (hostx_want_host_cursor()) { + if (hostx_want_host_cursor()) ephyrFuncs.initCursor = &ephyrCursorInit; - ephyrFuncs.enableCursor = &ephyrCursorEnable; - } KdOsInit(&EphyrOsFuncs); } -/* 'Fake' cursor stuff, could be improved */ - -static Bool -ephyrRealizeCursor(DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCursor) -{ - return TRUE; -} - -static Bool -ephyrUnrealizeCursor(DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCursor) -{ - return TRUE; -} - -static void -ephyrSetCursor(DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCursor, int x, - int y) -{ - ; -} - -static void -ephyrMoveCursor(DeviceIntPtr pDev, ScreenPtr pScreen, int x, int y) -{ - ; -} - -static Bool -ephyrDeviceCursorInitialize(DeviceIntPtr pDev, ScreenPtr pScreen) -{ - return TRUE; -} - -static void -ephyrDeviceCursorCleanup(DeviceIntPtr pDev, ScreenPtr pScreen) -{ -} - -miPointerSpriteFuncRec EphyrPointerSpriteFuncs = { - ephyrRealizeCursor, - ephyrUnrealizeCursor, - ephyrSetCursor, - ephyrMoveCursor, - ephyrDeviceCursorInitialize, - ephyrDeviceCursorCleanup -}; - -Bool -ephyrCursorInit(ScreenPtr pScreen) -{ - miPointerInitialize(pScreen, - &EphyrPointerSpriteFuncs, - &ephyrPointerScreenFuncs, FALSE); - - return TRUE; -} - -void -ephyrCursorEnable(ScreenPtr pScreen) -{ - ; -} - KdCardFuncs ephyrFuncs = { ephyrCardInit, /* cardinit */ ephyrScreenInitialize, /* scrinit */ diff --git a/hw/kdrive/ephyr/hostx.c b/hw/kdrive/ephyr/hostx.c index 2161ad5..0562625 100644 --- a/hw/kdrive/ephyr/hostx.c +++ b/hw/kdrive/ephyr/hostx.c @@ -71,6 +71,8 @@ struct EphyrHostXVars { xcb_visualtype_t *visual; Window winroot; xcb_gcontext_t gc; + xcb_render_pictformat_t argb_format; + xcb_cursor_t empty_cursor; int depth; Bool use_sw_cursor; Bool use_fullscreen; @@ -202,6 +204,12 @@ hostx_use_sw_cursor(void) HostX.use_sw_cursor = TRUE; } +xcb_cursor_t +hostx_get_empty_cursor(void) +{ + return HostX.empty_cursor; +} + int hostx_want_preexisting_window(KdScreenInfo *screen) { @@ -408,8 +416,8 @@ hostx_init(void) { uint32_t attrs[2]; uint32_t attr_mask = 0; - xcb_cursor_t empty_cursor; xcb_pixmap_t cursor_pxm; + xcb_gcontext_t cursor_gc; uint16_t red, green, blue; uint32_t pixel; int index; @@ -418,6 +426,7 @@ hostx_init(void) size_t class_len; const xcb_query_extension_reply_t *shm_rep; xcb_screen_t *xscreen; + xcb_rectangle_t rect = { 0, 0, 1, 1 }; attrs[0] = XCB_EVENT_MASK_BUTTON_PRESS @@ -594,18 +603,25 @@ hostx_init(void) xcb_change_gc(HostX.conn, HostX.gc, XCB_GC_FOREGROUND, &pixel); + cursor_pxm = xcb_generate_id(HostX.conn); + xcb_create_pixmap(HostX.conn, 1, cursor_pxm, HostX.winroot, 1, 1); + cursor_gc = xcb_generate_id(HostX.conn); + pixel = 0; + xcb_create_gc(HostX.conn, cursor_gc, cursor_pxm, + XCB_GC_FOREGROUND, &pixel); + xcb_poly_fill_rectangle(HostX.conn, cursor_pxm, cursor_gc, 1, &rect); + xcb_free_gc(HostX.conn, cursor_gc); + HostX.empty_cursor = xcb_generate_id(HostX.conn); + xcb_create_cursor(HostX.conn, + HostX.empty_cursor, + cursor_pxm, cursor_pxm, + 0,0,0, + 0,0,0, + 1,1); + xcb_free_pixmap(HostX.conn, cursor_pxm); if (!hostx_want_host_cursor ()) { CursorVisible = TRUE; /* Ditch the cursor, we provide our 'own' */ - cursor_pxm = xcb_generate_id(HostX.conn); - xcb_create_pixmap(HostX.conn, 1, cursor_pxm, HostX.winroot, 1, 1); - empty_cursor = xcb_generate_id(HostX.conn); - xcb_create_cursor(HostX.conn, - empty_cursor, - cursor_pxm, cursor_pxm, - 0,0,0, - 0,0,0, - 1,1); for (index = 0; index < HostX.n_screens; index++) { KdScreenInfo *screen = HostX.screens[index]; EphyrScrPriv *scrpriv = screen->driver; @@ -613,9 +629,8 @@ hostx_init(void) xcb_change_window_attributes(HostX.conn, scrpriv->win, XCB_CW_CURSOR, - &empty_cursor); + &HostX.empty_cursor); } - xcb_free_pixmap(HostX.conn, cursor_pxm); } /* Try to get share memory ximages for a little bit more speed */ diff --git a/hw/kdrive/ephyr/hostx.h b/hw/kdrive/ephyr/hostx.h index 80894c8..229961e 100644 --- a/hw/kdrive/ephyr/hostx.h +++ b/hw/kdrive/ephyr/hostx.h @@ -29,6 +29,7 @@ #include #include #include +#include #include "ephyr.h" #define EPHYR_WANT_DEBUG 0 @@ -82,6 +83,9 @@ int void hostx_use_sw_cursor(void); +xcb_cursor_t + hostx_get_empty_cursor(void); + void hostx_get_output_geometry(const char *output, int *x, int *y, -- 1.9.3 From ajax at nwnk.net Tue Sep 16 08:14:33 2014 From: ajax at nwnk.net (Adam Jackson) Date: Tue, 16 Sep 2014 11:14:33 -0400 Subject: [PATCH] present: Support PresentOptionCopy In-Reply-To: <1410382933-27433-1-git-send-email-keithp@keithp.com> References: <1410382933-27433-1-git-send-email-keithp@keithp.com> Message-ID: <1410880473.9541.13.camel@dmt> On Wed, 2014-09-10 at 14:02 -0700, Keith Packard wrote: > We added this option to the present protocol before 1.0 but somehow > never implemented it in the server. It's pretty simple; just don't > ever do flips if the application specifies Copy. Reviewed-by: Adam Jackson - ajax From ajax at nwnk.net Tue Sep 16 08:15:29 2014 From: ajax at nwnk.net (Adam Jackson) Date: Tue, 16 Sep 2014 11:15:29 -0400 Subject: [PATCH] present: Clear pending flip pixmaps at CloseScreen In-Reply-To: <1410382919-27385-1-git-send-email-keithp@keithp.com> References: <1410382919-27385-1-git-send-email-keithp@keithp.com> Message-ID: <1410880529.9541.14.camel@dmt> On Wed, 2014-09-10 at 14:01 -0700, Keith Packard wrote: > If a flip is active at server reset time, the associated window will > get destroyed which will queue an unflip operation. If that isn't > synchronous, then it won't have finished by the time CloseScreen is > called. > > Calling present_flip_idle will signal the fence and remove the > reference to the fence and pixmap, freeing these in the X server and > allowing a DRM client to clean up as well. > > This also rewords other comments in present_flip_destroy, removing > scary words about needing synchronous operation (everything in this > function is synchronous now) and describing what effect we actually > need from present_set_abort_flip. > > Signed-off-by: Keith Packard Reviewed-by: Adam Jackson - ajax From ajax at nwnk.net Tue Sep 16 08:23:44 2014 From: ajax at nwnk.net (Adam Jackson) Date: Tue, 16 Sep 2014 11:23:44 -0400 Subject: [PATCH 5/5] glamor: Check large pixmap users in glamor_largepixmap.c In-Reply-To: <1408478413-7902-6-git-send-email-keithp@keithp.com> References: <1408478413-7902-1-git-send-email-keithp@keithp.com> <1408478413-7902-6-git-send-email-keithp@keithp.com> Message-ID: <1410881024.9541.15.camel@dmt> On Tue, 2014-08-19 at 13:00 -0700, Keith Packard wrote: > This enables the assertion that all users of the large pixmap member > are restricted to pixmaps which are actually large. > > Signed-off-by: Keith Packard Series is: Reviewed-by: Adam Jackson - ajax From ajax at nwnk.net Tue Sep 16 07:41:54 2014 From: ajax at nwnk.net (Adam Jackson) Date: Tue, 16 Sep 2014 10:41:54 -0400 Subject: Can't hook into the Double Buffer extension. In-Reply-To: References: Message-ID: <1410878514.9541.9.camel@dmt> On Fri, 2014-09-12 at 14:59 -0400, Stirling Westrup wrote: > I am writing a video driver for which I'd like to support the Double > Buffer Extension. However I need to hook some of the calling functions > described xorg/dbestruct.h, especially 'AllocateBackBuffer' and > 'SwapBuffers'. You found an app that uses it? Impressive. > However, the only way to access them is via the private key for dbe, > and its not exported. Am I missing something, or is it really > impossible to hook those functions? At the moment, yeah. Not so much out of malice as neglect, the extension is not widely used and none of the open (or closed!) drivers attempts to support it specially. I wouldn't object to a patch, although I'd at least like to see it done with accessor functions that return the window/screen private pointer rather than by exporting the private keys. Ideally we'd do what the GLX spec says and unify the view of "the back buffer" across extensions, which I guess could include DRI3 at this point. - ajax From ajax at nwnk.net Tue Sep 16 07:29:40 2014 From: ajax at nwnk.net (Adam Jackson) Date: Tue, 16 Sep 2014 10:29:40 -0400 Subject: [PATCH] Build required portions of registry.c automatically [v2] In-Reply-To: <1410797893-6124-1-git-send-email-keithp@keithp.com> References: <1410390002-12042-4-git-send-email-keithp@keithp.com> <1410797893-6124-1-git-send-email-keithp@keithp.com> Message-ID: <1410877780.9541.0.camel@dmt> On Mon, 2014-09-15 at 09:18 -0700, Keith Packard wrote: > Instead of making the inclusion of the registry code a global > conditional, split the registry into two pieces; the bits required by > the X-Resource extension (the resource names) and the bits required by > the XCSECURITY extension (the protocol names). Build each set of code > if the related extension is being built. > > v2: Check for both XCSECURITY and XSELINUX. 1, 2, and v2 of 3 are: Reviewed-by: Adam Jackson - ajax From ajax at nwnk.net Tue Sep 16 08:57:18 2014 From: ajax at nwnk.net (Adam Jackson) Date: Tue, 16 Sep 2014 11:57:18 -0400 Subject: [PATCH 0/6] glamor: synchronize Xv display to vblank In-Reply-To: <1407388867-1719-1-git-send-email-keithp@keithp.com> References: <1407388867-1719-1-git-send-email-keithp@keithp.com> Message-ID: <1410883038.9541.23.camel@dmt> On Wed, 2014-08-06 at 22:21 -0700, Keith Packard wrote: > This series creates a new API within the Present code that provides > vblank-synchronized callbacks using the Present driver > interfaces and then uses that new interface to delay Xv put image > until vblank occurrs. > > This synchronization is only done when painting directly to the > screen, so a composited environment won't see additional delay, but > when the window goes full-screen and the compositing manager > un-redirects it, you'll continue to get synchronized video output. > > There are a couple of DebugPresent cleanups: > > [PATCH 1/6] present: Move DebugPresent macro to present_priv.h > [PATCH 2/6] present: Fix int types for DebugPresent arguments Reviewed-by: Adam Jackson > And two patches to expose the Present API to drivers: > > [PATCH 3/6] present: Provide stub for present_event_abandon > [PATCH 4/6] present: Create an internal server API to perform Likewise. Though it'd be nice if the init/fini model in 4 was made more obvious (as per Mark Marshall's comments), see below... > One patch that implements the new Present vblank API: > > [PATCH 5/6] xfree86: Expose present API to drivers via sdksyms R-b. > And one little patch that uses the new API in glamor's Xv code: > > [PATCH 6/6] glamor: Use Present to delay Xv painting to vblank Not sure I'm okay with this? I think you're calling present_vblank_window_queue as if present_vblank_screen_init had been done, but it doesn't need to have been (the patch doesn't show it added anywhere, I assume you hid that in the DDX driver). If we take this functionality, is there a good reason for a driver to refuse it? If so then you need to insulate against present_queue never being initialized; if not, why not just run vblank setup from present_screen_init (and tear it down from present_close_screen, addressing Mark's comment). - ajax From gabriele.mzt at gmail.com Tue Sep 16 08:20:15 2014 From: gabriele.mzt at gmail.com (Gabriele Mazzotta) Date: Tue, 16 Sep 2014 17:20:15 +0200 Subject: [PATCH synaptics] Use ABS_MT events for the palm detection when supported Message-ID: <1410880815-3187-1-git-send-email-gabriele.mzt@gmail.com> Use ABS_MT_TOUCH_MAJOR and ABS_MT_PRESSURE instead of ABS_TOOL_WIDTH and ABS_PRESSURE when supported so that the pressure and the width of all the fingers is taken into account for the palm detection. This also fixes the palm detection for those touchpads for which the kernel only sends ABS_MT_TOUCH_MAJOR and not ABS_TOOL_WIDTH. Signed-off-by: Gabriele Mazzotta --- I didn't modify the existing code of the palm detection to handle multiple fingers. Relying on just the pressure and the width thresholds to detect palms proved to be enough, so I opted for a a quick solution that doesn't require major code changes. src/eventcomm.c | 12 ++++++++++++ src/synaptics.c | 3 +++ 2 files changed, 15 insertions(+) diff --git a/src/eventcomm.c b/src/eventcomm.c index 37f16b2..5b18c44 100644 --- a/src/eventcomm.c +++ b/src/eventcomm.c @@ -606,6 +606,14 @@ EventProcessTouchEvent(InputInfoPtr pInfo, struct SynapticsHwState *hw, hw->slot_state[slot_index] = SLOTSTATE_CLOSE; proto_data->num_touches--; } + + /* When there are no fingers on the touchpad, set width and + * pressure to zero as ABS_MT_TOUCH_MAJOR and ABS_MT_PRESSURE + * are not zero when fingers are released. */ + if (proto_data->num_touches == 0) { + hw->fingerWidth = 0; + hw->z = 0; + } } else { ValuatorMask *mask = proto_data->last_mt_vals[slot_index]; @@ -618,6 +626,10 @@ EventProcessTouchEvent(InputInfoPtr pInfo, struct SynapticsHwState *hw, hw->cumulative_dx += ev->value - last_val; else if (ev->code == ABS_MT_POSITION_Y) hw->cumulative_dy += ev->value - last_val; + else if (ev->code == ABS_MT_TOUCH_MAJOR) + hw->fingerWidth = ev->value; + else if (ev->code == ABS_MT_PRESSURE) + hw->z = ev->value; } valuator_mask_set(mask, map, ev->value); diff --git a/src/synaptics.c b/src/synaptics.c index 1b1ac64..2746565 100644 --- a/src/synaptics.c +++ b/src/synaptics.c @@ -1857,6 +1857,9 @@ SynapticsDetectFinger(SynapticsPrivate * priv, struct SynapticsHwState *hw) if ((hw->z > para->palm_min_z) && (hw->fingerWidth > para->palm_min_width)) return FS_BLOCKED; + if (priv->has_touch) + return finger; + if (hw->x == 0 || priv->finger_state == FS_UNTOUCHED) priv->avg_width = 0; else -- 2.1.0 From keithp at keithp.com Tue Sep 16 12:44:10 2014 From: keithp at keithp.com (Keith Packard) Date: Tue, 16 Sep 2014 12:44:10 -0700 Subject: [PATCH 4/6] present: Create an internal server API to perform operations at vblank time In-Reply-To: References: <1407388867-1719-1-git-send-email-keithp@keithp.com> <1407388867-1719-5-git-send-email-keithp@keithp.com> Message-ID: <86egvb1hbp.fsf@hiro.keithp.com> Mark Marshall writes: > Hi. > > present_vblank_screen_close doesn't seem to get called from anywhere? > Is there some magic that I am missing? I added this to the patch series at some point, but failed to mark the commit with a [v2] indication. Thanks for catching this! -- keith.packard at intel.com -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 810 bytes Desc: not available URL: From keithp at keithp.com Tue Sep 16 12:45:05 2014 From: keithp at keithp.com (Keith Packard) Date: Tue, 16 Sep 2014 12:45:05 -0700 Subject: [PATCH 0/6] glamor: synchronize Xv display to vblank In-Reply-To: <1410883038.9541.23.camel@dmt> References: <1407388867-1719-1-git-send-email-keithp@keithp.com> <1410883038.9541.23.camel@dmt> Message-ID: <86d2av1ha6.fsf@hiro.keithp.com> Adam Jackson writes: > Likewise. Though it'd be nice if the init/fini model in 4 was made more > obvious (as per Mark Marshall's comments), see below... I think it's fine at this point; present_screen_init calls present_vblank_screen_init, and present_close_screen calls present_vblank_screen_close. -- keith.packard at intel.com -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 810 bytes Desc: not available URL: From peter.hutterer at who-t.net Tue Sep 16 22:38:22 2014 From: peter.hutterer at who-t.net (Peter Hutterer) Date: Wed, 17 Sep 2014 15:38:22 +1000 Subject: [PATCH synaptics] Use ABS_MT events for the palm detection when supported In-Reply-To: <1410880815-3187-1-git-send-email-gabriele.mzt@gmail.com> References: <1410880815-3187-1-git-send-email-gabriele.mzt@gmail.com> Message-ID: <20140917053822.GA29654@jelly.redhat.com> On Tue, Sep 16, 2014 at 05:20:15PM +0200, Gabriele Mazzotta wrote: > Use ABS_MT_TOUCH_MAJOR and ABS_MT_PRESSURE instead of ABS_TOOL_WIDTH > and ABS_PRESSURE when supported so that the pressure and the width of > all the fingers is taken into account for the palm detection. > > This also fixes the palm detection for those touchpads for which the > kernel only sends ABS_MT_TOUCH_MAJOR and not ABS_TOOL_WIDTH. > > Signed-off-by: Gabriele Mazzotta > --- > I didn't modify the existing code of the palm detection to handle > multiple fingers. Relying on just the pressure and the width > thresholds to detect palms proved to be enough, so I opted for a > a quick solution that doesn't require major code changes. thanks. I don't have a touchpad to test that with but it looks fine. 41b2312..a897147 master -> master Cheers, Peter > > src/eventcomm.c | 12 ++++++++++++ > src/synaptics.c | 3 +++ > 2 files changed, 15 insertions(+) > > diff --git a/src/eventcomm.c b/src/eventcomm.c > index 37f16b2..5b18c44 100644 > --- a/src/eventcomm.c > +++ b/src/eventcomm.c > @@ -606,6 +606,14 @@ EventProcessTouchEvent(InputInfoPtr pInfo, struct SynapticsHwState *hw, > hw->slot_state[slot_index] = SLOTSTATE_CLOSE; > proto_data->num_touches--; > } > + > + /* When there are no fingers on the touchpad, set width and > + * pressure to zero as ABS_MT_TOUCH_MAJOR and ABS_MT_PRESSURE > + * are not zero when fingers are released. */ > + if (proto_data->num_touches == 0) { > + hw->fingerWidth = 0; > + hw->z = 0; > + } > } > else { > ValuatorMask *mask = proto_data->last_mt_vals[slot_index]; > @@ -618,6 +626,10 @@ EventProcessTouchEvent(InputInfoPtr pInfo, struct SynapticsHwState *hw, > hw->cumulative_dx += ev->value - last_val; > else if (ev->code == ABS_MT_POSITION_Y) > hw->cumulative_dy += ev->value - last_val; > + else if (ev->code == ABS_MT_TOUCH_MAJOR) > + hw->fingerWidth = ev->value; > + else if (ev->code == ABS_MT_PRESSURE) > + hw->z = ev->value; > } > > valuator_mask_set(mask, map, ev->value); > diff --git a/src/synaptics.c b/src/synaptics.c > index 1b1ac64..2746565 100644 > --- a/src/synaptics.c > +++ b/src/synaptics.c > @@ -1857,6 +1857,9 @@ SynapticsDetectFinger(SynapticsPrivate * priv, struct SynapticsHwState *hw) > if ((hw->z > para->palm_min_z) && (hw->fingerWidth > para->palm_min_width)) > return FS_BLOCKED; > > + if (priv->has_touch) > + return finger; > + > if (hw->x == 0 || priv->finger_state == FS_UNTOUCHED) > priv->avg_width = 0; > else > -- > 2.1.0 > From jcristau at debian.org Tue Sep 16 22:41:27 2014 From: jcristau at debian.org (Julien Cristau) Date: Wed, 17 Sep 2014 07:41:27 +0200 Subject: [PATCH] xwayland: always include drm.xml in tarballs Message-ID: <1410932487-20437-1-git-send-email-jcristau@debian.org> Move drm.xml out of the automake conditional so make dist includes it even if glamor-egl is disabled. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=83960 Signed-off-by: Julien Cristau --- hw/xwayland/Makefile.am | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/xwayland/Makefile.am b/hw/xwayland/Makefile.am index dc16b8b..4e0e1bb 100644 --- a/hw/xwayland/Makefile.am +++ b/hw/xwayland/Makefile.am @@ -39,8 +39,6 @@ nodist_Xwayland_SOURCES = \ CLEANFILES = $(nodist_Xwayland_SOURCES) -EXTRA_DIST = drm.xml - xwayland-glamor.c : $(nodist_Xwayland_SOURCES) glamor_lib = $(top_builddir)/glamor/libglamor.la @@ -48,6 +46,8 @@ glamor_lib = $(top_builddir)/glamor/libglamor.la Xwayland_LDADD += $(GLAMOR_LIBS) $(GBM_LIBS) -lEGL -lGL endif +EXTRA_DIST = drm.xml + relink: $(AM_V_at)rm -f Xwayland$(EXEEXT) && $(MAKE) Xwayland$(EXEEXT) -- 2.1.0 From ajax at redhat.com Wed Sep 17 07:58:54 2014 From: ajax at redhat.com (Adam Jackson) Date: Wed, 17 Sep 2014 10:58:54 -0400 Subject: [PULL] vidmem cleanup series (was Re: [PATCH 09/12] xfree86: Remove leaky /dev/mem checks from xf86OSInitVidMem) In-Reply-To: <86a965y62k.fsf@hiro.keithp.com> References: <1406660419-21281-1-git-send-email-ajax@redhat.com> <1406660419-21281-10-git-send-email-ajax@redhat.com> <86a965y62k.fsf@hiro.keithp.com> Message-ID: <1410965934.6219.2.camel@dmt> On Thu, 2014-09-11 at 18:34 -0700, Keith Packard wrote: > Adam Jackson writes: > > > This is mostly a no-op, the checks didn't have much effect since > > pciaccess didn't end up using the fd we opened. Except for OpenBSD, > > where you have to pass that in from above, which is sort of a weird API > > decision. So this will break there until libpciaccess is made less > > dumb. > > I'm probably missing something, but what's the status of this series? I'll get back to the last four of this series at some point, but in the meantime: The following changes since commit d3427717f2c6a473dc3d20631dff653e4e37228e: xwayland: Snap damage reports to the bounding box (2014-09-11 23:40:30 -0600) are available in the git repository at: ssh://people.freedesktop.org/~ajax/xserver.git vidmem-cleanup for you to fetch changes up to 30dcc10f6c9c4bacbc0e3652917c298ca9fb3898: xfree86: Clean up some more alpha awareness (2014-09-16 11:58:53 -0400) ---------------------------------------------------------------- Adam Jackson (8): xfree86: Remove xf86{Map,Unmap}VidMem xfree86: Remove {set,undo}WC from VidMemInfo xfree86: Remove xf86LinearVidMem int10: Port off xf86ReadBIOS xfree86: Remove xf86ReadBIOS xfree86: Remove xf86CheckMTRR xfree86: Remove the memory of MTRR awareness xfree86: Clean up some more alpha awareness configure.ac | 23 -- hw/xfree86/doc/README.DRIcomp | 3 - hw/xfree86/doc/Registry | 1 - hw/xfree86/int10/generic.c | 16 +- hw/xfree86/man/xorg.conf.man | 6 - hw/xfree86/os-support/bsd/Makefile.am | 4 +- hw/xfree86/os-support/bsd/alpha_video.c | 434 ----------------------------- hw/xfree86/os-support/bsd/arm_video.c | 284 ------------------- hw/xfree86/os-support/bsd/bsd_axp.c | 71 ----- hw/xfree86/os-support/bsd/i386_video.c | 562 +------------------------------------ hw/xfree86/os-support/bsd/ppc_video.c | 56 ---- hw/xfree86/os-support/bsd/sparc64_video.c | 40 --- hw/xfree86/os-support/hurd/Makefile.am | 2 +- hw/xfree86/os-support/hurd/hurd_mmap.c | 94 ------- hw/xfree86/os-support/hurd/hurd_video.c | 65 ----- hw/xfree86/os-support/linux/Makefile.am | 10 +- hw/xfree86/os-support/linux/int10/linux.c | 19 +- hw/xfree86/os-support/linux/lnx_axp.c | 103 ------- hw/xfree86/os-support/linux/lnx_video.c | 676 --------------------------------------------- hw/xfree86/os-support/shared/bios_mmap.c | 135 --------- hw/xfree86/os-support/shared/vidmem.c | 205 -------------- hw/xfree86/os-support/shared/xf86Axp.c | 60 ---- hw/xfree86/os-support/shared/xf86Axp.h | 33 --- hw/xfree86/os-support/solaris/sun_vid.c | 140 ---------- hw/xfree86/os-support/stub/Makefile.am | 1 - hw/xfree86/os-support/stub/stub_bios.c | 12 - hw/xfree86/os-support/xf86OSpriv.h | 11 - hw/xfree86/os-support/xf86_OSproc.h | 26 -- include/dix-config.h.in | 3 - include/xorg-config.h.in | 6 - 30 files changed, 37 insertions(+), 3064 deletions(-) delete mode 100644 hw/xfree86/os-support/bsd/bsd_axp.c delete mode 100644 hw/xfree86/os-support/hurd/hurd_mmap.c delete mode 100644 hw/xfree86/os-support/linux/lnx_axp.c delete mode 100644 hw/xfree86/os-support/shared/bios_mmap.c delete mode 100644 hw/xfree86/os-support/shared/xf86Axp.c delete mode 100644 hw/xfree86/os-support/shared/xf86Axp.h delete mode 100644 hw/xfree86/os-support/stub/stub_bios.c - ajax From ajax at redhat.com Wed Sep 17 08:07:22 2014 From: ajax at redhat.com (Adam Jackson) Date: Wed, 17 Sep 2014 11:07:22 -0400 Subject: [PATCH] loader: Remove compatibility with ancient XFree86 version numbering Message-ID: <1410966442-10240-1-git-send-email-ajax@redhat.com> Pretty sure I'm guilty of adding this. I think I was thinking of trying to be compatible with some really old binary-only driver that I had vague aspirations of reverse-engineering, but since I haven't gotten around to it in the intervening decade... Signed-off-by: Adam Jackson --- hw/xfree86/loader/loadmod.c | 46 +++++++++------------------------------------ 1 file changed, 9 insertions(+), 37 deletions(-) diff --git a/hw/xfree86/loader/loadmod.c b/hw/xfree86/loader/loadmod.c index f1f7c22..21ccb1b 100644 --- a/hw/xfree86/loader/loadmod.c +++ b/hw/xfree86/loader/loadmod.c @@ -584,7 +584,6 @@ CheckVersion(const char *module, XF86ModuleVersionInfo * data, const XF86ModReqInfo * req) { int vercode[4]; - char verstr[4]; long ver = data->xf86version; MessageType errtype; @@ -592,42 +591,15 @@ CheckVersion(const char *module, XF86ModuleVersionInfo * data, data->modname ? data->modname : "UNKNOWN!", data->vendor ? data->vendor : "UNKNOWN!"); - /* Check for the different scheme used in XFree86 4.0.x releases: - * ((((((((major << 7) | minor) << 7) | subminor) << 5) | beta) << 5) | alpha) - * Since it wasn't used in 4.1.0 or later, limit to versions in the 4.0.x - * range, which limits the overlap with the new version scheme to conflicts - * with 6.71.8.764 through 6.72.39.934. - */ - if ((ver > (4 << 24)) && (ver < ((4 << 24) + (1 << 17)))) { - /* 4.0.x and earlier */ - verstr[1] = verstr[3] = 0; - verstr[2] = (ver & 0x1f) ? (ver & 0x1f) + 'a' - 1 : 0; - ver >>= 5; - verstr[0] = (ver & 0x1f) ? (ver & 0x1f) + 'A' - 1 : 0; - ver >>= 5; - vercode[2] = ver & 0x7f; - ver >>= 7; - vercode[1] = ver & 0x7f; - ver >>= 7; - vercode[0] = ver; - xf86ErrorF("\tcompiled for %d.%d", vercode[0], vercode[1]); - if (vercode[2] != 0) - xf86ErrorF(".%d", vercode[2]); - xf86ErrorF("%s%s, module version = %d.%d.%d\n", verstr, verstr + 2, - data->majorversion, data->minorversion, data->patchlevel); - } - else { - vercode[0] = ver / 10000000; - vercode[1] = (ver / 100000) % 100; - vercode[2] = (ver / 1000) % 100; - vercode[3] = ver % 1000; - xf86ErrorF("\tcompiled for %d.%d.%d", vercode[0], vercode[1], - vercode[2]); - if (vercode[3] != 0) - xf86ErrorF(".%d", vercode[3]); - xf86ErrorF(", module version = %d.%d.%d\n", data->majorversion, - data->minorversion, data->patchlevel); - } + vercode[0] = ver / 10000000; + vercode[1] = (ver / 100000) % 100; + vercode[2] = (ver / 1000) % 100; + vercode[3] = ver % 1000; + xf86ErrorF("\tcompiled for %d.%d.%d", vercode[0], vercode[1], vercode[2]); + if (vercode[3] != 0) + xf86ErrorF(".%d", vercode[3]); + xf86ErrorF(", module version = %d.%d.%d\n", data->majorversion, + data->minorversion, data->patchlevel); if (data->moduleclass) xf86ErrorFVerb(2, "\tModule class: %s\n", data->moduleclass); -- 1.9.3 From keithp at keithp.com Wed Sep 17 11:57:28 2014 From: keithp at keithp.com (Keith Packard) Date: Wed, 17 Sep 2014 11:57:28 -0700 Subject: [PULL] vidmem cleanup series (was Re: [PATCH 09/12] xfree86: Remove leaky /dev/mem checks from xf86OSInitVidMem) In-Reply-To: <1410965934.6219.2.camel@dmt> References: <1406660419-21281-1-git-send-email-ajax@redhat.com> <1406660419-21281-10-git-send-email-ajax@redhat.com> <86a965y62k.fsf@hiro.keithp.com> <1410965934.6219.2.camel@dmt> Message-ID: <86oaueyt0n.fsf@hiro.keithp.com> Adam Jackson writes: > Adam Jackson (8): > xfree86: Remove xf86{Map,Unmap}VidMem > xfree86: Remove {set,undo}WC from VidMemInfo > xfree86: Remove xf86LinearVidMem > int10: Port off xf86ReadBIOS > xfree86: Remove xf86ReadBIOS > xfree86: Remove xf86CheckMTRR > xfree86: Remove the memory of MTRR awareness > xfree86: Clean up some more alpha awareness Merged. d342771..30dcc10 master -> master -- keith.packard at intel.com -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 810 bytes Desc: not available URL: From eric at anholt.net Wed Sep 17 13:23:08 2014 From: eric at anholt.net (Eric Anholt) Date: Wed, 17 Sep 2014 13:23:08 -0700 Subject: [PATCH] loader: Remove compatibility with ancient XFree86 version numbering In-Reply-To: <1410966442-10240-1-git-send-email-ajax@redhat.com> References: <1410966442-10240-1-git-send-email-ajax@redhat.com> Message-ID: <8761gmxahf.fsf@eliezer.anholt.net> Adam Jackson writes: > Pretty sure I'm guilty of adding this. I think I was thinking of trying > to be compatible with some really old binary-only driver that I had > vague aspirations of reverse-engineering, but since I haven't gotten > around to it in the intervening decade... Reviewed-by: Eric Anholt -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 818 bytes Desc: not available URL: From eric at anholt.net Wed Sep 17 14:44:13 2014 From: eric at anholt.net (Eric Anholt) Date: Wed, 17 Sep 2014 14:44:13 -0700 Subject: [PULL] modesetting driver import Message-ID: <87tx45udle.fsf@eliezer.anholt.net> The following changes since commit 3a51418b2db353519a1779cf3cebbcc9afba2520: ephyr: set screen size & origin from host X server output's CRTC geometry (2014-08-21 20:14:55 -0500) are available in the git repository at: git://people.freedesktop.org/~anholt/xserver for you to fetch changes up to b84d25fd53e97105b99495af84abaacc4c901967: modesetting: Drop remaining old-xserver compatibility. (2014-09-16 16:28:50 -0700) ---------------------------------------------------------------- Aaron Plattner (1): modesetting: match PCI class 3, any subclass Adam Jackson (3): Implement ->driverFunc modesetting: Don't (brokenly) double-track software cursor Use own thunk function instead of shadowUpdatePackedWeak Alan Hourihane (14): Initial commit of new modesetting driver Run indent Plug in hardware cursor support Bring inline with current modesetting-101 branch for connector/encoder changes Add DRI2 support. formatting fixes more formatting fixes yet more Add EXA winsys for gallium pipe driver interface. Fix copy surface NULL checks add --with-gallium-dir to specify location of gallium tree More error checking fixes for gallium stride changes Alex Deucher (1): modesetting: query cursor size from the kernel Alon Levy (1): modesetting: add virtual connector support Chris Wilson (1): Add missing GTF modes Colin Walters (1): autogen.sh: Implement GNOME Build API Dave Airlie (60): drop exa modesetting: restart driver effort from other codebases cleanup some the drmmode_display header file modesetting: rewrite probing based on fbdev. gut some more unneeded code update authors/copyright drop loading dri2 port damage tracking code from st/xorg fix server recycling add -Wall, cleanup warnings remove unused debug add shadowfb support, default to on. add initial man page check drm support dumb buffer capability fix make distcheck fix fb_id for dirty reporting configure: don't require xvmc. fixup device open fix some whitespace modesetting: add cursor fallback if kernel rejects cursor. cleanup dumb cap fetch use a cap to decide if shadow is preferred or not. shadowfb: dump shadowfb state at startup modesetting: fix stride if kernel modifies it. modesetting: move shadow stuff to other structure modesetting: fix shadow resizing. modesetting: disable dirty updates for ENOSYS modesetting: fix warnings, remove dead code. xf86-video-modesetting 0.2.0 modesetting: fix build against older Xext drop use of alloca, just use malloc/free dirty: check malloc return cursor: hide cursors on LeaveVT modesetting: add set/drop master around VT switch modesetting: move opening kernel device to before setting depth modesetting: attempt to work out if we want 24 or 32bpp modesetting: make sure the pci device corresponds to the drm device bump version to 0.3.0 modesetting: add compat header file modesetting: convert to new scrn conversion APIs. modesetting: fix make distcheck modesetting: bump to latest X server compat api. modesetting: workaround kernel bug reporting 0x0 as valid mins modesetting: pci probing requires interface version 1.4 modesetting 0.4.0: bump configure.ac modesetting: drop useless xf86PciInfo include modesetting: fix warning about close being undefined. modesetting: add platform bus support modesetting: add output slave support. modesetting: remove alloca usage again modesetting: fix crashes caused by udev race conditions modesetting: bump to 0.6.0 modesetting: provide dummy hooks for shadow modesetting: fix adjust frame crash modesetting: change output names for secondary GPUs modesetting: move closing fd to after we check outputs modesetting: try and use hotspot cursor support modesetting: fix cursor rendering with hotspots. modesetting: fix use after free. modesetting: fix build regression against older servers. Eric Anholt (9): Merge branch 'modesetting-import' into master modesetting: Merge modesetting's COPYING into the xserver's. modesetting: unifdef MODESETTING_OUTPUT_SLAVE_SUPPORT modesetting: xserver already checks XEXTPROTO >= 7.2.99.901. modesetting: Drop use of "pointer" for "void *" modesetting: Update for the platform device API change. modesetting: Connect the driver to the build. modesetting: Drop use of compat-api.h modesetting: Drop remaining old-xserver compatibility. Gaetan Nadon (14): Fill the COPYING file with license text Add contact information to the README file man: missing AM_V_GEN and hard-coded sed command name Fix typo in .gitignore make: remove redundant AUTOMAKE_OPTIONS Remove redundant EXTRA_DIST for the README file. Add missing targets for ChangeLog and INSTALL Replace obsolete AM_CONFIG_HEADER with AC_CONFIG_HEADERS Remove redundant AC_PROG_CC Remove unneeded AM_PROG_CC_C_CO make: remove empty variable assignment make: add all warnings according to the platform config: replace deprecated AC_HELP_STRING with AS_HELP_STRING config: layout and comment the top portion of configure.ac Hans de Goede (1): Add support for server managed fds James Simmons (1): don't map cursors in sw cursor mode Keith Packard (2): Clean up compiler warnings. Handle new DamageUnregister API which has only one argument Maarten Lankhorst (9): bump version to 0.5.0 modesetting: clean up leaks modesetting: return null for get_modes if output could not be retrieved bump version to 0.7.0 support 32 bpp pixmaps when 24 bpp fb is used. modesetting: probe only succeeds if connectors are detected bump to 0.8.0 bump to 0.8.1 bump to 0.9.0 Matt Turner (2): Don't check for Xinerama. configure.ac: remove DRI and RENDER Sascha Hauer (5): fix if() brackets in Probe function introduce open_hw() function Fix non PCI device probing do not bail out on non pci devices make busID non mandatory Thierry Reding (4): build: Put m4 macros in m4 subdirectory Remove call to miInitializeBackingStore() Staticise and constify output names Properly identify DSI outputs Thomas Hellstrom (1): Avoid an EXA init segfault. Don't allocate each VRAM buffer with a 16MB alignment. Zack Rusin (1): Adding some readme. COPYING | 24 + configure.ac | 10 + hw/xfree86/Makefile.am | 2 +- hw/xfree86/drivers/Makefile.am | 5 + hw/xfree86/drivers/modesetting/Makefile.am | 61 + hw/xfree86/drivers/modesetting/driver.c | 1113 +++++++++++++++ hw/xfree86/drivers/modesetting/driver.h | 81 ++ hw/xfree86/drivers/modesetting/drmmode_display.c | 1616 ++++++++++++++++++++++ hw/xfree86/drivers/modesetting/drmmode_display.h | 136 ++ hw/xfree86/drivers/modesetting/modesetting.man | 54 + 10 files changed, 3101 insertions(+), 1 deletion(-) create mode 100644 hw/xfree86/drivers/Makefile.am create mode 100644 hw/xfree86/drivers/modesetting/Makefile.am create mode 100644 hw/xfree86/drivers/modesetting/driver.c create mode 100644 hw/xfree86/drivers/modesetting/driver.h create mode 100644 hw/xfree86/drivers/modesetting/drmmode_display.c create mode 100644 hw/xfree86/drivers/modesetting/drmmode_display.h create mode 100644 hw/xfree86/drivers/modesetting/modesetting.man -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 818 bytes Desc: not available URL: From eric at anholt.net Wed Sep 17 15:38:39 2014 From: eric at anholt.net (Eric Anholt) Date: Wed, 17 Sep 2014 15:38:39 -0700 Subject: [PATCH] Update help text since -iglx is now the default Message-ID: <1410993519-32490-1-git-send-email-eric@anholt.net> From: Jon TURNEY This should have been part of d0da0e9c3bb8fe0cd4879ecb24d21715bfaa209b Signed-off-by: Jon TURNEY Signed-off-by: Eric Anholt Reviewed-by: Eric Anholt --- os/utils.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/os/utils.c b/os/utils.c index f319743..b72d8b3 100644 --- a/os/utils.c +++ b/os/utils.c @@ -541,8 +541,8 @@ UseMsg(void) ErrorF("-fn string default font name\n"); ErrorF("-fp string default font path\n"); ErrorF("-help prints message with these options\n"); - ErrorF("+iglx Allow creating indirect GLX contexts (default)\n"); - ErrorF("-iglx Prohibit creating indirect GLX contexts\n"); + ErrorF("+iglx Allow creating indirect GLX contexts\n"); + ErrorF("-iglx Prohibit creating indirect GLX contexts (default)\n"); ErrorF("-I ignore all remaining arguments\n"); #ifdef RLIMIT_DATA ErrorF("-ld int limit data space to N Kb\n"); -- 2.1.0 From keithp at keithp.com Wed Sep 17 15:45:40 2014 From: keithp at keithp.com (Keith Packard) Date: Wed, 17 Sep 2014 15:45:40 -0700 Subject: [PATCH] Update help text since -iglx is now the default In-Reply-To: <1410993519-32490-1-git-send-email-eric@anholt.net> References: <1410993519-32490-1-git-send-email-eric@anholt.net> Message-ID: <86a95xzx0r.fsf@hiro.keithp.com> Eric Anholt writes: > From: Jon TURNEY > > This should have been part of d0da0e9c3bb8fe0cd4879ecb24d21715bfaa209b Merged. 30dcc10..e3aa13b master -> master -- keith.packard at intel.com -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 810 bytes Desc: not available URL: From keithp at keithp.com Wed Sep 17 15:57:29 2014 From: keithp at keithp.com (Keith Packard) Date: Wed, 17 Sep 2014 15:57:29 -0700 Subject: [PULL] modesetting driver import In-Reply-To: <87tx45udle.fsf@eliezer.anholt.net> References: <87tx45udle.fsf@eliezer.anholt.net> Message-ID: <864mw5zwh2.fsf@hiro.keithp.com> Eric Anholt writes: > Aaron Plattner (1): > modesetting: match PCI class 3, any subclass > > Adam Jackson (3): > Implement ->driverFunc > modesetting: Don't (brokenly) double-track software cursor > Use own thunk function instead of shadowUpdatePackedWeak > > Alan Hourihane (14): > Initial commit of new modesetting driver > Run indent > Plug in hardware cursor support > Bring inline with current modesetting-101 branch for connector/encoder changes > Add DRI2 support. > formatting fixes > more formatting fixes > yet more > Add EXA winsys for gallium pipe driver interface. > Fix copy surface > NULL checks > add --with-gallium-dir to specify location of gallium tree > More error checking > fixes for gallium stride changes > > Alex Deucher (1): > modesetting: query cursor size from the kernel > > Alon Levy (1): > modesetting: add virtual connector support > > Chris Wilson (1): > Add missing GTF modes > > Colin Walters (1): > autogen.sh: Implement GNOME Build API > > Dave Airlie (60): > drop exa > modesetting: restart driver effort from other codebases > cleanup some the drmmode_display header file > modesetting: rewrite probing based on fbdev. > gut some more unneeded code > update authors/copyright > drop loading dri2 > port damage tracking code from st/xorg > fix server recycling > add -Wall, cleanup warnings > remove unused debug > add shadowfb support, default to on. > add initial man page > check drm support dumb buffer capability > fix make distcheck > fix fb_id for dirty reporting > configure: don't require xvmc. > fixup device open > fix some whitespace > modesetting: add cursor fallback if kernel rejects cursor. > cleanup dumb cap fetch > use a cap to decide if shadow is preferred or not. > shadowfb: dump shadowfb state at startup > modesetting: fix stride if kernel modifies it. > modesetting: move shadow stuff to other structure > modesetting: fix shadow resizing. > modesetting: disable dirty updates for ENOSYS > modesetting: fix warnings, remove dead code. > xf86-video-modesetting 0.2.0 > modesetting: fix build against older Xext > drop use of alloca, just use malloc/free > dirty: check malloc return > cursor: hide cursors on LeaveVT > modesetting: add set/drop master around VT switch > modesetting: move opening kernel device to before setting depth > modesetting: attempt to work out if we want 24 or 32bpp > modesetting: make sure the pci device corresponds to the drm device > bump version to 0.3.0 > modesetting: add compat header file > modesetting: convert to new scrn conversion APIs. > modesetting: fix make distcheck > modesetting: bump to latest X server compat api. > modesetting: workaround kernel bug reporting 0x0 as valid mins > modesetting: pci probing requires interface version 1.4 > modesetting 0.4.0: bump configure.ac > modesetting: drop useless xf86PciInfo include > modesetting: fix warning about close being undefined. > modesetting: add platform bus support > modesetting: add output slave support. > modesetting: remove alloca usage again > modesetting: fix crashes caused by udev race conditions > modesetting: bump to 0.6.0 > modesetting: provide dummy hooks for shadow > modesetting: fix adjust frame crash > modesetting: change output names for secondary GPUs > modesetting: move closing fd to after we check outputs > modesetting: try and use hotspot cursor support > modesetting: fix cursor rendering with hotspots. > modesetting: fix use after free. > modesetting: fix build regression against older servers. > > Eric Anholt (9): > Merge branch 'modesetting-import' into master > modesetting: Merge modesetting's COPYING into the xserver's. > modesetting: unifdef MODESETTING_OUTPUT_SLAVE_SUPPORT > modesetting: xserver already checks XEXTPROTO >= 7.2.99.901. > modesetting: Drop use of "pointer" for "void *" > modesetting: Update for the platform device API change. > modesetting: Connect the driver to the build. > modesetting: Drop use of compat-api.h > modesetting: Drop remaining old-xserver compatibility. > > Gaetan Nadon (14): > Fill the COPYING file with license text > Add contact information to the README file > man: missing AM_V_GEN and hard-coded sed command name > Fix typo in .gitignore > make: remove redundant AUTOMAKE_OPTIONS > Remove redundant EXTRA_DIST for the README file. > Add missing targets for ChangeLog and INSTALL > Replace obsolete AM_CONFIG_HEADER with AC_CONFIG_HEADERS > Remove redundant AC_PROG_CC > Remove unneeded AM_PROG_CC_C_CO > make: remove empty variable assignment > make: add all warnings according to the platform > config: replace deprecated AC_HELP_STRING with AS_HELP_STRING > config: layout and comment the top portion of configure.ac > > Hans de Goede (1): > Add support for server managed fds > > James Simmons (1): > don't map cursors in sw cursor mode > > Keith Packard (2): > Clean up compiler warnings. > Handle new DamageUnregister API which has only one argument > > Maarten Lankhorst (9): > bump version to 0.5.0 > modesetting: clean up leaks > modesetting: return null for get_modes if output could not be retrieved > bump version to 0.7.0 > support 32 bpp pixmaps when 24 bpp fb is used. > modesetting: probe only succeeds if connectors are detected > bump to 0.8.0 > bump to 0.8.1 > bump to 0.9.0 > > Matt Turner (2): > Don't check for Xinerama. > configure.ac: remove DRI and RENDER > > Sascha Hauer (5): > fix if() brackets in Probe function > introduce open_hw() function > Fix non PCI device probing > do not bail out on non pci devices > make busID non mandatory > > Thierry Reding (4): > build: Put m4 macros in m4 subdirectory > Remove call to miInitializeBackingStore() > Staticise and constify output names > Properly identify DSI outputs > > Thomas Hellstrom (1): > Avoid an EXA init segfault. Don't allocate each VRAM buffer with a 16MB alignment. > > Zack Rusin (1): > Adding some readme. Merged. e3aa13b..eaee657 master -> master -- keith.packard at intel.com -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 810 bytes Desc: not available URL: From ajax at redhat.com Thu Sep 18 10:23:49 2014 From: ajax at redhat.com (Adam Jackson) Date: Thu, 18 Sep 2014 13:23:49 -0400 Subject: [PATCH 00/11] Misc window exposure/validation cleanups Message-ID: <1411061040-13053-1-git-send-email-ajax@redhat.com> In attempting to get the Always mode of backing store working again, I felt the urge to clean the place up a bit. The most notable change here is removing the (questionable) optimization from exposure event generation to emit a bounding-box event when faced with more than 25 rects in the exposed region. Given that toolkits already coalesce consecutive expose boxes, and that you'll never hit it in a composited environment anyway, the complexity doesn't seem justified. x11perfcomp results below; admittedly n=1 here because waiting half an hour for a run to complete was pretty boring. It's curious that some of the unmapped tests are slower, since literally none of the changed code is hit along those paths. Presumably those tests are just much more sensitive to address space layout and cache effects. I feel comfortable estimating it as a null result. 1 2 Operation ---------- ------------------- ----------------- 565563.3 574273.2 ( 1.02) Hide/expose window via popup (4 kids) 1037691.5 1053797.0 ( 1.02) Hide/expose window via popup (16 kids) 1133213.2 1147784.7 ( 1.01) Hide/expose window via popup (25 kids) 1148614.6 1161289.4 ( 1.01) Hide/expose window via popup (50 kids) 1105434.4 1116889.5 ( 1.01) Hide/expose window via popup (75 kids) 1061060.3 1064495.2 ( 1.00) Hide/expose window via popup (100 kids) 900025.3 905022.2 ( 1.01) Hide/expose window via popup (200 kids) 414620.3 420562.4 ( 1.01) Move window (4 kids) 306714.0 316005.0 ( 1.03) Move window (16 kids) 262854.3 271929.3 ( 1.03) Move window (25 kids) 200069.2 202072.4 ( 1.01) Move window (50 kids) 165483.1 166971.4 ( 1.01) Move window (75 kids) 143104.1 142990.3 ( 1.00) Move window (100 kids) 89162.4 88149.5 ( 0.99) Move window (200 kids) 5478809.7 5196263.9 ( 0.95) Moved unmapped window (4 kids) 5277308.1 5209940.5 ( 0.99) Moved unmapped window (16 kids) 5262610.7 5223677.5 ( 0.99) Moved unmapped window (25 kids) 5260202.1 5224090.2 ( 0.99) Moved unmapped window (50 kids) 5243965.8 5162111.2 ( 0.98) Moved unmapped window (75 kids) 5225942.1 5162169.0 ( 0.99) Moved unmapped window (100 kids) 5209352.2 5137380.6 ( 0.99) Moved unmapped window (200 kids) 1506849.3 1496157.8 ( 0.99) Move window via parent (4 kids) 3623342.4 3644216.3 ( 1.01) Move window via parent (16 kids) 4310670.9 4319778.6 ( 1.00) Move window via parent (25 kids) 5160041.3 5177500.5 ( 1.00) Move window via parent (50 kids) 5484570.9 5507343.0 ( 1.00) Move window via parent (75 kids) 5650077.2 5651413.9 ( 1.00) Move window via parent (100 kids) 5801632.7 5843455.9 ( 1.01) Move window via parent (200 kids) 411366.3 419379.7 ( 1.02) Resize window (4 kids) 331963.3 336729.2 ( 1.01) Resize window (16 kids) 296627.6 301137.8 ( 1.02) Resize window (25 kids) 229294.1 231393.3 ( 1.01) Resize window (50 kids) 197839.9 200640.0 ( 1.01) Resize window (75 kids) 172525.5 173867.0 ( 1.01) Resize window (100 kids) 115085.5 115788.0 ( 1.01) Resize window (200 kids) 4902030.0 4641241.1 ( 0.95) Resize unmapped window (4 kids) 4880480.0 4636762.2 ( 0.95) Resize unmapped window (16 kids) 4887409.2 4526975.5 ( 0.93) Resize unmapped window (25 kids) 4883508.7 4543796.4 ( 0.93) Resize unmapped window (50 kids) 4850783.0 4504614.4 ( 0.93) Resize unmapped window (75 kids) 4852278.4 4581507.9 ( 0.94) Resize unmapped window (100 kids) 4809895.3 4559465.5 ( 0.95) Resize unmapped window (200 kids) 252027.5 256260.2 ( 1.02) Circulate window (4 kids) 171326.0 173895.9 ( 1.02) Circulate window (16 kids) 167942.2 169278.7 ( 1.01) Circulate window (25 kids) 161646.8 161589.1 ( 1.00) Circulate window (50 kids) 153798.9 154246.5 ( 1.00) Circulate window (75 kids) 145598.3 146201.8 ( 1.00) Circulate window (100 kids) 111861.7 112879.0 ( 1.01) Circulate window (200 kids) 13415340.6 13000473.4 ( 0.97) Circulate Unmapped window (4 kids) 11802874.4 11384307.9 ( 0.96) Circulate Unmapped window (16 kids) 10814487.0 10534257.8 ( 0.97) Circulate Unmapped window (25 kids) 7388151.0 7471539.4 ( 1.01) Circulate Unmapped window (50 kids) 6271070.9 6014158.2 ( 0.96) Circulate Unmapped window (75 kids) 5014092.5 5030549.8 ( 1.00) Circulate Unmapped window (100 kids) 2162508.8 1843498.8 ( 0.85) Circulate Unmapped window (200 kids) Xext/panoramiXprocs.c | 10 -- composite/compext.c | 3 dix/dispatch.c | 52 +++++++++++- dix/window.c | 2 fb/fbcopy.c | 2 fb/fboverlay.c | 5 - fb/fboverlay.h | 4 glamor/glamor_copy.c | 3 hw/dmx/dmxgcops.c | 8 - hw/dmx/dmxwindow.c | 4 hw/dmx/dmxwindow.h | 3 hw/kdrive/ephyr/ephyr.c | 2 hw/kdrive/src/kdrive.c | 4 hw/kdrive/src/kxv.c | 6 - hw/xfree86/common/xf86xv.c | 6 - hw/xfree86/dri/dri.c | 4 hw/xfree86/dri/dri.h | 3 hw/xnest/Window.c | 4 hw/xnest/XNWindow.h | 3 hw/xquartz/xpr/dri.c | 21 ----- hw/xquartz/xpr/dri.h | 4 include/dix.h | 6 + include/scrnintstr.h | 10 -- mi/mi.h | 25 ------ mi/mibitblt.c | 5 - mi/micopy.c | 3 mi/miexpose.c | 159 +-------------------------------------- mi/mioverlay.c | 83 -------------------- mi/miscrinit.c | 1 mi/mivaltree.c | 65 ++++++--------- mi/miwindow.c | 4 miext/rootless/rootlessValTree.c | 65 --------------- 32 files changed, 134 insertions(+), 445 deletions(-) - ajax From ajax at redhat.com Thu Sep 18 10:23:50 2014 From: ajax at redhat.com (Adam Jackson) Date: Thu, 18 Sep 2014 13:23:50 -0400 Subject: [PATCH 01/11] kdrive: Remove vestigial reference to fbInitValidateTree In-Reply-To: <1411061040-13053-1-git-send-email-ajax@redhat.com> References: <1411061040-13053-1-git-send-email-ajax@redhat.com> Message-ID: <1411061040-13053-2-git-send-email-ajax@redhat.com> Signed-off-by: Adam Jackson --- hw/kdrive/src/kdrive.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/hw/kdrive/src/kdrive.c b/hw/kdrive/src/kdrive.c index 5dbff3f..dddbe6e 100644 --- a/hw/kdrive/src/kdrive.c +++ b/hw/kdrive/src/kdrive.c @@ -909,10 +909,6 @@ KdScreenInit(ScreenPtr pScreen, int argc, char **argv) if (!(*card->cfuncs->finishInitScreen) (pScreen)) return FALSE; -#if 0 - fbInitValidateTree(pScreen); -#endif - /* * Wrap CloseScreen, the order now is: * KdCloseScreen -- 1.9.3 From ajax at redhat.com Thu Sep 18 10:23:51 2014 From: ajax at redhat.com (Adam Jackson) Date: Thu, 18 Sep 2014 13:23:51 -0400 Subject: [PATCH 02/11] xquartz: Remove useless DRIWindowExposures In-Reply-To: <1411061040-13053-1-git-send-email-ajax@redhat.com> References: <1411061040-13053-1-git-send-email-ajax@redhat.com> Message-ID: <1411061040-13053-3-git-send-email-ajax@redhat.com> Signed-off-by: Adam Jackson --- hw/xquartz/xpr/dri.c | 21 --------------------- hw/xquartz/xpr/dri.h | 4 ---- 2 files changed, 25 deletions(-) diff --git a/hw/xquartz/xpr/dri.c b/hw/xquartz/xpr/dri.c index 0f19047..565d94f 100644 --- a/hw/xquartz/xpr/dri.c +++ b/hw/xquartz/xpr/dri.c @@ -138,9 +138,6 @@ DRIFinishScreenInit(ScreenPtr pScreen) DRIScreenPrivPtr pDRIPriv = DRI_SCREEN_PRIV(pScreen); /* Wrap DRI support */ - pDRIPriv->wrap.WindowExposures = pScreen->WindowExposures; - pScreen->WindowExposures = DRIWindowExposures; - pDRIPriv->wrap.CopyWindow = pScreen->CopyWindow; pScreen->CopyWindow = DRICopyWindow; @@ -577,24 +574,6 @@ DRIDrawablePrivDelete(void *pResource, XID id) } void -DRIWindowExposures(WindowPtr pWin, RegionPtr prgn, RegionPtr bsreg) -{ - ScreenPtr pScreen = pWin->drawable.pScreen; - DRIScreenPrivPtr pDRIPriv = DRI_SCREEN_PRIV(pScreen); - DRIDrawablePrivPtr pDRIDrawablePriv = DRI_DRAWABLE_PRIV_FROM_WINDOW(pWin); - - if (pDRIDrawablePriv) { - /* FIXME: something? */ - } - - pScreen->WindowExposures = pDRIPriv->wrap.WindowExposures; - - (*pScreen->WindowExposures)(pWin, prgn, bsreg); - - pScreen->WindowExposures = DRIWindowExposures; -} - -void DRICopyWindow(WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr prgnSrc) { ScreenPtr pScreen = pWin->drawable.pScreen; diff --git a/hw/xquartz/xpr/dri.h b/hw/xquartz/xpr/dri.h index 4476b06..a4400a2 100644 --- a/hw/xquartz/xpr/dri.h +++ b/hw/xquartz/xpr/dri.h @@ -51,7 +51,6 @@ typedef void (*ClipNotifyPtr)(WindowPtr, int, int); * overridden by the driver in its [driver]DRIScreenInit function. */ typedef struct { - WindowExposuresProcPtr WindowExposures; CopyWindowProcPtr CopyWindow; ClipNotifyProcPtr ClipNotify; } DRIWrappedFuncsRec, *DRIWrappedFuncsPtr; @@ -109,9 +108,6 @@ extern void DRIClipNotify(WindowPtr pWin, int dx, int dy); extern void -DRIWindowExposures(WindowPtr pWin, RegionPtr prgn, RegionPtr bsreg); - -extern void DRISurfaceNotify(xp_surface_id id, int kind); extern void -- 1.9.3 From ajax at redhat.com Thu Sep 18 10:23:52 2014 From: ajax at redhat.com (Adam Jackson) Date: Thu, 18 Sep 2014 13:23:52 -0400 Subject: [PATCH 03/11] dix: Drop the third argument from WindowExposuresProcPtr In-Reply-To: <1411061040-13053-1-git-send-email-ajax@redhat.com> References: <1411061040-13053-1-git-send-email-ajax@redhat.com> Message-ID: <1411061040-13053-4-git-send-email-ajax@redhat.com> A careful read shows that it was always NULL. It hasn't always been; as the DDX spec indicates, it was the "occluded region that has backing store", but since that backing store code is long gone, we can nuke it. mi{,Overlay}WindowExposures get slightly simpler here, and will get even simpler in just a moment. Signed-off-by: Adam Jackson --- dix/window.c | 2 +- fb/fboverlay.c | 5 ++--- fb/fboverlay.h | 4 +--- hw/dmx/dmxwindow.c | 4 ++-- hw/dmx/dmxwindow.h | 3 +-- hw/kdrive/ephyr/ephyr.c | 2 +- hw/kdrive/src/kxv.c | 6 +++--- hw/xfree86/common/xf86xv.c | 6 +++--- hw/xfree86/dri/dri.c | 4 ++-- hw/xfree86/dri/dri.h | 3 +-- hw/xnest/Window.c | 4 ++-- hw/xnest/XNWindow.h | 3 +-- include/scrnintstr.h | 3 +-- mi/mi.h | 4 +--- mi/miexpose.c | 15 +++------------ mi/mioverlay.c | 30 ++++++++---------------------- mi/miwindow.c | 4 ++-- 17 files changed, 35 insertions(+), 67 deletions(-) diff --git a/dix/window.c b/dix/window.c index f4acdc8..52e69ef 100644 --- a/dix/window.c +++ b/dix/window.c @@ -2601,7 +2601,7 @@ MapWindow(WindowPtr pWin, ClientPtr client) (*pScreen->PostValidateTree) (NullWindow, pWin, VTMap); RegionNull(&temp); RegionCopy(&temp, &pWin->clipList); - (*pScreen->WindowExposures) (pWin, &temp, NullRegion); + (*pScreen->WindowExposures) (pWin, &temp); RegionUninit(&temp); } diff --git a/fb/fboverlay.c b/fb/fboverlay.c index 935bf1b..6a5f0f8 100644 --- a/fb/fboverlay.c +++ b/fb/fboverlay.c @@ -240,12 +240,11 @@ fbOverlayCopyWindow(WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr prgnSrc) } void -fbOverlayWindowExposures(WindowPtr pWin, - RegionPtr prgn, RegionPtr other_exposed) +fbOverlayWindowExposures(WindowPtr pWin, RegionPtr prgn) { fbOverlayUpdateLayerRegion(pWin->drawable.pScreen, fbOverlayWindowLayer(pWin), prgn); - miWindowExposures(pWin, prgn, other_exposed); + miWindowExposures(pWin, prgn); } Bool diff --git a/fb/fboverlay.h b/fb/fboverlay.h index 57c9873..47727e4 100644 --- a/fb/fboverlay.h +++ b/fb/fboverlay.h @@ -82,9 +82,7 @@ extern _X_EXPORT void fbOverlayCopyWindow(WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr prgnSrc); extern _X_EXPORT void - -fbOverlayWindowExposures(WindowPtr pWin, - RegionPtr prgn, RegionPtr other_exposed); +fbOverlayWindowExposures(WindowPtr pWin, RegionPtr prgn); extern _X_EXPORT Bool diff --git a/hw/dmx/dmxwindow.c b/hw/dmx/dmxwindow.c index 1c23527..c753735 100644 --- a/hw/dmx/dmxwindow.c +++ b/hw/dmx/dmxwindow.c @@ -772,7 +772,7 @@ dmxWindowExposurePredicate(Display * dpy, XEvent * ev, XPointer ptr) * in DMX, the events that are generated by the back-end server are * redundant, so we eat them here. */ void -dmxWindowExposures(WindowPtr pWindow, RegionPtr prgn, RegionPtr other_exposed) +dmxWindowExposures(WindowPtr pWindow, RegionPtr prgn) { ScreenPtr pScreen = pWindow->drawable.pScreen; DMXScreenInfo *dmxScreen = &dmxScreens[pScreen->myNum]; @@ -799,7 +799,7 @@ dmxWindowExposures(WindowPtr pWindow, RegionPtr prgn, RegionPtr other_exposed) #if 1 if (pScreen->WindowExposures) - pScreen->WindowExposures(pWindow, prgn, other_exposed); + pScreen->WindowExposures(pWindow, prgn); #endif DMX_WRAP(WindowExposures, dmxWindowExposures, dmxScreen, pScreen); } diff --git a/hw/dmx/dmxwindow.h b/hw/dmx/dmxwindow.h index c6b2efe..dda6538 100644 --- a/hw/dmx/dmxwindow.h +++ b/hw/dmx/dmxwindow.h @@ -73,8 +73,7 @@ extern Bool dmxChangeWindowAttributes(WindowPtr pWindow, unsigned long mask); extern Bool dmxRealizeWindow(WindowPtr pWindow); extern Bool dmxUnrealizeWindow(WindowPtr pWindow); extern void dmxRestackWindow(WindowPtr pWindow, WindowPtr pOldNextSib); -extern void dmxWindowExposures(WindowPtr pWindow, RegionPtr prgn, - RegionPtr other_exposed); +extern void dmxWindowExposures(WindowPtr pWindow, RegionPtr prgn); extern void dmxCopyWindow(WindowPtr pWindow, DDXPointRec ptOldOrg, RegionPtr prgnSrc); diff --git a/hw/kdrive/ephyr/ephyr.c b/hw/kdrive/ephyr/ephyr.c index 85d4193..8b88f3e 100644 --- a/hw/kdrive/ephyr/ephyr.c +++ b/hw/kdrive/ephyr/ephyr.c @@ -878,7 +878,7 @@ ephyrExposePairedWindow(int a_remote) screen = pair->local->drawable.pScreen; RegionNull(®); RegionCopy(®, &pair->local->clipList); - screen->WindowExposures(pair->local, ®, NullRegion); + screen->WindowExposures(pair->local, ®); RegionUninit(®); } #endif /* XF86DRI */ diff --git a/hw/kdrive/src/kxv.c b/hw/kdrive/src/kxv.c index f979e1f..163d5c1 100644 --- a/hw/kdrive/src/kxv.c +++ b/hw/kdrive/src/kxv.c @@ -86,7 +86,7 @@ static int KdXVQueryImageAttributes(XvPortPtr, XvImagePtr, /* ScreenRec fields */ static Bool KdXVDestroyWindow(WindowPtr pWin); -static void KdXVWindowExposures(WindowPtr pWin, RegionPtr r1, RegionPtr r2); +static void KdXVWindowExposures(WindowPtr pWin, RegionPtr r1); static void KdXVClipNotify(WindowPtr pWin, int dx, int dy); static Bool KdXVCloseScreen(ScreenPtr); @@ -822,7 +822,7 @@ KdXVDestroyWindow(WindowPtr pWin) } static void -KdXVWindowExposures(WindowPtr pWin, RegionPtr reg1, RegionPtr reg2) +KdXVWindowExposures(WindowPtr pWin, RegionPtr reg1) { ScreenPtr pScreen = pWin->drawable.pScreen; KdXVScreenPtr ScreenPriv = GET_KDXV_SCREEN(pScreen); @@ -834,7 +834,7 @@ KdXVWindowExposures(WindowPtr pWin, RegionPtr reg1, RegionPtr reg2) AreasExposed = (WinPriv && reg1 && RegionNotEmpty(reg1)); pScreen->WindowExposures = ScreenPriv->WindowExposures; - (*pScreen->WindowExposures) (pWin, reg1, reg2); + (*pScreen->WindowExposures) (pWin, reg1); pScreen->WindowExposures = KdXVWindowExposures; /* filter out XClearWindow/Area */ diff --git a/hw/xfree86/common/xf86xv.c b/hw/xfree86/common/xf86xv.c index d342bde..d8fd88d 100644 --- a/hw/xfree86/common/xf86xv.c +++ b/hw/xfree86/common/xf86xv.c @@ -84,7 +84,7 @@ static int xf86XVQueryImageAttributes(XvPortPtr, XvImagePtr, /* ScreenRec fields */ static Bool xf86XVDestroyWindow(WindowPtr pWin); -static void xf86XVWindowExposures(WindowPtr pWin, RegionPtr r1, RegionPtr r2); +static void xf86XVWindowExposures(WindowPtr pWin, RegionPtr r1); static void xf86XVPostValidateTree(WindowPtr pWin, WindowPtr pLayerWin, VTKind kind); static void xf86XVClipNotify(WindowPtr pWin, int dx, int dy); @@ -1048,7 +1048,7 @@ xf86XVPostValidateTree(WindowPtr pWin, WindowPtr pLayerWin, VTKind kind) } static void -xf86XVWindowExposures(WindowPtr pWin, RegionPtr reg1, RegionPtr reg2) +xf86XVWindowExposures(WindowPtr pWin, RegionPtr reg1) { ScreenPtr pScreen = pWin->drawable.pScreen; XF86XVScreenPtr ScreenPriv = GET_XF86XV_SCREEN(pScreen); @@ -1059,7 +1059,7 @@ xf86XVWindowExposures(WindowPtr pWin, RegionPtr reg1, RegionPtr reg2) AreasExposed = (WinPriv && reg1 && RegionNotEmpty(reg1)); pScreen->WindowExposures = ScreenPriv->WindowExposures; - (*pScreen->WindowExposures) (pWin, reg1, reg2); + (*pScreen->WindowExposures) (pWin, reg1); pScreen->WindowExposures = xf86XVWindowExposures; /* filter out XClearWindow/Area */ diff --git a/hw/xfree86/dri/dri.c b/hw/xfree86/dri/dri.c index 3f2f6a9..5077c7c 100644 --- a/hw/xfree86/dri/dri.c +++ b/hw/xfree86/dri/dri.c @@ -1828,7 +1828,7 @@ DRIGetContextStore(DRIContextPrivPtr context) } void -DRIWindowExposures(WindowPtr pWin, RegionPtr prgn, RegionPtr bsreg) +DRIWindowExposures(WindowPtr pWin, RegionPtr prgn) { ScreenPtr pScreen = pWin->drawable.pScreen; DRIScreenPrivPtr pDRIPriv = DRI_SCREEN_PRIV(pScreen); @@ -1846,7 +1846,7 @@ DRIWindowExposures(WindowPtr pWin, RegionPtr prgn, RegionPtr bsreg) pScreen->WindowExposures = pDRIPriv->wrap.WindowExposures; /* call lower layers */ - (*pScreen->WindowExposures) (pWin, prgn, bsreg); + (*pScreen->WindowExposures) (pWin, prgn); /* rewrap */ pDRIPriv->wrap.WindowExposures = pScreen->WindowExposures; diff --git a/hw/xfree86/dri/dri.h b/hw/xfree86/dri/dri.h index dec6885..1ce0970 100644 --- a/hw/xfree86/dri/dri.h +++ b/hw/xfree86/dri/dri.h @@ -280,8 +280,7 @@ extern _X_EXPORT void DRISwapContext(int drmFD, void *oldctx, void *newctx); extern _X_EXPORT void *DRIGetContextStore(DRIContextPrivPtr context); -extern _X_EXPORT void DRIWindowExposures(WindowPtr pWin, - RegionPtr prgn, RegionPtr bsreg); +extern _X_EXPORT void DRIWindowExposures(WindowPtr pWin, RegionPtr prgn); extern _X_EXPORT Bool DRIDestroyWindow(WindowPtr pWin); diff --git a/hw/xnest/Window.c b/hw/xnest/Window.c index fc87e82..8d9c672 100644 --- a/hw/xnest/Window.c +++ b/hw/xnest/Window.c @@ -386,7 +386,7 @@ xnestWindowExposurePredicate(Display * dpy, XEvent * event, XPointer ptr) } void -xnestWindowExposures(WindowPtr pWin, RegionPtr pRgn, RegionPtr other_exposed) +xnestWindowExposures(WindowPtr pWin, RegionPtr pRgn) { XEvent event; Window window; @@ -410,7 +410,7 @@ xnestWindowExposures(WindowPtr pWin, RegionPtr pRgn, RegionPtr other_exposed) XPutBackEvent(xnestDisplay, &event); } - miWindowExposures(pWin, pRgn, other_exposed); + miWindowExposures(pWin, pRgn); } void diff --git a/hw/xnest/XNWindow.h b/hw/xnest/XNWindow.h index 02b0f3f..6320ede 100644 --- a/hw/xnest/XNWindow.h +++ b/hw/xnest/XNWindow.h @@ -66,8 +66,7 @@ Bool xnestRealizeWindow(WindowPtr pWin); Bool xnestUnrealizeWindow(WindowPtr pWin); void xnestCopyWindow(WindowPtr pWin, xPoint oldOrigin, RegionPtr oldRegion); void xnestClipNotify(WindowPtr pWin, int dx, int dy); -void xnestWindowExposures(WindowPtr pWin, RegionPtr pRgn, - RegionPtr other_exposed); +void xnestWindowExposures(WindowPtr pWin, RegionPtr pRgn); void xnestSetShape(WindowPtr pWin, int kind); void xnestShapeWindow(WindowPtr pWin); diff --git a/include/scrnintstr.h b/include/scrnintstr.h index 6955e77..7331ec1 100644 --- a/include/scrnintstr.h +++ b/include/scrnintstr.h @@ -155,8 +155,7 @@ typedef void (*PostValidateTreeProcPtr) (WindowPtr /*pParent */ , VTKind /*kind */ ); typedef void (*WindowExposuresProcPtr) (WindowPtr /*pWindow */ , - RegionPtr /*prgn */ , - RegionPtr /*other_exposed */ ); + RegionPtr /*prgn */); typedef void (*CopyWindowProcPtr) (WindowPtr /*pWindow */ , DDXPointRec /*ptOldOrg */ , diff --git a/mi/mi.h b/mi/mi.h index d5a5ba3..4b5e862 100644 --- a/mi/mi.h +++ b/mi/mi.h @@ -247,9 +247,7 @@ extern _X_EXPORT void miSendExposures(WindowPtr /*pWin */ , ); extern _X_EXPORT void miWindowExposures(WindowPtr /*pWin */ , - RegionPtr /*prgn */ , - RegionPtr /*other_exposed */ - ); + RegionPtr /*prgn */); extern _X_EXPORT void miPaintWindow(WindowPtr /*pWin */ , RegionPtr /*prgn */ , diff --git a/mi/miexpose.c b/mi/miexpose.c index 198c433..23987fa 100644 --- a/mi/miexpose.c +++ b/mi/miexpose.c @@ -421,12 +421,11 @@ miSendExposures(WindowPtr pWin, RegionPtr pRgn, int dx, int dy) } void -miWindowExposures(WindowPtr pWin, RegionPtr prgn, RegionPtr other_exposed) +miWindowExposures(WindowPtr pWin, RegionPtr prgn) { RegionPtr exposures = prgn; - if ((prgn && !RegionNil(prgn)) || - (exposures && !RegionNil(exposures)) || other_exposed) { + if ((prgn && !RegionNil(prgn)) || (exposures && !RegionNil(exposures))) { RegionRec expRec; int clientInterested; @@ -435,14 +434,6 @@ miWindowExposures(WindowPtr pWin, RegionPtr prgn, RegionPtr other_exposed) */ clientInterested = (pWin->eventMask | wOtherEventMasks(pWin)) & ExposureMask; - if (other_exposed) { - if (exposures) { - RegionUnion(other_exposed, exposures, other_exposed); - if (exposures != prgn) - RegionDestroy(exposures); - } - exposures = other_exposed; - } if (clientInterested && exposures && (RegionNumRects(exposures) > RECTLIMIT)) { /* @@ -474,7 +465,7 @@ miWindowExposures(WindowPtr pWin, RegionPtr prgn, RegionPtr other_exposed) if (exposures == &expRec) { RegionUninit(exposures); } - else if (exposures && exposures != prgn && exposures != other_exposed) + else if (exposures && exposures != prgn) RegionDestroy(exposures); if (prgn) RegionEmpty(prgn); diff --git a/mi/mioverlay.c b/mi/mioverlay.c index 7f502fa..f894e2b 100644 --- a/mi/mioverlay.c +++ b/mi/mioverlay.c @@ -79,7 +79,7 @@ static void miOverlayMarkUnrealizedWindow(WindowPtr, WindowPtr, Bool); static int miOverlayValidateTree(WindowPtr, WindowPtr, VTKind); static void miOverlayHandleExposures(WindowPtr); static void miOverlayMoveWindow(WindowPtr, int, int, WindowPtr, VTKind); -static void miOverlayWindowExposures(WindowPtr, RegionPtr, RegionPtr); +static void miOverlayWindowExposures(WindowPtr, RegionPtr); static void miOverlayResizeWindow(WindowPtr, int, int, unsigned int, unsigned int, WindowPtr); static void miOverlayClearToBackground(WindowPtr, int, int, int, int, Bool); @@ -827,7 +827,7 @@ miOverlayHandleExposures(WindowPtr pWin) miOverlayScreenPtr pPriv = MIOVERLAY_GET_SCREEN_PRIVATE(pScreen); WindowPtr pChild; ValidatePtr val; - void (*WindowExposures) (WindowPtr, RegionPtr, RegionPtr); + WindowExposuresProcPtr WindowExposures; WindowExposures = pWin->drawable.pScreen->WindowExposures; if (pPriv->underlayMarked) { @@ -849,8 +849,7 @@ miOverlayHandleExposures(WindowPtr pWin) } RegionUninit(&mival->borderExposed); - (*WindowExposures) (pTree->pWin, &mival->exposed, - NullRegion); + (*WindowExposures) (pTree->pWin, &mival->exposed); RegionUninit(&mival->exposed); } free(mival); @@ -886,7 +885,7 @@ miOverlayHandleExposures(WindowPtr pWin) if (RegionNotEmpty(&val->after.borderExposed)) { miPaintWindow(pChild, &val->after.borderExposed, PW_BORDER); } - (*WindowExposures) (pChild, &val->after.exposed, NullRegion); + (*WindowExposures) (pChild, &val->after.exposed); } RegionUninit(&val->after.borderExposed); RegionUninit(&val->after.exposed); @@ -980,26 +979,16 @@ miOverlayMoveWindow(WindowPtr pWin, #endif static void -miOverlayWindowExposures(WindowPtr pWin, - RegionPtr prgn, RegionPtr other_exposed) +miOverlayWindowExposures(WindowPtr pWin, RegionPtr prgn) { RegionPtr exposures = prgn; - if ((prgn && !RegionNil(prgn)) || - (exposures && !RegionNil(exposures)) || other_exposed) { + if ((prgn && !RegionNil(prgn)) || (exposures && !RegionNil(exposures))) { RegionRec expRec; int clientInterested; clientInterested = (pWin->eventMask | wOtherEventMasks(pWin)) & ExposureMask; - if (other_exposed) { - if (exposures) { - RegionUnion(other_exposed, exposures, other_exposed); - if (exposures != prgn) - RegionDestroy(exposures); - } - exposures = other_exposed; - } if (clientInterested && exposures && (RegionNumRects(exposures) > RECTLIMIT)) { ScreenPtr pScreen = pWin->drawable.pScreen; @@ -1035,7 +1024,7 @@ miOverlayWindowExposures(WindowPtr pWin, if (exposures == &expRec) { RegionUninit(exposures); } - else if (exposures && exposures != prgn && exposures != other_exposed) + else if (exposures && exposures != prgn) RegionDestroy(exposures); if (prgn) RegionEmpty(prgn); @@ -1592,7 +1581,6 @@ miOverlayClearToBackground(WindowPtr pWin, miOverlayTreePtr pTree = MIOVERLAY_GET_WINDOW_TREE(pWin); BoxRec box; RegionRec reg; - RegionPtr pBSReg = NullRegion; ScreenPtr pScreen = pWin->drawable.pScreen; miOverlayScreenPtr pScreenPriv = MIOVERLAY_GET_SCREEN_PRIVATE(pScreen); RegionPtr clipList; @@ -1636,12 +1624,10 @@ miOverlayClearToBackground(WindowPtr pWin, RegionIntersect(®, ®, clipList); if (generateExposures) - (*pScreen->WindowExposures) (pWin, ®, pBSReg); + (*pScreen->WindowExposures) (pWin, ®); else if (pWin->backgroundState != None) miPaintWindow(pWin, ®, PW_BACKGROUND); RegionUninit(®); - if (pBSReg) - RegionDestroy(pBSReg); } /****************************************************************/ diff --git a/mi/miwindow.c b/mi/miwindow.c index 82c3513..ba4c9ed 100644 --- a/mi/miwindow.c +++ b/mi/miwindow.c @@ -111,7 +111,7 @@ miClearToBackground(WindowPtr pWin, RegionIntersect(®, ®, &pWin->clipList); if (generateExposures) - (*pWin->drawable.pScreen->WindowExposures) (pWin, ®, NULL); + (*pWin->drawable.pScreen->WindowExposures) (pWin, ®); else if (pWin->backgroundState != None) miPaintWindow(pWin, ®, PW_BACKGROUND); RegionUninit(®); @@ -221,7 +221,7 @@ miHandleValidateExposures(WindowPtr pWin) if (RegionNotEmpty(&val->after.borderExposed)) miPaintWindow(pChild, &val->after.borderExposed, PW_BORDER); RegionUninit(&val->after.borderExposed); - (*WindowExposures) (pChild, &val->after.exposed, NullRegion); + (*WindowExposures) (pChild, &val->after.exposed); RegionUninit(&val->after.exposed); free(val); pChild->valdata = NULL; -- 1.9.3 From ajax at redhat.com Thu Sep 18 10:23:53 2014 From: ajax at redhat.com (Adam Jackson) Date: Thu, 18 Sep 2014 13:23:53 -0400 Subject: [PATCH 04/11] mi: Drastically simplify miWindowExposures In-Reply-To: <1411061040-13053-1-git-send-email-ajax@redhat.com> References: <1411061040-13053-1-git-send-email-ajax@redhat.com> Message-ID: <1411061040-13053-5-git-send-email-ajax@redhat.com> First, we drop the "spontaneous combustion" path. In a composited environment you're never going to hit that anyway, and even in a classic environment it's so rare to hit as to not be worth it. Second, we delete the declaration of exposures, replace exposures with prgn to match, and then delete all the redundant conditionals. Suddenly this looks like a function a mortal could understand. Signed-off-by: Adam Jackson --- mi/miexpose.c | 53 +++++------------------------------------------------ 1 file changed, 5 insertions(+), 48 deletions(-) diff --git a/mi/miexpose.c b/mi/miexpose.c index 23987fa..98112ab 100644 --- a/mi/miexpose.c +++ b/mi/miexpose.c @@ -423,55 +423,12 @@ miSendExposures(WindowPtr pWin, RegionPtr pRgn, int dx, int dy) void miWindowExposures(WindowPtr pWin, RegionPtr prgn) { - RegionPtr exposures = prgn; - - if ((prgn && !RegionNil(prgn)) || (exposures && !RegionNil(exposures))) { - RegionRec expRec; - int clientInterested; - - /* - * Restore from backing-store FIRST. - */ - clientInterested = - (pWin->eventMask | wOtherEventMasks(pWin)) & ExposureMask; - if (clientInterested && exposures && - (RegionNumRects(exposures) > RECTLIMIT)) { - /* - * If we have LOTS of rectangles, we decide to take the extents - * and force an exposure on that. This should require much less - * work overall, on both client and server. This is cheating, but - * isn't prohibited by the protocol ("spontaneous combustion" :-). - */ - BoxRec box; - - box = *RegionExtents(exposures); - if (exposures == prgn) { - exposures = &expRec; - RegionInit(exposures, &box, 1); - RegionReset(prgn, &box); - } - else { - RegionReset(exposures, &box); - RegionUnion(prgn, prgn, exposures); - } - /* miPaintWindow doesn't clip, so we have to */ - RegionIntersect(prgn, prgn, &pWin->clipList); - } - if (prgn && !RegionNil(prgn)) - miPaintWindow(pWin, prgn, PW_BACKGROUND); - if (clientInterested && exposures && !RegionNil(exposures)) - miSendExposures(pWin, exposures, - pWin->drawable.x, pWin->drawable.y); - if (exposures == &expRec) { - RegionUninit(exposures); - } - else if (exposures && exposures != prgn) - RegionDestroy(exposures); - if (prgn) - RegionEmpty(prgn); + if (prgn && !RegionNil(prgn)) { + miPaintWindow(pWin, prgn, PW_BACKGROUND); + if ((pWin->eventMask | wOtherEventMasks(pWin)) & ExposureMask) + miSendExposures(pWin, prgn, pWin->drawable.x, pWin->drawable.y); + RegionEmpty(prgn); } - else if (exposures && exposures != prgn) - RegionDestroy(exposures); } #ifdef ROOTLESS -- 1.9.3 From ajax at redhat.com Thu Sep 18 10:23:55 2014 From: ajax at redhat.com (Adam Jackson) Date: Thu, 18 Sep 2014 13:23:55 -0400 Subject: [PATCH 06/11] mi: Remove spontaneous combustion from miHandleExposures too In-Reply-To: <1411061040-13053-1-git-send-email-ajax@redhat.com> References: <1411061040-13053-1-git-send-email-ajax@redhat.com> Message-ID: <1411061040-13053-7-git-send-email-ajax@redhat.com> Signed-off-by: Adam Jackson --- mi/miexpose.c | 40 +--------------------------------------- 1 file changed, 1 insertion(+), 39 deletions(-) diff --git a/mi/miexpose.c b/mi/miexpose.c index 98112ab..38b85c2 100644 --- a/mi/miexpose.c +++ b/mi/miexpose.c @@ -103,10 +103,6 @@ Equipment Corporation. the region package can call this. */ -#ifndef RECTLIMIT -#define RECTLIMIT 25 /* pick a number, any number > 8 */ -#endif - /* miHandleExposures generate a region for exposures for areas that were copied from obscured or non-existent areas to non-obscured areas of the destination. Paint the @@ -142,8 +138,6 @@ miHandleExposures(DrawablePtr pSrcDrawable, DrawablePtr pDstDrawable, the window background */ WindowPtr pSrcWin; - BoxRec expBox; - Bool extents; /* avoid work if we can */ if (!pGC->graphicsExposures && @@ -239,51 +233,19 @@ miHandleExposures(DrawablePtr pSrcDrawable, DrawablePtr pDstDrawable, if (pGC->clientClipType == CT_REGION) RegionIntersect(&rgnExposed, &rgnExposed, pGC->clientClip); - /* - * If we have LOTS of rectangles, we decide to take the extents - * and force an exposure on that. This should require much less - * work overall, on both client and server. This is cheating, but - * isn't prohibited by the protocol ("spontaneous combustion" :-) - * for windows. - */ - extents = pGC->graphicsExposures && - (RegionNumRects(&rgnExposed) > RECTLIMIT) && - (pDstDrawable->type != DRAWABLE_PIXMAP); if (pSrcWin) { RegionPtr region; if (!(region = wClipShape(pSrcWin))) region = wBoundingShape(pSrcWin); - /* - * If you try to CopyArea the extents of a shaped window, compacting the - * exposed region will undo all our work! - */ - if (extents && pSrcWin && region && - (RegionContainsRect(region, &srcBox) != rgnIN)) - extents = FALSE; - } - if (extents) { - expBox = *RegionExtents(&rgnExposed); - RegionReset(&rgnExposed, &expBox); } if ((pDstDrawable->type != DRAWABLE_PIXMAP) && (((WindowPtr) pDstDrawable)->backgroundState != None)) { - WindowPtr pWin = (WindowPtr) pDstDrawable; /* make the exposed area screen-relative */ RegionTranslate(&rgnExposed, pDstDrawable->x, pDstDrawable->y); - - if (extents) { - /* miPaintWindow doesn't clip, so we have to */ - RegionIntersect(&rgnExposed, &rgnExposed, &pWin->clipList); - } miPaintWindow((WindowPtr) pDstDrawable, &rgnExposed, PW_BACKGROUND); - - if (extents) { - RegionReset(&rgnExposed, &expBox); - } - else - RegionTranslate(&rgnExposed, -pDstDrawable->x, -pDstDrawable->y); + RegionTranslate(&rgnExposed, -pDstDrawable->x, -pDstDrawable->y); } if (prgnDstClip == &rgnDstRec) { RegionUninit(prgnDstClip); -- 1.9.3 From ajax at redhat.com Thu Sep 18 10:23:54 2014 From: ajax at redhat.com (Adam Jackson) Date: Thu, 18 Sep 2014 13:23:54 -0400 Subject: [PATCH 05/11] mioverlay: Remove miOverlayWindowExposures In-Reply-To: <1411061040-13053-1-git-send-email-ajax@redhat.com> References: <1411061040-13053-1-git-send-email-ajax@redhat.com> Message-ID: <1411061040-13053-6-git-send-email-ajax@redhat.com> As the comment indicates, the only reason this existed was to make sure that in the spontaneous combustion path we clipped painting the border to the correct clip layer. But the mi layer isn't spontaneously combusting anymore; if we apply the same transformation to the overlay code, we end up being identical to miWindowExposures, so we can just drop the whole thing. Signed-off-by: Adam Jackson --- mi/mioverlay.c | 61 ---------------------------------------------------------- 1 file changed, 61 deletions(-) diff --git a/mi/mioverlay.c b/mi/mioverlay.c index f894e2b..8e02d2c 100644 --- a/mi/mioverlay.c +++ b/mi/mioverlay.c @@ -79,7 +79,6 @@ static void miOverlayMarkUnrealizedWindow(WindowPtr, WindowPtr, Bool); static int miOverlayValidateTree(WindowPtr, WindowPtr, VTKind); static void miOverlayHandleExposures(WindowPtr); static void miOverlayMoveWindow(WindowPtr, int, int, WindowPtr, VTKind); -static void miOverlayWindowExposures(WindowPtr, RegionPtr); static void miOverlayResizeWindow(WindowPtr, int, int, unsigned int, unsigned int, WindowPtr); static void miOverlayClearToBackground(WindowPtr, int, int, int, int, Bool); @@ -149,7 +148,6 @@ miInitOverlay(ScreenPtr pScreen, pScreen->ValidateTree = miOverlayValidateTree; pScreen->HandleExposures = miOverlayHandleExposures; pScreen->MoveWindow = miOverlayMoveWindow; - pScreen->WindowExposures = miOverlayWindowExposures; pScreen->ResizeWindow = miOverlayResizeWindow; pScreen->MarkWindow = miOverlayMarkWindow; pScreen->ClearToBackground = miOverlayClearToBackground; @@ -974,65 +972,6 @@ miOverlayMoveWindow(WindowPtr pWin, WindowsRestructured(); } -#ifndef RECTLIMIT -#define RECTLIMIT 25 -#endif - -static void -miOverlayWindowExposures(WindowPtr pWin, RegionPtr prgn) -{ - RegionPtr exposures = prgn; - - if ((prgn && !RegionNil(prgn)) || (exposures && !RegionNil(exposures))) { - RegionRec expRec; - int clientInterested; - - clientInterested = (pWin->eventMask | wOtherEventMasks(pWin)) & - ExposureMask; - if (clientInterested && exposures && - (RegionNumRects(exposures) > RECTLIMIT)) { - ScreenPtr pScreen = pWin->drawable.pScreen; - miOverlayScreenPtr pPriv = MIOVERLAY_GET_SCREEN_PRIVATE(pScreen); - BoxRec box; - - box = *RegionExtents(exposures); - if (exposures == prgn) { - exposures = &expRec; - RegionInit(exposures, &box, 1); - RegionReset(prgn, &box); - } - else { - RegionReset(exposures, &box); - RegionUnion(prgn, prgn, exposures); - } - /* This is the only reason why we are replacing mi's version - of this file */ - - if (!((*pPriv->InOverlay) (pWin))) { - miOverlayTreePtr pTree = MIOVERLAY_GET_WINDOW_TREE(pWin); - - RegionIntersect(prgn, prgn, &pTree->clipList); - } - else - RegionIntersect(prgn, prgn, &pWin->clipList); - } - if (prgn && !RegionNil(prgn)) - miPaintWindow(pWin, prgn, PW_BACKGROUND); - if (clientInterested && exposures && !RegionNil(exposures)) - miSendExposures(pWin, exposures, - pWin->drawable.x, pWin->drawable.y); - if (exposures == &expRec) { - RegionUninit(exposures); - } - else if (exposures && exposures != prgn) - RegionDestroy(exposures); - if (prgn) - RegionEmpty(prgn); - } - else if (exposures && exposures != prgn) - RegionDestroy(exposures); -} - typedef struct { RegionPtr over; RegionPtr under; -- 1.9.3 From ajax at redhat.com Thu Sep 18 10:23:56 2014 From: ajax at redhat.com (Adam Jackson) Date: Thu, 18 Sep 2014 13:23:56 -0400 Subject: [PATCH 07/11] mi: Factor out visibility notify check/send In-Reply-To: <1411061040-13053-1-git-send-email-ajax@redhat.com> References: <1411061040-13053-1-git-send-email-ajax@redhat.com> Message-ID: <1411061040-13053-8-git-send-email-ajax@redhat.com> Signed-off-by: Adam Jackson --- mi/mivaltree.c | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/mi/mivaltree.c b/mi/mivaltree.c index c1cc431..2a39c56 100644 --- a/mi/mivaltree.c +++ b/mi/mivaltree.c @@ -171,6 +171,14 @@ miRegisterRedirectBorderClipProc(SetRedirectBorderClipProcPtr setBorderClip, miGetRedirectBorderClipProc = getBorderClip; } +static void +doVisibilityNotify(WindowPtr pWin, unsigned oldVis) +{ + if (oldVis != pWin->visibility && + ((pWin->eventMask | wOtherEventMasks(pWin)) & VisibilityChangeMask)) + SendVisibilityNotify(pWin); +} + /* * Manual redirected windows are treated as transparent; they do not obscure * siblings or parent windows @@ -281,10 +289,7 @@ miComputeClips(WindowPtr pParent, break; } pParent->visibility = newVis; - if (oldVis != newVis && - ((pParent-> - eventMask | wOtherEventMasks(pParent)) & VisibilityChangeMask)) - SendVisibilityNotify(pParent); + doVisibilityNotify(pParent, oldVis); dx = pParent->drawable.x - pParent->valdata->before.oldAbsCorner.x; dy = pParent->drawable.y - pParent->valdata->before.oldAbsCorner.y; @@ -499,10 +504,8 @@ miTreeObscured(WindowPtr pParent) while (1) { if (pChild->viewable) { oldVis = pChild->visibility; - if (oldVis != (pChild->visibility = VisibilityFullyObscured) && - ((pChild-> - eventMask | wOtherEventMasks(pChild)) & VisibilityChangeMask)) - SendVisibilityNotify(pChild); + pChild->visibility = VisibilityFullyObscured; + doVisibilityNotify(pChild, oldVis); if (pChild->firstChild) { pChild = pChild->firstChild; continue; -- 1.9.3 From ajax at redhat.com Thu Sep 18 10:23:58 2014 From: ajax at redhat.com (Adam Jackson) Date: Thu, 18 Sep 2014 13:23:58 -0400 Subject: [PATCH 09/11] rootless: remove redundant RootlessShapedWindowIn In-Reply-To: <1411061040-13053-1-git-send-email-ajax@redhat.com> References: <1411061040-13053-1-git-send-email-ajax@redhat.com> Message-ID: <1411061040-13053-10-git-send-email-ajax@redhat.com> miShapedWindowIn is identical. Which you would expect, since neither one takes an actual WindowPtr argument, so they couldn't possibly make reference to rootlessness. Signed-off-by: Adam Jackson --- miext/rootless/rootlessValTree.c | 65 ++-------------------------------------- 1 file changed, 3 insertions(+), 62 deletions(-) diff --git a/miext/rootless/rootlessValTree.c b/miext/rootless/rootlessValTree.c index 730d291..c7c2c99 100644 --- a/miext/rootless/rootlessValTree.c +++ b/miext/rootless/rootlessValTree.c @@ -106,64 +106,6 @@ Equipment Corporation. int RootlessMiValidateTree(WindowPtr pRoot, WindowPtr pChild, VTKind kind); -/* - * Compute the visibility of a shaped window - */ -static int -RootlessShapedWindowIn(RegionPtr universe, - RegionPtr bounding, BoxPtr rect, int x, int y) -{ - BoxRec box; - register BoxPtr boundBox; - int nbox; - Bool someIn, someOut; - register int t, x1, y1, x2, y2; - - nbox = RegionNumRects(bounding); - boundBox = RegionRects(bounding); - someIn = someOut = FALSE; - x1 = rect->x1; - y1 = rect->y1; - x2 = rect->x2; - y2 = rect->y2; - while (nbox--) { - if ((t = boundBox->x1 + x) < x1) - t = x1; - box.x1 = t; - if ((t = boundBox->y1 + y) < y1) - t = y1; - box.y1 = t; - if ((t = boundBox->x2 + x) > x2) - t = x2; - box.x2 = t; - if ((t = boundBox->y2 + y) > y2) - t = y2; - box.y2 = t; - if (box.x1 > box.x2) - box.x2 = box.x1; - if (box.y1 > box.y2) - box.y2 = box.y1; - switch (RegionContainsRect(universe, &box)) { - case rgnIN: - if (someOut) - return rgnPART; - someIn = TRUE; - break; - case rgnOUT: - if (someIn) - return rgnPART; - someOut = TRUE; - break; - default: - return rgnPART; - } - boundBox++; - } - if (someIn) - return rgnIN; - return rgnOUT; -} - #define HasParentRelativeBorder(w) (!(w)->borderIsPixel && \ HasBorder(w) && \ (w)->backgroundState == ParentRelative) @@ -229,10 +171,9 @@ RootlessComputeClips(WindowPtr pParent, ScreenPtr pScreen, RegionPtr pBounding; if ((pBounding = wBoundingShape(pParent))) { - switch (RootlessShapedWindowIn(universe, - pBounding, &borderSize, - pParent->drawable.x, - pParent->drawable.y)) { + switch (miShapedWindowIn(universe, pBounding, &borderSize, + pParent->drawable.x, + pParent->drawable.y)) { case rgnIN: newVis = VisibilityUnobscured; break; -- 1.9.3 From ajax at redhat.com Thu Sep 18 10:24:00 2014 From: ajax at redhat.com (Adam Jackson) Date: Thu, 18 Sep 2014 13:24:00 -0400 Subject: [PATCH 11/11] dix: Move pScreen->SendGraphicsExpose up to dix In-Reply-To: <1411061040-13053-1-git-send-email-ajax@redhat.com> References: <1411061040-13053-1-git-send-email-ajax@redhat.com> Message-ID: <1411061040-13053-12-git-send-email-ajax@redhat.com> No DDX is overriding this and it's fairly absurd to expose it as a screen operation anyway. Signed-off-by: Adam Jackson --- Xext/panoramiXprocs.c | 10 ++++------ dix/dispatch.c | 52 +++++++++++++++++++++++++++++++++++++++++++++++---- include/dix.h | 6 ++++++ include/scrnintstr.h | 7 ------- mi/mi.h | 7 ------- mi/miexpose.c | 47 ---------------------------------------------- mi/miscrinit.c | 1 - 7 files changed, 58 insertions(+), 72 deletions(-) diff --git a/Xext/panoramiXprocs.c b/Xext/panoramiXprocs.c index 83a2e08..aa3859f 100644 --- a/Xext/panoramiXprocs.c +++ b/Xext/panoramiXprocs.c @@ -1193,9 +1193,8 @@ PanoramiXCopyArea(ClientPtr client) Bool overlap; RegionValidate(&totalReg, &overlap); - (*pDst->pScreen->SendGraphicsExpose) (client, &totalReg, - stuff->dstDrawable, - X_CopyArea, 0); + SendGraphicsExpose(client, &totalReg, stuff->dstDrawable, + X_CopyArea, 0); RegionUninit(&totalReg); } } @@ -1306,9 +1305,8 @@ PanoramiXCopyPlane(ClientPtr client) Bool overlap; RegionValidate(&totalReg, &overlap); - (*pdstDraw->pScreen->SendGraphicsExpose) (client, &totalReg, - stuff->dstDrawable, - X_CopyPlane, 0); + SendGraphicsExpose(client, &totalReg, stuff->dstDrawable, + X_CopyPlane, 0); RegionUninit(&totalReg); } diff --git a/dix/dispatch.c b/dix/dispatch.c index f7a08f8..74abecd 100644 --- a/dix/dispatch.c +++ b/dix/dispatch.c @@ -1597,6 +1597,52 @@ ProcClearToBackground(ClientPtr client) return Success; } +/* send GraphicsExpose events, or a NoExpose event, based on the region */ +void +SendGraphicsExpose(ClientPtr client, RegionPtr pRgn, XID drawable, + int major, int minor) +{ + if (pRgn && !RegionNil(pRgn)) { + xEvent *pEvent; + xEvent *pe; + BoxPtr pBox; + int i; + int numRects; + + numRects = RegionNumRects(pRgn); + pBox = RegionRects(pRgn); + if (!(pEvent = calloc(numRects, sizeof(xEvent)))) + return; + pe = pEvent; + + for (i = 1; i <= numRects; i++, pe++, pBox++) { + pe->u.u.type = GraphicsExpose; + pe->u.graphicsExposure.drawable = drawable; + pe->u.graphicsExposure.x = pBox->x1; + pe->u.graphicsExposure.y = pBox->y1; + pe->u.graphicsExposure.width = pBox->x2 - pBox->x1; + pe->u.graphicsExposure.height = pBox->y2 - pBox->y1; + pe->u.graphicsExposure.count = numRects - i; + pe->u.graphicsExposure.majorEvent = major; + pe->u.graphicsExposure.minorEvent = minor; + } + /* GraphicsExpose is a "critical event", which TryClientEvents + * handles specially. */ + TryClientEvents(client, NULL, pEvent, numRects, + (Mask) 0, NoEventMask, NullGrab); + free(pEvent); + } + else { + xEvent event = { + .u.noExposure.drawable = drawable, + .u.noExposure.majorEvent = major, + .u.noExposure.minorEvent = minor + }; + event.u.u.type = NoExpose; + WriteEventsToClient(client, 1, &event); + } +} + int ProcCopyArea(ClientPtr client) { @@ -1628,8 +1674,7 @@ ProcCopyArea(ClientPtr client) stuff->width, stuff->height, stuff->dstX, stuff->dstY); if (pGC->graphicsExposures) { - (*pDst->pScreen->SendGraphicsExpose) - (client, pRgn, stuff->dstDrawable, X_CopyArea, 0); + SendGraphicsExpose(client, pRgn, stuff->dstDrawable, X_CopyArea, 0); if (pRgn) RegionDestroy(pRgn); } @@ -1676,8 +1721,7 @@ ProcCopyPlane(ClientPtr client) stuff->srcY, stuff->width, stuff->height, stuff->dstX, stuff->dstY, stuff->bitPlane); if (pGC->graphicsExposures) { - (*pdstDraw->pScreen->SendGraphicsExpose) - (client, pRgn, stuff->dstDrawable, X_CopyPlane, 0); + SendGraphicsExpose(client, pRgn, stuff->dstDrawable, X_CopyPlane, 0); if (pRgn) RegionDestroy(pRgn); } diff --git a/include/dix.h b/include/dix.h index 61ecc8d..116da2e 100644 --- a/include/dix.h +++ b/include/dix.h @@ -254,6 +254,12 @@ extern _X_EXPORT void ClientWakeup(ClientPtr /*client */ ); extern _X_EXPORT Bool ClientIsAsleep(ClientPtr /*client */ ); +extern _X_EXPORT void SendGraphicsExpose(ClientPtr /*client */ , + RegionPtr /*pRgn */ , + XID /*drawable */ , + int /*major */ , + int /*minor */); + /* atom.c */ extern _X_EXPORT Atom MakeAtom(const char * /*string */ , diff --git a/include/scrnintstr.h b/include/scrnintstr.h index 7331ec1..269ff5a 100644 --- a/include/scrnintstr.h +++ b/include/scrnintstr.h @@ -252,12 +252,6 @@ typedef void (*ResolveColorProcPtr) (unsigned short * /*pred */ , typedef RegionPtr (*BitmapToRegionProcPtr) (PixmapPtr /*pPix */ ); -typedef void (*SendGraphicsExposeProcPtr) (ClientPtr /*client */ , - RegionPtr /*pRgn */ , - XID /*drawable */ , - int /*major */ , - int /*minor */ ); - typedef void (*ScreenBlockHandlerProcPtr) (ScreenPtr pScreen, void *pTimeout, void *pReadmask); @@ -540,7 +534,6 @@ typedef struct _Screen { /* Region procedures */ BitmapToRegionProcPtr BitmapToRegion; - SendGraphicsExposeProcPtr SendGraphicsExpose; /* os layer procedures */ diff --git a/mi/mi.h b/mi/mi.h index 700bb11..8cb3ce7 100644 --- a/mi/mi.h +++ b/mi/mi.h @@ -232,13 +232,6 @@ extern _X_EXPORT RegionPtr miHandleExposures(DrawablePtr /*pSrcDrawable */ , int /*dsty */ ); -extern _X_EXPORT void miSendGraphicsExpose(ClientPtr /*client */ , - RegionPtr /*pRgn */ , - XID /*drawable */ , - int /*major */ , - int /*minor */ - ); - extern _X_EXPORT void miSendExposures(WindowPtr /*pWin */ , RegionPtr /*pRgn */ , int /*dx */ , diff --git a/mi/miexpose.c b/mi/miexpose.c index fe0dc47..04a53a4 100644 --- a/mi/miexpose.c +++ b/mi/miexpose.c @@ -268,53 +268,6 @@ miHandleExposures(DrawablePtr pSrcDrawable, DrawablePtr pDstDrawable, } } -/* send GraphicsExpose events, or a NoExpose event, based on the region */ - -void -miSendGraphicsExpose(ClientPtr client, RegionPtr pRgn, XID drawable, - int major, int minor) -{ - if (pRgn && !RegionNil(pRgn)) { - xEvent *pEvent; - xEvent *pe; - BoxPtr pBox; - int i; - int numRects; - - numRects = RegionNumRects(pRgn); - pBox = RegionRects(pRgn); - if (!(pEvent = calloc(numRects, sizeof(xEvent)))) - return; - pe = pEvent; - - for (i = 1; i <= numRects; i++, pe++, pBox++) { - pe->u.u.type = GraphicsExpose; - pe->u.graphicsExposure.drawable = drawable; - pe->u.graphicsExposure.x = pBox->x1; - pe->u.graphicsExposure.y = pBox->y1; - pe->u.graphicsExposure.width = pBox->x2 - pBox->x1; - pe->u.graphicsExposure.height = pBox->y2 - pBox->y1; - pe->u.graphicsExposure.count = numRects - i; - pe->u.graphicsExposure.majorEvent = major; - pe->u.graphicsExposure.minorEvent = minor; - } - /* GraphicsExpose is a "critical event", which TryClientEvents - * handles specially. */ - TryClientEvents(client, NULL, pEvent, numRects, - (Mask) 0, NoEventMask, NullGrab); - free(pEvent); - } - else { - xEvent event = { - .u.noExposure.drawable = drawable, - .u.noExposure.majorEvent = major, - .u.noExposure.minorEvent = minor - }; - event.u.u.type = NoExpose; - WriteEventsToClient(client, 1, &event); - } -} - void miSendExposures(WindowPtr pWin, RegionPtr pRgn, int dx, int dy) { diff --git a/mi/miscrinit.c b/mi/miscrinit.c index 00c15f7..ec4d108 100644 --- a/mi/miscrinit.c +++ b/mi/miscrinit.c @@ -259,7 +259,6 @@ miScreenInit(ScreenPtr pScreen, void *pbits, /* pointer to screen bits */ /* CreateColormap, DestroyColormap, InstallColormap, UninstallColormap */ /* ListInstalledColormaps, StoreColors, ResolveColor */ /* BitmapToRegion */ - pScreen->SendGraphicsExpose = miSendGraphicsExpose; pScreen->BlockHandler = (ScreenBlockHandlerProcPtr) NoopDDA; pScreen->WakeupHandler = (ScreenWakeupHandlerProcPtr) NoopDDA; pScreen->MarkWindow = miMarkWindow; -- 1.9.3 From ajax at redhat.com Thu Sep 18 10:23:59 2014 From: ajax at redhat.com (Adam Jackson) Date: Thu, 18 Sep 2014 13:23:59 -0400 Subject: [PATCH 10/11] mi: Drop plane argument from miHandleExposures In-Reply-To: <1411061040-13053-1-git-send-email-ajax@redhat.com> References: <1411061040-13053-1-git-send-email-ajax@redhat.com> Message-ID: <1411061040-13053-11-git-send-email-ajax@redhat.com> This existed to be passed to the bs recovery routine; since we back all planes, we don't care. Signed-off-by: Adam Jackson --- fb/fbcopy.c | 2 +- glamor/glamor_copy.c | 3 +-- hw/dmx/dmxgcops.c | 8 ++++---- mi/mi.h | 3 +-- mi/mibitblt.c | 5 ++--- mi/micopy.c | 3 +-- mi/miexpose.c | 8 +------- 7 files changed, 11 insertions(+), 21 deletions(-) diff --git a/fb/fbcopy.c b/fb/fbcopy.c index 541ef71..5bbabc3 100644 --- a/fb/fbcopy.c +++ b/fb/fbcopy.c @@ -271,5 +271,5 @@ fbCopyPlane(DrawablePtr pSrcDrawable, else return miHandleExposures(pSrcDrawable, pDstDrawable, pGC, xIn, yIn, - widthSrc, heightSrc, xOut, yOut, bitplane); + widthSrc, heightSrc, xOut, yOut); } diff --git a/glamor/glamor_copy.c b/glamor/glamor_copy.c index 6f422d4..3320935 100644 --- a/glamor/glamor_copy.c +++ b/glamor/glamor_copy.c @@ -677,8 +677,7 @@ glamor_copy_plane(DrawablePtr src, DrawablePtr dst, GCPtr gc, { if ((bitplane & FbFullMask(src->depth)) == 0) return miHandleExposures(src, dst, gc, - srcx, srcy, width, height, dstx, dsty, - bitplane); + srcx, srcy, width, height, dstx, dsty); return miDoCopy(src, dst, gc, srcx, srcy, width, height, dstx, dsty, glamor_copy, bitplane, NULL); diff --git a/hw/dmx/dmxgcops.c b/hw/dmx/dmxgcops.c index aa7c8eb..0ebd69a 100644 --- a/hw/dmx/dmxgcops.c +++ b/hw/dmx/dmxgcops.c @@ -179,7 +179,7 @@ dmxCopyArea(DrawablePtr pSrc, DrawablePtr pDst, GCPtr pGC, if (DMX_GCOPS_OFFSCREEN(pSrc) || DMX_GCOPS_OFFSCREEN(pDst)) return miHandleExposures(pSrc, pDst, pGC, srcx, srcy, w, h, - dstx, dsty, 0L); + dstx, dsty); DMX_GCOPS_SET_DRAWABLE(pSrc, srcDraw); DMX_GCOPS_SET_DRAWABLE(pDst, dstDraw); @@ -188,7 +188,7 @@ dmxCopyArea(DrawablePtr pSrc, DrawablePtr pDst, GCPtr pGC, srcx, srcy, w, h, dstx, dsty); dmxSync(dmxScreen, FALSE); - return miHandleExposures(pSrc, pDst, pGC, srcx, srcy, w, h, dstx, dsty, 0L); + return miHandleExposures(pSrc, pDst, pGC, srcx, srcy, w, h, dstx, dsty); } /** Copy plane number \a bitPlane from \a pSrc drawable to \a pDst @@ -206,7 +206,7 @@ dmxCopyPlane(DrawablePtr pSrc, DrawablePtr pDst, GCPtr pGC, if (DMX_GCOPS_OFFSCREEN(pSrc) || DMX_GCOPS_OFFSCREEN(pDst)) return miHandleExposures(pSrc, pDst, pGC, srcx, srcy, width, height, - dstx, dsty, bitPlane); + dstx, dsty); DMX_GCOPS_SET_DRAWABLE(pSrc, srcDraw); DMX_GCOPS_SET_DRAWABLE(pDst, dstDraw); @@ -216,7 +216,7 @@ dmxCopyPlane(DrawablePtr pSrc, DrawablePtr pDst, GCPtr pGC, dmxSync(dmxScreen, FALSE); return miHandleExposures(pSrc, pDst, pGC, srcx, srcy, width, height, - dstx, dsty, bitPlane); + dstx, dsty); } /** Render list of points, \a pptInit in \a pDrawable on the back-end diff --git a/mi/mi.h b/mi/mi.h index a4a01b8..700bb11 100644 --- a/mi/mi.h +++ b/mi/mi.h @@ -229,8 +229,7 @@ extern _X_EXPORT RegionPtr miHandleExposures(DrawablePtr /*pSrcDrawable */ , int /*width */ , int /*height */ , int /*dstx */ , - int /*dsty */ , - unsigned long /*plane */ + int /*dsty */ ); extern _X_EXPORT void miSendGraphicsExpose(ClientPtr /*client */ , diff --git a/mi/mibitblt.c b/mi/mibitblt.c index 3ed4ed1..08bd1c5 100644 --- a/mi/mibitblt.c +++ b/mi/mibitblt.c @@ -242,8 +242,7 @@ miCopyArea(DrawablePtr pSrcDrawable, } } prgnExposed = miHandleExposures(pSrcDrawable, pDstDrawable, pGC, xIn, yIn, - widthSrc, heightSrc, xOut, yOut, - (unsigned long) 0); + widthSrc, heightSrc, xOut, yOut); if (realSrcClip) RegionDestroy(prgnSrcClip); @@ -579,7 +578,7 @@ miCopyPlane(DrawablePtr pSrcDrawable, } } prgnExposed = miHandleExposures(pSrcDrawable, pDstDrawable, pGC, srcx, srcy, - width, height, dstx, dsty, bitPlane); + width, height, dstx, dsty); RegionDestroy(prgnSrc); return prgnExposed; } diff --git a/mi/micopy.c b/mi/micopy.c index 3079511..a52b0a7 100644 --- a/mi/micopy.c +++ b/mi/micopy.c @@ -304,8 +304,7 @@ miDoCopy(DrawablePtr pSrcDrawable, yIn - pSrcDrawable->y, widthSrc, heightSrc, xOut - pDstDrawable->x, - yOut - pDstDrawable->y, - (unsigned long) bitPlane); + yOut - pDstDrawable->y); RegionUninit(&rgnDst); if (freeSrcClip) RegionDestroy(prgnSrcClip); diff --git a/mi/miexpose.c b/mi/miexpose.c index 38b85c2..fe0dc47 100644 --- a/mi/miexpose.c +++ b/mi/miexpose.c @@ -112,18 +112,12 @@ NOTE: this should generally be called, even if graphicsExposures is false, because this is where bits get recovered from backing store. -NOTE: - added argument 'plane' is used to indicate how exposures from backing -store should be accomplished. If plane is 0 (i.e. no bit plane), CopyArea -should be used, else a CopyPlane of the indicated plane will be used. The -exposing is done by the backing store's GraphicsExpose function, of course. - */ RegionPtr miHandleExposures(DrawablePtr pSrcDrawable, DrawablePtr pDstDrawable, GCPtr pGC, int srcx, int srcy, int width, int height, - int dstx, int dsty, unsigned long plane) + int dstx, int dsty) { RegionPtr prgnSrcClip; /* drawable-relative source clip */ RegionRec rgnSrcRec; -- 1.9.3 From ajax at redhat.com Thu Sep 18 10:23:57 2014 From: ajax at redhat.com (Adam Jackson) Date: Thu, 18 Sep 2014 13:23:57 -0400 Subject: [PATCH 08/11] mi: Simplify composite border clip redirection interface In-Reply-To: <1411061040-13053-1-git-send-email-ajax@redhat.com> References: <1411061040-13053-1-git-send-email-ajax@redhat.com> Message-ID: <1411061040-13053-9-git-send-email-ajax@redhat.com> There's not really a good reason for mi to not just call the composite code directly. Signed-off-by: Adam Jackson --- composite/compext.c | 3 --- mi/mi.h | 11 ----------- mi/mivaltree.c | 52 +++++++++++++++++++--------------------------------- 3 files changed, 19 insertions(+), 47 deletions(-) diff --git a/composite/compext.c b/composite/compext.c index cadedbd..fcfc349 100644 --- a/composite/compext.c +++ b/composite/compext.c @@ -594,9 +594,6 @@ CompositeExtensionInit(void) return; CompositeReqCode = (CARD8) extEntry->base; - miRegisterRedirectBorderClipProc(compSetRedirectBorderClip, - compGetRedirectBorderClip); - /* Initialization succeeded */ noCompositeExtension = FALSE; } diff --git a/mi/mi.h b/mi/mi.h index 4b5e862..a4a01b8 100644 --- a/mi/mi.h +++ b/mi/mi.h @@ -425,17 +425,6 @@ extern _X_EXPORT int miShapedWindowIn(RegionPtr /*universe */ , int /*y */ ); -typedef void - (*SetRedirectBorderClipProcPtr) (WindowPtr pWindow, RegionPtr pRegion); - -typedef RegionPtr - (*GetRedirectBorderClipProcPtr) (WindowPtr pWindow); - -extern _X_EXPORT void - -miRegisterRedirectBorderClipProc(SetRedirectBorderClipProcPtr setBorderClip, - GetRedirectBorderClipProcPtr getBorderClip); - extern _X_EXPORT int miValidateTree(WindowPtr /*pParent */ , WindowPtr /*pChild */ , VTKind /*kind */ diff --git a/mi/mivaltree.c b/mi/mivaltree.c index 2a39c56..d23fbcc 100644 --- a/mi/mivaltree.c +++ b/mi/mivaltree.c @@ -99,8 +99,10 @@ Equipment Corporation. #include "mi.h" #include "regionstr.h" #include "mivalidate.h" - #include "globals.h" +#ifdef COMPOSITE +#include "compint.h" +#endif /* * Compute the visibility of a shaped window @@ -160,17 +162,6 @@ miShapedWindowIn(RegionPtr universe, RegionPtr bounding, return rgnOUT; } -static GetRedirectBorderClipProcPtr miGetRedirectBorderClipProc; -static SetRedirectBorderClipProcPtr miSetRedirectBorderClipProc; - -void -miRegisterRedirectBorderClipProc(SetRedirectBorderClipProcPtr setBorderClip, - GetRedirectBorderClipProcPtr getBorderClip) -{ - miSetRedirectBorderClipProc = setBorderClip; - miGetRedirectBorderClipProc = getBorderClip; -} - static void doVisibilityNotify(WindowPtr pWin, unsigned oldVis) { @@ -250,11 +241,9 @@ miComputeClips(WindowPtr pParent, * In redirected drawing case, reset universe to borderSize */ if (pParent->redirectDraw != RedirectDrawNone) { - if (miSetRedirectBorderClipProc) { - if (TreatAsTransparent(pParent)) - RegionEmpty(universe); - (*miSetRedirectBorderClipProc) (pParent, universe); - } + if (TreatAsTransparent(pParent)) + RegionEmpty(universe); + compSetRedirectBorderClip (pParent, universe); RegionCopy(universe, &pParent->borderSize); } #endif @@ -519,6 +508,17 @@ miTreeObscured(WindowPtr pParent) } } +static RegionPtr +getBorderClip(WindowPtr pWin) +{ +#ifdef COMPOSITE + if (pWin->redirectDraw != RedirectDrawNone) + return compGetRedirectBorderClip(pWin); + else +#endif + return &pWin->borderClip; +} + /* *----------------------------------------------------------------------- * miValidateTree -- @@ -612,14 +612,7 @@ miValidateTree(WindowPtr pParent, /* Parent to validate */ forward = TRUE; for (pWin = pChild; pWin; pWin = pWin->nextSib) { if (pWin->valdata) { - RegionPtr pBorderClip = &pWin->borderClip; - -#ifdef COMPOSITE - if (pWin->redirectDraw != RedirectDrawNone && - miGetRedirectBorderClipProc) - pBorderClip = (*miGetRedirectBorderClipProc) (pWin); -#endif - RegionAppend(&totalClip, pBorderClip); + RegionAppend(&totalClip, getBorderClip(pWin)); if (pWin->viewable) viewvals++; } @@ -630,14 +623,7 @@ miValidateTree(WindowPtr pParent, /* Parent to validate */ pWin = pParent->lastChild; while (1) { if (pWin->valdata) { - RegionPtr pBorderClip = &pWin->borderClip; - -#ifdef COMPOSITE - if (pWin->redirectDraw != RedirectDrawNone && - miGetRedirectBorderClipProc) - pBorderClip = (*miGetRedirectBorderClipProc) (pWin); -#endif - RegionAppend(&totalClip, pBorderClip); + RegionAppend(&totalClip, getBorderClip(pWin)); if (pWin->viewable) viewvals++; } -- 1.9.3 From jcristau at debian.org Thu Sep 18 13:32:50 2014 From: jcristau at debian.org (Julien Cristau) Date: Thu, 18 Sep 2014 22:32:50 +0200 Subject: [PATCH] xwayland: always include drm.xml in tarballs In-Reply-To: <1410932487-20437-1-git-send-email-jcristau@debian.org> References: <1410932487-20437-1-git-send-email-jcristau@debian.org> Message-ID: <20140918203250.GT2264@betterave.cristau.org> On Wed, Sep 17, 2014 at 07:41:27 +0200, Julien Cristau wrote: > Move drm.xml out of the automake conditional so make dist includes it > even if glamor-egl is disabled. > > Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=83960 > > Signed-off-by: Julien Cristau > --- > hw/xwayland/Makefile.am | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > from IRC: Reviewed-by: Eric Anholt Cheers, Julien From keithp at keithp.com Thu Sep 18 15:07:52 2014 From: keithp at keithp.com (Keith Packard) Date: Thu, 18 Sep 2014 15:07:52 -0700 Subject: [PATCH] xwayland: always include drm.xml in tarballs In-Reply-To: <20140918203250.GT2264@betterave.cristau.org> References: <1410932487-20437-1-git-send-email-jcristau@debian.org> <20140918203250.GT2264@betterave.cristau.org> Message-ID: <86ha04y43r.fsf@hiro.keithp.com> Julien Cristau writes: >> Signed-off-by: Julien Cristau > Reviewed-by: Eric Anholt Merged. eaee657..af40913 master -> master -- keith.packard at intel.com -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 810 bytes Desc: not available URL: From keithp at keithp.com Thu Sep 18 15:16:24 2014 From: keithp at keithp.com (Keith Packard) Date: Thu, 18 Sep 2014 15:16:24 -0700 Subject: [PATCH] loader: Remove compatibility with ancient XFree86 version numbering In-Reply-To: <8761gmxahf.fsf@eliezer.anholt.net> References: <1410966442-10240-1-git-send-email-ajax@redhat.com> <8761gmxahf.fsf@eliezer.anholt.net> Message-ID: <86bnqcy3pj.fsf@hiro.keithp.com> Eric Anholt writes: > Adam Jackson writes: > >> Pretty sure I'm guilty of adding this. I think I was thinking of trying >> to be compatible with some really old binary-only driver that I had >> vague aspirations of reverse-engineering, but since I haven't gotten >> around to it in the intervening decade... > > Reviewed-by: Eric Anholt Merged. af40913..f839caa master -> master -- keith.packard at intel.com -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 810 bytes Desc: not available URL: From keithp at keithp.com Thu Sep 18 15:27:48 2014 From: keithp at keithp.com (Keith Packard) Date: Thu, 18 Sep 2014 15:27:48 -0700 Subject: [PATCH] ephyr: Properly implement hardware cursors (v3) In-Reply-To: <1410880258-4419-1-git-send-email-ajax@redhat.com> References: <1410880258-4419-1-git-send-email-ajax@redhat.com> Message-ID: <868ulgy36j.fsf@hiro.keithp.com> Adam Jackson writes: > v3: > Initialize the invisible cursor's image (Keith) > > Signed-off-by: Adam Jackson Reviewed-by: Keith Packard master -- keith.packard at intel.com -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 810 bytes Desc: not available URL: From keithp at keithp.com Thu Sep 18 15:31:12 2014 From: keithp at keithp.com (Keith Packard) Date: Thu, 18 Sep 2014 15:31:12 -0700 Subject: [PATCH] Build required portions of registry.c automatically [v2] In-Reply-To: <1410877780.9541.0.camel@dmt> References: <1410390002-12042-4-git-send-email-keithp@keithp.com> <1410797893-6124-1-git-send-email-keithp@keithp.com> <1410877780.9541.0.camel@dmt> Message-ID: <864mw4y30v.fsf@hiro.keithp.com> Adam Jackson writes: > 1, 2, and v2 of 3 are: > > Reviewed-by: Adam Jackson Merged. 670ee07..69d8572 master -> master -- keith.packard at intel.com -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 810 bytes Desc: not available URL: From keithp at keithp.com Thu Sep 18 15:32:38 2014 From: keithp at keithp.com (Keith Packard) Date: Thu, 18 Sep 2014 15:32:38 -0700 Subject: [PATCH] present: Support PresentOptionCopy In-Reply-To: <1410880473.9541.13.camel@dmt> References: <1410382933-27433-1-git-send-email-keithp@keithp.com> <1410880473.9541.13.camel@dmt> Message-ID: <861tr8y2yh.fsf@hiro.keithp.com> Adam Jackson writes: > On Wed, 2014-09-10 at 14:02 -0700, Keith Packard wrote: >> We added this option to the present protocol before 1.0 but somehow >> never implemented it in the server. It's pretty simple; just don't >> ever do flips if the application specifies Copy. > > Reviewed-by: Adam Jackson Merged. 69d8572..2051514 master -> master -- keith.packard at intel.com -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 810 bytes Desc: not available URL: From keithp at keithp.com Thu Sep 18 15:33:37 2014 From: keithp at keithp.com (Keith Packard) Date: Thu, 18 Sep 2014 15:33:37 -0700 Subject: [PATCH] present: Clear pending flip pixmaps at CloseScreen In-Reply-To: <1410880529.9541.14.camel@dmt> References: <1410382919-27385-1-git-send-email-keithp@keithp.com> <1410880529.9541.14.camel@dmt> Message-ID: <86y4tgwoce.fsf@hiro.keithp.com> Adam Jackson writes: >> Signed-off-by: Keith Packard > > Reviewed-by: Adam Jackson Merged. 2051514..ea7357d master -> master -- keith.packard at intel.com -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 810 bytes Desc: not available URL: From keithp at keithp.com Thu Sep 18 15:49:07 2014 From: keithp at keithp.com (Keith Packard) Date: Thu, 18 Sep 2014 15:49:07 -0700 Subject: [PATCH 00/11] Misc window exposure/validation cleanups In-Reply-To: <1411061040-13053-1-git-send-email-ajax@redhat.com> References: <1411061040-13053-1-git-send-email-ajax@redhat.com> Message-ID: <86vbokwnmk.fsf@hiro.keithp.com> Adam Jackson writes: > In attempting to get the Always mode of backing store working again, I > felt the urge to clean the place up a bit. The most notable change here > is removing the (questionable) optimization from exposure event generation > to emit a bounding-box event when faced with more than 25 rects in the > exposed region. Given that toolkits already coalesce consecutive expose > boxes, and that you'll never hit it in a composited environment anyway, > the complexity doesn't seem justified. This was written to address shaped windows, which can still generate a large number of rectangles, even in a composited environment. I think xeyes was the original test case; a full-screen xeyes window has a couple thousand rectangles, or about 64kB of data. I suspect an xeyes-specific optimization is not all that useful to keep around, but I fear that some user somewhere is taking advantage of this... -- keith.packard at intel.com -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 810 bytes Desc: not available URL: From keithp at keithp.com Thu Sep 18 15:51:39 2014 From: keithp at keithp.com (Keith Packard) Date: Thu, 18 Sep 2014 15:51:39 -0700 Subject: [PATCH 08/11] mi: Simplify composite border clip redirection interface In-Reply-To: <1411061040-13053-9-git-send-email-ajax@redhat.com> References: <1411061040-13053-1-git-send-email-ajax@redhat.com> <1411061040-13053-9-git-send-email-ajax@redhat.com> Message-ID: <86sijownic.fsf@hiro.keithp.com> Adam Jackson writes: > +#ifdef COMPOSITE > +#include "compint.h" > +#endif Let's move these functions to the public interface instead of abusing the header file here, I think. Otherwise, this patch is Reviewed-by: Keith Packard -- keith.packard at intel.com -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 810 bytes Desc: not available URL: From keithp at keithp.com Thu Sep 18 15:55:28 2014 From: keithp at keithp.com (Keith Packard) Date: Thu, 18 Sep 2014 15:55:28 -0700 Subject: [PATCH 5/5] glamor: Check large pixmap users in glamor_largepixmap.c In-Reply-To: <1410881024.9541.15.camel@dmt> References: <1408478413-7902-1-git-send-email-keithp@keithp.com> <1408478413-7902-6-git-send-email-keithp@keithp.com> <1410881024.9541.15.camel@dmt> Message-ID: <86ppeswnbz.fsf@hiro.keithp.com> Adam Jackson writes: > On Tue, 2014-08-19 at 13:00 -0700, Keith Packard wrote: >> This enables the assertion that all users of the large pixmap member >> are restricted to pixmaps which are actually large. >> >> Signed-off-by: Keith Packard > > Series is: > > Reviewed-by: Adam Jackson Merged, along with the patch removing shader-based trapezoids, which was Reviewed via IRC. ea7357d..7e6bd54 master -> master -- keith.packard at intel.com -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 810 bytes Desc: not available URL: From keithp at keithp.com Thu Sep 18 16:57:07 2014 From: keithp at keithp.com (Keith Packard) Date: Thu, 18 Sep 2014 16:57:07 -0700 Subject: [PATCH 01/11] kdrive: Remove vestigial reference to fbInitValidateTree In-Reply-To: <1411061040-13053-2-git-send-email-ajax@redhat.com> References: <1411061040-13053-1-git-send-email-ajax@redhat.com> <1411061040-13053-2-git-send-email-ajax@redhat.com> Message-ID: <86mw9wwkh8.fsf@hiro.keithp.com> Adam Jackson writes: > Signed-off-by: Adam Jackson Reviewed-by: Keith Packard -- keith.packard at intel.com -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 810 bytes Desc: not available URL: From keithp at keithp.com Thu Sep 18 16:57:22 2014 From: keithp at keithp.com (Keith Packard) Date: Thu, 18 Sep 2014 16:57:22 -0700 Subject: [PATCH 02/11] xquartz: Remove useless DRIWindowExposures In-Reply-To: <1411061040-13053-3-git-send-email-ajax@redhat.com> References: <1411061040-13053-1-git-send-email-ajax@redhat.com> <1411061040-13053-3-git-send-email-ajax@redhat.com> Message-ID: <86k350wkgt.fsf@hiro.keithp.com> Adam Jackson writes: > Signed-off-by: Adam Jackson Reviewed-by: Keith Packard -- keith.packard at intel.com -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 810 bytes Desc: not available URL: From airlied at gmail.com Thu Sep 18 21:00:45 2014 From: airlied at gmail.com (Dave Airlie) Date: Fri, 19 Sep 2014 14:00:45 +1000 Subject: xserver build failure on tinderbox Message-ID: I finally got back to trying to resurrect the RHEL6 tinderbox, However the xserver build is broken due to a double definition of DBusConnection http://tinderbox.x.org/builds/2014-09-19-0004/logs/xserver/#build This seems to be due to 480590b90c3966536451d2a2fecc42a66082ed77 dbus-core: Make dbus-core no longer mutually exclusive with udev Dave. From airlied at gmail.com Thu Sep 18 21:22:13 2014 From: airlied at gmail.com (Dave Airlie) Date: Fri, 19 Sep 2014 14:22:13 +1000 Subject: [PATCH] xserver: Move 'pragma GCC diagnostic' outside functions Message-ID: <1411100533-2601-1-git-send-email-airlied@gmail.com> From: Jon TURNEY $ gcc --version gcc (Gentoo 4.4.3-r2 p1.2) 4.4.3 /jhbuild/checkout/xorg/xserver/os/log.c: In function ?LogInit?: /jhbuild/checkout/xorg/xserver/os/log.c:199: error: #pragma GCC diagnostic not allowed inside functions /jhbuild/checkout/xorg/xserver/os/log.c:201: warning: format not a string literal, argument types not checked /jhbuild/checkout/xorg/xserver/os/log.c:212: error: #pragma GCC diagnostic not allowed inside functions /jhbuild/checkout/xorg/xserver/os/log.c:214: warning: format not a string literal, argument types not checked etc. Reviewed-by: Dave Airlie Signed-off-by: Jon TURNEY Signed-off-by: Dave Airlie --- hw/xfree86/os-support/linux/lnx_init.c | 6 +++++- os/log.c | 10 ++++------ test/signal-logging.c | 7 ++++--- 3 files changed, 13 insertions(+), 10 deletions(-) diff --git a/hw/xfree86/os-support/linux/lnx_init.c b/hw/xfree86/os-support/linux/lnx_init.c index 85709c6..9485307 100644 --- a/hw/xfree86/os-support/linux/lnx_init.c +++ b/hw/xfree86/os-support/linux/lnx_init.c @@ -76,6 +76,9 @@ switch_to(int vt, const char *from) FatalError("%s: VT_WAITACTIVE failed: %s\n", from, strerror(errno)); } +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wformat-nonliteral" + void xf86OpenConsole(void) { @@ -166,7 +169,6 @@ xf86OpenConsole(void) i = 0; while (vcs[i] != NULL) { -#pragma GCC diagnostic ignored "-Wformat-nonliteral" snprintf(vtname, sizeof(vtname), vcs[i], xf86Info.vtno); /* /dev/tty1-64 */ if ((xf86Info.consoleFd = open(vtname, O_RDWR | O_NDELAY, 0)) >= 0) break; @@ -272,6 +274,8 @@ xf86OpenConsole(void) } } +#pragma GCC diagnostic pop + void xf86CloseConsole(void) { diff --git a/os/log.c b/os/log.c index 629021e..7348ad4 100644 --- a/os/log.c +++ b/os/log.c @@ -189,15 +189,15 @@ strlen_sigsafe(const char *s) * string. */ +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wformat-nonliteral" + const char * LogInit(const char *fname, const char *backup) { char *logFileName = NULL; if (fname && *fname) { -#if __GNUC__ > 4 || __GNUC__ == 4 && __GNUC_MINOR__ > 5 -#pragma GCC diagnostic ignored "-Wformat-nonliteral" -#endif if (asprintf(&logFileName, fname, display) == -1) FatalError("Cannot allocate space for the log file name\n"); @@ -208,9 +208,6 @@ LogInit(const char *fname, const char *backup) char *suffix; char *oldLog; -#if __GNUC__ > 4 || __GNUC__ == 4 && __GNUC_MINOR__ > 5 -#pragma GCC diagnostic ignored "-Wformat-nonliteral" -#endif if ((asprintf(&suffix, backup, display) == -1) || (asprintf(&oldLog, "%s%s", logFileName, suffix) == -1)) FatalError("Cannot allocate space for the log file name\n"); @@ -254,6 +251,7 @@ LogInit(const char *fname, const char *backup) return logFileName; } +#pragma GCC diagnostic pop void LogClose(enum ExitCode error) diff --git a/test/signal-logging.c b/test/signal-logging.c index 4320121..3d2d048 100644 --- a/test/signal-logging.c +++ b/test/signal-logging.c @@ -113,12 +113,13 @@ double float_tests[] = { 0, 5, 0.1, 0.01, 5.2342, 10.2301, -1, -2.00, -0.6023, -1203.30 }; +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Woverflow" + static void number_formatting(void) { int i; -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Woverflow" long unsigned int unsigned_tests[] = { 0,/* Zero */ 5, /* Single digit number */ 12, /* Two digit decimal number */ @@ -141,7 +142,6 @@ number_formatting(void) -0x15D027BF211B37A, /* Large > 32 bit number */ -0x7FFFFFFFFFFFFFFF, /* Maximum 64-bit signed number */ } ; -#pragma GCC diagnostic pop for (i = 0; i < sizeof(unsigned_tests) / sizeof(unsigned_tests[0]); i++) assert(check_number_format_test(unsigned_tests[i])); @@ -152,6 +152,7 @@ number_formatting(void) for (i = 0; i < sizeof(float_tests) / sizeof(float_tests[0]); i++) assert(check_float_format_test(float_tests[i])); } +#pragma GCC diagnostic pop #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wformat-security" -- 1.9.3 From keithp at keithp.com Thu Sep 18 22:29:12 2014 From: keithp at keithp.com (Keith Packard) Date: Thu, 18 Sep 2014 22:29:12 -0700 Subject: [PATCH] xserver: Move 'pragma GCC diagnostic' outside functions In-Reply-To: <1411100533-2601-1-git-send-email-airlied@gmail.com> References: <1411100533-2601-1-git-send-email-airlied@gmail.com> Message-ID: <86egv8w53r.fsf@hiro.keithp.com> Dave Airlie writes: > From: Jon TURNEY > > $ gcc --version > gcc (Gentoo 4.4.3-r2 p1.2) 4.4.3 > > /jhbuild/checkout/xorg/xserver/os/log.c: In function ?LogInit?: > /jhbuild/checkout/xorg/xserver/os/log.c:199: error: #pragma GCC diagnostic not allowed inside functions > /jhbuild/checkout/xorg/xserver/os/log.c:201: warning: format not a string literal, argument types not checked > /jhbuild/checkout/xorg/xserver/os/log.c:212: error: #pragma GCC diagnostic not allowed inside functions > /jhbuild/checkout/xorg/xserver/os/log.c:214: warning: format not a string literal, argument types not checked > > etc. > > Reviewed-by: Dave Airlie > Signed-off-by: Jon TURNEY > Signed-off-by: Dave Airlie Merged. 7e6bd54..28337cb master -> master -- keith.packard at intel.com -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 810 bytes Desc: not available URL: From peter.hutterer at who-t.net Thu Sep 18 23:02:50 2014 From: peter.hutterer at who-t.net (Peter Hutterer) Date: Fri, 19 Sep 2014 16:02:50 +1000 Subject: X.Org looking for projects and mentors for the Outreach Program for Women In-Reply-To: <20140904230144.GA20941@jelly.redhat.com> References: <20140904230144.GA20941@jelly.redhat.com> Message-ID: <20140919060250.GA17283@jelly.redhat.com> Just a reminder, if you have projects that are suitable for the OPW please add them to the wiki page or, if you can't access the wiki, send me a summary and I'll add it. http://www.x.org/wiki/XorgOPW/ Prospective participants can start submitting applications on Sep 22 and it'd be great if we had a nice range of projects available by then. Note that unlike GSoC, the scope is not limited to coding (see below). Cheers, Peter On Fri, Sep 05, 2014 at 09:01:44AM +1000, Peter Hutterer wrote: > Hi everyone, > > X.Org will join the Outreach Program for Women (OPW) in Round 9 (December > 2014 - March 2015). The OPW is "open to anyone who was > assigned female at birth and anyone who identifies as a woman, genderqueer, > genderfluid, or genderfree regardless of gender presentation or assigned sex > at birth." > For more details on the program see https://wiki.gnome.org/OutreachProgramForWomen > > We've secured funding for one participant and are currently looking for > suitable projects and mentors. The scope of the program is "not limited to > coding, but include user experience design, graphic design, documentation, > web development, marketing, translation and other types of tasks needed to > sustain a FOSS project." > > So if you are interested in mentoring or you can think of a suitable > project, please add it to the wiki page or alternatively email me. > http://www.x.org/wiki/XorgOPW/ > > If you are interested in participating and you can think of a suitable > project, please do the same and we'll try our best to find a mentor for you. > > The applications will open on September 22, so let's get some good projects > up there by then! > > Cheers, > Peter, on behalf of the X.Org BoD > From ajax at redhat.com Fri Sep 19 07:15:15 2014 From: ajax at redhat.com (Adam Jackson) Date: Fri, 19 Sep 2014 10:15:15 -0400 Subject: [PATCH 00/11] Misc window exposure/validation cleanups In-Reply-To: <86vbokwnmk.fsf@hiro.keithp.com> References: <1411061040-13053-1-git-send-email-ajax@redhat.com> <86vbokwnmk.fsf@hiro.keithp.com> Message-ID: <1411136115.19451.7.camel@dmt> On Thu, 2014-09-18 at 15:49 -0700, Keith Packard wrote: > Adam Jackson writes: > > > In attempting to get the Always mode of backing store working again, I > > felt the urge to clean the place up a bit. The most notable change here > > is removing the (questionable) optimization from exposure event generation > > to emit a bounding-box event when faced with more than 25 rects in the > > exposed region. Given that toolkits already coalesce consecutive expose > > boxes, and that you'll never hit it in a composited environment anyway, > > the complexity doesn't seem justified. > > This was written to address shaped windows, which can still generate a > large number of rectangles, even in a composited environment. I think > xeyes was the original test case; a full-screen xeyes window has a > couple thousand rectangles, or about 64kB of data. > > I suspect an xeyes-specific optimization is not all that useful to keep > around, but I fear that some user somewhere is taking advantage of this... Fair. How about moving that heuristic down to event emission (miHandleExposures and SendGraphicsExpose)? That way it's obvious that it's a protocol-facing heuristic, and we can still drop the wrap in mioverlay. - ajax From keithp at keithp.com Fri Sep 19 08:40:17 2014 From: keithp at keithp.com (Keith Packard) Date: Fri, 19 Sep 2014 08:40:17 -0700 Subject: [PATCH 00/11] Misc window exposure/validation cleanups In-Reply-To: <1411136115.19451.7.camel@dmt> References: <1411061040-13053-1-git-send-email-ajax@redhat.com> <86vbokwnmk.fsf@hiro.keithp.com> <1411136115.19451.7.camel@dmt> Message-ID: <8661gjwrdq.fsf@hiro.keithp.com> Adam Jackson writes: > Fair. How about moving that heuristic down to event emission > (miHandleExposures and SendGraphicsExpose)? That way it's obvious that > it's a protocol-facing heuristic, and we can still drop the wrap in > mioverlay. We have to actually paint the exposed area with the window background, not just send the events. -- keith.packard at intel.com -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 810 bytes Desc: not available URL: From jstpierre at mecheye.net Fri Sep 19 09:39:06 2014 From: jstpierre at mecheye.net (Jasper St. Pierre) Date: Fri, 19 Sep 2014 10:39:06 -0600 Subject: [PATCH 00/11] Misc window exposure/validation cleanups In-Reply-To: <86vbokwnmk.fsf@hiro.keithp.com> References: <1411061040-13053-1-git-send-email-ajax@redhat.com> <86vbokwnmk.fsf@hiro.keithp.com> Message-ID: Why would xeyes generate a large number of rectangles in a composited environment? Are you talking about the initial expose? On Thu, Sep 18, 2014 at 4:49 PM, Keith Packard wrote: > Adam Jackson writes: > > > In attempting to get the Always mode of backing store working again, I > > felt the urge to clean the place up a bit. The most notable change here > > is removing the (questionable) optimization from exposure event > generation > > to emit a bounding-box event when faced with more than 25 rects in the > > exposed region. Given that toolkits already coalesce consecutive expose > > boxes, and that you'll never hit it in a composited environment anyway, > > the complexity doesn't seem justified. > > This was written to address shaped windows, which can still generate a > large number of rectangles, even in a composited environment. I think > xeyes was the original test case; a full-screen xeyes window has a > couple thousand rectangles, or about 64kB of data. > > I suspect an xeyes-specific optimization is not all that useful to keep > around, but I fear that some user somewhere is taking advantage of this... > > -- > keith.packard at intel.com > > _______________________________________________ > xorg-devel at lists.x.org: X.Org development > Archives: http://lists.x.org/archives/xorg-devel > Info: http://lists.x.org/mailman/listinfo/xorg-devel > -- Jasper -------------- next part -------------- An HTML attachment was scrubbed... URL: From aplattner at nvidia.com Fri Sep 19 14:15:58 2014 From: aplattner at nvidia.com (Aaron Plattner) Date: Fri, 19 Sep 2014 14:15:58 -0700 Subject: [PATCH 04/11] mi: Drastically simplify miWindowExposures In-Reply-To: <1411061040-13053-5-git-send-email-ajax@redhat.com> References: <1411061040-13053-1-git-send-email-ajax@redhat.com> <1411061040-13053-5-git-send-email-ajax@redhat.com> Message-ID: <541C9D0E.9060503@nvidia.com> On 09/18/2014 10:23 AM, Adam Jackson wrote: > First, we drop the "spontaneous combustion" path. In a composited > environment you're never going to hit that anyway, and even in a classic > environment it's so rare to hit as to not be worth it. Second, we You mean running xeyes over a backing store app isn't something everyone does all the time?? > delete the declaration of exposures, replace exposures with prgn > to match, and then delete all the redundant conditionals. > > Suddenly this looks like a function a mortal could understand. > > Signed-off-by: Adam Jackson > --- > mi/miexpose.c | 53 +++++------------------------------------------------ > 1 file changed, 5 insertions(+), 48 deletions(-) > > diff --git a/mi/miexpose.c b/mi/miexpose.c > index 23987fa..98112ab 100644 > --- a/mi/miexpose.c > +++ b/mi/miexpose.c > @@ -423,55 +423,12 @@ miSendExposures(WindowPtr pWin, RegionPtr pRgn, int dx, int dy) > void > miWindowExposures(WindowPtr pWin, RegionPtr prgn) > { > - RegionPtr exposures = prgn; > - > - if ((prgn && !RegionNil(prgn)) || (exposures && !RegionNil(exposures))) { > - RegionRec expRec; > - int clientInterested; > - > - /* > - * Restore from backing-store FIRST. > - */ > - clientInterested = > - (pWin->eventMask | wOtherEventMasks(pWin)) & ExposureMask; > - if (clientInterested && exposures && > - (RegionNumRects(exposures) > RECTLIMIT)) { > - /* > - * If we have LOTS of rectangles, we decide to take the extents > - * and force an exposure on that. This should require much less > - * work overall, on both client and server. This is cheating, but > - * isn't prohibited by the protocol ("spontaneous combustion" :-). > - */ > - BoxRec box; > - > - box = *RegionExtents(exposures); > - if (exposures == prgn) { > - exposures = &expRec; > - RegionInit(exposures, &box, 1); > - RegionReset(prgn, &box); > - } > - else { > - RegionReset(exposures, &box); > - RegionUnion(prgn, prgn, exposures); > - } > - /* miPaintWindow doesn't clip, so we have to */ > - RegionIntersect(prgn, prgn, &pWin->clipList); > - } > - if (prgn && !RegionNil(prgn)) > - miPaintWindow(pWin, prgn, PW_BACKGROUND); > - if (clientInterested && exposures && !RegionNil(exposures)) > - miSendExposures(pWin, exposures, > - pWin->drawable.x, pWin->drawable.y); > - if (exposures == &expRec) { > - RegionUninit(exposures); > - } > - else if (exposures && exposures != prgn) > - RegionDestroy(exposures); > - if (prgn) > - RegionEmpty(prgn); > + if (prgn && !RegionNil(prgn)) { > + miPaintWindow(pWin, prgn, PW_BACKGROUND); > + if ((pWin->eventMask | wOtherEventMasks(pWin)) & ExposureMask) > + miSendExposures(pWin, prgn, pWin->drawable.x, pWin->drawable.y); > + RegionEmpty(prgn); > } > - else if (exposures && exposures != prgn) > - RegionDestroy(exposures); > } > > #ifdef ROOTLESS > Reviewed-by: Aaron Plattner -- Aaron From aplattner at nvidia.com Fri Sep 19 14:17:48 2014 From: aplattner at nvidia.com (Aaron Plattner) Date: Fri, 19 Sep 2014 14:17:48 -0700 Subject: [PATCH 07/11] mi: Factor out visibility notify check/send In-Reply-To: <1411061040-13053-8-git-send-email-ajax@redhat.com> References: <1411061040-13053-1-git-send-email-ajax@redhat.com> <1411061040-13053-8-git-send-email-ajax@redhat.com> Message-ID: <541C9D7C.7000108@nvidia.com> On 09/18/2014 10:23 AM, Adam Jackson wrote: > Signed-off-by: Adam Jackson > --- > mi/mivaltree.c | 19 +++++++++++-------- > 1 file changed, 11 insertions(+), 8 deletions(-) > > diff --git a/mi/mivaltree.c b/mi/mivaltree.c > index c1cc431..2a39c56 100644 > --- a/mi/mivaltree.c > +++ b/mi/mivaltree.c > @@ -171,6 +171,14 @@ miRegisterRedirectBorderClipProc(SetRedirectBorderClipProcPtr setBorderClip, > miGetRedirectBorderClipProc = getBorderClip; > } > > +static void > +doVisibilityNotify(WindowPtr pWin, unsigned oldVis) > +{ > + if (oldVis != pWin->visibility && > + ((pWin->eventMask | wOtherEventMasks(pWin)) & VisibilityChangeMask)) > + SendVisibilityNotify(pWin); > +} > + > /* > * Manual redirected windows are treated as transparent; they do not obscure > * siblings or parent windows > @@ -281,10 +289,7 @@ miComputeClips(WindowPtr pParent, > break; > } > pParent->visibility = newVis; > - if (oldVis != newVis && > - ((pParent-> > - eventMask | wOtherEventMasks(pParent)) & VisibilityChangeMask)) > - SendVisibilityNotify(pParent); > + doVisibilityNotify(pParent, oldVis); > > dx = pParent->drawable.x - pParent->valdata->before.oldAbsCorner.x; > dy = pParent->drawable.y - pParent->valdata->before.oldAbsCorner.y; > @@ -499,10 +504,8 @@ miTreeObscured(WindowPtr pParent) > while (1) { > if (pChild->viewable) { > oldVis = pChild->visibility; > - if (oldVis != (pChild->visibility = VisibilityFullyObscured) && ... because this is completely obvious. > - ((pChild-> > - eventMask | wOtherEventMasks(pChild)) & VisibilityChangeMask)) > - SendVisibilityNotify(pChild); > + pChild->visibility = VisibilityFullyObscured; > + doVisibilityNotify(pChild, oldVis); > if (pChild->firstChild) { > pChild = pChild->firstChild; > continue; > Reviewed-by: Aaron Plattner -- Aaron From drinkcat at chromium.org Fri Sep 19 16:18:55 2014 From: drinkcat at chromium.org (Nicolas Boichat) Date: Fri, 19 Sep 2014 16:18:55 -0700 Subject: xorg-server-dummy: cannot add additional xrandr mode (xrandr: Configure crtc 0 failed) Message-ID: Hi, I'm running a dummy X11 server (Xorg 1.15.1 on Ubuntu 14.04), using the configuration attached. I am able to change resolution using xrandr, as long as I use the ones that are setup when the server is started (either the default ones, or the ones I add in the Monitor section). I'd like to be able to add new arbitrary resolutions using output from gtf, but this fails: # xrandr --newmode 800x632_60.00 40.24 800 832 912 1024 632 633 636 655 -HSync +Vsync # xrandr --addmode default 800x632_60.00 xrandr: Failed to get size of gamma for output default (I guess this is harmless: the mode is added) # xrandr --output default --mode 800x632_60.00 --verbose xrandr: Failed to get size of gamma for output default crtc 0: disable screen 0: 800x632 211x167 mm 96.09dpi crtc 0: 800x632_60.00 60.0 +0+0 "default" xrandr: Configure crtc 0 failed crtc 0: disable screen 0: revert crtc 0: revert A similar method works fine with intel drivers. Any idea if this is supposed to work, or if I am doing something wrong? Or is this something that the dummy driver does not support? Thanks a lot for your help, Best regards, Nicolas -------------- next part -------------- A non-text attachment was scrubbed... Name: xorg.conf Type: application/octet-stream Size: 932 bytes Desc: not available URL: From airlied at gmail.com Fri Sep 19 22:58:35 2014 From: airlied at gmail.com (Dave Airlie) Date: Sat, 20 Sep 2014 15:58:35 +1000 Subject: build regression with registry changes Message-ID: -DROOTLESS_SAFEALPHA -DNO_ALLOCA -c dispatch.c -fno-common -DPIC -o .libs/dispatch.o dispatch.c:421:43: error: implicit declaration of function 'LookupMajorName' is invalid in C99 [-Werror,-Wimplicit-function-declaration,Semantic Issue] XSERVER_REQUEST_START(LookupMajorName(client->majorOp), ^ ./Xserver-dtrace.h:73:108: note: expanded from macro 'XSERVER_REQUEST_START' __dtrace_probe$Xserver$request__start$v1$63686172202a$75696e74385f74$75696e7431365f74$696e74$766f6964202a(arg0, arg1, arg2, arg3, arg4); \ ^ dispatch.c:421:43: warning: incompatible integer to pointer conversion passing 'int' to parameter of type 'const char *' [-Wint-conversion,Value Conversion Issue] XSERVER_REQUEST_START(LookupMajorName(client->majorOp), ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ./Xserver-dtrace.h:73:108: note: expanded from macro 'XSERVER_REQUEST_START' http://tinderbox.x.org/builds/2014-09-19-0003/logs/xserver/#build Dave. From consume.noise at gmail.com Sat Sep 20 00:07:39 2014 From: consume.noise at gmail.com (Daniel Martin) Date: Sat, 20 Sep 2014 09:07:39 +0200 Subject: [PATCH 1/3] dix: Remove XpExtension leftovers from protocol.txt Message-ID: <1411196861-26958-1-git-send-email-consume.noise@gmail.com> There's no XPrint extension (anymore). Signed-off-by: Daniel Martin --- dix/protocol.txt | 30 ------------------------------ 1 file changed, 30 deletions(-) diff --git a/dix/protocol.txt b/dix/protocol.txt index f83f38c..c223795 100644 --- a/dix/protocol.txt +++ b/dix/protocol.txt @@ -1082,33 +1082,3 @@ R009 XVideo-MotionCompensation:GetDRInfo E000 XVideo-MotionCompensation:BadContext E001 XVideo-MotionCompensation:BadSurface E002 XVideo-MotionCompensation:BadSubpicture -R000 XpExtension:QueryVersion -R001 XpExtension:GetPrinterList -R002 XpExtension:CreateContext -R003 XpExtension:SetContext -R004 XpExtension:GetContext -R005 XpExtension:DestroyContext -R006 XpExtension:GetContextScreen -R007 XpExtension:StartJob -R008 XpExtension:EndJob -R009 XpExtension:StartDoc -R010 XpExtension:EndDoc -R011 XpExtension:PutDocumentData -R012 XpExtension:GetDocumentData -R013 XpExtension:StartPage -R014 XpExtension:EndPage -R015 XpExtension:SelectInput -R016 XpExtension:InputSelected -R017 XpExtension:GetAttributes -R018 XpExtension:SetAttributes -R019 XpExtension:GetOneAttribute -R020 XpExtension:RehashPrinterList -R021 XpExtension:GetPageDimensions -R022 XpExtension:QueryScreens -R023 XpExtension:SetImageResolution -R024 XpExtension:GetImageResolution -V000 XpExtension:PrintNotify -V001 XpExtension:AttributeNotify -E000 XpExtension:BadContext -E001 XpExtension:BadSequence -E002 XpExtension:BadResourceID -- 2.1.0 From consume.noise at gmail.com Sat Sep 20 00:07:40 2014 From: consume.noise at gmail.com (Daniel Martin) Date: Sat, 20 Sep 2014 09:07:40 +0200 Subject: [PATCH 2/3] security: Remove XpExtension from SecurityTrustedExtensions In-Reply-To: <1411196861-26958-1-git-send-email-consume.noise@gmail.com> References: <1411196861-26958-1-git-send-email-consume.noise@gmail.com> Message-ID: <1411196861-26958-2-git-send-email-consume.noise@gmail.com> There's no XPrint extension (anymore). Signed-off-by: Daniel Martin --- Xext/security.c | 1 - 1 file changed, 1 deletion(-) diff --git a/Xext/security.c b/Xext/security.c index 421b252..bf2ab2e 100644 --- a/Xext/security.c +++ b/Xext/security.c @@ -67,7 +67,6 @@ typedef struct { static const char *SecurityTrustedExtensions[] = { "XC-MISC", "BIG-REQUESTS", - "XpExtension", NULL }; -- 2.1.0 From consume.noise at gmail.com Sat Sep 20 00:07:41 2014 From: consume.noise at gmail.com (Daniel Martin) Date: Sat, 20 Sep 2014 09:07:41 +0200 Subject: [PATCH 3/3] xfree86: Delete file modinit.h In-Reply-To: <1411196861-26958-1-git-send-email-consume.noise@gmail.com> References: <1411196861-26958-1-git-send-email-consume.noise@gmail.com> Message-ID: <1411196861-26958-3-git-send-email-consume.noise@gmail.com> All references to modinit.h have been remove with: a1d41e3 Move extension initialisation prototypes into extinit.h Signed-off-by: Daniel Martin --- I haven't compile-tested it, but grep told me that it is safe to remove. hw/xfree86/dixmods/extmod/modinit.h | 80 ------------------------------------- 1 file changed, 80 deletions(-) delete mode 100644 hw/xfree86/dixmods/extmod/modinit.h diff --git a/hw/xfree86/dixmods/extmod/modinit.h b/hw/xfree86/dixmods/extmod/modinit.h deleted file mode 100644 index 4c9b6e3..0000000 --- a/hw/xfree86/dixmods/extmod/modinit.h +++ /dev/null @@ -1,80 +0,0 @@ - -#ifdef HAVE_DIX_CONFIG_H -#include -#endif - -#include - -#ifdef XTEST -extern void XTestExtensionInit(void); -#include -#endif - -#if 1 -extern void XTestExtension1Init(void); -#endif - -#if 1 -extern void XCMiscExtensionInit(void); -#endif - -#ifdef SCREENSAVER -extern void ScreenSaverExtensionInit(void); -#include -#endif - -#ifdef XF86VIDMODE -extern void XFree86VidModeExtensionInit(void); -#include -#endif - -#ifdef XFreeXDGA -extern void XFree86DGAExtensionInit(void); -extern void XFree86DGARegister(void); -#include -#endif - -#ifdef DPMSExtension -extern void DPMSExtensionInit(void); -#include -#endif - -#ifdef XV -extern void XvExtensionInit(void); -extern void XvMCExtensionInit(void); -extern void XvRegister(void); -#include -#include -#endif - -#ifdef RES -extern void ResExtensionInit(void); -#include -#endif - -#ifdef SHM -#include -extern void ShmExtensionInit(void); -extern void ShmRegisterFuncs(ScreenPtr pScreen, ShmFuncsPtr funcs); -#endif - -#ifdef XSELINUX -extern void SELinuxExtensionInit(void); -#include "xselinux.h" -#endif - -#ifdef XEVIE -extern void XevieExtensionInit(void); -#endif - -#if 1 -extern void SecurityExtensionInit(void); -#endif - -#if 1 -extern void PanoramiXExtensionInit(void); -#endif - -#if 1 -extern void XkbExtensionInit(void); -#endif -- 2.1.0 From keithp at keithp.com Sat Sep 20 04:09:52 2014 From: keithp at keithp.com (Keith Packard) Date: Sat, 20 Sep 2014 04:09:52 -0700 Subject: [PATCH] XSERVER_DTRACE needs request names from registry too In-Reply-To: References: Message-ID: <1411211392-4751-1-git-send-email-keithp@keithp.com> The dtrace code in the server wants to log the name of each executed request, which it gets from the registry. Use that as an additional indication of when that portion of the registry should be included in the server build. See: http://tinderbox.x.org/builds/2014-09-19-0003/logs/xserver/#build Cc: Dave Airlie Signed-off-by: Keith Packard --- include/registry.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/registry.h b/include/registry.h index 43c3db3..f50fa76 100644 --- a/include/registry.h +++ b/include/registry.h @@ -24,7 +24,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #define X_REGISTRY_RESOURCE 1 #endif -#if defined(XSELINUX) || defined(XCSECURITY) +#if defined(XSELINUX) || defined(XCSECURITY) || defined(XSERVER_DTRACE) #define X_REGISTRY_REQUEST 1 #endif -- 2.1.0 From airlied at gmail.com Sat Sep 20 16:48:16 2014 From: airlied at gmail.com (Dave Airlie) Date: Sun, 21 Sep 2014 09:48:16 +1000 Subject: [PATCH] XSERVER_DTRACE needs request names from registry too In-Reply-To: <1411211392-4751-1-git-send-email-keithp@keithp.com> References: <1411211392-4751-1-git-send-email-keithp@keithp.com> Message-ID: On 20 September 2014 21:09, Keith Packard wrote: > The dtrace code in the server wants to log the name of each executed > request, which it gets from the registry. Use that as an additional > indication of when that portion of the registry should be included in > the server build. > > See: > > http://tinderbox.x.org/builds/2014-09-19-0003/logs/xserver/#build > > Cc: Dave Airlie Reviewed-by: Dave Airlie > Signed-off-by: Keith Packard > --- > include/registry.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/include/registry.h b/include/registry.h > index 43c3db3..f50fa76 100644 > --- a/include/registry.h > +++ b/include/registry.h > @@ -24,7 +24,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. > #define X_REGISTRY_RESOURCE 1 > #endif > > -#if defined(XSELINUX) || defined(XCSECURITY) > +#if defined(XSELINUX) || defined(XCSECURITY) || defined(XSERVER_DTRACE) > #define X_REGISTRY_REQUEST 1 > #endif > > -- > 2.1.0 > From airlied at gmail.com Sat Sep 20 16:54:12 2014 From: airlied at gmail.com (Dave Airlie) Date: Sun, 21 Sep 2014 09:54:12 +1000 Subject: [PATCH 01/16] xv: Remove dead VIDEO_INVERT_CLIPLIST from the xorg and kdrive DDXes. In-Reply-To: <86sily4j11.fsf@hiro.keithp.com> References: <1405704753-20488-1-git-send-email-eric@anholt.net> <1405704753-20488-2-git-send-email-eric@anholt.net> <86sily4j11.fsf@hiro.keithp.com> Message-ID: On 19 July 2014 04:30, Keith Packard wrote: > Eric Anholt writes: > >> As far as I can see (looking at trees on my disk, plus googling for >> the term), nothing has ever used this flag you need more trees, xf86-video-v4l clearly uses this for something. Dave. From daniel at quora.org Sun Sep 21 01:35:31 2014 From: daniel at quora.org (Daniel J Blueman) Date: Sun, 21 Sep 2014 16:35:31 +0800 Subject: Xephyr 1.15.1/1.16 crash with Intel ZaphodHeads Message-ID: On stock Ubuntu 14.04 with X 1.15.1 or 14.10 with X 1.16, Xephyr crashes when connecting to the first screen of an ZaphodHeads setup [1]: # /usr/bin/X -ac :0 # DISPLAY=:0.0 /usr/bin/Xephyr -ac :1 (EE) Backtrace: (EE) 0: Xephyr (xorg_backtrace+0x56) [0x7fe9b4fd94c6] (EE) 1: Xephyr (0x7fe9b4e0e000+0x1cf6c9) [0x7fe9b4fdd6c9] (EE) 2: /lib/x86_64-linux-gnu/libpthread.so.0 (0x7fe9b3af5000+0xfc90) [0x7fe9b3b04c90] (EE) 3: Xephyr (0x7fe9b4e0e000+0x44d29) [0x7fe9b4e52d29] (EE) 4: Xephyr (0x7fe9b4e0e000+0x3f968) [0x7fe9b4e4d968] (EE) 5: Xephyr (0x7fe9b4e0e000+0xc7487) [0x7fe9b4ed5487] (EE) 6: Xephyr (AddScreen+0x101) [0x7fe9b4e98a61] (EE) 7: Xephyr (0x7fe9b4e0e000+0xc7941) [0x7fe9b4ed5941] (EE) 8: Xephyr (0x7fe9b4e0e000+0x8e6da) [0x7fe9b4e9c6da] (EE) 9: /lib/x86_64-linux-gnu/libc.so.6 (__libc_start_main+0xf5) [0x7fe9b1281ec5] (EE) 10: Xephyr (0x7fe9b4e0e000+0x3e5ee) [0x7fe9b4e4c5ee] (EE) (EE) Segmentation fault at address 0x4 (EE) Fatal server error: (EE) Caught signal 11 (Segmentation fault). Server aborting Running it with on the second screen (:0.1), it works just fine. Anything I'm doing wrong? Thanks, Daniel -- [1] /usr/share/X11/xorg.conf.d/60-local.conf Section "Device" Identifier "Intel0" Driver "intel" Option "ZaphodHeads" "eDP1" Screen 0 EndSection Section "Device" Identifier "Intel1" Driver "intel" Option "ZaphodHeads" "HDMI" Screen 1 EndSection Section "Screen" Identifier "Screen0" Device "Intel0" EndSection Section "Screen" Identifier "Screen1" Device "Intel1" EndSection Section "ServerLayout" Identifier "default" Screen "Screen0" 0 0 Screen "Screen1" RightOf "Screen0" EndSection -- Daniel J Blueman From alan.coopersmith at oracle.com Sun Sep 21 09:49:05 2014 From: alan.coopersmith at oracle.com (Alan Coopersmith) Date: Sun, 21 Sep 2014 09:49:05 -0700 Subject: [PATCH 1/2] Abort xi2 tests if ActivateDevice() fails Message-ID: <1411318146-23315-1-git-send-email-alan.coopersmith@oracle.com> I was getting segfaults in xi2 tests from trying to copy XKB keyboard state to NULL pointers with a stack of: key=key at entry=0) at xkbActions.c:1189 sendevent=sendevent at entry=0 '\000') at devices.c:420 at protocol-xiquerydevice.c:338 which turned out to be due to xkbcomp failure, which was logged in the test logs as: XKB: Failed to compile keymap Keyboard initialization failed. This could be a missing or incorrect setup of xkeyboard-config. but which was overlooked because the ActivateDevice() return code wasn't checked and the tests went forward assuming the structures were all correctly initialized. This catches the failure closer to the point of failure, to save debugging time. Signed-off-by: Alan Coopersmith --- test/xi2/protocol-common.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/test/xi2/protocol-common.c b/test/xi2/protocol-common.c index 9a429e4..64a5777 100644 --- a/test/xi2/protocol-common.c +++ b/test/xi2/protocol-common.c @@ -137,6 +137,7 @@ init_devices(void) { ClientRec client; struct devices local_devices; + int ret; client = init_client(0, NULL); @@ -145,15 +146,20 @@ init_devices(void) inputInfo.pointer = local_devices.vcp; inputInfo.keyboard = local_devices.vck; - ActivateDevice(local_devices.vcp, FALSE); - ActivateDevice(local_devices.vck, FALSE); + ret = ActivateDevice(local_devices.vcp, FALSE); + assert(ret == Success); + /* This may fail if xkbcomp fails or xkb-config is not found. */ + ret = ActivateDevice(local_devices.vck, FALSE); + assert(ret == Success); EnableDevice(local_devices.vcp, FALSE); EnableDevice(local_devices.vck, FALSE); AllocDevicePair(&client, "", &local_devices.mouse, &local_devices.kbd, TestPointerProc, CoreKeyboardProc, FALSE); - ActivateDevice(local_devices.mouse, FALSE); - ActivateDevice(local_devices.kbd, FALSE); + ret = ActivateDevice(local_devices.mouse, FALSE); + assert(ret == Success); + ret = ActivateDevice(local_devices.kbd, FALSE); + assert(ret == Success); EnableDevice(local_devices.mouse, FALSE); EnableDevice(local_devices.kbd, FALSE); -- 1.7.9.2 From alan.coopersmith at oracle.com Sun Sep 21 09:49:06 2014 From: alan.coopersmith at oracle.com (Alan Coopersmith) Date: Sun, 21 Sep 2014 09:49:06 -0700 Subject: [PATCH 2/2] Use unique display name for each xi2 test program In-Reply-To: <1411318146-23315-1-git-send-email-alan.coopersmith@oracle.com> References: <1411318146-23315-1-git-send-email-alan.coopersmith@oracle.com> Message-ID: <1411318146-23315-2-git-send-email-alan.coopersmith@oracle.com> make -j 8 check was sporadically failing in different xi2 tests. After adding the asserts in the previous commit to catch xkb failure it became easier to catch the failures and see that multiple tests were running at once trying to write to /tmp/server-(null).xkm and then delete it, and interfering with each other. Putting a unique string into the display variable let them each write to their own file and not interfere with others. Signed-off-by: Alan Coopersmith --- I've only tested on Solaris with getprogname(), not on Linux, where program_invocation_name would be used instead. If neither is found we should either use something like mkstemp() or disable running the tests in parallel, but I've not bothered to go that far, since this covers enough platforms for me. configure.ac | 4 +++- include/dix-config.h.in | 7 +++++++ test/xi2/protocol-common.c | 11 +++++++++++ 3 files changed, 21 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index be8bff6..04b0b4a 100644 --- a/configure.ac +++ b/configure.ac @@ -217,10 +217,12 @@ AC_SUBST(DLOPEN_LIBS) dnl Checks for library functions. AC_CHECK_FUNCS([backtrace ffs geteuid getuid issetugid getresuid \ - getdtablesize getifaddrs getpeereid getpeerucred getzoneid \ + getdtablesize getifaddrs getpeereid getpeerucred getprogname getzoneid \ mmap seteuid shmctl64 strncasecmp vasprintf vsnprintf walkcontext]) AC_REPLACE_FUNCS([strcasecmp strcasestr strlcat strlcpy strndup]) +AC_CHECK_DECLS([program_invocation_name], [], [], [[#include ]]) + dnl Find the math libary, then check for cbrt function in it. AC_CHECK_LIB(m, sqrt) AC_CHECK_FUNCS([cbrt]) diff --git a/include/dix-config.h.in b/include/dix-config.h.in index 4268b8f..ac68ad6 100644 --- a/include/dix-config.h.in +++ b/include/dix-config.h.in @@ -72,6 +72,10 @@ /* Define to 1 if you have the header file. */ #undef HAVE_DBM_H +/* Define to 1 if you have the declaration of `program_invocation_name', and + to 0 if you don't. */ +#undef HAVE_DECL_PROGRAM_INVOCATION_NAME + /* Define to 1 if you have the header file, and it defines `DIR'. */ #undef HAVE_DIRENT_H @@ -100,6 +104,9 @@ /* Define to 1 if you have the `getpeerucred' function. */ #undef HAVE_GETPEERUCRED +/* Define to 1 if you have the `getprogname' function. */ +#undef HAVE_GETPROGNAME + /* Define to 1 if you have the `getzoneid' function. */ #undef HAVE_GETZONEID diff --git a/test/xi2/protocol-common.c b/test/xi2/protocol-common.c index 64a5777..3a53050 100644 --- a/test/xi2/protocol-common.c +++ b/test/xi2/protocol-common.c @@ -139,6 +139,17 @@ init_devices(void) struct devices local_devices; int ret; + /* + * Put a unique name in display pointer so that when tests are run in + * parallel, their xkbcomp outputs to /tmp/server-.xkm don't + * stomp on each other. + */ +#ifdef HAVE_GETPROGNAME + display = getprogname(); +#elif HAVE_DECL_PROGRAM_INVOCATION_NAME + display = program_invocation_name; +#endif + client = init_client(0, NULL); AllocDevicePair(&client, "Virtual core", &local_devices.vcp, &local_devices.vck, -- 1.7.9.2 From alan.coopersmith at oracle.com Sun Sep 21 10:43:28 2014 From: alan.coopersmith at oracle.com (Alan Coopersmith) Date: Sun, 21 Sep 2014 10:43:28 -0700 Subject: [PATCH 1/2] Abort xi2 tests if ActivateDevice() fails In-Reply-To: <1411318146-23315-1-git-send-email-alan.coopersmith@oracle.com> References: <1411318146-23315-1-git-send-email-alan.coopersmith@oracle.com> Message-ID: <541F0E40.8070409@oracle.com> On 09/21/14 09:49 AM, Alan Coopersmith wrote: > I was getting segfaults in xi2 tests from trying to copy XKB keyboard > state to NULL pointers with a stack of: > key=key at entry=0) at xkbActions.c:1189 > sendevent=sendevent at entry=0 '\000') at devices.c:420 > at protocol-xiquerydevice.c:338 Bah, stupid gdb putting # signs in front of stack traces, and stupid me for not noticing. #0 0x00000000006244d2 in XkbPushLockedStateToSlaves (master=0x7b4650, evtype=0, key=0) at xkbActions.c:1189 #1 0x00000000004f450a in EnableDevice (dev=0x7b3810, sendevent=0 '\000') at devices.c:420 #2 0x00000000004cf2a7 in init_devices () at protocol-common.c:158 #3 0x00000000004cf5ea in init_simple () at protocol-common.c:259 #4 0x00000000004d090f in main (argc=1, argv=0xffff80ffbfffe458) at protocol-xiquerydevice.c:338 -- -Alan Coopersmith- alan.coopersmith at oracle.com Oracle Solaris Engineering - http://blogs.oracle.com/alanc From gioele at svario.it Sun Sep 21 14:05:55 2014 From: gioele at svario.it (Gioele Barabucci) Date: Sun, 21 Sep 2014 23:05:55 +0200 Subject: [PATCH] Add compose sequence for U+20B9 INDIAN RUPEE SIGN Message-ID: <1411333555-5604-1-git-send-email-gioele@svario.it> The compose sequence for the new Indian Rupee sign is modelled after the sequence for the Euro sign. Signed-off-by: Gioele Barabucci --- nls/en_US.UTF-8/Compose.pre | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/nls/en_US.UTF-8/Compose.pre b/nls/en_US.UTF-8/Compose.pre index 4a96570..f3ede3d 100644 --- a/nls/en_US.UTF-8/Compose.pre +++ b/nls/en_US.UTF-8/Compose.pre @@ -200,7 +200,10 @@ XCOMM "?" U20b2 GUARANI SIGN XCOMM "?" U20b3 AUSTRAL SIGN XCOMM "?" U20b4 HRYVNIA SIGN XCOMM "?" U20b5 CEDI SIGN - + : "?" U20b9 # INDIAN RUPEE SIGN + : "?" U20b9 # INDIAN RUPEE SIGN + : "?" U20b9 # INDIAN RUPEE SIGN + : "?" U20b9 # INDIAN RUPEE SIGN : "?" cent # CENT SIGN : "?" cent # CENT SIGN -- 2.1.0 From peter.hutterer at who-t.net Sun Sep 21 15:29:32 2014 From: peter.hutterer at who-t.net (Peter Hutterer) Date: Mon, 22 Sep 2014 08:29:32 +1000 Subject: [PATCH 2/2] Use unique display name for each xi2 test program In-Reply-To: <1411318146-23315-2-git-send-email-alan.coopersmith@oracle.com> References: <1411318146-23315-1-git-send-email-alan.coopersmith@oracle.com> <1411318146-23315-2-git-send-email-alan.coopersmith@oracle.com> Message-ID: <20140921222932.GA24761@jelly.redhat.com> On Sun, Sep 21, 2014 at 09:49:06AM -0700, Alan Coopersmith wrote: > make -j 8 check was sporadically failing in different xi2 tests. > After adding the asserts in the previous commit to catch xkb failure > it became easier to catch the failures and see that multiple tests > were running at once trying to write to /tmp/server-(null).xkm and > then delete it, and interfering with each other. > > Putting a unique string into the display variable let them each write > to their own file and not interfere with others. > > Signed-off-by: Alan Coopersmith > --- > > I've only tested on Solaris with getprogname(), not on Linux, where > program_invocation_name would be used instead. If neither is found > we should either use something like mkstemp() or disable running the > tests in parallel, but I've not bothered to go that far, since this > covers enough platforms for me. Reviewed-by: Peter Hutterer for both Cheers, Peter > > configure.ac | 4 +++- > include/dix-config.h.in | 7 +++++++ > test/xi2/protocol-common.c | 11 +++++++++++ > 3 files changed, 21 insertions(+), 1 deletion(-) > > diff --git a/configure.ac b/configure.ac > index be8bff6..04b0b4a 100644 > --- a/configure.ac > +++ b/configure.ac > @@ -217,10 +217,12 @@ AC_SUBST(DLOPEN_LIBS) > > dnl Checks for library functions. > AC_CHECK_FUNCS([backtrace ffs geteuid getuid issetugid getresuid \ > - getdtablesize getifaddrs getpeereid getpeerucred getzoneid \ > + getdtablesize getifaddrs getpeereid getpeerucred getprogname getzoneid \ > mmap seteuid shmctl64 strncasecmp vasprintf vsnprintf walkcontext]) > AC_REPLACE_FUNCS([strcasecmp strcasestr strlcat strlcpy strndup]) > > +AC_CHECK_DECLS([program_invocation_name], [], [], [[#include ]]) > + > dnl Find the math libary, then check for cbrt function in it. > AC_CHECK_LIB(m, sqrt) > AC_CHECK_FUNCS([cbrt]) > diff --git a/include/dix-config.h.in b/include/dix-config.h.in > index 4268b8f..ac68ad6 100644 > --- a/include/dix-config.h.in > +++ b/include/dix-config.h.in > @@ -72,6 +72,10 @@ > /* Define to 1 if you have the header file. */ > #undef HAVE_DBM_H > > +/* Define to 1 if you have the declaration of `program_invocation_name', and > + to 0 if you don't. */ > +#undef HAVE_DECL_PROGRAM_INVOCATION_NAME > + > /* Define to 1 if you have the header file, and it defines `DIR'. > */ > #undef HAVE_DIRENT_H > @@ -100,6 +104,9 @@ > /* Define to 1 if you have the `getpeerucred' function. */ > #undef HAVE_GETPEERUCRED > > +/* Define to 1 if you have the `getprogname' function. */ > +#undef HAVE_GETPROGNAME > + > /* Define to 1 if you have the `getzoneid' function. */ > #undef HAVE_GETZONEID > > diff --git a/test/xi2/protocol-common.c b/test/xi2/protocol-common.c > index 64a5777..3a53050 100644 > --- a/test/xi2/protocol-common.c > +++ b/test/xi2/protocol-common.c > @@ -139,6 +139,17 @@ init_devices(void) > struct devices local_devices; > int ret; > > + /* > + * Put a unique name in display pointer so that when tests are run in > + * parallel, their xkbcomp outputs to /tmp/server-.xkm don't > + * stomp on each other. > + */ > +#ifdef HAVE_GETPROGNAME > + display = getprogname(); > +#elif HAVE_DECL_PROGRAM_INVOCATION_NAME > + display = program_invocation_name; > +#endif > + > client = init_client(0, NULL); > > AllocDevicePair(&client, "Virtual core", &local_devices.vcp, &local_devices.vck, > -- > 1.7.9.2 > From keithp at keithp.com Mon Sep 22 12:13:28 2014 From: keithp at keithp.com (Keith Packard) Date: Mon, 22 Sep 2014 12:13:28 -0700 Subject: [PATCH 00/11] Misc window exposure/validation cleanups In-Reply-To: References: <1411061040-13053-1-git-send-email-ajax@redhat.com> <86vbokwnmk.fsf@hiro.keithp.com> Message-ID: <86bnq7tqnb.fsf@hiro.keithp.com> "Jasper St. Pierre" writes: > Why would xeyes generate a large number of rectangles in a composited > environment? Are you talking about the initial expose? Initial expose or on any resize. -- keith.packard at intel.com -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 810 bytes Desc: not available URL: From keithp at keithp.com Mon Sep 22 12:03:46 2014 From: keithp at keithp.com (Keith Packard) Date: Mon, 22 Sep 2014 12:03:46 -0700 Subject: [PATCH] XSERVER_DTRACE needs request names from registry too In-Reply-To: References: <1411211392-4751-1-git-send-email-keithp@keithp.com> Message-ID: <86oau7tr3h.fsf@hiro.keithp.com> Dave Airlie writes: > Reviewed-by: Dave Airlie > >> Signed-off-by: Keith Packard Merged. 28337cb..18935b4 master -> master -- keith.packard at intel.com -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 810 bytes Desc: not available URL: From aplattner at nvidia.com Mon Sep 22 12:24:53 2014 From: aplattner at nvidia.com (Aaron Plattner) Date: Mon, 22 Sep 2014 12:24:53 -0700 Subject: [PATCH libpciaccess] Add missing HAVE_CONFIG_H include guards Message-ID: <1411413894-6191-1-git-send-email-aplattner@nvidia.com> Signed-off-by: Aaron Plattner --- src/common_vgaarb.c | 2 ++ src/freebsd_pci.c | 2 ++ src/linux_sysfs.c | 2 ++ 3 files changed, 6 insertions(+) diff --git a/src/common_vgaarb.c b/src/common_vgaarb.c index ab3c5e806ffe..c59bd788dc5e 100644 --- a/src/common_vgaarb.c +++ b/src/common_vgaarb.c @@ -33,7 +33,9 @@ #include #include +#ifdef HAVE_CONFIG_H #include "config.h" +#endif #include "pciaccess.h" #include "pciaccess_private.h" diff --git a/src/freebsd_pci.c b/src/freebsd_pci.c index 7f5f56b7d408..9505a1c17d21 100644 --- a/src/freebsd_pci.c +++ b/src/freebsd_pci.c @@ -45,7 +45,9 @@ #include #include +#ifdef HAVE_CONFIG_H #include "config.h" +#endif #include "pciaccess.h" #include "pciaccess_private.h" diff --git a/src/linux_sysfs.c b/src/linux_sysfs.c index 8fca65e1cc37..08c99719bcba 100644 --- a/src/linux_sysfs.c +++ b/src/linux_sysfs.c @@ -57,7 +57,9 @@ #define iopl(x) -1 #endif +#ifdef HAVE_CONFIG_H #include "config.h" +#endif #ifdef HAVE_MTRR #include -- 2.1.0 From aplattner at nvidia.com Mon Sep 22 12:24:54 2014 From: aplattner at nvidia.com (Aaron Plattner) Date: Mon, 22 Sep 2014 12:24:54 -0700 Subject: [PATCH libpciaccess] Allow building without O_CLOEXEC In-Reply-To: <1411413894-6191-1-git-send-email-aplattner@nvidia.com> References: <1411413894-6191-1-git-send-email-aplattner@nvidia.com> Message-ID: <1411413894-6191-2-git-send-email-aplattner@nvidia.com> Old versions of Linux don't support O_CLOEXEC, so rather than failing to build, allow building without O_CLOEXEC if a new ALLOW_NO_O_CLOEXEC flag is defined. Create a new helper function, pci_open_cloexec that uses O_CLOEXEC when it's available and falls back to open + fcntl when it's not. Route all calls to open that pass O_CLOEXEC through this new function instead using the following Coccinelle patch: @@ expression path, flags; @@ -open(path, flags | O_CLOEXEC) +pci_open_cloexec(path, flags) Signed-off-by: Aaron Plattner --- There are three calls to open() that don't use O_CLOEXEC -- are those bugs? src/linux_devmem.c: fd = open("/dev/mem", O_RDONLY, 0); src/netbsd_pci.c: fd = open("/dev/ttyE0", O_RDONLY); src/netbsd_pci.c: pcifd = open(netbsd_devname, O_RDWR); src/common_vgaarb.c | 2 +- src/freebsd_pci.c | 10 +++++----- src/linux_sysfs.c | 26 +++++++++++++------------- src/netbsd_pci.c | 2 +- src/openbsd_pci.c | 2 +- src/pciaccess_private.h | 33 +++++++++++++++++++++++++++++---- src/solx_devfs.c | 4 ++-- src/x86_pci.c | 4 ++-- 8 files changed, 54 insertions(+), 29 deletions(-) diff --git a/src/common_vgaarb.c b/src/common_vgaarb.c index c59bd788dc5e..f3b523e67c3a 100644 --- a/src/common_vgaarb.c +++ b/src/common_vgaarb.c @@ -131,7 +131,7 @@ pci_device_vgaarb_init(void) if (!pci_sys) return -1; - if ((pci_sys->vgaarb_fd = open ("/dev/vga_arbiter", O_RDWR | O_CLOEXEC)) < 0) { + if ((pci_sys->vgaarb_fd = pci_open_cloexec ("/dev/vga_arbiter", O_RDWR)) < 0) { return errno; } diff --git a/src/freebsd_pci.c b/src/freebsd_pci.c index 9505a1c17d21..e40d80847bf0 100644 --- a/src/freebsd_pci.c +++ b/src/freebsd_pci.c @@ -112,7 +112,7 @@ pci_device_freebsd_map_range(struct pci_device *dev, int fd, err = 0; - fd = open("/dev/mem", O_RDWR | O_CLOEXEC); + fd = pci_open_cloexec("/dev/mem", O_RDWR); if (fd == -1) return errno; @@ -157,7 +157,7 @@ pci_device_freebsd_unmap_range( struct pci_device *dev, if ((map->flags & PCI_DEV_MAP_FLAG_CACHABLE) || (map->flags & PCI_DEV_MAP_FLAG_WRITE_COMBINE)) { - fd = open("/dev/mem", O_RDWR | O_CLOEXEC); + fd = pci_open_cloexec("/dev/mem", O_RDWR); if (fd != -1) { mrd.mr_base = map->base; mrd.mr_len = map->size; @@ -297,7 +297,7 @@ pci_device_freebsd_read_rom( struct pci_device * dev, void * buffer ) } printf("Using rom_base = 0x%lx\n", (long)rom_base); - memfd = open( "/dev/mem", O_RDONLY | O_CLOEXEC ); + memfd = pci_open_cloexec( "/dev/mem", O_RDONLY ); if ( memfd == -1 ) return errno; @@ -574,7 +574,7 @@ pci_device_freebsd_open_legacy_io(struct pci_io_handle *ret, struct pci_device *dev, pciaddr_t base, pciaddr_t size) { #if defined(__i386__) || defined(__amd64__) - ret->fd = open("/dev/io", O_RDWR | O_CLOEXEC); + ret->fd = pci_open_cloexec("/dev/io", O_RDWR); if (ret->fd < 0) return NULL; @@ -735,7 +735,7 @@ pci_system_freebsd_create( void ) int i; /* Try to open the PCI device */ - pcidev = open( "/dev/pci", O_RDWR | O_CLOEXEC ); + pcidev = pci_open_cloexec( "/dev/pci", O_RDWR ); if ( pcidev == -1 ) return ENXIO; diff --git a/src/linux_sysfs.c b/src/linux_sysfs.c index 08c99719bcba..120cd6411893 100644 --- a/src/linux_sysfs.c +++ b/src/linux_sysfs.c @@ -100,7 +100,7 @@ pci_system_linux_sysfs_create( void ) if ( pci_sys != NULL ) { pci_sys->methods = & linux_sysfs_methods; #ifdef HAVE_MTRR - pci_sys->mtrr_fd = open("/proc/mtrr", O_WRONLY | O_CLOEXEC); + pci_sys->mtrr_fd = pci_open_cloexec("/proc/mtrr", O_WRONLY); #endif err = populate_entries(pci_sys); } @@ -247,7 +247,7 @@ pci_device_linux_sysfs_probe( struct pci_device * dev ) dev->bus, dev->dev, dev->func ); - fd = open( name, O_RDONLY | O_CLOEXEC); + fd = pci_open_cloexec(name, O_RDONLY); if ( fd != -1 ) { char * next; pciaddr_t low_addr; @@ -309,7 +309,7 @@ pci_device_linux_sysfs_read_rom( struct pci_device * dev, void * buffer ) dev->dev, dev->func ); - fd = open( name, O_RDWR | O_CLOEXEC); + fd = pci_open_cloexec(name, O_RDWR); if ( fd == -1 ) { #ifdef LINUX_ROM /* If reading the ROM using sysfs fails, fall back to the old @@ -390,7 +390,7 @@ pci_device_linux_sysfs_read( struct pci_device * dev, void * data, dev->dev, dev->func ); - fd = open( name, O_RDONLY | O_CLOEXEC); + fd = pci_open_cloexec(name, O_RDONLY); if ( fd == -1 ) { return errno; } @@ -450,7 +450,7 @@ pci_device_linux_sysfs_write( struct pci_device * dev, const void * data, dev->dev, dev->func ); - fd = open( name, O_WRONLY | O_CLOEXEC); + fd = pci_open_cloexec(name, O_WRONLY); if ( fd == -1 ) { return errno; } @@ -501,7 +501,7 @@ pci_device_linux_sysfs_map_range_wc(struct pci_device *dev, dev->dev, dev->func, map->region); - fd = open(name, open_flags | O_CLOEXEC); + fd = pci_open_cloexec(name, open_flags); if (fd == -1) return errno; @@ -566,7 +566,7 @@ pci_device_linux_sysfs_map_range(struct pci_device *dev, dev->func, map->region); - fd = open(name, open_flags | O_CLOEXEC); + fd = pci_open_cloexec(name, open_flags); if (fd == -1) { return errno; } @@ -689,7 +689,7 @@ static void pci_device_linux_sysfs_enable(struct pci_device *dev) dev->dev, dev->func ); - fd = open( name, O_RDWR | O_CLOEXEC); + fd = pci_open_cloexec(name, O_RDWR); if (fd == -1) return; @@ -711,7 +711,7 @@ static int pci_device_linux_sysfs_boot_vga(struct pci_device *dev) dev->dev, dev->func ); - fd = open( name, O_RDONLY | O_CLOEXEC); + fd = pci_open_cloexec(name, O_RDONLY); if (fd == -1) return 0; @@ -754,7 +754,7 @@ pci_device_linux_sysfs_open_device_io(struct pci_io_handle *ret, snprintf(name, PATH_MAX, "%s/%04x:%02x:%02x.%1u/resource%d", SYS_BUS_PCI, dev->domain, dev->bus, dev->dev, dev->func, bar); - ret->fd = open(name, O_RDWR | O_CLOEXEC); + ret->fd = pci_open_cloexec(name, O_RDWR); if (ret->fd < 0) return NULL; @@ -778,7 +778,7 @@ pci_device_linux_sysfs_open_legacy_io(struct pci_io_handle *ret, snprintf(name, PATH_MAX, "/sys/class/pci_bus/%04x:%02x/legacy_io", dev->domain, dev->bus); - ret->fd = open(name, O_RDWR | O_CLOEXEC); + ret->fd = pci_open_cloexec(name, O_RDWR); if (ret->fd >= 0) break; @@ -925,7 +925,7 @@ pci_device_linux_sysfs_map_legacy(struct pci_device *dev, pciaddr_t base, snprintf(name, PATH_MAX, "/sys/class/pci_bus/%04x:%02x/legacy_mem", dev->domain, dev->bus); - fd = open(name, flags | O_CLOEXEC); + fd = pci_open_cloexec(name, flags); if (fd >= 0) break; @@ -934,7 +934,7 @@ pci_device_linux_sysfs_map_legacy(struct pci_device *dev, pciaddr_t base, /* If not, /dev/mem is the best we can do */ if (!dev) - fd = open("/dev/mem", flags | O_CLOEXEC); + fd = pci_open_cloexec("/dev/mem", flags); if (fd < 0) return errno; diff --git a/src/netbsd_pci.c b/src/netbsd_pci.c index 52591b08f737..87bb2feb2504 100644 --- a/src/netbsd_pci.c +++ b/src/netbsd_pci.c @@ -909,7 +909,7 @@ pci_system_netbsd_create(void) ndevs = 0; nbuses = 0; snprintf(netbsd_devname, 32, "/dev/pci%d", nbuses); - pcifd = open(netbsd_devname, O_RDWR | O_CLOEXEC); + pcifd = pci_open_cloexec(netbsd_devname, O_RDWR); while (pcifd > 0) { ioctl(pcifd, PCI_IOC_BUSINFO, &businfo); buses[nbuses].fd = pcifd; diff --git a/src/openbsd_pci.c b/src/openbsd_pci.c index fe034f3b046b..3d66598b5b77 100644 --- a/src/openbsd_pci.c +++ b/src/openbsd_pci.c @@ -571,7 +571,7 @@ pci_system_openbsd_create(void) for (domain = 0; domain < sizeof(pcifd) / sizeof(pcifd[0]); domain++) { snprintf(path, sizeof(path), "/dev/pci%d", domain); - pcifd[domain] = open(path, O_RDWR | O_CLOEXEC); + pcifd[domain] = pci_open_cloexec(path, O_RDWR); if (pcifd[domain] == -1) break; ndomains++; diff --git a/src/pciaccess_private.h b/src/pciaccess_private.h index 9f4e8f9ab573..0de989bceab4 100644 --- a/src/pciaccess_private.h +++ b/src/pciaccess_private.h @@ -40,13 +40,16 @@ /* * O_CLOEXEC fixes an fd leak case (see 'man 2 open' for details). I don't * know of any OS we support where this isn't available in a sufficiently - * new version, so warn unconditionally. + * new version, so fail if ALLOW_NO_O_CLOEXEC is not defined. */ #include -#ifndef O_CLOEXEC -#warning O_CLOEXEC not available, please upgrade. -#define O_CLOEXEC 0 +#if !defined(O_CLOEXEC) +# if defined(ALLOW_NO_O_CLOEXEC) +# include +# else +# error O_CLOEXEC not available, please upgrade. +# endif #endif @@ -191,3 +194,25 @@ extern void pci_system_openbsd_init_dev_mem( int ); extern int pci_system_solx_devfs_create( void ); extern int pci_system_x86_create( void ); extern void pci_io_cleanup( void ); + +static inline int pci_open_cloexec( const char *path, int flags ) +{ +#if defined(O_CLOEXEC) + return open(path, flags | O_CLOEXEC); +#else + int fd = open(path, flags); + if (fd >= 0) { + int flags = fcntl(fd, F_GETFD); + if (flags == -1) { + close(fd); + return -1; + } + flags |= FD_CLOEXEC; + if (fcntl(fd, F_SETFD, flags) == -1) { + close(fd); + return -1; + } + } + return fd; +#endif +} diff --git a/src/solx_devfs.c b/src/solx_devfs.c index f57239304a43..2d4b102f8cf1 100644 --- a/src/solx_devfs.c +++ b/src/solx_devfs.c @@ -415,7 +415,7 @@ probe_nexus_node(di_node_t di_node, di_minor_t minor, void *arg) nexus_path, first_bus, last_bus); #endif - if ((fd = open(nexus_path, O_RDWR | O_CLOEXEC)) >= 0) { + if ((fd = pci_open_cloexec(nexus_path, O_RDWR)) >= 0) { probe_args_t args; nexus->fd = fd; @@ -718,7 +718,7 @@ pci_device_solx_devfs_map_range(struct pci_device *dev, #endif if (map_fd < 0) { - if ((map_fd = open(map_dev, O_RDWR | O_CLOEXEC)) < 0) { + if ((map_fd = pci_open_cloexec(map_dev, O_RDWR)) < 0) { err = errno; (void) fprintf(stderr, "can not open %s: %s\n", map_dev, strerror(errno)); diff --git a/src/x86_pci.c b/src/x86_pci.c index 49c1cabc3c6c..7088ff9a016d 100644 --- a/src/x86_pci.c +++ b/src/x86_pci.c @@ -457,7 +457,7 @@ pci_device_x86_read_rom(struct pci_device *dev, void *buffer) return ENOSYS; } - memfd = open("/dev/mem", O_RDONLY | O_CLOEXEC); + memfd = pci_open_cloexec("/dev/mem", O_RDONLY); if (memfd == -1) return errno; @@ -637,7 +637,7 @@ static int pci_device_x86_map_range(struct pci_device *dev, struct pci_device_mapping *map) { - int memfd = open("/dev/mem", O_RDWR | O_CLOEXEC); + int memfd = pci_open_cloexec("/dev/mem", O_RDWR); int prot = PROT_READ; if (memfd == -1) -- 2.1.0 From jstpierre at mecheye.net Mon Sep 22 12:51:36 2014 From: jstpierre at mecheye.net (Jasper St. Pierre) Date: Mon, 22 Sep 2014 13:51:36 -0600 Subject: [PATCH 00/11] Misc window exposure/validation cleanups In-Reply-To: <86bnq7tqnb.fsf@hiro.keithp.com> References: <1411061040-13053-1-git-send-email-ajax@redhat.com> <86vbokwnmk.fsf@hiro.keithp.com> <86bnq7tqnb.fsf@hiro.keithp.com> Message-ID: Initial expose happens once. For the xeyes case, doesn't it set a new shape after it is configured? Setting a new window shape will only re-expose the parts of the window that weren't in the old shape, right? So the middle of the eyes won't get exposes, but the circular edges will. That doesn't sound like it would be too much traffic, and any machine could handle that nowadays. On Mon, Sep 22, 2014 at 1:13 PM, Keith Packard wrote: > "Jasper St. Pierre" writes: > > > Why would xeyes generate a large number of rectangles in a composited > > environment? Are you talking about the initial expose? > > Initial expose or on any resize. > > -- > keith.packard at intel.com > -- Jasper -------------- next part -------------- An HTML attachment was scrubbed... URL: From jstpierre at mecheye.net Mon Sep 22 12:56:40 2014 From: jstpierre at mecheye.net (Jasper St. Pierre) Date: Mon, 22 Sep 2014 13:56:40 -0600 Subject: [PATCH libpciaccess] Allow building without O_CLOEXEC In-Reply-To: <1411413894-6191-2-git-send-email-aplattner@nvidia.com> References: <1411413894-6191-1-git-send-email-aplattner@nvidia.com> <1411413894-6191-2-git-send-email-aplattner@nvidia.com> Message-ID: How old? O_CLOEXEC is part of the 2008 POSIX specification. I really wouldn't like to build on anything older than that... :( On Mon, Sep 22, 2014 at 1:24 PM, Aaron Plattner wrote: > Old versions of Linux don't support O_CLOEXEC, so rather than failing to > build, > allow building without O_CLOEXEC if a new ALLOW_NO_O_CLOEXEC flag is > defined. > > Create a new helper function, pci_open_cloexec that uses O_CLOEXEC when > it's > available and falls back to open + fcntl when it's not. Route all calls > to open > that pass O_CLOEXEC through this new function instead using the following > Coccinelle patch: > > @@ > expression path, flags; > @@ > -open(path, flags | O_CLOEXEC) > +pci_open_cloexec(path, flags) > > Signed-off-by: Aaron Plattner > --- > There are three calls to open() that don't use O_CLOEXEC -- are those bugs? > > src/linux_devmem.c: fd = open("/dev/mem", O_RDONLY, 0); > src/netbsd_pci.c: fd = open("/dev/ttyE0", O_RDONLY); > src/netbsd_pci.c: pcifd = open(netbsd_devname, O_RDWR); > > src/common_vgaarb.c | 2 +- > src/freebsd_pci.c | 10 +++++----- > src/linux_sysfs.c | 26 +++++++++++++------------- > src/netbsd_pci.c | 2 +- > src/openbsd_pci.c | 2 +- > src/pciaccess_private.h | 33 +++++++++++++++++++++++++++++---- > src/solx_devfs.c | 4 ++-- > src/x86_pci.c | 4 ++-- > 8 files changed, 54 insertions(+), 29 deletions(-) > > diff --git a/src/common_vgaarb.c b/src/common_vgaarb.c > index c59bd788dc5e..f3b523e67c3a 100644 > --- a/src/common_vgaarb.c > +++ b/src/common_vgaarb.c > @@ -131,7 +131,7 @@ pci_device_vgaarb_init(void) > if (!pci_sys) > return -1; > > - if ((pci_sys->vgaarb_fd = open ("/dev/vga_arbiter", O_RDWR | > O_CLOEXEC)) < 0) { > + if ((pci_sys->vgaarb_fd = pci_open_cloexec ("/dev/vga_arbiter", > O_RDWR)) < 0) { > return errno; > } > > diff --git a/src/freebsd_pci.c b/src/freebsd_pci.c > index 9505a1c17d21..e40d80847bf0 100644 > --- a/src/freebsd_pci.c > +++ b/src/freebsd_pci.c > @@ -112,7 +112,7 @@ pci_device_freebsd_map_range(struct pci_device *dev, > > int fd, err = 0; > > - fd = open("/dev/mem", O_RDWR | O_CLOEXEC); > + fd = pci_open_cloexec("/dev/mem", O_RDWR); > if (fd == -1) > return errno; > > @@ -157,7 +157,7 @@ pci_device_freebsd_unmap_range( struct pci_device *dev, > if ((map->flags & PCI_DEV_MAP_FLAG_CACHABLE) || > (map->flags & PCI_DEV_MAP_FLAG_WRITE_COMBINE)) > { > - fd = open("/dev/mem", O_RDWR | O_CLOEXEC); > + fd = pci_open_cloexec("/dev/mem", O_RDWR); > if (fd != -1) { > mrd.mr_base = map->base; > mrd.mr_len = map->size; > @@ -297,7 +297,7 @@ pci_device_freebsd_read_rom( struct pci_device * dev, > void * buffer ) > } > > printf("Using rom_base = 0x%lx\n", (long)rom_base); > - memfd = open( "/dev/mem", O_RDONLY | O_CLOEXEC ); > + memfd = pci_open_cloexec( "/dev/mem", O_RDONLY ); > if ( memfd == -1 ) > return errno; > > @@ -574,7 +574,7 @@ pci_device_freebsd_open_legacy_io(struct pci_io_handle > *ret, > struct pci_device *dev, pciaddr_t base, pciaddr_t size) > { > #if defined(__i386__) || defined(__amd64__) > - ret->fd = open("/dev/io", O_RDWR | O_CLOEXEC); > + ret->fd = pci_open_cloexec("/dev/io", O_RDWR); > > if (ret->fd < 0) > return NULL; > @@ -735,7 +735,7 @@ pci_system_freebsd_create( void ) > int i; > > /* Try to open the PCI device */ > - pcidev = open( "/dev/pci", O_RDWR | O_CLOEXEC ); > + pcidev = pci_open_cloexec( "/dev/pci", O_RDWR ); > if ( pcidev == -1 ) > return ENXIO; > > diff --git a/src/linux_sysfs.c b/src/linux_sysfs.c > index 08c99719bcba..120cd6411893 100644 > --- a/src/linux_sysfs.c > +++ b/src/linux_sysfs.c > @@ -100,7 +100,7 @@ pci_system_linux_sysfs_create( void ) > if ( pci_sys != NULL ) { > pci_sys->methods = & linux_sysfs_methods; > #ifdef HAVE_MTRR > - pci_sys->mtrr_fd = open("/proc/mtrr", O_WRONLY | O_CLOEXEC); > + pci_sys->mtrr_fd = pci_open_cloexec("/proc/mtrr", O_WRONLY); > #endif > err = populate_entries(pci_sys); > } > @@ -247,7 +247,7 @@ pci_device_linux_sysfs_probe( struct pci_device * dev ) > dev->bus, > dev->dev, > dev->func ); > - fd = open( name, O_RDONLY | O_CLOEXEC); > + fd = pci_open_cloexec(name, O_RDONLY); > if ( fd != -1 ) { > char * next; > pciaddr_t low_addr; > @@ -309,7 +309,7 @@ pci_device_linux_sysfs_read_rom( struct pci_device * > dev, void * buffer ) > dev->dev, > dev->func ); > > - fd = open( name, O_RDWR | O_CLOEXEC); > + fd = pci_open_cloexec(name, O_RDWR); > if ( fd == -1 ) { > #ifdef LINUX_ROM > /* If reading the ROM using sysfs fails, fall back to the old > @@ -390,7 +390,7 @@ pci_device_linux_sysfs_read( struct pci_device * dev, > void * data, > dev->dev, > dev->func ); > > - fd = open( name, O_RDONLY | O_CLOEXEC); > + fd = pci_open_cloexec(name, O_RDONLY); > if ( fd == -1 ) { > return errno; > } > @@ -450,7 +450,7 @@ pci_device_linux_sysfs_write( struct pci_device * dev, > const void * data, > dev->dev, > dev->func ); > > - fd = open( name, O_WRONLY | O_CLOEXEC); > + fd = pci_open_cloexec(name, O_WRONLY); > if ( fd == -1 ) { > return errno; > } > @@ -501,7 +501,7 @@ pci_device_linux_sysfs_map_range_wc(struct pci_device > *dev, > dev->dev, > dev->func, > map->region); > - fd = open(name, open_flags | O_CLOEXEC); > + fd = pci_open_cloexec(name, open_flags); > if (fd == -1) > return errno; > > @@ -566,7 +566,7 @@ pci_device_linux_sysfs_map_range(struct pci_device > *dev, > dev->func, > map->region); > > - fd = open(name, open_flags | O_CLOEXEC); > + fd = pci_open_cloexec(name, open_flags); > if (fd == -1) { > return errno; > } > @@ -689,7 +689,7 @@ static void pci_device_linux_sysfs_enable(struct > pci_device *dev) > dev->dev, > dev->func ); > > - fd = open( name, O_RDWR | O_CLOEXEC); > + fd = pci_open_cloexec(name, O_RDWR); > if (fd == -1) > return; > > @@ -711,7 +711,7 @@ static int pci_device_linux_sysfs_boot_vga(struct > pci_device *dev) > dev->dev, > dev->func ); > > - fd = open( name, O_RDONLY | O_CLOEXEC); > + fd = pci_open_cloexec(name, O_RDONLY); > if (fd == -1) > return 0; > > @@ -754,7 +754,7 @@ pci_device_linux_sysfs_open_device_io(struct > pci_io_handle *ret, > snprintf(name, PATH_MAX, "%s/%04x:%02x:%02x.%1u/resource%d", > SYS_BUS_PCI, dev->domain, dev->bus, dev->dev, dev->func, bar); > > - ret->fd = open(name, O_RDWR | O_CLOEXEC); > + ret->fd = pci_open_cloexec(name, O_RDWR); > > if (ret->fd < 0) > return NULL; > @@ -778,7 +778,7 @@ pci_device_linux_sysfs_open_legacy_io(struct > pci_io_handle *ret, > snprintf(name, PATH_MAX, "/sys/class/pci_bus/%04x:%02x/legacy_io", > dev->domain, dev->bus); > > - ret->fd = open(name, O_RDWR | O_CLOEXEC); > + ret->fd = pci_open_cloexec(name, O_RDWR); > if (ret->fd >= 0) > break; > > @@ -925,7 +925,7 @@ pci_device_linux_sysfs_map_legacy(struct pci_device > *dev, pciaddr_t base, > snprintf(name, PATH_MAX, "/sys/class/pci_bus/%04x:%02x/legacy_mem", > dev->domain, dev->bus); > > - fd = open(name, flags | O_CLOEXEC); > + fd = pci_open_cloexec(name, flags); > if (fd >= 0) > break; > > @@ -934,7 +934,7 @@ pci_device_linux_sysfs_map_legacy(struct pci_device > *dev, pciaddr_t base, > > /* If not, /dev/mem is the best we can do */ > if (!dev) > - fd = open("/dev/mem", flags | O_CLOEXEC); > + fd = pci_open_cloexec("/dev/mem", flags); > > if (fd < 0) > return errno; > diff --git a/src/netbsd_pci.c b/src/netbsd_pci.c > index 52591b08f737..87bb2feb2504 100644 > --- a/src/netbsd_pci.c > +++ b/src/netbsd_pci.c > @@ -909,7 +909,7 @@ pci_system_netbsd_create(void) > ndevs = 0; > nbuses = 0; > snprintf(netbsd_devname, 32, "/dev/pci%d", nbuses); > - pcifd = open(netbsd_devname, O_RDWR | O_CLOEXEC); > + pcifd = pci_open_cloexec(netbsd_devname, O_RDWR); > while (pcifd > 0) { > ioctl(pcifd, PCI_IOC_BUSINFO, &businfo); > buses[nbuses].fd = pcifd; > diff --git a/src/openbsd_pci.c b/src/openbsd_pci.c > index fe034f3b046b..3d66598b5b77 100644 > --- a/src/openbsd_pci.c > +++ b/src/openbsd_pci.c > @@ -571,7 +571,7 @@ pci_system_openbsd_create(void) > > for (domain = 0; domain < sizeof(pcifd) / sizeof(pcifd[0]); > domain++) { > snprintf(path, sizeof(path), "/dev/pci%d", domain); > - pcifd[domain] = open(path, O_RDWR | O_CLOEXEC); > + pcifd[domain] = pci_open_cloexec(path, O_RDWR); > if (pcifd[domain] == -1) > break; > ndomains++; > diff --git a/src/pciaccess_private.h b/src/pciaccess_private.h > index 9f4e8f9ab573..0de989bceab4 100644 > --- a/src/pciaccess_private.h > +++ b/src/pciaccess_private.h > @@ -40,13 +40,16 @@ > /* > * O_CLOEXEC fixes an fd leak case (see 'man 2 open' for details). I don't > * know of any OS we support where this isn't available in a sufficiently > - * new version, so warn unconditionally. > + * new version, so fail if ALLOW_NO_O_CLOEXEC is not defined. > */ > #include > > -#ifndef O_CLOEXEC > -#warning O_CLOEXEC not available, please upgrade. > -#define O_CLOEXEC 0 > +#if !defined(O_CLOEXEC) > +# if defined(ALLOW_NO_O_CLOEXEC) > +# include > +# else > +# error O_CLOEXEC not available, please upgrade. > +# endif > #endif > > > @@ -191,3 +194,25 @@ extern void pci_system_openbsd_init_dev_mem( int ); > extern int pci_system_solx_devfs_create( void ); > extern int pci_system_x86_create( void ); > extern void pci_io_cleanup( void ); > + > +static inline int pci_open_cloexec( const char *path, int flags ) > +{ > +#if defined(O_CLOEXEC) > + return open(path, flags | O_CLOEXEC); > +#else > + int fd = open(path, flags); > + if (fd >= 0) { > + int flags = fcntl(fd, F_GETFD); > + if (flags == -1) { > + close(fd); > + return -1; > + } > + flags |= FD_CLOEXEC; > + if (fcntl(fd, F_SETFD, flags) == -1) { > + close(fd); > + return -1; > + } > + } > + return fd; > +#endif > +} > diff --git a/src/solx_devfs.c b/src/solx_devfs.c > index f57239304a43..2d4b102f8cf1 100644 > --- a/src/solx_devfs.c > +++ b/src/solx_devfs.c > @@ -415,7 +415,7 @@ probe_nexus_node(di_node_t di_node, di_minor_t minor, > void *arg) > nexus_path, first_bus, last_bus); > #endif > > - if ((fd = open(nexus_path, O_RDWR | O_CLOEXEC)) >= 0) { > + if ((fd = pci_open_cloexec(nexus_path, O_RDWR)) >= 0) { > probe_args_t args; > > nexus->fd = fd; > @@ -718,7 +718,7 @@ pci_device_solx_devfs_map_range(struct pci_device *dev, > #endif > > if (map_fd < 0) { > - if ((map_fd = open(map_dev, O_RDWR | O_CLOEXEC)) < 0) { > + if ((map_fd = pci_open_cloexec(map_dev, O_RDWR)) < 0) { > err = errno; > (void) fprintf(stderr, "can not open %s: %s\n", map_dev, > strerror(errno)); > diff --git a/src/x86_pci.c b/src/x86_pci.c > index 49c1cabc3c6c..7088ff9a016d 100644 > --- a/src/x86_pci.c > +++ b/src/x86_pci.c > @@ -457,7 +457,7 @@ pci_device_x86_read_rom(struct pci_device *dev, void > *buffer) > return ENOSYS; > } > > - memfd = open("/dev/mem", O_RDONLY | O_CLOEXEC); > + memfd = pci_open_cloexec("/dev/mem", O_RDONLY); > if (memfd == -1) > return errno; > > @@ -637,7 +637,7 @@ static int > pci_device_x86_map_range(struct pci_device *dev, > struct pci_device_mapping *map) > { > - int memfd = open("/dev/mem", O_RDWR | O_CLOEXEC); > + int memfd = pci_open_cloexec("/dev/mem", O_RDWR); > int prot = PROT_READ; > > if (memfd == -1) > -- > 2.1.0 > > _______________________________________________ > xorg-devel at lists.x.org: X.Org development > Archives: http://lists.x.org/archives/xorg-devel > Info: http://lists.x.org/mailman/listinfo/xorg-devel > -- Jasper -------------- next part -------------- An HTML attachment was scrubbed... URL: From aplattner at nvidia.com Mon Sep 22 13:12:11 2014 From: aplattner at nvidia.com (Aaron Plattner) Date: Mon, 22 Sep 2014 13:12:11 -0700 Subject: [PATCH libpciaccess] Allow building without O_CLOEXEC In-Reply-To: References: <1411413894-6191-1-git-send-email-aplattner@nvidia.com> <1411413894-6191-2-git-send-email-aplattner@nvidia.com> Message-ID: <5420829B.90109@nvidia.com> On 09/22/2014 12:56 PM, Jasper St. Pierre wrote: > How old? O_CLOEXEC is part of the 2008 POSIX specification. I really > wouldn't like to build on anything older than that... :( As old as possible. :) For context, I want to use libpciaccess's device enumeration stuff in nvidia-installer to identify legacy devices. I don't need any of the mapping code and I don't need to worry about the application forking, which is why not having O_CLOEXEC is safe in my case. According to our README [1], the minimum supported kernel is 2.6.18. The open(2) man page says that O_CLOEXEC was introduced in Linux 2.6.23. I agree that allowing the library to be built normally (i.e. outside of special custom configurations) with the fallback isn't a good idea, which is why I didn't wire up ALLOW_NO_O_CLOEXEC to a configure option. [1] http://us.download.nvidia.com/XFree86/Linux-x86/343.22/README/minimumrequirements.html > On Mon, Sep 22, 2014 at 1:24 PM, Aaron Plattner > wrote: > > Old versions of Linux don't support O_CLOEXEC, so rather than > failing to build, > allow building without O_CLOEXEC if a new ALLOW_NO_O_CLOEXEC flag is > defined. > > Create a new helper function, pci_open_cloexec that uses O_CLOEXEC > when it's > available and falls back to open + fcntl when it's not. Route all > calls to open > that pass O_CLOEXEC through this new function instead using the > following > Coccinelle patch: > > @@ > expression path, flags; > @@ > -open(path, flags | O_CLOEXEC) > +pci_open_cloexec(path, flags) > > Signed-off-by: Aaron Plattner > > --- > There are three calls to open() that don't use O_CLOEXEC -- are > those bugs? > > src/linux_devmem.c: fd = open("/dev/mem", O_RDONLY, 0); > src/netbsd_pci.c: fd = open("/dev/ttyE0", O_RDONLY); > src/netbsd_pci.c: pcifd = open(netbsd_devname, O_RDWR); > > src/common_vgaarb.c | 2 +- > src/freebsd_pci.c | 10 +++++----- > src/linux_sysfs.c | 26 +++++++++++++------------- > src/netbsd_pci.c | 2 +- > src/openbsd_pci.c | 2 +- > src/pciaccess_private.h | 33 +++++++++++++++++++++++++++++---- > src/solx_devfs.c | 4 ++-- > src/x86_pci.c | 4 ++-- > 8 files changed, 54 insertions(+), 29 deletions(-) > > diff --git a/src/common_vgaarb.c b/src/common_vgaarb.c > index c59bd788dc5e..f3b523e67c3a 100644 > --- a/src/common_vgaarb.c > +++ b/src/common_vgaarb.c > @@ -131,7 +131,7 @@ pci_device_vgaarb_init(void) > if (!pci_sys) > return -1; > > - if ((pci_sys->vgaarb_fd = open ("/dev/vga_arbiter", O_RDWR | > O_CLOEXEC)) < 0) { > + if ((pci_sys->vgaarb_fd = pci_open_cloexec ("/dev/vga_arbiter", > O_RDWR)) < 0) { > return errno; > } > > diff --git a/src/freebsd_pci.c b/src/freebsd_pci.c > index 9505a1c17d21..e40d80847bf0 100644 > --- a/src/freebsd_pci.c > +++ b/src/freebsd_pci.c > @@ -112,7 +112,7 @@ pci_device_freebsd_map_range(struct pci_device *dev, > > int fd, err = 0; > > - fd = open("/dev/mem", O_RDWR | O_CLOEXEC); > + fd = pci_open_cloexec("/dev/mem", O_RDWR); > if (fd == -1) > return errno; > > @@ -157,7 +157,7 @@ pci_device_freebsd_unmap_range( struct > pci_device *dev, > if ((map->flags & PCI_DEV_MAP_FLAG_CACHABLE) || > (map->flags & PCI_DEV_MAP_FLAG_WRITE_COMBINE)) > { > - fd = open("/dev/mem", O_RDWR | O_CLOEXEC); > + fd = pci_open_cloexec("/dev/mem", O_RDWR); > if (fd != -1) { > mrd.mr_base = map->base; > mrd.mr_len = map->size; > @@ -297,7 +297,7 @@ pci_device_freebsd_read_rom( struct pci_device * > dev, void * buffer ) > } > > printf("Using rom_base = 0x%lx\n", (long)rom_base); > - memfd = open( "/dev/mem", O_RDONLY | O_CLOEXEC ); > + memfd = pci_open_cloexec( "/dev/mem", O_RDONLY ); > if ( memfd == -1 ) > return errno; > > @@ -574,7 +574,7 @@ pci_device_freebsd_open_legacy_io(struct > pci_io_handle *ret, > struct pci_device *dev, pciaddr_t base, pciaddr_t size) > { > #if defined(__i386__) || defined(__amd64__) > - ret->fd = open("/dev/io", O_RDWR | O_CLOEXEC); > + ret->fd = pci_open_cloexec("/dev/io", O_RDWR); > > if (ret->fd < 0) > return NULL; > @@ -735,7 +735,7 @@ pci_system_freebsd_create( void ) > int i; > > /* Try to open the PCI device */ > - pcidev = open( "/dev/pci", O_RDWR | O_CLOEXEC ); > + pcidev = pci_open_cloexec( "/dev/pci", O_RDWR ); > if ( pcidev == -1 ) > return ENXIO; > > diff --git a/src/linux_sysfs.c b/src/linux_sysfs.c > index 08c99719bcba..120cd6411893 100644 > --- a/src/linux_sysfs.c > +++ b/src/linux_sysfs.c > @@ -100,7 +100,7 @@ pci_system_linux_sysfs_create( void ) > if ( pci_sys != NULL ) { > pci_sys->methods = & linux_sysfs_methods; > #ifdef HAVE_MTRR > - pci_sys->mtrr_fd = open("/proc/mtrr", O_WRONLY | O_CLOEXEC); > + pci_sys->mtrr_fd = pci_open_cloexec("/proc/mtrr", O_WRONLY); > #endif > err = populate_entries(pci_sys); > } > @@ -247,7 +247,7 @@ pci_device_linux_sysfs_probe( struct pci_device > * dev ) > dev->bus, > dev->dev, > dev->func ); > - fd = open( name, O_RDONLY | O_CLOEXEC); > + fd = pci_open_cloexec(name, O_RDONLY); > if ( fd != -1 ) { > char * next; > pciaddr_t low_addr; > @@ -309,7 +309,7 @@ pci_device_linux_sysfs_read_rom( struct > pci_device * dev, void * buffer ) > dev->dev, > dev->func ); > > - fd = open( name, O_RDWR | O_CLOEXEC); > + fd = pci_open_cloexec(name, O_RDWR); > if ( fd == -1 ) { > #ifdef LINUX_ROM > /* If reading the ROM using sysfs fails, fall back to the old > @@ -390,7 +390,7 @@ pci_device_linux_sysfs_read( struct pci_device * > dev, void * data, > dev->dev, > dev->func ); > > - fd = open( name, O_RDONLY | O_CLOEXEC); > + fd = pci_open_cloexec(name, O_RDONLY); > if ( fd == -1 ) { > return errno; > } > @@ -450,7 +450,7 @@ pci_device_linux_sysfs_write( struct pci_device > * dev, const void * data, > dev->dev, > dev->func ); > > - fd = open( name, O_WRONLY | O_CLOEXEC); > + fd = pci_open_cloexec(name, O_WRONLY); > if ( fd == -1 ) { > return errno; > } > @@ -501,7 +501,7 @@ pci_device_linux_sysfs_map_range_wc(struct > pci_device *dev, > dev->dev, > dev->func, > map->region); > - fd = open(name, open_flags | O_CLOEXEC); > + fd = pci_open_cloexec(name, open_flags); > if (fd == -1) > return errno; > > @@ -566,7 +566,7 @@ pci_device_linux_sysfs_map_range(struct > pci_device *dev, > dev->func, > map->region); > > - fd = open(name, open_flags | O_CLOEXEC); > + fd = pci_open_cloexec(name, open_flags); > if (fd == -1) { > return errno; > } > @@ -689,7 +689,7 @@ static void pci_device_linux_sysfs_enable(struct > pci_device *dev) > dev->dev, > dev->func ); > > - fd = open( name, O_RDWR | O_CLOEXEC); > + fd = pci_open_cloexec(name, O_RDWR); > if (fd == -1) > return; > > @@ -711,7 +711,7 @@ static int > pci_device_linux_sysfs_boot_vga(struct pci_device *dev) > dev->dev, > dev->func ); > > - fd = open( name, O_RDONLY | O_CLOEXEC); > + fd = pci_open_cloexec(name, O_RDONLY); > if (fd == -1) > return 0; > > @@ -754,7 +754,7 @@ pci_device_linux_sysfs_open_device_io(struct > pci_io_handle *ret, > snprintf(name, PATH_MAX, "%s/%04x:%02x:%02x.%1u/resource%d", > SYS_BUS_PCI, dev->domain, dev->bus, dev->dev, > dev->func, bar); > > - ret->fd = open(name, O_RDWR | O_CLOEXEC); > + ret->fd = pci_open_cloexec(name, O_RDWR); > > if (ret->fd < 0) > return NULL; > @@ -778,7 +778,7 @@ pci_device_linux_sysfs_open_legacy_io(struct > pci_io_handle *ret, > snprintf(name, PATH_MAX, > "/sys/class/pci_bus/%04x:%02x/legacy_io", > dev->domain, dev->bus); > > - ret->fd = open(name, O_RDWR | O_CLOEXEC); > + ret->fd = pci_open_cloexec(name, O_RDWR); > if (ret->fd >= 0) > break; > > @@ -925,7 +925,7 @@ pci_device_linux_sysfs_map_legacy(struct > pci_device *dev, pciaddr_t base, > snprintf(name, PATH_MAX, > "/sys/class/pci_bus/%04x:%02x/legacy_mem", > dev->domain, dev->bus); > > - fd = open(name, flags | O_CLOEXEC); > + fd = pci_open_cloexec(name, flags); > if (fd >= 0) > break; > > @@ -934,7 +934,7 @@ pci_device_linux_sysfs_map_legacy(struct > pci_device *dev, pciaddr_t base, > > /* If not, /dev/mem is the best we can do */ > if (!dev) > - fd = open("/dev/mem", flags | O_CLOEXEC); > + fd = pci_open_cloexec("/dev/mem", flags); > > if (fd < 0) > return errno; > diff --git a/src/netbsd_pci.c b/src/netbsd_pci.c > index 52591b08f737..87bb2feb2504 100644 > --- a/src/netbsd_pci.c > +++ b/src/netbsd_pci.c > @@ -909,7 +909,7 @@ pci_system_netbsd_create(void) > ndevs = 0; > nbuses = 0; > snprintf(netbsd_devname, 32, "/dev/pci%d", nbuses); > - pcifd = open(netbsd_devname, O_RDWR | O_CLOEXEC); > + pcifd = pci_open_cloexec(netbsd_devname, O_RDWR); > while (pcifd > 0) { > ioctl(pcifd, PCI_IOC_BUSINFO, &businfo); > buses[nbuses].fd = pcifd; > diff --git a/src/openbsd_pci.c b/src/openbsd_pci.c > index fe034f3b046b..3d66598b5b77 100644 > --- a/src/openbsd_pci.c > +++ b/src/openbsd_pci.c > @@ -571,7 +571,7 @@ pci_system_openbsd_create(void) > > for (domain = 0; domain < sizeof(pcifd) / sizeof(pcifd[0]); > domain++) { > snprintf(path, sizeof(path), "/dev/pci%d", domain); > - pcifd[domain] = open(path, O_RDWR | O_CLOEXEC); > + pcifd[domain] = pci_open_cloexec(path, O_RDWR); > if (pcifd[domain] == -1) > break; > ndomains++; > diff --git a/src/pciaccess_private.h b/src/pciaccess_private.h > index 9f4e8f9ab573..0de989bceab4 100644 > --- a/src/pciaccess_private.h > +++ b/src/pciaccess_private.h > @@ -40,13 +40,16 @@ > /* > * O_CLOEXEC fixes an fd leak case (see 'man 2 open' for details). > I don't > * know of any OS we support where this isn't available in a > sufficiently > - * new version, so warn unconditionally. > + * new version, so fail if ALLOW_NO_O_CLOEXEC is not defined. > */ > #include > > -#ifndef O_CLOEXEC > -#warning O_CLOEXEC not available, please upgrade. > -#define O_CLOEXEC 0 > +#if !defined(O_CLOEXEC) > +# if defined(ALLOW_NO_O_CLOEXEC) > +# include > +# else > +# error O_CLOEXEC not available, please upgrade. > +# endif > #endif > > > @@ -191,3 +194,25 @@ extern void pci_system_openbsd_init_dev_mem( int ); > extern int pci_system_solx_devfs_create( void ); > extern int pci_system_x86_create( void ); > extern void pci_io_cleanup( void ); > + > +static inline int pci_open_cloexec( const char *path, int flags ) > +{ > +#if defined(O_CLOEXEC) > + return open(path, flags | O_CLOEXEC); > +#else > + int fd = open(path, flags); > + if (fd >= 0) { > + int flags = fcntl(fd, F_GETFD); > + if (flags == -1) { > + close(fd); > + return -1; > + } > + flags |= FD_CLOEXEC; > + if (fcntl(fd, F_SETFD, flags) == -1) { > + close(fd); > + return -1; > + } > + } > + return fd; > +#endif > +} > diff --git a/src/solx_devfs.c b/src/solx_devfs.c > index f57239304a43..2d4b102f8cf1 100644 > --- a/src/solx_devfs.c > +++ b/src/solx_devfs.c > @@ -415,7 +415,7 @@ probe_nexus_node(di_node_t di_node, di_minor_t > minor, void *arg) > nexus_path, first_bus, last_bus); > #endif > > - if ((fd = open(nexus_path, O_RDWR | O_CLOEXEC)) >= 0) { > + if ((fd = pci_open_cloexec(nexus_path, O_RDWR)) >= 0) { > probe_args_t args; > > nexus->fd = fd; > @@ -718,7 +718,7 @@ pci_device_solx_devfs_map_range(struct > pci_device *dev, > #endif > > if (map_fd < 0) { > - if ((map_fd = open(map_dev, O_RDWR | O_CLOEXEC)) < 0) { > + if ((map_fd = pci_open_cloexec(map_dev, O_RDWR)) < 0) { > err = errno; > (void) fprintf(stderr, "can not open %s: %s\n", map_dev, > strerror(errno)); > diff --git a/src/x86_pci.c b/src/x86_pci.c > index 49c1cabc3c6c..7088ff9a016d 100644 > --- a/src/x86_pci.c > +++ b/src/x86_pci.c > @@ -457,7 +457,7 @@ pci_device_x86_read_rom(struct pci_device *dev, > void *buffer) > return ENOSYS; > } > > - memfd = open("/dev/mem", O_RDONLY | O_CLOEXEC); > + memfd = pci_open_cloexec("/dev/mem", O_RDONLY); > if (memfd == -1) > return errno; > > @@ -637,7 +637,7 @@ static int > pci_device_x86_map_range(struct pci_device *dev, > struct pci_device_mapping *map) > { > - int memfd = open("/dev/mem", O_RDWR | O_CLOEXEC); > + int memfd = pci_open_cloexec("/dev/mem", O_RDWR); > int prot = PROT_READ; > > if (memfd == -1) > -- > 2.1.0 > > _______________________________________________ > xorg-devel at lists.x.org : X.Org > development > Archives: http://lists.x.org/archives/xorg-devel > Info: http://lists.x.org/mailman/listinfo/xorg-devel > > > > > -- > Jasper -- Aaron From aplattner at nvidia.com Mon Sep 22 13:43:29 2014 From: aplattner at nvidia.com (Aaron Plattner) Date: Mon, 22 Sep 2014 13:43:29 -0700 Subject: [PATCH libpciaccess] Allow building without O_CLOEXEC In-Reply-To: <54208946.7080705@o2.pl> References: <1411413894-6191-1-git-send-email-aplattner@nvidia.com> <1411413894-6191-2-git-send-email-aplattner@nvidia.com> <5420829B.90109@nvidia.com> <54208946.7080705@o2.pl> Message-ID: <542089F1.20701@nvidia.com> On 09/22/2014 01:40 PM, Mateusz Jo?czyk wrote: > W dniu 22.09.2014 o 22:12, Aaron Plattner pisze: >> On 09/22/2014 12:56 PM, Jasper St. Pierre wrote: >>> How old? O_CLOEXEC is part of the 2008 POSIX specification. I really >>> wouldn't like to build on anything older than that... :( > > You could just do: > #define O_CLOEXEC 0 Sorry, I should have clarified that nvidia-installer does fork & exec other processes, it just doesn't do it from threads or signal handlers that could be subject to the FD_CLOEXEC race. -- Aaron From keithp at keithp.com Mon Sep 22 13:49:46 2014 From: keithp at keithp.com (Keith Packard) Date: Mon, 22 Sep 2014 13:49:46 -0700 Subject: [PATCH 00/11] Misc window exposure/validation cleanups In-Reply-To: References: <1411061040-13053-1-git-send-email-ajax@redhat.com> <86vbokwnmk.fsf@hiro.keithp.com> <86bnq7tqnb.fsf@hiro.keithp.com> Message-ID: <8661gftm6t.fsf@hiro.keithp.com> "Jasper St. Pierre" writes: > That doesn't sound like it would be too much traffic, and any machine could > handle that nowadays. Right, the question is not 'xeyes' itself, the question is whether removing this optimization would hurt any real applications that might be reshaping their window on a regular basis, and thus generating piles of expose events. Given that the network utilization isn't heavy, applications which carefully collect expose events and perform minimal repaint won't be affected much by this change. However, applications which trust the X server to have done this optimization for them may well repaint their entire contents once for each rectangle. The impact of that would be fairly serious. Just to fill people in on the larger context, this optimization was written with xeyes in mind, but the main need was not from the xeyes application itself, but from other applications on the desktop. In a non-composited environment, imagine dragging xeyes around the desktop and sending millions of expose events to every application. Even if we don't care much about this case now, I'm having a hard time getting excited about removing a fairly benign optimization, even if the resulting code is a whole lot prettier. -- keith.packard at intel.com -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 810 bytes Desc: not available URL: From keithp at keithp.com Mon Sep 22 14:01:39 2014 From: keithp at keithp.com (Keith Packard) Date: Mon, 22 Sep 2014 14:01:39 -0700 Subject: [PATCH] os: Don't listen to 'tcp' by default. Add '-listen' option. [v2] In-Reply-To: <54172A2B.7060006@redhat.com> References: <1410546941-31486-1-git-send-email-keithp@keithp.com> <1410795750-12393-1-git-send-email-keithp@keithp.com> <54172A2B.7060006@redhat.com> Message-ID: <86zjdrs72k.fsf@hiro.keithp.com> Hans de Goede writes: >> v2: Leave unix socket enabled by default. Add configure options. >> >> Signed-off-by: Keith Packard > > Looks good: > > Reviewed-by: Hans de Goede I've merged this, along with a configure.ac check for the just-released libxtrans. You'll need to use that xtrans to build the X server at this point. -- keith.packard at intel.com -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 810 bytes Desc: not available URL: From keithp at keithp.com Mon Sep 22 14:02:26 2014 From: keithp at keithp.com (Keith Packard) Date: Mon, 22 Sep 2014 14:02:26 -0700 Subject: [PATCH 2/2] Use unique display name for each xi2 test program In-Reply-To: <20140921222932.GA24761@jelly.redhat.com> References: <1411318146-23315-1-git-send-email-alan.coopersmith@oracle.com> <1411318146-23315-2-git-send-email-alan.coopersmith@oracle.com> <20140921222932.GA24761@jelly.redhat.com> Message-ID: <86wq8vs719.fsf@hiro.keithp.com> Peter Hutterer writes: > On Sun, Sep 21, 2014 at 09:49:06AM -0700, Alan Coopersmith wrote: >> make -j 8 check was sporadically failing in different xi2 tests. >> After adding the asserts in the previous commit to catch xkb failure >> it became easier to catch the failures and see that multiple tests >> were running at once trying to write to /tmp/server-(null).xkm and >> then delete it, and interfering with each other. >> >> Putting a unique string into the display variable let them each write >> to their own file and not interfere with others. >> >> Signed-off-by: Alan Coopersmith >> --- >> >> I've only tested on Solaris with getprogname(), not on Linux, where >> program_invocation_name would be used instead. If neither is found >> we should either use something like mkstemp() or disable running the >> tests in parallel, but I've not bothered to go that far, since this >> covers enough platforms for me. > > Reviewed-by: Peter Hutterer > for both Are you going to send a pull with this? Or shall I just merge? -- keith.packard at intel.com -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 810 bytes Desc: not available URL: From keithp at keithp.com Mon Sep 22 14:04:19 2014 From: keithp at keithp.com (Keith Packard) Date: Mon, 22 Sep 2014 14:04:19 -0700 Subject: [PATCH 1/3] dix: Remove XpExtension leftovers from protocol.txt In-Reply-To: <1411196861-26958-1-git-send-email-consume.noise@gmail.com> References: <1411196861-26958-1-git-send-email-consume.noise@gmail.com> Message-ID: <86tx3zs6y4.fsf@hiro.keithp.com> Daniel Martin writes: > There's no XPrint extension (anymore). > > Signed-off-by: Daniel Martin Reviewed-by: Keith Packard -- keith.packard at intel.com -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 810 bytes Desc: not available URL: From keithp at keithp.com Mon Sep 22 14:04:39 2014 From: keithp at keithp.com (Keith Packard) Date: Mon, 22 Sep 2014 14:04:39 -0700 Subject: [PATCH 2/3] security: Remove XpExtension from SecurityTrustedExtensions In-Reply-To: <1411196861-26958-2-git-send-email-consume.noise@gmail.com> References: <1411196861-26958-1-git-send-email-consume.noise@gmail.com> <1411196861-26958-2-git-send-email-consume.noise@gmail.com> Message-ID: <86r3z3s6xk.fsf@hiro.keithp.com> Daniel Martin writes: > There's no XPrint extension (anymore). > > Signed-off-by: Daniel Martin Reviewed-by: Keith Packard -- keith.packard at intel.com -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 810 bytes Desc: not available URL: From mat.jonczyk at o2.pl Mon Sep 22 13:40:38 2014 From: mat.jonczyk at o2.pl (=?UTF-8?B?TWF0ZXVzeiBKb8WEY3p5aw==?=) Date: Mon, 22 Sep 2014 22:40:38 +0200 Subject: [PATCH libpciaccess] Allow building without O_CLOEXEC In-Reply-To: <5420829B.90109@nvidia.com> References: <1411413894-6191-1-git-send-email-aplattner@nvidia.com> <1411413894-6191-2-git-send-email-aplattner@nvidia.com> <5420829B.90109@nvidia.com> Message-ID: <54208946.7080705@o2.pl> W dniu 22.09.2014 o 22:12, Aaron Plattner pisze: > On 09/22/2014 12:56 PM, Jasper St. Pierre wrote: >> How old? O_CLOEXEC is part of the 2008 POSIX specification. I really >> wouldn't like to build on anything older than that... :( You could just do: #define O_CLOEXEC 0 Greetings, Mateusz From peter.hutterer at who-t.net Mon Sep 22 14:50:45 2014 From: peter.hutterer at who-t.net (Peter Hutterer) Date: Tue, 23 Sep 2014 07:50:45 +1000 Subject: [PATCH 2/2] Use unique display name for each xi2 test program In-Reply-To: <86wq8vs719.fsf@hiro.keithp.com> References: <1411318146-23315-1-git-send-email-alan.coopersmith@oracle.com> <1411318146-23315-2-git-send-email-alan.coopersmith@oracle.com> <20140921222932.GA24761@jelly.redhat.com> <86wq8vs719.fsf@hiro.keithp.com> Message-ID: <20140922215045.GA24842@jelly.redhat.com> On Mon, Sep 22, 2014 at 02:02:26PM -0700, Keith Packard wrote: > Peter Hutterer writes: > > > On Sun, Sep 21, 2014 at 09:49:06AM -0700, Alan Coopersmith wrote: > >> make -j 8 check was sporadically failing in different xi2 tests. > >> After adding the asserts in the previous commit to catch xkb failure > >> it became easier to catch the failures and see that multiple tests > >> were running at once trying to write to /tmp/server-(null).xkm and > >> then delete it, and interfering with each other. > >> > >> Putting a unique string into the display variable let them each write > >> to their own file and not interfere with others. > >> > >> Signed-off-by: Alan Coopersmith > >> --- > >> > >> I've only tested on Solaris with getprogname(), not on Linux, where > >> program_invocation_name would be used instead. If neither is found > >> we should either use something like mkstemp() or disable running the > >> tests in parallel, but I've not bothered to go that far, since this > >> covers enough platforms for me. > > > > Reviewed-by: Peter Hutterer > > for both > > Are you going to send a pull with this? Or shall I just merge? just merge it please, thanks. Cheers, Peter From mrmazda at earthlink.net Mon Sep 22 20:50:30 2014 From: mrmazda at earthlink.net (Felix Miata) Date: Mon, 22 Sep 2014 23:50:30 -0400 Subject: F21/F22: xorg-x11-drv: which for SiS? Message-ID: <5420EE06.7060302@earthlink.net> xorg-x11-drv-sis seems to have disappeared. Did that happen on purpose? It still exists as a selelection in Bugzilla. Xorg is looking for sis module but cannot find it. Gfxchip here is Z7/Z9 (XG20 core). Is it now supposed to be using some other (not installed) driver? Before today's upgrade, X still worked. -- "The wise are known for their understanding, and pleasant words are persuasive." Proverbs 16:21 (New Living Translation) Team OS/2 ** Reg. Linux User #211409 ** a11y rocks! Felix Miata *** http://fm.no-ip.com/ From jstpierre at mecheye.net Mon Sep 22 23:37:31 2014 From: jstpierre at mecheye.net (Jasper St. Pierre) Date: Tue, 23 Sep 2014 00:37:31 -0600 Subject: F21/F22: xorg-x11-drv: which for SiS? In-Reply-To: <5420EE06.7060302@earthlink.net> References: <5420EE06.7060302@earthlink.net> Message-ID: Seems to exist to me: http://cgit.freedesktop.org/xorg/driver/xf86-video-sis/ On Mon, Sep 22, 2014 at 9:50 PM, Felix Miata wrote: > xorg-x11-drv-sis seems to have disappeared. Did that happen on purpose? It > still exists as a selelection in Bugzilla. Xorg is looking for sis module > but > cannot find it. Gfxchip here is Z7/Z9 (XG20 core). Is it now supposed to be > using some other (not installed) driver? Before today's upgrade, X still > worked. > -- > "The wise are known for their understanding, and pleasant > words are persuasive." Proverbs 16:21 (New Living Translation) > > Team OS/2 ** Reg. Linux User #211409 ** a11y rocks! > > Felix Miata *** http://fm.no-ip.com/ > _______________________________________________ > xorg-devel at lists.x.org: X.Org development > Archives: http://lists.x.org/archives/xorg-devel > Info: http://lists.x.org/mailman/listinfo/xorg-devel > -- Jasper -------------- next part -------------- An HTML attachment was scrubbed... URL: From laerciosousa at sme-mogidascruzes.sp.gov.br Tue Sep 23 04:05:46 2014 From: laerciosousa at sme-mogidascruzes.sp.gov.br (=?UTF-8?Q?La=C3=A9rcio_de_Sousa?=) Date: Tue, 23 Sep 2014 08:05:46 -0300 Subject: F21/F22: xorg-x11-drv: which for SiS? In-Reply-To: References: <5420EE06.7060302@earthlink.net> Message-ID: According to http://pkgs.fedoraproject.org/cgit/xorg-x11-drv-sis.git/commit/?id=95dc18d4c803988702974635badb391cc50b6a63 , this package is dead for Fedora 21 and later due to lack of KMS support. See also: https://lists.fedoraproject.org/pipermail/devel/2013-August/188429.html 2014-09-23 3:37 GMT-03:00 Jasper St. Pierre : > Seems to exist to me: > > http://cgit.freedesktop.org/xorg/driver/xf86-video-sis/ > > On Mon, Sep 22, 2014 at 9:50 PM, Felix Miata > wrote: > >> xorg-x11-drv-sis seems to have disappeared. Did that happen on purpose? It >> still exists as a selelection in Bugzilla. Xorg is looking for sis module >> but >> cannot find it. Gfxchip here is Z7/Z9 (XG20 core). Is it now supposed to >> be >> using some other (not installed) driver? Before today's upgrade, X still >> worked. >> -- >> "The wise are known for their understanding, and pleasant >> words are persuasive." Proverbs 16:21 (New Living Translation) >> >> Team OS/2 ** Reg. Linux User #211409 ** a11y rocks! >> >> Felix Miata *** http://fm.no-ip.com/ >> _______________________________________________ >> xorg-devel at 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 at lists.x.org: X.Org development > Archives: http://lists.x.org/archives/xorg-devel > Info: http://lists.x.org/mailman/listinfo/xorg-devel > -- *La?rcio de Sousa* *Orientador de Inform?tica* *Escola Municipal "Professor Eul?lio Gruppi"* *Rua Ismael da Silva Mello, 559, Mogi Moderno* *Mogi das Cruzes - SPCEP 08717-390* Telefone: (11) 4726-8313 -------------- next part -------------- An HTML attachment was scrubbed... URL: From ajax at redhat.com Tue Sep 23 11:32:16 2014 From: ajax at redhat.com (Adam Jackson) Date: Tue, 23 Sep 2014 14:32:16 -0400 Subject: [PATCH 00/18] Misc exposure/validation cleanups, v2 Message-ID: <1411497154-7684-1-git-send-email-ajax@redhat.com> This series no longer has the spontaneous combustion removal. 5 and 6 are instead just propagating through the 'exposures = prgn' bit of the logic. It also no longer has the doVisibilityNotify refactor, since in 10 we discover that the second path can't actually get hit so there's no reason to factor it out. The rest from 11 to 18 are new, and hopefully boringly correct. - ajax From ajax at redhat.com Tue Sep 23 11:32:17 2014 From: ajax at redhat.com (Adam Jackson) Date: Tue, 23 Sep 2014 14:32:17 -0400 Subject: [PATCH 01/18] kdrive: Remove vestigial reference to fbInitValidateTree In-Reply-To: <1411497154-7684-1-git-send-email-ajax@redhat.com> References: <1411497154-7684-1-git-send-email-ajax@redhat.com> Message-ID: <1411497154-7684-2-git-send-email-ajax@redhat.com> Reviewed-by: Keith Packard Signed-off-by: Adam Jackson --- hw/kdrive/src/kdrive.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/hw/kdrive/src/kdrive.c b/hw/kdrive/src/kdrive.c index 5dbff3f..dddbe6e 100644 --- a/hw/kdrive/src/kdrive.c +++ b/hw/kdrive/src/kdrive.c @@ -909,10 +909,6 @@ KdScreenInit(ScreenPtr pScreen, int argc, char **argv) if (!(*card->cfuncs->finishInitScreen) (pScreen)) return FALSE; -#if 0 - fbInitValidateTree(pScreen); -#endif - /* * Wrap CloseScreen, the order now is: * KdCloseScreen -- 1.9.3 From ajax at redhat.com Tue Sep 23 11:32:18 2014 From: ajax at redhat.com (Adam Jackson) Date: Tue, 23 Sep 2014 14:32:18 -0400 Subject: [PATCH 02/18] xquartz: Remove useless DRIWindowExposures In-Reply-To: <1411497154-7684-1-git-send-email-ajax@redhat.com> References: <1411497154-7684-1-git-send-email-ajax@redhat.com> Message-ID: <1411497154-7684-3-git-send-email-ajax@redhat.com> Reviewed-by: Keith Packard Signed-off-by: Adam Jackson --- hw/xquartz/xpr/dri.c | 21 --------------------- hw/xquartz/xpr/dri.h | 4 ---- 2 files changed, 25 deletions(-) diff --git a/hw/xquartz/xpr/dri.c b/hw/xquartz/xpr/dri.c index 0f19047..565d94f 100644 --- a/hw/xquartz/xpr/dri.c +++ b/hw/xquartz/xpr/dri.c @@ -138,9 +138,6 @@ DRIFinishScreenInit(ScreenPtr pScreen) DRIScreenPrivPtr pDRIPriv = DRI_SCREEN_PRIV(pScreen); /* Wrap DRI support */ - pDRIPriv->wrap.WindowExposures = pScreen->WindowExposures; - pScreen->WindowExposures = DRIWindowExposures; - pDRIPriv->wrap.CopyWindow = pScreen->CopyWindow; pScreen->CopyWindow = DRICopyWindow; @@ -577,24 +574,6 @@ DRIDrawablePrivDelete(void *pResource, XID id) } void -DRIWindowExposures(WindowPtr pWin, RegionPtr prgn, RegionPtr bsreg) -{ - ScreenPtr pScreen = pWin->drawable.pScreen; - DRIScreenPrivPtr pDRIPriv = DRI_SCREEN_PRIV(pScreen); - DRIDrawablePrivPtr pDRIDrawablePriv = DRI_DRAWABLE_PRIV_FROM_WINDOW(pWin); - - if (pDRIDrawablePriv) { - /* FIXME: something? */ - } - - pScreen->WindowExposures = pDRIPriv->wrap.WindowExposures; - - (*pScreen->WindowExposures)(pWin, prgn, bsreg); - - pScreen->WindowExposures = DRIWindowExposures; -} - -void DRICopyWindow(WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr prgnSrc) { ScreenPtr pScreen = pWin->drawable.pScreen; diff --git a/hw/xquartz/xpr/dri.h b/hw/xquartz/xpr/dri.h index 4476b06..a4400a2 100644 --- a/hw/xquartz/xpr/dri.h +++ b/hw/xquartz/xpr/dri.h @@ -51,7 +51,6 @@ typedef void (*ClipNotifyPtr)(WindowPtr, int, int); * overridden by the driver in its [driver]DRIScreenInit function. */ typedef struct { - WindowExposuresProcPtr WindowExposures; CopyWindowProcPtr CopyWindow; ClipNotifyProcPtr ClipNotify; } DRIWrappedFuncsRec, *DRIWrappedFuncsPtr; @@ -109,9 +108,6 @@ extern void DRIClipNotify(WindowPtr pWin, int dx, int dy); extern void -DRIWindowExposures(WindowPtr pWin, RegionPtr prgn, RegionPtr bsreg); - -extern void DRISurfaceNotify(xp_surface_id id, int kind); extern void -- 1.9.3 From ajax at redhat.com Tue Sep 23 11:32:19 2014 From: ajax at redhat.com (Adam Jackson) Date: Tue, 23 Sep 2014 14:32:19 -0400 Subject: [PATCH 03/18] rootless: remove redundant RootlessShapedWindowIn In-Reply-To: <1411497154-7684-1-git-send-email-ajax@redhat.com> References: <1411497154-7684-1-git-send-email-ajax@redhat.com> Message-ID: <1411497154-7684-4-git-send-email-ajax@redhat.com> miShapedWindowIn is identical. Which you would expect, since neither one takes an actual WindowPtr argument, so they couldn't possibly make reference to rootlessness. Signed-off-by: Adam Jackson --- miext/rootless/rootlessValTree.c | 65 ++-------------------------------------- 1 file changed, 3 insertions(+), 62 deletions(-) diff --git a/miext/rootless/rootlessValTree.c b/miext/rootless/rootlessValTree.c index 730d291..c7c2c99 100644 --- a/miext/rootless/rootlessValTree.c +++ b/miext/rootless/rootlessValTree.c @@ -106,64 +106,6 @@ Equipment Corporation. int RootlessMiValidateTree(WindowPtr pRoot, WindowPtr pChild, VTKind kind); -/* - * Compute the visibility of a shaped window - */ -static int -RootlessShapedWindowIn(RegionPtr universe, - RegionPtr bounding, BoxPtr rect, int x, int y) -{ - BoxRec box; - register BoxPtr boundBox; - int nbox; - Bool someIn, someOut; - register int t, x1, y1, x2, y2; - - nbox = RegionNumRects(bounding); - boundBox = RegionRects(bounding); - someIn = someOut = FALSE; - x1 = rect->x1; - y1 = rect->y1; - x2 = rect->x2; - y2 = rect->y2; - while (nbox--) { - if ((t = boundBox->x1 + x) < x1) - t = x1; - box.x1 = t; - if ((t = boundBox->y1 + y) < y1) - t = y1; - box.y1 = t; - if ((t = boundBox->x2 + x) > x2) - t = x2; - box.x2 = t; - if ((t = boundBox->y2 + y) > y2) - t = y2; - box.y2 = t; - if (box.x1 > box.x2) - box.x2 = box.x1; - if (box.y1 > box.y2) - box.y2 = box.y1; - switch (RegionContainsRect(universe, &box)) { - case rgnIN: - if (someOut) - return rgnPART; - someIn = TRUE; - break; - case rgnOUT: - if (someIn) - return rgnPART; - someOut = TRUE; - break; - default: - return rgnPART; - } - boundBox++; - } - if (someIn) - return rgnIN; - return rgnOUT; -} - #define HasParentRelativeBorder(w) (!(w)->borderIsPixel && \ HasBorder(w) && \ (w)->backgroundState == ParentRelative) @@ -229,10 +171,9 @@ RootlessComputeClips(WindowPtr pParent, ScreenPtr pScreen, RegionPtr pBounding; if ((pBounding = wBoundingShape(pParent))) { - switch (RootlessShapedWindowIn(universe, - pBounding, &borderSize, - pParent->drawable.x, - pParent->drawable.y)) { + switch (miShapedWindowIn(universe, pBounding, &borderSize, + pParent->drawable.x, + pParent->drawable.y)) { case rgnIN: newVis = VisibilityUnobscured; break; -- 1.9.3 From ajax at redhat.com Tue Sep 23 11:32:20 2014 From: ajax at redhat.com (Adam Jackson) Date: Tue, 23 Sep 2014 14:32:20 -0400 Subject: [PATCH 04/18] dix: Drop the third argument from WindowExposuresProcPtr In-Reply-To: <1411497154-7684-1-git-send-email-ajax@redhat.com> References: <1411497154-7684-1-git-send-email-ajax@redhat.com> Message-ID: <1411497154-7684-5-git-send-email-ajax@redhat.com> A careful read shows that it was always NULL. It hasn't always been; as the DDX spec indicates, it was the "occluded region that has backing store", but since that backing store code is long gone nothing, we can nuke it. mi{,Overlay}WindowExposures get slightly simpler here, and will get even simpler in just a moment. Signed-off-by: Adam Jackson --- dix/window.c | 2 +- fb/fboverlay.c | 5 ++--- fb/fboverlay.h | 4 +--- hw/dmx/dmxwindow.c | 4 ++-- hw/dmx/dmxwindow.h | 3 +-- hw/kdrive/ephyr/ephyr.c | 2 +- hw/kdrive/src/kxv.c | 6 +++--- hw/xfree86/common/xf86xv.c | 6 +++--- hw/xfree86/dri/dri.c | 4 ++-- hw/xfree86/dri/dri.h | 3 +-- hw/xnest/Window.c | 4 ++-- hw/xnest/XNWindow.h | 3 +-- include/scrnintstr.h | 3 +-- mi/mi.h | 4 +--- mi/miexpose.c | 15 +++------------ mi/mioverlay.c | 30 ++++++++---------------------- mi/miwindow.c | 4 ++-- 17 files changed, 35 insertions(+), 67 deletions(-) diff --git a/dix/window.c b/dix/window.c index f4acdc8..52e69ef 100644 --- a/dix/window.c +++ b/dix/window.c @@ -2601,7 +2601,7 @@ MapWindow(WindowPtr pWin, ClientPtr client) (*pScreen->PostValidateTree) (NullWindow, pWin, VTMap); RegionNull(&temp); RegionCopy(&temp, &pWin->clipList); - (*pScreen->WindowExposures) (pWin, &temp, NullRegion); + (*pScreen->WindowExposures) (pWin, &temp); RegionUninit(&temp); } diff --git a/fb/fboverlay.c b/fb/fboverlay.c index 935bf1b..6a5f0f8 100644 --- a/fb/fboverlay.c +++ b/fb/fboverlay.c @@ -240,12 +240,11 @@ fbOverlayCopyWindow(WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr prgnSrc) } void -fbOverlayWindowExposures(WindowPtr pWin, - RegionPtr prgn, RegionPtr other_exposed) +fbOverlayWindowExposures(WindowPtr pWin, RegionPtr prgn) { fbOverlayUpdateLayerRegion(pWin->drawable.pScreen, fbOverlayWindowLayer(pWin), prgn); - miWindowExposures(pWin, prgn, other_exposed); + miWindowExposures(pWin, prgn); } Bool diff --git a/fb/fboverlay.h b/fb/fboverlay.h index 57c9873..47727e4 100644 --- a/fb/fboverlay.h +++ b/fb/fboverlay.h @@ -82,9 +82,7 @@ extern _X_EXPORT void fbOverlayCopyWindow(WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr prgnSrc); extern _X_EXPORT void - -fbOverlayWindowExposures(WindowPtr pWin, - RegionPtr prgn, RegionPtr other_exposed); +fbOverlayWindowExposures(WindowPtr pWin, RegionPtr prgn); extern _X_EXPORT Bool diff --git a/hw/dmx/dmxwindow.c b/hw/dmx/dmxwindow.c index 1c23527..c753735 100644 --- a/hw/dmx/dmxwindow.c +++ b/hw/dmx/dmxwindow.c @@ -772,7 +772,7 @@ dmxWindowExposurePredicate(Display * dpy, XEvent * ev, XPointer ptr) * in DMX, the events that are generated by the back-end server are * redundant, so we eat them here. */ void -dmxWindowExposures(WindowPtr pWindow, RegionPtr prgn, RegionPtr other_exposed) +dmxWindowExposures(WindowPtr pWindow, RegionPtr prgn) { ScreenPtr pScreen = pWindow->drawable.pScreen; DMXScreenInfo *dmxScreen = &dmxScreens[pScreen->myNum]; @@ -799,7 +799,7 @@ dmxWindowExposures(WindowPtr pWindow, RegionPtr prgn, RegionPtr other_exposed) #if 1 if (pScreen->WindowExposures) - pScreen->WindowExposures(pWindow, prgn, other_exposed); + pScreen->WindowExposures(pWindow, prgn); #endif DMX_WRAP(WindowExposures, dmxWindowExposures, dmxScreen, pScreen); } diff --git a/hw/dmx/dmxwindow.h b/hw/dmx/dmxwindow.h index c6b2efe..dda6538 100644 --- a/hw/dmx/dmxwindow.h +++ b/hw/dmx/dmxwindow.h @@ -73,8 +73,7 @@ extern Bool dmxChangeWindowAttributes(WindowPtr pWindow, unsigned long mask); extern Bool dmxRealizeWindow(WindowPtr pWindow); extern Bool dmxUnrealizeWindow(WindowPtr pWindow); extern void dmxRestackWindow(WindowPtr pWindow, WindowPtr pOldNextSib); -extern void dmxWindowExposures(WindowPtr pWindow, RegionPtr prgn, - RegionPtr other_exposed); +extern void dmxWindowExposures(WindowPtr pWindow, RegionPtr prgn); extern void dmxCopyWindow(WindowPtr pWindow, DDXPointRec ptOldOrg, RegionPtr prgnSrc); diff --git a/hw/kdrive/ephyr/ephyr.c b/hw/kdrive/ephyr/ephyr.c index 85d4193..8b88f3e 100644 --- a/hw/kdrive/ephyr/ephyr.c +++ b/hw/kdrive/ephyr/ephyr.c @@ -878,7 +878,7 @@ ephyrExposePairedWindow(int a_remote) screen = pair->local->drawable.pScreen; RegionNull(®); RegionCopy(®, &pair->local->clipList); - screen->WindowExposures(pair->local, ®, NullRegion); + screen->WindowExposures(pair->local, ®); RegionUninit(®); } #endif /* XF86DRI */ diff --git a/hw/kdrive/src/kxv.c b/hw/kdrive/src/kxv.c index f979e1f..163d5c1 100644 --- a/hw/kdrive/src/kxv.c +++ b/hw/kdrive/src/kxv.c @@ -86,7 +86,7 @@ static int KdXVQueryImageAttributes(XvPortPtr, XvImagePtr, /* ScreenRec fields */ static Bool KdXVDestroyWindow(WindowPtr pWin); -static void KdXVWindowExposures(WindowPtr pWin, RegionPtr r1, RegionPtr r2); +static void KdXVWindowExposures(WindowPtr pWin, RegionPtr r1); static void KdXVClipNotify(WindowPtr pWin, int dx, int dy); static Bool KdXVCloseScreen(ScreenPtr); @@ -822,7 +822,7 @@ KdXVDestroyWindow(WindowPtr pWin) } static void -KdXVWindowExposures(WindowPtr pWin, RegionPtr reg1, RegionPtr reg2) +KdXVWindowExposures(WindowPtr pWin, RegionPtr reg1) { ScreenPtr pScreen = pWin->drawable.pScreen; KdXVScreenPtr ScreenPriv = GET_KDXV_SCREEN(pScreen); @@ -834,7 +834,7 @@ KdXVWindowExposures(WindowPtr pWin, RegionPtr reg1, RegionPtr reg2) AreasExposed = (WinPriv && reg1 && RegionNotEmpty(reg1)); pScreen->WindowExposures = ScreenPriv->WindowExposures; - (*pScreen->WindowExposures) (pWin, reg1, reg2); + (*pScreen->WindowExposures) (pWin, reg1); pScreen->WindowExposures = KdXVWindowExposures; /* filter out XClearWindow/Area */ diff --git a/hw/xfree86/common/xf86xv.c b/hw/xfree86/common/xf86xv.c index d342bde..d8fd88d 100644 --- a/hw/xfree86/common/xf86xv.c +++ b/hw/xfree86/common/xf86xv.c @@ -84,7 +84,7 @@ static int xf86XVQueryImageAttributes(XvPortPtr, XvImagePtr, /* ScreenRec fields */ static Bool xf86XVDestroyWindow(WindowPtr pWin); -static void xf86XVWindowExposures(WindowPtr pWin, RegionPtr r1, RegionPtr r2); +static void xf86XVWindowExposures(WindowPtr pWin, RegionPtr r1); static void xf86XVPostValidateTree(WindowPtr pWin, WindowPtr pLayerWin, VTKind kind); static void xf86XVClipNotify(WindowPtr pWin, int dx, int dy); @@ -1048,7 +1048,7 @@ xf86XVPostValidateTree(WindowPtr pWin, WindowPtr pLayerWin, VTKind kind) } static void -xf86XVWindowExposures(WindowPtr pWin, RegionPtr reg1, RegionPtr reg2) +xf86XVWindowExposures(WindowPtr pWin, RegionPtr reg1) { ScreenPtr pScreen = pWin->drawable.pScreen; XF86XVScreenPtr ScreenPriv = GET_XF86XV_SCREEN(pScreen); @@ -1059,7 +1059,7 @@ xf86XVWindowExposures(WindowPtr pWin, RegionPtr reg1, RegionPtr reg2) AreasExposed = (WinPriv && reg1 && RegionNotEmpty(reg1)); pScreen->WindowExposures = ScreenPriv->WindowExposures; - (*pScreen->WindowExposures) (pWin, reg1, reg2); + (*pScreen->WindowExposures) (pWin, reg1); pScreen->WindowExposures = xf86XVWindowExposures; /* filter out XClearWindow/Area */ diff --git a/hw/xfree86/dri/dri.c b/hw/xfree86/dri/dri.c index 3f2f6a9..5077c7c 100644 --- a/hw/xfree86/dri/dri.c +++ b/hw/xfree86/dri/dri.c @@ -1828,7 +1828,7 @@ DRIGetContextStore(DRIContextPrivPtr context) } void -DRIWindowExposures(WindowPtr pWin, RegionPtr prgn, RegionPtr bsreg) +DRIWindowExposures(WindowPtr pWin, RegionPtr prgn) { ScreenPtr pScreen = pWin->drawable.pScreen; DRIScreenPrivPtr pDRIPriv = DRI_SCREEN_PRIV(pScreen); @@ -1846,7 +1846,7 @@ DRIWindowExposures(WindowPtr pWin, RegionPtr prgn, RegionPtr bsreg) pScreen->WindowExposures = pDRIPriv->wrap.WindowExposures; /* call lower layers */ - (*pScreen->WindowExposures) (pWin, prgn, bsreg); + (*pScreen->WindowExposures) (pWin, prgn); /* rewrap */ pDRIPriv->wrap.WindowExposures = pScreen->WindowExposures; diff --git a/hw/xfree86/dri/dri.h b/hw/xfree86/dri/dri.h index dec6885..1ce0970 100644 --- a/hw/xfree86/dri/dri.h +++ b/hw/xfree86/dri/dri.h @@ -280,8 +280,7 @@ extern _X_EXPORT void DRISwapContext(int drmFD, void *oldctx, void *newctx); extern _X_EXPORT void *DRIGetContextStore(DRIContextPrivPtr context); -extern _X_EXPORT void DRIWindowExposures(WindowPtr pWin, - RegionPtr prgn, RegionPtr bsreg); +extern _X_EXPORT void DRIWindowExposures(WindowPtr pWin, RegionPtr prgn); extern _X_EXPORT Bool DRIDestroyWindow(WindowPtr pWin); diff --git a/hw/xnest/Window.c b/hw/xnest/Window.c index fc87e82..8d9c672 100644 --- a/hw/xnest/Window.c +++ b/hw/xnest/Window.c @@ -386,7 +386,7 @@ xnestWindowExposurePredicate(Display * dpy, XEvent * event, XPointer ptr) } void -xnestWindowExposures(WindowPtr pWin, RegionPtr pRgn, RegionPtr other_exposed) +xnestWindowExposures(WindowPtr pWin, RegionPtr pRgn) { XEvent event; Window window; @@ -410,7 +410,7 @@ xnestWindowExposures(WindowPtr pWin, RegionPtr pRgn, RegionPtr other_exposed) XPutBackEvent(xnestDisplay, &event); } - miWindowExposures(pWin, pRgn, other_exposed); + miWindowExposures(pWin, pRgn); } void diff --git a/hw/xnest/XNWindow.h b/hw/xnest/XNWindow.h index 02b0f3f..6320ede 100644 --- a/hw/xnest/XNWindow.h +++ b/hw/xnest/XNWindow.h @@ -66,8 +66,7 @@ Bool xnestRealizeWindow(WindowPtr pWin); Bool xnestUnrealizeWindow(WindowPtr pWin); void xnestCopyWindow(WindowPtr pWin, xPoint oldOrigin, RegionPtr oldRegion); void xnestClipNotify(WindowPtr pWin, int dx, int dy); -void xnestWindowExposures(WindowPtr pWin, RegionPtr pRgn, - RegionPtr other_exposed); +void xnestWindowExposures(WindowPtr pWin, RegionPtr pRgn); void xnestSetShape(WindowPtr pWin, int kind); void xnestShapeWindow(WindowPtr pWin); diff --git a/include/scrnintstr.h b/include/scrnintstr.h index 6955e77..7331ec1 100644 --- a/include/scrnintstr.h +++ b/include/scrnintstr.h @@ -155,8 +155,7 @@ typedef void (*PostValidateTreeProcPtr) (WindowPtr /*pParent */ , VTKind /*kind */ ); typedef void (*WindowExposuresProcPtr) (WindowPtr /*pWindow */ , - RegionPtr /*prgn */ , - RegionPtr /*other_exposed */ ); + RegionPtr /*prgn */); typedef void (*CopyWindowProcPtr) (WindowPtr /*pWindow */ , DDXPointRec /*ptOldOrg */ , diff --git a/mi/mi.h b/mi/mi.h index d5a5ba3..4b5e862 100644 --- a/mi/mi.h +++ b/mi/mi.h @@ -247,9 +247,7 @@ extern _X_EXPORT void miSendExposures(WindowPtr /*pWin */ , ); extern _X_EXPORT void miWindowExposures(WindowPtr /*pWin */ , - RegionPtr /*prgn */ , - RegionPtr /*other_exposed */ - ); + RegionPtr /*prgn */); extern _X_EXPORT void miPaintWindow(WindowPtr /*pWin */ , RegionPtr /*prgn */ , diff --git a/mi/miexpose.c b/mi/miexpose.c index 198c433..23987fa 100644 --- a/mi/miexpose.c +++ b/mi/miexpose.c @@ -421,12 +421,11 @@ miSendExposures(WindowPtr pWin, RegionPtr pRgn, int dx, int dy) } void -miWindowExposures(WindowPtr pWin, RegionPtr prgn, RegionPtr other_exposed) +miWindowExposures(WindowPtr pWin, RegionPtr prgn) { RegionPtr exposures = prgn; - if ((prgn && !RegionNil(prgn)) || - (exposures && !RegionNil(exposures)) || other_exposed) { + if ((prgn && !RegionNil(prgn)) || (exposures && !RegionNil(exposures))) { RegionRec expRec; int clientInterested; @@ -435,14 +434,6 @@ miWindowExposures(WindowPtr pWin, RegionPtr prgn, RegionPtr other_exposed) */ clientInterested = (pWin->eventMask | wOtherEventMasks(pWin)) & ExposureMask; - if (other_exposed) { - if (exposures) { - RegionUnion(other_exposed, exposures, other_exposed); - if (exposures != prgn) - RegionDestroy(exposures); - } - exposures = other_exposed; - } if (clientInterested && exposures && (RegionNumRects(exposures) > RECTLIMIT)) { /* @@ -474,7 +465,7 @@ miWindowExposures(WindowPtr pWin, RegionPtr prgn, RegionPtr other_exposed) if (exposures == &expRec) { RegionUninit(exposures); } - else if (exposures && exposures != prgn && exposures != other_exposed) + else if (exposures && exposures != prgn) RegionDestroy(exposures); if (prgn) RegionEmpty(prgn); diff --git a/mi/mioverlay.c b/mi/mioverlay.c index 7f502fa..f894e2b 100644 --- a/mi/mioverlay.c +++ b/mi/mioverlay.c @@ -79,7 +79,7 @@ static void miOverlayMarkUnrealizedWindow(WindowPtr, WindowPtr, Bool); static int miOverlayValidateTree(WindowPtr, WindowPtr, VTKind); static void miOverlayHandleExposures(WindowPtr); static void miOverlayMoveWindow(WindowPtr, int, int, WindowPtr, VTKind); -static void miOverlayWindowExposures(WindowPtr, RegionPtr, RegionPtr); +static void miOverlayWindowExposures(WindowPtr, RegionPtr); static void miOverlayResizeWindow(WindowPtr, int, int, unsigned int, unsigned int, WindowPtr); static void miOverlayClearToBackground(WindowPtr, int, int, int, int, Bool); @@ -827,7 +827,7 @@ miOverlayHandleExposures(WindowPtr pWin) miOverlayScreenPtr pPriv = MIOVERLAY_GET_SCREEN_PRIVATE(pScreen); WindowPtr pChild; ValidatePtr val; - void (*WindowExposures) (WindowPtr, RegionPtr, RegionPtr); + WindowExposuresProcPtr WindowExposures; WindowExposures = pWin->drawable.pScreen->WindowExposures; if (pPriv->underlayMarked) { @@ -849,8 +849,7 @@ miOverlayHandleExposures(WindowPtr pWin) } RegionUninit(&mival->borderExposed); - (*WindowExposures) (pTree->pWin, &mival->exposed, - NullRegion); + (*WindowExposures) (pTree->pWin, &mival->exposed); RegionUninit(&mival->exposed); } free(mival); @@ -886,7 +885,7 @@ miOverlayHandleExposures(WindowPtr pWin) if (RegionNotEmpty(&val->after.borderExposed)) { miPaintWindow(pChild, &val->after.borderExposed, PW_BORDER); } - (*WindowExposures) (pChild, &val->after.exposed, NullRegion); + (*WindowExposures) (pChild, &val->after.exposed); } RegionUninit(&val->after.borderExposed); RegionUninit(&val->after.exposed); @@ -980,26 +979,16 @@ miOverlayMoveWindow(WindowPtr pWin, #endif static void -miOverlayWindowExposures(WindowPtr pWin, - RegionPtr prgn, RegionPtr other_exposed) +miOverlayWindowExposures(WindowPtr pWin, RegionPtr prgn) { RegionPtr exposures = prgn; - if ((prgn && !RegionNil(prgn)) || - (exposures && !RegionNil(exposures)) || other_exposed) { + if ((prgn && !RegionNil(prgn)) || (exposures && !RegionNil(exposures))) { RegionRec expRec; int clientInterested; clientInterested = (pWin->eventMask | wOtherEventMasks(pWin)) & ExposureMask; - if (other_exposed) { - if (exposures) { - RegionUnion(other_exposed, exposures, other_exposed); - if (exposures != prgn) - RegionDestroy(exposures); - } - exposures = other_exposed; - } if (clientInterested && exposures && (RegionNumRects(exposures) > RECTLIMIT)) { ScreenPtr pScreen = pWin->drawable.pScreen; @@ -1035,7 +1024,7 @@ miOverlayWindowExposures(WindowPtr pWin, if (exposures == &expRec) { RegionUninit(exposures); } - else if (exposures && exposures != prgn && exposures != other_exposed) + else if (exposures && exposures != prgn) RegionDestroy(exposures); if (prgn) RegionEmpty(prgn); @@ -1592,7 +1581,6 @@ miOverlayClearToBackground(WindowPtr pWin, miOverlayTreePtr pTree = MIOVERLAY_GET_WINDOW_TREE(pWin); BoxRec box; RegionRec reg; - RegionPtr pBSReg = NullRegion; ScreenPtr pScreen = pWin->drawable.pScreen; miOverlayScreenPtr pScreenPriv = MIOVERLAY_GET_SCREEN_PRIVATE(pScreen); RegionPtr clipList; @@ -1636,12 +1624,10 @@ miOverlayClearToBackground(WindowPtr pWin, RegionIntersect(®, ®, clipList); if (generateExposures) - (*pScreen->WindowExposures) (pWin, ®, pBSReg); + (*pScreen->WindowExposures) (pWin, ®); else if (pWin->backgroundState != None) miPaintWindow(pWin, ®, PW_BACKGROUND); RegionUninit(®); - if (pBSReg) - RegionDestroy(pBSReg); } /****************************************************************/ diff --git a/mi/miwindow.c b/mi/miwindow.c index 82c3513..ba4c9ed 100644 --- a/mi/miwindow.c +++ b/mi/miwindow.c @@ -111,7 +111,7 @@ miClearToBackground(WindowPtr pWin, RegionIntersect(®, ®, &pWin->clipList); if (generateExposures) - (*pWin->drawable.pScreen->WindowExposures) (pWin, ®, NULL); + (*pWin->drawable.pScreen->WindowExposures) (pWin, ®); else if (pWin->backgroundState != None) miPaintWindow(pWin, ®, PW_BACKGROUND); RegionUninit(®); @@ -221,7 +221,7 @@ miHandleValidateExposures(WindowPtr pWin) if (RegionNotEmpty(&val->after.borderExposed)) miPaintWindow(pChild, &val->after.borderExposed, PW_BORDER); RegionUninit(&val->after.borderExposed); - (*WindowExposures) (pChild, &val->after.exposed, NullRegion); + (*WindowExposures) (pChild, &val->after.exposed); RegionUninit(&val->after.exposed); free(val); pChild->valdata = NULL; -- 1.9.3 From ajax at redhat.com Tue Sep 23 11:32:22 2014 From: ajax at redhat.com (Adam Jackson) Date: Tue, 23 Sep 2014 14:32:22 -0400 Subject: [PATCH 06/18] mi: Deobfuscate miOverlayWindowExposures In-Reply-To: <1411497154-7684-1-git-send-email-ajax@redhat.com> References: <1411497154-7684-1-git-send-email-ajax@redhat.com> Message-ID: <1411497154-7684-7-git-send-email-ajax@redhat.com> Signed-off-by: Adam Jackson --- mi/mioverlay.c | 40 ++++++++++++---------------------------- 1 file changed, 12 insertions(+), 28 deletions(-) diff --git a/mi/mioverlay.c b/mi/mioverlay.c index f894e2b..2ad6bc0 100644 --- a/mi/mioverlay.c +++ b/mi/mioverlay.c @@ -983,28 +983,19 @@ miOverlayWindowExposures(WindowPtr pWin, RegionPtr prgn) { RegionPtr exposures = prgn; - if ((prgn && !RegionNil(prgn)) || (exposures && !RegionNil(exposures))) { + if (prgn && !RegionNil(prgn)) { RegionRec expRec; - int clientInterested; - - clientInterested = (pWin->eventMask | wOtherEventMasks(pWin)) & - ExposureMask; - if (clientInterested && exposures && - (RegionNumRects(exposures) > RECTLIMIT)) { + int clientInterested = + (pWin->eventMask | wOtherEventMasks(pWin)) & ExposureMask; + if (clientInterested && (RegionNumRects(prgn) > RECTLIMIT)) { ScreenPtr pScreen = pWin->drawable.pScreen; miOverlayScreenPtr pPriv = MIOVERLAY_GET_SCREEN_PRIVATE(pScreen); BoxRec box; - box = *RegionExtents(exposures); - if (exposures == prgn) { - exposures = &expRec; - RegionInit(exposures, &box, 1); - RegionReset(prgn, &box); - } - else { - RegionReset(exposures, &box); - RegionUnion(prgn, prgn, exposures); - } + box = *RegionExtents(prgn); + exposures = &expRec; + RegionInit(exposures, &box, 1); + RegionReset(prgn, &box); /* This is the only reason why we are replacing mi's version of this file */ @@ -1016,21 +1007,14 @@ miOverlayWindowExposures(WindowPtr pWin, RegionPtr prgn) else RegionIntersect(prgn, prgn, &pWin->clipList); } - if (prgn && !RegionNil(prgn)) - miPaintWindow(pWin, prgn, PW_BACKGROUND); - if (clientInterested && exposures && !RegionNil(exposures)) + miPaintWindow(pWin, prgn, PW_BACKGROUND); + if (clientInterested) miSendExposures(pWin, exposures, pWin->drawable.x, pWin->drawable.y); - if (exposures == &expRec) { + if (exposures == &expRec) RegionUninit(exposures); - } - else if (exposures && exposures != prgn) - RegionDestroy(exposures); - if (prgn) - RegionEmpty(prgn); + RegionEmpty(prgn); } - else if (exposures && exposures != prgn) - RegionDestroy(exposures); } typedef struct { -- 1.9.3 From ajax at redhat.com Tue Sep 23 11:32:21 2014 From: ajax at redhat.com (Adam Jackson) Date: Tue, 23 Sep 2014 14:32:21 -0400 Subject: [PATCH 05/18] mi: Deobfuscate miWindowExposures In-Reply-To: <1411497154-7684-1-git-send-email-ajax@redhat.com> References: <1411497154-7684-1-git-send-email-ajax@redhat.com> Message-ID: <1411497154-7684-6-git-send-email-ajax@redhat.com> Signed-off-by: Adam Jackson --- mi/miexpose.c | 41 +++++++++++------------------------------ 1 file changed, 11 insertions(+), 30 deletions(-) diff --git a/mi/miexpose.c b/mi/miexpose.c index 23987fa..de0e148 100644 --- a/mi/miexpose.c +++ b/mi/miexpose.c @@ -425,17 +425,11 @@ miWindowExposures(WindowPtr pWin, RegionPtr prgn) { RegionPtr exposures = prgn; - if ((prgn && !RegionNil(prgn)) || (exposures && !RegionNil(exposures))) { + if (prgn && !RegionNil(prgn)) { RegionRec expRec; - int clientInterested; - - /* - * Restore from backing-store FIRST. - */ - clientInterested = + int clientInterested = (pWin->eventMask | wOtherEventMasks(pWin)) & ExposureMask; - if (clientInterested && exposures && - (RegionNumRects(exposures) > RECTLIMIT)) { + if (clientInterested && (RegionNumRects(prgn) > RECTLIMIT)) { /* * If we have LOTS of rectangles, we decide to take the extents * and force an exposure on that. This should require much less @@ -444,34 +438,21 @@ miWindowExposures(WindowPtr pWin, RegionPtr prgn) */ BoxRec box; - box = *RegionExtents(exposures); - if (exposures == prgn) { - exposures = &expRec; - RegionInit(exposures, &box, 1); - RegionReset(prgn, &box); - } - else { - RegionReset(exposures, &box); - RegionUnion(prgn, prgn, exposures); - } + box = *RegionExtents(prgn); + exposures = &expRec; + RegionInit(exposures, &box, 1); + RegionReset(prgn, &box); /* miPaintWindow doesn't clip, so we have to */ RegionIntersect(prgn, prgn, &pWin->clipList); } - if (prgn && !RegionNil(prgn)) - miPaintWindow(pWin, prgn, PW_BACKGROUND); - if (clientInterested && exposures && !RegionNil(exposures)) + miPaintWindow(pWin, prgn, PW_BACKGROUND); + if (clientInterested) miSendExposures(pWin, exposures, pWin->drawable.x, pWin->drawable.y); - if (exposures == &expRec) { + if (exposures == &expRec) RegionUninit(exposures); - } - else if (exposures && exposures != prgn) - RegionDestroy(exposures); - if (prgn) - RegionEmpty(prgn); + RegionEmpty(prgn); } - else if (exposures && exposures != prgn) - RegionDestroy(exposures); } #ifdef ROOTLESS -- 1.9.3 From ajax at redhat.com Tue Sep 23 11:32:23 2014 From: ajax at redhat.com (Adam Jackson) Date: Tue, 23 Sep 2014 14:32:23 -0400 Subject: [PATCH 07/18] mi: Simplify composite border clip redirection interface In-Reply-To: <1411497154-7684-1-git-send-email-ajax@redhat.com> References: <1411497154-7684-1-git-send-email-ajax@redhat.com> Message-ID: <1411497154-7684-8-git-send-email-ajax@redhat.com> There's not really a good reason for mi to not just call the composite code directly. Reviewed-by: Keith Packard Signed-off-by: Adam Jackson --- composite/compext.c | 3 --- mi/mi.h | 11 ----------- mi/mivaltree.c | 52 +++++++++++++++++++--------------------------------- 3 files changed, 19 insertions(+), 47 deletions(-) diff --git a/composite/compext.c b/composite/compext.c index cadedbd..fcfc349 100644 --- a/composite/compext.c +++ b/composite/compext.c @@ -594,9 +594,6 @@ CompositeExtensionInit(void) return; CompositeReqCode = (CARD8) extEntry->base; - miRegisterRedirectBorderClipProc(compSetRedirectBorderClip, - compGetRedirectBorderClip); - /* Initialization succeeded */ noCompositeExtension = FALSE; } diff --git a/mi/mi.h b/mi/mi.h index 4b5e862..a4a01b8 100644 --- a/mi/mi.h +++ b/mi/mi.h @@ -425,17 +425,6 @@ extern _X_EXPORT int miShapedWindowIn(RegionPtr /*universe */ , int /*y */ ); -typedef void - (*SetRedirectBorderClipProcPtr) (WindowPtr pWindow, RegionPtr pRegion); - -typedef RegionPtr - (*GetRedirectBorderClipProcPtr) (WindowPtr pWindow); - -extern _X_EXPORT void - -miRegisterRedirectBorderClipProc(SetRedirectBorderClipProcPtr setBorderClip, - GetRedirectBorderClipProcPtr getBorderClip); - extern _X_EXPORT int miValidateTree(WindowPtr /*pParent */ , WindowPtr /*pChild */ , VTKind /*kind */ diff --git a/mi/mivaltree.c b/mi/mivaltree.c index c1cc431..8e4e9a9 100644 --- a/mi/mivaltree.c +++ b/mi/mivaltree.c @@ -99,8 +99,10 @@ Equipment Corporation. #include "mi.h" #include "regionstr.h" #include "mivalidate.h" - #include "globals.h" +#ifdef COMPOSITE +#include "compint.h" +#endif /* * Compute the visibility of a shaped window @@ -160,17 +162,6 @@ miShapedWindowIn(RegionPtr universe, RegionPtr bounding, return rgnOUT; } -static GetRedirectBorderClipProcPtr miGetRedirectBorderClipProc; -static SetRedirectBorderClipProcPtr miSetRedirectBorderClipProc; - -void -miRegisterRedirectBorderClipProc(SetRedirectBorderClipProcPtr setBorderClip, - GetRedirectBorderClipProcPtr getBorderClip) -{ - miSetRedirectBorderClipProc = setBorderClip; - miGetRedirectBorderClipProc = getBorderClip; -} - /* * Manual redirected windows are treated as transparent; they do not obscure * siblings or parent windows @@ -242,11 +233,9 @@ miComputeClips(WindowPtr pParent, * In redirected drawing case, reset universe to borderSize */ if (pParent->redirectDraw != RedirectDrawNone) { - if (miSetRedirectBorderClipProc) { - if (TreatAsTransparent(pParent)) - RegionEmpty(universe); - (*miSetRedirectBorderClipProc) (pParent, universe); - } + if (TreatAsTransparent(pParent)) + RegionEmpty(universe); + compSetRedirectBorderClip (pParent, universe); RegionCopy(universe, &pParent->borderSize); } #endif @@ -516,6 +505,17 @@ miTreeObscured(WindowPtr pParent) } } +static RegionPtr +getBorderClip(WindowPtr pWin) +{ +#ifdef COMPOSITE + if (pWin->redirectDraw != RedirectDrawNone) + return compGetRedirectBorderClip(pWin); + else +#endif + return &pWin->borderClip; +} + /* *----------------------------------------------------------------------- * miValidateTree -- @@ -609,14 +609,7 @@ miValidateTree(WindowPtr pParent, /* Parent to validate */ forward = TRUE; for (pWin = pChild; pWin; pWin = pWin->nextSib) { if (pWin->valdata) { - RegionPtr pBorderClip = &pWin->borderClip; - -#ifdef COMPOSITE - if (pWin->redirectDraw != RedirectDrawNone && - miGetRedirectBorderClipProc) - pBorderClip = (*miGetRedirectBorderClipProc) (pWin); -#endif - RegionAppend(&totalClip, pBorderClip); + RegionAppend(&totalClip, getBorderClip(pWin)); if (pWin->viewable) viewvals++; } @@ -627,14 +620,7 @@ miValidateTree(WindowPtr pParent, /* Parent to validate */ pWin = pParent->lastChild; while (1) { if (pWin->valdata) { - RegionPtr pBorderClip = &pWin->borderClip; - -#ifdef COMPOSITE - if (pWin->redirectDraw != RedirectDrawNone && - miGetRedirectBorderClipProc) - pBorderClip = (*miGetRedirectBorderClipProc) (pWin); -#endif - RegionAppend(&totalClip, pBorderClip); + RegionAppend(&totalClip, getBorderClip(pWin)); if (pWin->viewable) viewvals++; } -- 1.9.3 From ajax at redhat.com Tue Sep 23 11:32:24 2014 From: ajax at redhat.com (Adam Jackson) Date: Tue, 23 Sep 2014 14:32:24 -0400 Subject: [PATCH 08/18] mi: Drop plane argument from miHandleExposures In-Reply-To: <1411497154-7684-1-git-send-email-ajax@redhat.com> References: <1411497154-7684-1-git-send-email-ajax@redhat.com> Message-ID: <1411497154-7684-9-git-send-email-ajax@redhat.com> This existed to be passed to the bs recovery routine; since we back all planes, we don't care. Signed-off-by: Adam Jackson --- fb/fbcopy.c | 2 +- glamor/glamor_copy.c | 3 +-- hw/dmx/dmxgcops.c | 8 ++++---- mi/mi.h | 3 +-- mi/mibitblt.c | 5 ++--- mi/micopy.c | 3 +-- mi/miexpose.c | 8 +------- 7 files changed, 11 insertions(+), 21 deletions(-) diff --git a/fb/fbcopy.c b/fb/fbcopy.c index 541ef71..5bbabc3 100644 --- a/fb/fbcopy.c +++ b/fb/fbcopy.c @@ -271,5 +271,5 @@ fbCopyPlane(DrawablePtr pSrcDrawable, else return miHandleExposures(pSrcDrawable, pDstDrawable, pGC, xIn, yIn, - widthSrc, heightSrc, xOut, yOut, bitplane); + widthSrc, heightSrc, xOut, yOut); } diff --git a/glamor/glamor_copy.c b/glamor/glamor_copy.c index 6f422d4..3320935 100644 --- a/glamor/glamor_copy.c +++ b/glamor/glamor_copy.c @@ -677,8 +677,7 @@ glamor_copy_plane(DrawablePtr src, DrawablePtr dst, GCPtr gc, { if ((bitplane & FbFullMask(src->depth)) == 0) return miHandleExposures(src, dst, gc, - srcx, srcy, width, height, dstx, dsty, - bitplane); + srcx, srcy, width, height, dstx, dsty); return miDoCopy(src, dst, gc, srcx, srcy, width, height, dstx, dsty, glamor_copy, bitplane, NULL); diff --git a/hw/dmx/dmxgcops.c b/hw/dmx/dmxgcops.c index aa7c8eb..0ebd69a 100644 --- a/hw/dmx/dmxgcops.c +++ b/hw/dmx/dmxgcops.c @@ -179,7 +179,7 @@ dmxCopyArea(DrawablePtr pSrc, DrawablePtr pDst, GCPtr pGC, if (DMX_GCOPS_OFFSCREEN(pSrc) || DMX_GCOPS_OFFSCREEN(pDst)) return miHandleExposures(pSrc, pDst, pGC, srcx, srcy, w, h, - dstx, dsty, 0L); + dstx, dsty); DMX_GCOPS_SET_DRAWABLE(pSrc, srcDraw); DMX_GCOPS_SET_DRAWABLE(pDst, dstDraw); @@ -188,7 +188,7 @@ dmxCopyArea(DrawablePtr pSrc, DrawablePtr pDst, GCPtr pGC, srcx, srcy, w, h, dstx, dsty); dmxSync(dmxScreen, FALSE); - return miHandleExposures(pSrc, pDst, pGC, srcx, srcy, w, h, dstx, dsty, 0L); + return miHandleExposures(pSrc, pDst, pGC, srcx, srcy, w, h, dstx, dsty); } /** Copy plane number \a bitPlane from \a pSrc drawable to \a pDst @@ -206,7 +206,7 @@ dmxCopyPlane(DrawablePtr pSrc, DrawablePtr pDst, GCPtr pGC, if (DMX_GCOPS_OFFSCREEN(pSrc) || DMX_GCOPS_OFFSCREEN(pDst)) return miHandleExposures(pSrc, pDst, pGC, srcx, srcy, width, height, - dstx, dsty, bitPlane); + dstx, dsty); DMX_GCOPS_SET_DRAWABLE(pSrc, srcDraw); DMX_GCOPS_SET_DRAWABLE(pDst, dstDraw); @@ -216,7 +216,7 @@ dmxCopyPlane(DrawablePtr pSrc, DrawablePtr pDst, GCPtr pGC, dmxSync(dmxScreen, FALSE); return miHandleExposures(pSrc, pDst, pGC, srcx, srcy, width, height, - dstx, dsty, bitPlane); + dstx, dsty); } /** Render list of points, \a pptInit in \a pDrawable on the back-end diff --git a/mi/mi.h b/mi/mi.h index a4a01b8..700bb11 100644 --- a/mi/mi.h +++ b/mi/mi.h @@ -229,8 +229,7 @@ extern _X_EXPORT RegionPtr miHandleExposures(DrawablePtr /*pSrcDrawable */ , int /*width */ , int /*height */ , int /*dstx */ , - int /*dsty */ , - unsigned long /*plane */ + int /*dsty */ ); extern _X_EXPORT void miSendGraphicsExpose(ClientPtr /*client */ , diff --git a/mi/mibitblt.c b/mi/mibitblt.c index 3ed4ed1..08bd1c5 100644 --- a/mi/mibitblt.c +++ b/mi/mibitblt.c @@ -242,8 +242,7 @@ miCopyArea(DrawablePtr pSrcDrawable, } } prgnExposed = miHandleExposures(pSrcDrawable, pDstDrawable, pGC, xIn, yIn, - widthSrc, heightSrc, xOut, yOut, - (unsigned long) 0); + widthSrc, heightSrc, xOut, yOut); if (realSrcClip) RegionDestroy(prgnSrcClip); @@ -579,7 +578,7 @@ miCopyPlane(DrawablePtr pSrcDrawable, } } prgnExposed = miHandleExposures(pSrcDrawable, pDstDrawable, pGC, srcx, srcy, - width, height, dstx, dsty, bitPlane); + width, height, dstx, dsty); RegionDestroy(prgnSrc); return prgnExposed; } diff --git a/mi/micopy.c b/mi/micopy.c index 3079511..a52b0a7 100644 --- a/mi/micopy.c +++ b/mi/micopy.c @@ -304,8 +304,7 @@ miDoCopy(DrawablePtr pSrcDrawable, yIn - pSrcDrawable->y, widthSrc, heightSrc, xOut - pDstDrawable->x, - yOut - pDstDrawable->y, - (unsigned long) bitPlane); + yOut - pDstDrawable->y); RegionUninit(&rgnDst); if (freeSrcClip) RegionDestroy(prgnSrcClip); diff --git a/mi/miexpose.c b/mi/miexpose.c index de0e148..7a1c172 100644 --- a/mi/miexpose.c +++ b/mi/miexpose.c @@ -116,18 +116,12 @@ NOTE: this should generally be called, even if graphicsExposures is false, because this is where bits get recovered from backing store. -NOTE: - added argument 'plane' is used to indicate how exposures from backing -store should be accomplished. If plane is 0 (i.e. no bit plane), CopyArea -should be used, else a CopyPlane of the indicated plane will be used. The -exposing is done by the backing store's GraphicsExpose function, of course. - */ RegionPtr miHandleExposures(DrawablePtr pSrcDrawable, DrawablePtr pDstDrawable, GCPtr pGC, int srcx, int srcy, int width, int height, - int dstx, int dsty, unsigned long plane) + int dstx, int dsty) { RegionPtr prgnSrcClip; /* drawable-relative source clip */ RegionRec rgnSrcRec; -- 1.9.3 From ajax at redhat.com Tue Sep 23 11:32:25 2014 From: ajax at redhat.com (Adam Jackson) Date: Tue, 23 Sep 2014 14:32:25 -0400 Subject: [PATCH 09/18] mi: Move pScreen->SendGraphicsExpose up to dix In-Reply-To: <1411497154-7684-1-git-send-email-ajax@redhat.com> References: <1411497154-7684-1-git-send-email-ajax@redhat.com> Message-ID: <1411497154-7684-10-git-send-email-ajax@redhat.com> No DDX is overriding this and it's fairly absurd to expose it as a screen operation anyway. Signed-off-by: Adam Jackson --- Xext/panoramiXprocs.c | 10 ++++------ dix/dispatch.c | 52 +++++++++++++++++++++++++++++++++++++++++++++++---- include/dix.h | 6 ++++++ include/scrnintstr.h | 7 ------- mi/mi.h | 7 ------- mi/miexpose.c | 47 ---------------------------------------------- mi/miscrinit.c | 1 - 7 files changed, 58 insertions(+), 72 deletions(-) diff --git a/Xext/panoramiXprocs.c b/Xext/panoramiXprocs.c index 83a2e08..aa3859f 100644 --- a/Xext/panoramiXprocs.c +++ b/Xext/panoramiXprocs.c @@ -1193,9 +1193,8 @@ PanoramiXCopyArea(ClientPtr client) Bool overlap; RegionValidate(&totalReg, &overlap); - (*pDst->pScreen->SendGraphicsExpose) (client, &totalReg, - stuff->dstDrawable, - X_CopyArea, 0); + SendGraphicsExpose(client, &totalReg, stuff->dstDrawable, + X_CopyArea, 0); RegionUninit(&totalReg); } } @@ -1306,9 +1305,8 @@ PanoramiXCopyPlane(ClientPtr client) Bool overlap; RegionValidate(&totalReg, &overlap); - (*pdstDraw->pScreen->SendGraphicsExpose) (client, &totalReg, - stuff->dstDrawable, - X_CopyPlane, 0); + SendGraphicsExpose(client, &totalReg, stuff->dstDrawable, + X_CopyPlane, 0); RegionUninit(&totalReg); } diff --git a/dix/dispatch.c b/dix/dispatch.c index f7a08f8..74abecd 100644 --- a/dix/dispatch.c +++ b/dix/dispatch.c @@ -1597,6 +1597,52 @@ ProcClearToBackground(ClientPtr client) return Success; } +/* send GraphicsExpose events, or a NoExpose event, based on the region */ +void +SendGraphicsExpose(ClientPtr client, RegionPtr pRgn, XID drawable, + int major, int minor) +{ + if (pRgn && !RegionNil(pRgn)) { + xEvent *pEvent; + xEvent *pe; + BoxPtr pBox; + int i; + int numRects; + + numRects = RegionNumRects(pRgn); + pBox = RegionRects(pRgn); + if (!(pEvent = calloc(numRects, sizeof(xEvent)))) + return; + pe = pEvent; + + for (i = 1; i <= numRects; i++, pe++, pBox++) { + pe->u.u.type = GraphicsExpose; + pe->u.graphicsExposure.drawable = drawable; + pe->u.graphicsExposure.x = pBox->x1; + pe->u.graphicsExposure.y = pBox->y1; + pe->u.graphicsExposure.width = pBox->x2 - pBox->x1; + pe->u.graphicsExposure.height = pBox->y2 - pBox->y1; + pe->u.graphicsExposure.count = numRects - i; + pe->u.graphicsExposure.majorEvent = major; + pe->u.graphicsExposure.minorEvent = minor; + } + /* GraphicsExpose is a "critical event", which TryClientEvents + * handles specially. */ + TryClientEvents(client, NULL, pEvent, numRects, + (Mask) 0, NoEventMask, NullGrab); + free(pEvent); + } + else { + xEvent event = { + .u.noExposure.drawable = drawable, + .u.noExposure.majorEvent = major, + .u.noExposure.minorEvent = minor + }; + event.u.u.type = NoExpose; + WriteEventsToClient(client, 1, &event); + } +} + int ProcCopyArea(ClientPtr client) { @@ -1628,8 +1674,7 @@ ProcCopyArea(ClientPtr client) stuff->width, stuff->height, stuff->dstX, stuff->dstY); if (pGC->graphicsExposures) { - (*pDst->pScreen->SendGraphicsExpose) - (client, pRgn, stuff->dstDrawable, X_CopyArea, 0); + SendGraphicsExpose(client, pRgn, stuff->dstDrawable, X_CopyArea, 0); if (pRgn) RegionDestroy(pRgn); } @@ -1676,8 +1721,7 @@ ProcCopyPlane(ClientPtr client) stuff->srcY, stuff->width, stuff->height, stuff->dstX, stuff->dstY, stuff->bitPlane); if (pGC->graphicsExposures) { - (*pdstDraw->pScreen->SendGraphicsExpose) - (client, pRgn, stuff->dstDrawable, X_CopyPlane, 0); + SendGraphicsExpose(client, pRgn, stuff->dstDrawable, X_CopyPlane, 0); if (pRgn) RegionDestroy(pRgn); } diff --git a/include/dix.h b/include/dix.h index 61ecc8d..116da2e 100644 --- a/include/dix.h +++ b/include/dix.h @@ -254,6 +254,12 @@ extern _X_EXPORT void ClientWakeup(ClientPtr /*client */ ); extern _X_EXPORT Bool ClientIsAsleep(ClientPtr /*client */ ); +extern _X_EXPORT void SendGraphicsExpose(ClientPtr /*client */ , + RegionPtr /*pRgn */ , + XID /*drawable */ , + int /*major */ , + int /*minor */); + /* atom.c */ extern _X_EXPORT Atom MakeAtom(const char * /*string */ , diff --git a/include/scrnintstr.h b/include/scrnintstr.h index 7331ec1..269ff5a 100644 --- a/include/scrnintstr.h +++ b/include/scrnintstr.h @@ -252,12 +252,6 @@ typedef void (*ResolveColorProcPtr) (unsigned short * /*pred */ , typedef RegionPtr (*BitmapToRegionProcPtr) (PixmapPtr /*pPix */ ); -typedef void (*SendGraphicsExposeProcPtr) (ClientPtr /*client */ , - RegionPtr /*pRgn */ , - XID /*drawable */ , - int /*major */ , - int /*minor */ ); - typedef void (*ScreenBlockHandlerProcPtr) (ScreenPtr pScreen, void *pTimeout, void *pReadmask); @@ -540,7 +534,6 @@ typedef struct _Screen { /* Region procedures */ BitmapToRegionProcPtr BitmapToRegion; - SendGraphicsExposeProcPtr SendGraphicsExpose; /* os layer procedures */ diff --git a/mi/mi.h b/mi/mi.h index 700bb11..8cb3ce7 100644 --- a/mi/mi.h +++ b/mi/mi.h @@ -232,13 +232,6 @@ extern _X_EXPORT RegionPtr miHandleExposures(DrawablePtr /*pSrcDrawable */ , int /*dsty */ ); -extern _X_EXPORT void miSendGraphicsExpose(ClientPtr /*client */ , - RegionPtr /*pRgn */ , - XID /*drawable */ , - int /*major */ , - int /*minor */ - ); - extern _X_EXPORT void miSendExposures(WindowPtr /*pWin */ , RegionPtr /*pRgn */ , int /*dx */ , diff --git a/mi/miexpose.c b/mi/miexpose.c index 7a1c172..555f3b2 100644 --- a/mi/miexpose.c +++ b/mi/miexpose.c @@ -306,53 +306,6 @@ miHandleExposures(DrawablePtr pSrcDrawable, DrawablePtr pDstDrawable, } } -/* send GraphicsExpose events, or a NoExpose event, based on the region */ - -void -miSendGraphicsExpose(ClientPtr client, RegionPtr pRgn, XID drawable, - int major, int minor) -{ - if (pRgn && !RegionNil(pRgn)) { - xEvent *pEvent; - xEvent *pe; - BoxPtr pBox; - int i; - int numRects; - - numRects = RegionNumRects(pRgn); - pBox = RegionRects(pRgn); - if (!(pEvent = calloc(numRects, sizeof(xEvent)))) - return; - pe = pEvent; - - for (i = 1; i <= numRects; i++, pe++, pBox++) { - pe->u.u.type = GraphicsExpose; - pe->u.graphicsExposure.drawable = drawable; - pe->u.graphicsExposure.x = pBox->x1; - pe->u.graphicsExposure.y = pBox->y1; - pe->u.graphicsExposure.width = pBox->x2 - pBox->x1; - pe->u.graphicsExposure.height = pBox->y2 - pBox->y1; - pe->u.graphicsExposure.count = numRects - i; - pe->u.graphicsExposure.majorEvent = major; - pe->u.graphicsExposure.minorEvent = minor; - } - /* GraphicsExpose is a "critical event", which TryClientEvents - * handles specially. */ - TryClientEvents(client, NULL, pEvent, numRects, - (Mask) 0, NoEventMask, NullGrab); - free(pEvent); - } - else { - xEvent event = { - .u.noExposure.drawable = drawable, - .u.noExposure.majorEvent = major, - .u.noExposure.minorEvent = minor - }; - event.u.u.type = NoExpose; - WriteEventsToClient(client, 1, &event); - } -} - void miSendExposures(WindowPtr pWin, RegionPtr pRgn, int dx, int dy) { diff --git a/mi/miscrinit.c b/mi/miscrinit.c index 00c15f7..ec4d108 100644 --- a/mi/miscrinit.c +++ b/mi/miscrinit.c @@ -259,7 +259,6 @@ miScreenInit(ScreenPtr pScreen, void *pbits, /* pointer to screen bits */ /* CreateColormap, DestroyColormap, InstallColormap, UninstallColormap */ /* ListInstalledColormaps, StoreColors, ResolveColor */ /* BitmapToRegion */ - pScreen->SendGraphicsExpose = miSendGraphicsExpose; pScreen->BlockHandler = (ScreenBlockHandlerProcPtr) NoopDDA; pScreen->WakeupHandler = (ScreenWakeupHandlerProcPtr) NoopDDA; pScreen->MarkWindow = miMarkWindow; -- 1.9.3 From ajax at redhat.com Tue Sep 23 11:32:26 2014 From: ajax at redhat.com (Adam Jackson) Date: Tue, 23 Sep 2014 14:32:26 -0400 Subject: [PATCH 10/18] mi: Remove a can't-happen from miValidateTree In-Reply-To: <1411497154-7684-1-git-send-email-ajax@redhat.com> References: <1411497154-7684-1-git-send-email-ajax@redhat.com> Message-ID: <1411497154-7684-11-git-send-email-ajax@redhat.com> The only way you can get VisibilityNotViewable is to be, you know, not viewable. Since this test is inside if (pWin->viewable)... Signed-off-by: Adam Jackson --- mi/mivaltree.c | 30 ------------------------------ 1 file changed, 30 deletions(-) diff --git a/mi/mivaltree.c b/mi/mivaltree.c index 8e4e9a9..b1caec9 100644 --- a/mi/mivaltree.c +++ b/mi/mivaltree.c @@ -478,33 +478,6 @@ miComputeClips(WindowPtr pParent, (*pScreen->ClipNotify) (pParent, dx, dy); } -static void -miTreeObscured(WindowPtr pParent) -{ - WindowPtr pChild; - int oldVis; - - pChild = pParent; - while (1) { - if (pChild->viewable) { - oldVis = pChild->visibility; - if (oldVis != (pChild->visibility = VisibilityFullyObscured) && - ((pChild-> - eventMask | wOtherEventMasks(pChild)) & VisibilityChangeMask)) - SendVisibilityNotify(pChild); - if (pChild->firstChild) { - pChild = pChild->firstChild; - continue; - } - } - while (!pChild->nextSib && (pChild != pParent)) - pChild = pChild->parent; - if (pChild == pParent) - break; - pChild = pChild->nextSib; - } -} - static RegionPtr getBorderClip(WindowPtr pWin) { @@ -683,9 +656,6 @@ miValidateTree(WindowPtr pParent, /* Parent to validate */ RegionSubtract(&totalClip, &totalClip, &pWin->borderSize); } } - else if (pWin->visibility == VisibilityNotViewable) { - miTreeObscured(pWin); - } } else { if (pWin->valdata) { -- 1.9.3 From ajax at redhat.com Tue Sep 23 11:32:27 2014 From: ajax at redhat.com (Adam Jackson) Date: Tue, 23 Sep 2014 14:32:27 -0400 Subject: [PATCH 11/18] mi: Rewrite a conditional chain to be a bit more obvious In-Reply-To: <1411497154-7684-1-git-send-email-ajax@redhat.com> References: <1411497154-7684-1-git-send-email-ajax@redhat.com> Message-ID: <1411497154-7684-12-git-send-email-ajax@redhat.com> Signed-off-by: Adam Jackson --- mi/mivaltree.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/mi/mivaltree.c b/mi/mivaltree.c index b1caec9..1b68739 100644 --- a/mi/mivaltree.c +++ b/mi/mivaltree.c @@ -648,17 +648,15 @@ miValidateTree(WindowPtr pParent, /* Parent to validate */ } for (pWin = pChild; pWin != NullWindow; pWin = pWin->nextSib) { - if (pWin->viewable) { - if (pWin->valdata) { + if (pWin->valdata) { + if (pWin->viewable) { RegionIntersect(&childClip, &totalClip, &pWin->borderSize); miComputeClips(pWin, pScreen, &childClip, kind, &exposed); if (overlap && !TreatAsTransparent(pWin)) { RegionSubtract(&totalClip, &totalClip, &pWin->borderSize); } } - } - else { - if (pWin->valdata) { + else { RegionEmpty(&pWin->clipList); if (pScreen->ClipNotify) (*pScreen->ClipNotify) (pWin, 0, 0); -- 1.9.3 From ajax at redhat.com Tue Sep 23 11:32:29 2014 From: ajax at redhat.com (Adam Jackson) Date: Tue, 23 Sep 2014 14:32:29 -0400 Subject: [PATCH 13/18] dix: Lower backStorage to a bit instead of a pointer In-Reply-To: <1411497154-7684-1-git-send-email-ajax@redhat.com> References: <1411497154-7684-1-git-send-email-ajax@redhat.com> Message-ID: <1411497154-7684-14-git-send-email-ajax@redhat.com> Signed-off-by: Adam Jackson --- composite/compinit.c | 4 ++-- dix/window.c | 2 +- include/windowstr.h | 2 +- mi/miexpose.c | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/composite/compinit.c b/composite/compinit.c index 48e938f..111c16e 100644 --- a/composite/compinit.c +++ b/composite/compinit.c @@ -119,12 +119,12 @@ compChangeWindowAttributes(WindowPtr pWin, unsigned long mask) pScreen->backingStoreSupport != NotUseful) { if (pWin->backingStore != NotUseful && !pWin->backStorage) { compRedirectWindow(serverClient, pWin, CompositeRedirectAutomatic); - pWin->backStorage = (void *) (intptr_t) 1; + pWin->backStorage = TRUE; } else if (pWin->backingStore == NotUseful && pWin->backStorage) { compUnredirectWindow(serverClient, pWin, CompositeRedirectAutomatic); - pWin->backStorage = NULL; + pWin->backStorage = FALSE; } } diff --git a/dix/window.c b/dix/window.c index f227e4c..e1645c3 100644 --- a/dix/window.c +++ b/dix/window.c @@ -362,7 +362,7 @@ SetWindowToDefaults(WindowPtr pWin) pWin->cursorIsNone = TRUE; pWin->backingStore = NotUseful; - pWin->backStorage = (void *) NULL; + pWin->backStorage = 0; pWin->mapped = FALSE; /* off */ pWin->realized = FALSE; /* off */ diff --git a/include/windowstr.h b/include/windowstr.h index 81f5f8c..740f4a6 100644 --- a/include/windowstr.h +++ b/include/windowstr.h @@ -144,12 +144,12 @@ typedef struct _Window { Mask eventMask; /* mask from the creating client */ PixUnion background; PixUnion border; - void *backStorage; /* null when BS disabled */ WindowOptPtr optional; unsigned backgroundState:2; /* None, Relative, Pixel, Pixmap */ unsigned borderIsPixel:1; unsigned cursorIsNone:1; /* else real cursor (might inherit) */ unsigned backingStore:2; + unsigned backStorage:1; /* if bs is allocated */ unsigned saveUnder:1; unsigned bitGravity:4; unsigned winGravity:4; diff --git a/mi/miexpose.c b/mi/miexpose.c index 555f3b2..de8ee6c 100644 --- a/mi/miexpose.c +++ b/mi/miexpose.c @@ -143,7 +143,7 @@ miHandleExposures(DrawablePtr pSrcDrawable, DrawablePtr pDstDrawable, if (!pGC->graphicsExposures && (pDstDrawable->type == DRAWABLE_PIXMAP) && ((pSrcDrawable->type == DRAWABLE_PIXMAP) || - (((WindowPtr) pSrcDrawable)->backStorage == NULL))) + (((WindowPtr) pSrcDrawable)->backStorage == 0))) return NULL; srcBox.x1 = srcx; -- 1.9.3 From ajax at redhat.com Tue Sep 23 11:32:30 2014 From: ajax at redhat.com (Adam Jackson) Date: Tue, 23 Sep 2014 14:32:30 -0400 Subject: [PATCH 14/18] dix: Remove an empty if In-Reply-To: <1411497154-7684-1-git-send-email-ajax@redhat.com> References: <1411497154-7684-1-git-send-email-ajax@redhat.com> Message-ID: <1411497154-7684-15-git-send-email-ajax@redhat.com> Signed-off-by: Adam Jackson --- dix/window.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/dix/window.c b/dix/window.c index e1645c3..e49670a 100644 --- a/dix/window.c +++ b/dix/window.c @@ -2806,8 +2806,6 @@ UnmapSubwindows(WindowPtr pWin) pChild->mapped = FALSE; if (pChild->realized) UnrealizeTree(pChild, FALSE); - if (wasViewable) { - } } } if (wasViewable) { -- 1.9.3 From ajax at redhat.com Tue Sep 23 11:32:31 2014 From: ajax at redhat.com (Adam Jackson) Date: Tue, 23 Sep 2014 14:32:31 -0400 Subject: [PATCH 15/18] dix: Remove some pointless casting of NULL In-Reply-To: <1411497154-7684-1-git-send-email-ajax@redhat.com> References: <1411497154-7684-1-git-send-email-ajax@redhat.com> Message-ID: <1411497154-7684-16-git-send-email-ajax@redhat.com> Signed-off-by: Adam Jackson --- dix/window.c | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/dix/window.c b/dix/window.c index e49670a..295038a 100644 --- a/dix/window.c +++ b/dix/window.c @@ -357,8 +357,8 @@ SetWindowToDefaults(WindowPtr pWin) pWin->firstChild = NullWindow; pWin->lastChild = NullWindow; - pWin->valdata = (ValidatePtr) NULL; - pWin->optional = (WindowOptPtr) NULL; + pWin->valdata = NULL; + pWin->optional = NULL; pWin->cursorIsNone = TRUE; pWin->backingStore = NotUseful; @@ -1550,7 +1550,7 @@ MoveWindowInStack(WindowPtr pWin, WindowPtr pNextSib) if (pWin->prevSib) pWin->prevSib->nextSib = pWin->nextSib; pWin->nextSib = pParent->firstChild; - pWin->prevSib = (WindowPtr) NULL; + pWin->prevSib = NULL; pNextSib->prevSib = pWin; pParent->firstChild = pWin; } @@ -1847,7 +1847,7 @@ WindowExtents(WindowPtr pWin, BoxPtr pBox) return pBox; } -#define IS_SHAPED(pWin) (wBoundingShape (pWin) != (RegionPtr) NULL) +#define IS_SHAPED(pWin) (wBoundingShape (pWin) != NULL) static RegionPtr MakeBoundingRegion(WindowPtr pWin, BoxPtr pBox) @@ -1953,7 +1953,7 @@ WhereDoIGoInTheStack(WindowPtr pWin, WindowPtr pHead, pFirst; if ((pWin == pWin->parent->firstChild) && (pWin == pWin->parent->lastChild)) - return ((WindowPtr) NULL); + return NULL; pHead = RealChildHead(pWin->parent); pFirst = pHead ? pHead->nextSib : pWin->parent->firstChild; box.x1 = x; @@ -2644,8 +2644,7 @@ MapSubwindows(WindowPtr pParent, ClientPtr client) RealizeTree(pWin); if (pWin->viewable) { anyMarked |= (*pScreen->MarkOverlappedWindows) (pWin, pWin, - (WindowPtr - *) NULL); + NULL); } } } @@ -2655,8 +2654,7 @@ MapSubwindows(WindowPtr pParent, ClientPtr client) pLayerWin = (*pScreen->GetLayerWindow) (pParent); if (pLayerWin->parent != pParent) { anyMarked |= (*pScreen->MarkOverlappedWindows) (pLayerWin, - pLayerWin, - (WindowPtr *) NULL); + pLayerWin, NULL); pFirstMapped = pLayerWin; } if (anyMarked) { @@ -2815,8 +2813,7 @@ UnmapSubwindows(WindowPtr pWin) else { WindowPtr ptmp; - (*pScreen->MarkOverlappedWindows) (pWin, pLayerWin, - (WindowPtr *) NULL); + (*pScreen->MarkOverlappedWindows) (pWin, pLayerWin, NULL); (*pScreen->MarkWindow) (pLayerWin->parent); /* Windows between pWin and pLayerWin may not have been marked */ @@ -2875,7 +2872,7 @@ HandleSaveSet(ClientPtr client) } free(client->saveSet); client->numSaved = 0; - client->saveSet = (SaveSetElt *) NULL; + client->saveSet = NULL; } /** @@ -3591,7 +3588,7 @@ SetRootClip(ScreenPtr pScreen, Bool enable) if (pWin->firstChild) { anyMarked |= (*pScreen->MarkOverlappedWindows) (pWin->firstChild, pWin->firstChild, - (WindowPtr *) NULL); + NULL); } else { (*pScreen->MarkWindow) (pWin); -- 1.9.3 From ajax at redhat.com Tue Sep 23 11:32:28 2014 From: ajax at redhat.com (Adam Jackson) Date: Tue, 23 Sep 2014 14:32:28 -0400 Subject: [PATCH 12/18] dix: Remove DIXsaveUnder bit from the Window In-Reply-To: <1411497154-7684-1-git-send-email-ajax@redhat.com> References: <1411497154-7684-1-git-send-email-ajax@redhat.com> Message-ID: <1411497154-7684-13-git-send-email-ajax@redhat.com> Signed-off-by: Adam Jackson --- dix/window.c | 1 - include/windowstr.h | 1 - 2 files changed, 2 deletions(-) diff --git a/dix/window.c b/dix/window.c index 52e69ef..f227e4c 100644 --- a/dix/window.c +++ b/dix/window.c @@ -362,7 +362,6 @@ SetWindowToDefaults(WindowPtr pWin) pWin->cursorIsNone = TRUE; pWin->backingStore = NotUseful; - pWin->DIXsaveUnder = FALSE; pWin->backStorage = (void *) NULL; pWin->mapped = FALSE; /* off */ diff --git a/include/windowstr.h b/include/windowstr.h index 6b79bbd..81f5f8c 100644 --- a/include/windowstr.h +++ b/include/windowstr.h @@ -151,7 +151,6 @@ typedef struct _Window { unsigned cursorIsNone:1; /* else real cursor (might inherit) */ unsigned backingStore:2; unsigned saveUnder:1; - unsigned DIXsaveUnder:1; unsigned bitGravity:4; unsigned winGravity:4; unsigned overrideRedirect:1; -- 1.9.3 From ajax at redhat.com Tue Sep 23 11:32:32 2014 From: ajax at redhat.com (Adam Jackson) Date: Tue, 23 Sep 2014 14:32:32 -0400 Subject: [PATCH 16/18] dix: Remove an obfuscatory macro In-Reply-To: <1411497154-7684-1-git-send-email-ajax@redhat.com> References: <1411497154-7684-1-git-send-email-ajax@redhat.com> Message-ID: <1411497154-7684-17-git-send-email-ajax@redhat.com> Signed-off-by: Adam Jackson --- dix/window.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/dix/window.c b/dix/window.c index 295038a..7a2866a 100644 --- a/dix/window.c +++ b/dix/window.c @@ -1812,8 +1812,6 @@ ResizeChildrenWinSize(WindowPtr pWin, int dx, int dy, int dw, int dh) #define ChangeMask ((Mask)(CWX | CWY | CWWidth | CWHeight)) -#define IllegalInputOnlyConfigureMask (CWBorderWidth) - /* * IsSiblingAboveMe * returns Above if pSib above pMe in stack or Below otherwise @@ -2091,8 +2089,7 @@ ConfigureWindow(WindowPtr pWin, Mask mask, XID *vlist, ClientPtr client) h = pWin->drawable.height, bw = pWin->borderWidth; int rc, action, smode = Above; - if ((pWin->drawable.class == InputOnly) && - (mask & IllegalInputOnlyConfigureMask)) + if ((pWin->drawable.class == InputOnly) && (mask & CWBorderWidth)) return BadMatch; if ((mask & CWSibling) && !(mask & CWStackMode)) -- 1.9.3 From ajax at redhat.com Tue Sep 23 11:32:33 2014 From: ajax at redhat.com (Adam Jackson) Date: Tue, 23 Sep 2014 14:32:33 -0400 Subject: [PATCH 17/18] mi: miSlideAndSizeWindow -> miResizeWindow In-Reply-To: <1411497154-7684-1-git-send-email-ajax@redhat.com> References: <1411497154-7684-1-git-send-email-ajax@redhat.com> Message-ID: <1411497154-7684-18-git-send-email-ajax@redhat.com> Make the function name match the screen slot name. Signed-off-by: Adam Jackson --- mi/mi.h | 12 ++++++------ mi/miscrinit.c | 2 +- mi/miwindow.c | 5 ++--- 3 files changed, 9 insertions(+), 10 deletions(-) diff --git a/mi/mi.h b/mi/mi.h index 8cb3ce7..5a455c9 100644 --- a/mi/mi.h +++ b/mi/mi.h @@ -470,12 +470,12 @@ extern _X_EXPORT void miMoveWindow(WindowPtr /*pWin */ , VTKind /*kind */ ); -extern _X_EXPORT void miSlideAndSizeWindow(WindowPtr /*pWin */ , - int /*x */ , - int /*y */ , - unsigned int /*w */ , - unsigned int /*h */ , - WindowPtr /*pSib */ +extern _X_EXPORT void miResizeWindow(WindowPtr /*pWin */ , + int /*x */ , + int /*y */ , + unsigned int /*w */ , + unsigned int /*h */ , + WindowPtr /*pSib */ ); extern _X_EXPORT WindowPtr miGetLayerWindow(WindowPtr /*pWin */ diff --git a/mi/miscrinit.c b/mi/miscrinit.c index ec4d108..327bd15 100644 --- a/mi/miscrinit.c +++ b/mi/miscrinit.c @@ -264,7 +264,7 @@ miScreenInit(ScreenPtr pScreen, void *pbits, /* pointer to screen bits */ pScreen->MarkWindow = miMarkWindow; pScreen->MarkOverlappedWindows = miMarkOverlappedWindows; pScreen->MoveWindow = miMoveWindow; - pScreen->ResizeWindow = miSlideAndSizeWindow; + pScreen->ResizeWindow = miResizeWindow; pScreen->GetLayerWindow = miGetLayerWindow; pScreen->HandleExposures = miHandleValidateExposures; pScreen->ReparentWindow = (ReparentWindowProcPtr) 0; diff --git a/mi/miwindow.c b/mi/miwindow.c index ba4c9ed..cfe085a 100644 --- a/mi/miwindow.c +++ b/mi/miwindow.c @@ -337,9 +337,8 @@ miRecomputeExposures(WindowPtr pWin, void *value) } void -miSlideAndSizeWindow(WindowPtr pWin, - int x, int y, - unsigned int w, unsigned int h, WindowPtr pSib) +miResizeWindow(WindowPtr pWin, int x, int y, unsigned int w, unsigned int h, + WindowPtr pSib) { WindowPtr pParent; Bool WasViewable = (Bool) (pWin->viewable); -- 1.9.3 From ajax at redhat.com Tue Sep 23 11:32:34 2014 From: ajax at redhat.com (Adam Jackson) Date: Tue, 23 Sep 2014 14:32:34 -0400 Subject: [PATCH 18/18] fb: fb{Map,Unmap}Window -> fb{Realize,Unrealize}Window In-Reply-To: <1411497154-7684-1-git-send-email-ajax@redhat.com> References: <1411497154-7684-1-git-send-email-ajax@redhat.com> Message-ID: <1411497154-7684-19-git-send-email-ajax@redhat.com> Make the function names match the screen slot name. Signed-off-by: Adam Jackson --- fb/fb.h | 4 ++-- fb/fbscreen.c | 4 ++-- fb/fbwindow.c | 4 ++-- fb/wfbrename.h | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/fb/fb.h b/fb/fb.h index 9057767..d176bb3 100644 --- a/fb/fb.h +++ b/fb/fb.h @@ -1621,13 +1621,13 @@ extern _X_EXPORT Bool fbDestroyWindow(WindowPtr pWin); extern _X_EXPORT Bool - fbMapWindow(WindowPtr pWindow); + fbRealizeWindow(WindowPtr pWindow); extern _X_EXPORT Bool fbPositionWindow(WindowPtr pWin, int x, int y); extern _X_EXPORT Bool - fbUnmapWindow(WindowPtr pWindow); + fbUnrealizeWindow(WindowPtr pWindow); extern _X_EXPORT void diff --git a/fb/fbscreen.c b/fb/fbscreen.c index 0d4d87f..71bcc5d 100644 --- a/fb/fbscreen.c +++ b/fb/fbscreen.c @@ -110,8 +110,8 @@ fbSetupScreen(ScreenPtr pScreen, void *pbits, /* pointer to screen bitmap */ pScreen->DestroyWindow = fbDestroyWindow; pScreen->PositionWindow = fbPositionWindow; pScreen->ChangeWindowAttributes = fbChangeWindowAttributes; - pScreen->RealizeWindow = fbMapWindow; - pScreen->UnrealizeWindow = fbUnmapWindow; + pScreen->RealizeWindow = fbRealizeWindow; + pScreen->UnrealizeWindow = fbUnrealizeWindow; pScreen->CopyWindow = fbCopyWindow; pScreen->CreatePixmap = fbCreatePixmap; pScreen->DestroyPixmap = fbDestroyPixmap; diff --git a/fb/fbwindow.c b/fb/fbwindow.c index c90175f..7a5fac8 100644 --- a/fb/fbwindow.c +++ b/fb/fbwindow.c @@ -46,7 +46,7 @@ fbDestroyWindow(WindowPtr pWin) } Bool -fbMapWindow(WindowPtr pWindow) +fbRealizeWindow(WindowPtr pWindow) { return TRUE; } @@ -58,7 +58,7 @@ fbPositionWindow(WindowPtr pWin, int x, int y) } Bool -fbUnmapWindow(WindowPtr pWindow) +fbUnrealizeWindow(WindowPtr pWindow) { return TRUE; } diff --git a/fb/wfbrename.h b/fb/wfbrename.h index 54d00d0..749c6d0 100644 --- a/fb/wfbrename.h +++ b/fb/wfbrename.h @@ -88,7 +88,6 @@ #define fbInstallColormap wfbInstallColormap #define fbLaneTable wfbLaneTable #define fbListInstalledColormaps wfbListInstalledColormaps -#define fbMapWindow wfbMapWindow #define FbMergeRopBits wFbMergeRopBits #define fbOddStipple wfbOddStipple #define fbOddTile wfbOddTile @@ -134,6 +133,7 @@ #define fbQueryBestSize wfbQueryBestSize #define fbRasterizeTrapezoid wfbRasterizeTrapezoid #define fbRealizeFont wfbRealizeFont +#define fbRealizeWindow wfbRealizeWindow #define fbReduceRasterOp wfbReduceRasterOp #define fbReplicatePixel wfbReplicatePixel #define fbResolveColor wfbResolveColor @@ -160,7 +160,7 @@ #define fbTrapezoids wfbTrapezoids #define fbTriangles wfbTriangles #define fbUninstallColormap wfbUninstallColormap -#define fbUnmapWindow wfbUnmapWindow +#define fbUnrealizeWindow wfbUnrealizeWindow #define fbUnrealizeFont wfbUnrealizeFont #define fbValidateGC wfbValidateGC #define fbWinPrivateKeyRec wfbWinPrivateKeyRec -- 1.9.3 From jstpierre at mecheye.net Tue Sep 23 12:03:52 2014 From: jstpierre at mecheye.net (Jasper St. Pierre) Date: Tue, 23 Sep 2014 13:03:52 -0600 Subject: [PATCH 13/18] dix: Lower backStorage to a bit instead of a pointer In-Reply-To: <1411497154-7684-14-git-send-email-ajax@redhat.com> References: <1411497154-7684-1-git-send-email-ajax@redhat.com> <1411497154-7684-14-git-send-email-ajax@redhat.com> Message-ID: On Tue, Sep 23, 2014 at 12:32 PM, Adam Jackson wrote: > Signed-off-by: Adam Jackson > --- > composite/compinit.c | 4 ++-- > dix/window.c | 2 +- > include/windowstr.h | 2 +- > mi/miexpose.c | 2 +- > 4 files changed, 5 insertions(+), 5 deletions(-) > > diff --git a/composite/compinit.c b/composite/compinit.c > index 48e938f..111c16e 100644 > --- a/composite/compinit.c > +++ b/composite/compinit.c > @@ -119,12 +119,12 @@ compChangeWindowAttributes(WindowPtr pWin, unsigned > long mask) > pScreen->backingStoreSupport != NotUseful) { > if (pWin->backingStore != NotUseful && !pWin->backStorage) { > compRedirectWindow(serverClient, pWin, > CompositeRedirectAutomatic); > - pWin->backStorage = (void *) (intptr_t) 1; > + pWin->backStorage = TRUE; > } > else if (pWin->backingStore == NotUseful && pWin->backStorage) { > compUnredirectWindow(serverClient, pWin, > CompositeRedirectAutomatic); > - pWin->backStorage = NULL; > + pWin->backStorage = FALSE; > Here you use TRUE / FALSE > } > } > > diff --git a/dix/window.c b/dix/window.c > index f227e4c..e1645c3 100644 > --- a/dix/window.c > +++ b/dix/window.c > @@ -362,7 +362,7 @@ SetWindowToDefaults(WindowPtr pWin) > pWin->cursorIsNone = TRUE; > > pWin->backingStore = NotUseful; > - pWin->backStorage = (void *) NULL; > + pWin->backStorage = 0; > Here you use 0. > pWin->mapped = FALSE; /* off */ > pWin->realized = FALSE; /* off */ > diff --git a/include/windowstr.h b/include/windowstr.h > index 81f5f8c..740f4a6 100644 > --- a/include/windowstr.h > +++ b/include/windowstr.h > @@ -144,12 +144,12 @@ typedef struct _Window { > Mask eventMask; /* mask from the creating client */ > PixUnion background; > PixUnion border; > - void *backStorage; /* null when BS disabled */ > WindowOptPtr optional; > unsigned backgroundState:2; /* None, Relative, Pixel, Pixmap */ > unsigned borderIsPixel:1; > unsigned cursorIsNone:1; /* else real cursor (might inherit) */ > unsigned backingStore:2; > + unsigned backStorage:1; /* if bs is allocated */ > unsigned saveUnder:1; > unsigned bitGravity:4; > unsigned winGravity:4; > diff --git a/mi/miexpose.c b/mi/miexpose.c > index 555f3b2..de8ee6c 100644 > --- a/mi/miexpose.c > +++ b/mi/miexpose.c > @@ -143,7 +143,7 @@ miHandleExposures(DrawablePtr pSrcDrawable, > DrawablePtr pDstDrawable, > if (!pGC->graphicsExposures && > (pDstDrawable->type == DRAWABLE_PIXMAP) && > ((pSrcDrawable->type == DRAWABLE_PIXMAP) || > - (((WindowPtr) pSrcDrawable)->backStorage == NULL))) > + (((WindowPtr) pSrcDrawable)->backStorage == 0))) > return NULL; > Here you use 0. Why the inconsistency? > srcBox.x1 = srcx; > -- > 1.9.3 > > _______________________________________________ > xorg-devel at lists.x.org: X.Org development > Archives: http://lists.x.org/archives/xorg-devel > Info: http://lists.x.org/mailman/listinfo/xorg-devel > -- Jasper -------------- next part -------------- An HTML attachment was scrubbed... URL: From jstpierre at mecheye.net Tue Sep 23 12:07:26 2014 From: jstpierre at mecheye.net (Jasper St. Pierre) Date: Tue, 23 Sep 2014 13:07:26 -0600 Subject: [PATCH 17/18] mi: miSlideAndSizeWindow -> miResizeWindow In-Reply-To: <1411497154-7684-18-git-send-email-ajax@redhat.com> References: <1411497154-7684-1-git-send-email-ajax@redhat.com> <1411497154-7684-18-git-send-email-ajax@redhat.com> Message-ID: I sort of like "slide" because it gives the impression that we copy the framebuffer contents if the size of the window hasn't changed. That said, if we want to change this, we should change the name of the slot too. Reviewed-by: Jasper St. Pierre On Tue, Sep 23, 2014 at 12:32 PM, Adam Jackson wrote: > Make the function name match the screen slot name. > > Signed-off-by: Adam Jackson > --- > mi/mi.h | 12 ++++++------ > mi/miscrinit.c | 2 +- > mi/miwindow.c | 5 ++--- > 3 files changed, 9 insertions(+), 10 deletions(-) > > diff --git a/mi/mi.h b/mi/mi.h > index 8cb3ce7..5a455c9 100644 > --- a/mi/mi.h > +++ b/mi/mi.h > @@ -470,12 +470,12 @@ extern _X_EXPORT void miMoveWindow(WindowPtr /*pWin > */ , > VTKind /*kind */ > ); > > -extern _X_EXPORT void miSlideAndSizeWindow(WindowPtr /*pWin */ , > - int /*x */ , > - int /*y */ , > - unsigned int /*w */ , > - unsigned int /*h */ , > - WindowPtr /*pSib */ > +extern _X_EXPORT void miResizeWindow(WindowPtr /*pWin */ , > + int /*x */ , > + int /*y */ , > + unsigned int /*w */ , > + unsigned int /*h */ , > + WindowPtr /*pSib */ > ); > > extern _X_EXPORT WindowPtr miGetLayerWindow(WindowPtr /*pWin */ > diff --git a/mi/miscrinit.c b/mi/miscrinit.c > index ec4d108..327bd15 100644 > --- a/mi/miscrinit.c > +++ b/mi/miscrinit.c > @@ -264,7 +264,7 @@ miScreenInit(ScreenPtr pScreen, void *pbits, /* > pointer to screen bits */ > pScreen->MarkWindow = miMarkWindow; > pScreen->MarkOverlappedWindows = miMarkOverlappedWindows; > pScreen->MoveWindow = miMoveWindow; > - pScreen->ResizeWindow = miSlideAndSizeWindow; > + pScreen->ResizeWindow = miResizeWindow; > pScreen->GetLayerWindow = miGetLayerWindow; > pScreen->HandleExposures = miHandleValidateExposures; > pScreen->ReparentWindow = (ReparentWindowProcPtr) 0; > diff --git a/mi/miwindow.c b/mi/miwindow.c > index ba4c9ed..cfe085a 100644 > --- a/mi/miwindow.c > +++ b/mi/miwindow.c > @@ -337,9 +337,8 @@ miRecomputeExposures(WindowPtr pWin, void *value) > } > > void > -miSlideAndSizeWindow(WindowPtr pWin, > - int x, int y, > - unsigned int w, unsigned int h, WindowPtr pSib) > +miResizeWindow(WindowPtr pWin, int x, int y, unsigned int w, unsigned int > h, > + WindowPtr pSib) > { > WindowPtr pParent; > Bool WasViewable = (Bool) (pWin->viewable); > -- > 1.9.3 > > _______________________________________________ > xorg-devel at lists.x.org: X.Org development > Archives: http://lists.x.org/archives/xorg-devel > Info: http://lists.x.org/mailman/listinfo/xorg-devel > -- Jasper -------------- next part -------------- An HTML attachment was scrubbed... URL: From ajax at redhat.com Tue Sep 23 12:18:34 2014 From: ajax at redhat.com (Adam Jackson) Date: Tue, 23 Sep 2014 15:18:34 -0400 Subject: [PATCH 13/18] dix: Lower backStorage to a bit instead of a pointer In-Reply-To: References: <1411497154-7684-1-git-send-email-ajax@redhat.com> <1411497154-7684-14-git-send-email-ajax@redhat.com> Message-ID: <1411499914.24286.47.camel@dmt> On Tue, 2014-09-23 at 13:03 -0600, Jasper St. Pierre wrote: > Here you use 0. > > Why the inconsistency? No especially good reason. In the tree I'm actually working on [1] this particular lowering happened after I'd factored out the redirection logic in compChangeWindowAttributes to its own function. When I reordered things so the trivial cleanuppy bits came before functionality this change conflicted, and when I fixed it up my hands typed the other thing. Good eye though, I'll fix it up before sending a pull request. [1] - http://cgit.freedesktop.org/~ajax/xserver/log/?h=bsbs - ajax From ajax at redhat.com Tue Sep 23 12:31:53 2014 From: ajax at redhat.com (Adam Jackson) Date: Tue, 23 Sep 2014 15:31:53 -0400 Subject: [PATCH 17/18] mi: miSlideAndSizeWindow -> miResizeWindow In-Reply-To: References: <1411497154-7684-1-git-send-email-ajax@redhat.com> <1411497154-7684-18-git-send-email-ajax@redhat.com> Message-ID: <1411500713.24286.56.camel@dmt> On Tue, 2014-09-23 at 13:07 -0600, Jasper St. Pierre wrote: > I sort of like "slide" because it gives the impression that we copy > the framebuffer contents if the size of the window hasn't changed. > That said, if we want to change this, we should change the name of the > slot too. Meh. This change was in favor of the majority, the other occupiers of that slot are all named fooResizeWindow. The DDX documentation says "The formerly dix function SlideAndSizeWindow has moved to ddx and is accessed via [pScreen->ResizeWindow]", which apparently happened between X11R5 and X11R6.0. I guess I don't have a strong opinion, but SlideAndSize seems awkward. - aja From tobias.jakobi1 at uni-bielefeld.de Tue Sep 23 11:13:11 2014 From: tobias.jakobi1 at uni-bielefeld.de (tobias.jakobi1 at uni-bielefeld.de) Date: Tue, 23 Sep 2014 20:13:11 +0200 Subject: [PATCH] uxa/video: only call intel_xvmc_adaptor_init when xvmc is enabled Message-ID: <1411495991-18081-1-git-send-email-tjakobi@math.uni-bielefeld.de> Signed-off-by: Tobias Jakobi --- src/uxa/intel_video.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/uxa/intel_video.c b/src/uxa/intel_video.c index 310b6c9..33d447c 100644 --- a/src/uxa/intel_video.c +++ b/src/uxa/intel_video.c @@ -239,8 +239,10 @@ void intel_video_init(ScreenPtr screen) intel->XvEnabled = FALSE; } +#ifdef INTEL_XVMC if (texturedAdaptor) intel_xvmc_adaptor_init(screen); +#endif free(adaptors); } -- 1.8.5.5 From eich at freedesktop.org Tue Sep 23 23:17:59 2014 From: eich at freedesktop.org (Egbert Eich) Date: Wed, 24 Sep 2014 08:17:59 +0200 Subject: [PATCH driver/intel] Allow copy_front() to fail and clean up gracefully if it does Message-ID: <1411539479-7946-1-git-send-email-eich@freedesktop.org> From: Egbert Eich copy_front() calls sna_pixmap_force_to_gpu() which may fail. If we pretend to have been successful and continue the caller sna_mode_resize() may finish successfully pretending a mode change has succeeded which might leave a mode behind which is unusable. This patch makes copy_front() fail if sna_pixmap_force_to_gpu() fails which allows sna_mode_resize() to detect this situation, clean up gracefully, ie. destroy the newly created front pixmap and fail itself. This way an application requesting such a mode will receive a proper XError while the previous mode will be restored leaving the user with a usable mode. Signed-off-by: Egbert Eich --- src/sna/sna_display.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/src/sna/sna_display.c b/src/sna/sna_display.c index 2a98fb9..25873c4 100644 --- a/src/sna/sna_display.c +++ b/src/sna/sna_display.c @@ -4044,22 +4044,22 @@ void sna_mode_discover(struct sna *sna) } } -static void copy_front(struct sna *sna, PixmapPtr old, PixmapPtr new) +static Bool copy_front(struct sna *sna, PixmapPtr old, PixmapPtr new) { struct sna_pixmap *old_priv, *new_priv; DBG(("%s\n", __FUNCTION__)); if (wedged(sna)) - return; + return FALSE; old_priv = sna_pixmap_force_to_gpu(old, MOVE_READ); if (!old_priv) - return; + return FALSE; new_priv = sna_pixmap_force_to_gpu(new, MOVE_WRITE); if (!new_priv) - return; + return FALSE; if (old_priv->clear) { (void)sna->render.fill_one(sna, new, new_priv->gpu_bo, @@ -4137,6 +4137,8 @@ static void copy_front(struct sna *sna, PixmapPtr old, PixmapPtr new) } sna_damage_all(&new_priv->gpu_damage, new); + + return TRUE; } static Bool @@ -4182,7 +4184,10 @@ sna_mode_resize(ScrnInfoPtr scrn, int width, int height) assert(sna->mode.shadow_damage == NULL); assert(sna->mode.shadow == NULL); - copy_front(sna, sna->front, new_front); + if (!copy_front(sna, sna->front, new_front)) { + screen->DestroyPixmap(new_front); + return FALSE; + } screen->SetScreenPixmap(new_front); assert(screen->GetScreenPixmap(screen) == new_front); -- 1.8.4.5 From eich at freedesktop.org Tue Sep 23 23:18:32 2014 From: eich at freedesktop.org (Egbert Eich) Date: Wed, 24 Sep 2014 08:18:32 +0200 Subject: [PATCH driver/intel] In sna_pixmap_alloc_gpu() process user selected tiling thru kgem_choose_tiling() Message-ID: <1411539512-7988-1-git-send-email-eich@freedesktop.org> From: Egbert Eich In sna_pixmap_alloc_gpu() a different than the default tiling may be picked by a usage hint. Before passing the tiling to kgem_create_2d() fix it up by calling kgem_choose_tiling(). This avoids kgem_surface_size() not being able to find a surface size for the tiling value. Signed-off-by: Egbert Eich --- src/sna/sna_accel.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/sna/sna_accel.c b/src/sna/sna_accel.c index ab43831..16726ee 100644 --- a/src/sna/sna_accel.c +++ b/src/sna/sna_accel.c @@ -1618,6 +1618,11 @@ static bool sna_pixmap_alloc_gpu(struct sna *sna, if (pixmap->usage_hint == SNA_CREATE_FB && (sna->flags & SNA_LINEAR_FB) == 0) { flags |= CREATE_SCANOUT; tiling = -I915_TILING_X; + tiling = kgem_choose_tiling(&sna->kgem, + tiling, + pixmap->drawable.width, + pixmap->drawable.height, + pixmap->drawable.bitsPerPixel); } else tiling = sna_pixmap_default_tiling(sna, pixmap); -- 1.8.4.5 From alan.coopersmith at oracle.com Tue Sep 23 23:19:58 2014 From: alan.coopersmith at oracle.com (Alan Coopersmith) Date: Tue, 23 Sep 2014 23:19:58 -0700 Subject: [PATCH 1/2] Abort xi2 tests if ActivateDevice() fails Message-ID: <1411539599-6042-1-git-send-email-alan.coopersmith@oracle.com> I was getting segfaults in xi2 tests from trying to copy XKB keyboard state to NULL pointers with a stack of: 0 0x00000000006244d2 in XkbPushLockedStateToSlaves (master=0x7b4650, evtype=0, key=0) at xkbActions.c:1189 1 0x00000000004f450a in EnableDevice (dev=0x7b3810, sendevent=0 '\000') at devices.c:420 2 0x00000000004cf2a7 in init_devices () at protocol-common.c:158 3 0x00000000004cf5ea in init_simple () at protocol-common.c:259 4 0x00000000004d090f in main (argc=1, argv=0xffff80ffbfffe458) at protocol-xiquerydevice.c:338 which turned out to be due to xkbcomp failure, which was logged in the test logs as: XKB: Failed to compile keymap Keyboard initialization failed. This could be a missing or incorrect setup of xkeyboard-config. but which was overlooked because the ActivateDevice() return code wasn't checked and the tests went forward assuming the structures were all correctly initialized. This catches the failure closer to the point of failure, to save debugging time. Signed-off-by: Alan Coopersmith Reviewed-by: Peter Hutterer --- test/xi2/protocol-common.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/test/xi2/protocol-common.c b/test/xi2/protocol-common.c index 9a429e4..64a5777 100644 --- a/test/xi2/protocol-common.c +++ b/test/xi2/protocol-common.c @@ -137,6 +137,7 @@ init_devices(void) { ClientRec client; struct devices local_devices; + int ret; client = init_client(0, NULL); @@ -145,15 +146,20 @@ init_devices(void) inputInfo.pointer = local_devices.vcp; inputInfo.keyboard = local_devices.vck; - ActivateDevice(local_devices.vcp, FALSE); - ActivateDevice(local_devices.vck, FALSE); + ret = ActivateDevice(local_devices.vcp, FALSE); + assert(ret == Success); + /* This may fail if xkbcomp fails or xkb-config is not found. */ + ret = ActivateDevice(local_devices.vck, FALSE); + assert(ret == Success); EnableDevice(local_devices.vcp, FALSE); EnableDevice(local_devices.vck, FALSE); AllocDevicePair(&client, "", &local_devices.mouse, &local_devices.kbd, TestPointerProc, CoreKeyboardProc, FALSE); - ActivateDevice(local_devices.mouse, FALSE); - ActivateDevice(local_devices.kbd, FALSE); + ret = ActivateDevice(local_devices.mouse, FALSE); + assert(ret == Success); + ret = ActivateDevice(local_devices.kbd, FALSE); + assert(ret == Success); EnableDevice(local_devices.mouse, FALSE); EnableDevice(local_devices.kbd, FALSE); -- 1.7.9.2 From alan.coopersmith at oracle.com Tue Sep 23 23:19:59 2014 From: alan.coopersmith at oracle.com (Alan Coopersmith) Date: Tue, 23 Sep 2014 23:19:59 -0700 Subject: [PATCH 2/2] Use unique display name for each xi2 test program In-Reply-To: <1411539599-6042-1-git-send-email-alan.coopersmith@oracle.com> References: <1411539599-6042-1-git-send-email-alan.coopersmith@oracle.com> Message-ID: <1411539599-6042-2-git-send-email-alan.coopersmith@oracle.com> make -j 8 check was sporadically failing in different xi2 tests. After adding the asserts in the previous commit to catch xkb failure it became easier to catch the failures and see that multiple tests were running at once trying to write to /tmp/server-(null).xkm and then delete it, and interfering with each other. Putting a unique string into the display variable let them each write to their own file and not interfere with others. Signed-off-by: Alan Coopersmith Reviewed-by: Peter Hutterer --- configure.ac | 4 +++- include/dix-config.h.in | 7 +++++++ test/xi2/protocol-common.c | 11 +++++++++++ 3 files changed, 21 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index be8bff6..04b0b4a 100644 --- a/configure.ac +++ b/configure.ac @@ -217,10 +217,12 @@ AC_SUBST(DLOPEN_LIBS) dnl Checks for library functions. AC_CHECK_FUNCS([backtrace ffs geteuid getuid issetugid getresuid \ - getdtablesize getifaddrs getpeereid getpeerucred getzoneid \ + getdtablesize getifaddrs getpeereid getpeerucred getprogname getzoneid \ mmap seteuid shmctl64 strncasecmp vasprintf vsnprintf walkcontext]) AC_REPLACE_FUNCS([strcasecmp strcasestr strlcat strlcpy strndup]) +AC_CHECK_DECLS([program_invocation_name], [], [], [[#include ]]) + dnl Find the math libary, then check for cbrt function in it. AC_CHECK_LIB(m, sqrt) AC_CHECK_FUNCS([cbrt]) diff --git a/include/dix-config.h.in b/include/dix-config.h.in index 4268b8f..ac68ad6 100644 --- a/include/dix-config.h.in +++ b/include/dix-config.h.in @@ -72,6 +72,10 @@ /* Define to 1 if you have the header file. */ #undef HAVE_DBM_H +/* Define to 1 if you have the declaration of `program_invocation_name', and + to 0 if you don't. */ +#undef HAVE_DECL_PROGRAM_INVOCATION_NAME + /* Define to 1 if you have the header file, and it defines `DIR'. */ #undef HAVE_DIRENT_H @@ -100,6 +104,9 @@ /* Define to 1 if you have the `getpeerucred' function. */ #undef HAVE_GETPEERUCRED +/* Define to 1 if you have the `getprogname' function. */ +#undef HAVE_GETPROGNAME + /* Define to 1 if you have the `getzoneid' function. */ #undef HAVE_GETZONEID diff --git a/test/xi2/protocol-common.c b/test/xi2/protocol-common.c index 64a5777..3a53050 100644 --- a/test/xi2/protocol-common.c +++ b/test/xi2/protocol-common.c @@ -139,6 +139,17 @@ init_devices(void) struct devices local_devices; int ret; + /* + * Put a unique name in display pointer so that when tests are run in + * parallel, their xkbcomp outputs to /tmp/server-.xkm don't + * stomp on each other. + */ +#ifdef HAVE_GETPROGNAME + display = getprogname(); +#elif HAVE_DECL_PROGRAM_INVOCATION_NAME + display = program_invocation_name; +#endif + client = init_client(0, NULL); AllocDevicePair(&client, "Virtual core", &local_devices.vcp, &local_devices.vck, -- 1.7.9.2 From alan.coopersmith at oracle.com Tue Sep 23 23:33:10 2014 From: alan.coopersmith at oracle.com (Alan Coopersmith) Date: Tue, 23 Sep 2014 23:33:10 -0700 Subject: [PATCH libxtrans] Add TRANS(Listen) function to re-enable specific listen sockets In-Reply-To: <1410546792-31329-1-git-send-email-keithp@keithp.com> References: <1410546792-31329-1-git-send-email-keithp@keithp.com> Message-ID: <542265A6.50201@oracle.com> I'd started working on a similar patch series last year, but never finished it after getting sidetracked by our security fixes - for whatever it's worth, I've attached the work-in-progress I had - I don't even remember at this point what was still left to do. -- -Alan Coopersmith- alan.coopersmith at oracle.com Oracle Solaris Engineering - http://blogs.oracle.com/alanc -------------- next part -------------- From ffafcb8745e430e7a09f967247da39aafaca1df6 Mon Sep 17 00:00:00 2001 From: Alan Coopersmith Date: Sun, 27 Jan 2013 23:47:55 -0800 Subject: [PATCH:libxtrans 1/2] Set TRANS_LOCAL flag for "unix" and "local" socket families Was previously only set for LOCALCONN transports Signed-off-by: Alan Coopersmith --- Xtranssock.c | 10 ++++------ doc/xtrans.xml | 6 +++++- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/Xtranssock.c b/Xtranssock.c index 23150b2..4ea58dc 100644 --- a/Xtranssock.c +++ b/Xtranssock.c @@ -2582,10 +2582,9 @@ Xtransport TRANS(SocketLocalFuncs) = { /* Socket Interface */ "local", #ifdef HAVE_ABSTRACT_SOCKETS - TRANS_ABSTRACT, -#else - 0, + TRANS_ABSTRACT | #endif + TRANS_LOCAL, #ifdef TRANS_CLIENT TRANS(SocketOpenCOTSClient), #endif /* TRANS_CLIENT */ @@ -2634,10 +2633,9 @@ Xtransport TRANS(SocketUNIXFuncs) = { /* Socket Interface */ "unix", #if !defined(LOCALCONN) && !defined(HAVE_ABSTRACT_SOCKETS) - TRANS_ALIAS, -#else - 0, + TRANS_ALIAS | #endif + TRANS_LOCAL, #ifdef TRANS_CLIENT TRANS(SocketOpenCOTSClient), #endif /* TRANS_CLIENT */ diff --git a/doc/xtrans.xml b/doc/xtrans.xml index 59daa3f..d9dba6a 100644 --- a/doc/xtrans.xml +++ b/doc/xtrans.xml @@ -298,7 +298,11 @@ not be used to create a listener. TRANS_LOCAL -indicates that this is a LOCALCONN transport. +in Xtrans 1.3 and later, indicates that this transport can only open +connections to the local host, either via LOCALCONN or other non-networked +methods such as a Unix domain socket or abstract socket. +(In Xtrans 1.2 and earlier, this was limited to indicating that this is a +LOCALCONN transport.) -- 1.7.9.2 -------------- next part -------------- From f7403568d69015a1184a71a2624ce2718f4cef87 Mon Sep 17 00:00:00 2001 From: Alan Coopersmith Date: Sun, 27 Jan 2013 23:55:35 -0800 Subject: [PATCH:libxtrans 2/2] Create public listener management API to replace undocumented TRANS(NoListen) Allows enabling or disabling listening on a given transport type, and querying current listening status. Provides functions to operate on aliases and sets of transport types, including "all", "all-local", and "all-remote". Maintains backwards compatibility with TRANS(NoListen). Bumps xtrans version to 1.3.99.0 to allow other packages to depend on new APIs via pkg-config version checks. Signed-off-by: Alan Coopersmith --- COPYING | 3 +- Xtrans.c | 182 ++++++++++++++++++++++++++++++++++++++++++++++++++------ Xtrans.h | 39 ++++++++++++ configure.ac | 2 +- doc/xtrans.xml | 176 +++++++++++++++++++++++++++++++++++++++++++++++++++++- 5 files changed, 382 insertions(+), 20 deletions(-) diff --git a/COPYING b/COPYING index d2dbc2c..820f517 100644 --- a/COPYING +++ b/COPYING @@ -48,7 +48,8 @@ CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ______________________________________________________________________________ -Copyright (c) 2002, 2005, Oracle and/or its affiliates. All rights reserved. +Copyright (c) 2002, 2005, 2013, Oracle and/or its affiliates. +All rights reserved. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), diff --git a/Xtrans.c b/Xtrans.c index 7c7967f..ac3e8af 100644 --- a/Xtrans.c +++ b/Xtrans.c @@ -47,6 +47,30 @@ from The Open Group. * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ +/* + * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. + * + * 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 (including the next + * paragraph) 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 /* @@ -737,38 +761,162 @@ TRANS(SetOption) (XtransConnInfo ciptr, int option, int arg) #ifdef TRANS_SERVER int +TRANS(ForEachTransport)(const char *filter, TransportCallbackProc call, + void *closure) + +{ + enum { NO_SET = 0, ALL, ALL_REMOTE, ALL_LOCAL } set = NO_SET; + int ret = 0; + int i; + Xtransport *trans; + + /* Accept "all", "all-remote", and "all-local" as aliases for the + sets of all transports, all without TRANS_LOCAL set in flags, + and all with TRANS_LOCAL set in flags */ + if (strcmp(filter, "all") == 0) + set = ALL; + else if (strcmp(filter, "all-remote") == 0) + set = ALL_REMOTE; + else if (strcmp(filter, "all-local") == 0) + set = ALL_LOCAL; + /* Accept "all-sets" as a special keyword to get a list of the aliases + for the sets of transports */ + else if (strcmp(filter, "all-sets") == 0) + { + ret |= call("all", closure); + ret |= call("all-local", closure); + ret |= call("all-remote", closure); + return ret; + } + else + { + if ((trans = TRANS(SelectTransport)(filter)) == NULL) + { + prmsg (1,"TransForEachTransport: unable to find transport: %s\n", + filter); + return -1; + } + if (trans->flags & TRANS_ALIAS) { + if (trans->nolisten) { + for (i = 0; trans->nolisten[i] != NULL; i++) { + ret |= call(trans->nolisten[i], closure); + } + } + } + ret |= call(trans->TransName, closure); + return ret; + } + + for (i = 0; i < NUMTRANS; i++) + { + trans = Xtransports[i].transport; + /* filter out non-matching transports, then fall through + to callback for the rest */ + switch (set) { + case NO_SET: + /* shouldn't be possible, but gcc warns if case is not handled */ + return -1; + case ALL: + /* always fall through to callback */ + break; + case ALL_REMOTE: + if ((trans->flags & TRANS_LOCAL) != 0) + continue; /* Skip local */ + break; + case ALL_LOCAL: + if ((trans->flags & TRANS_LOCAL) == 0) + continue; /* Skip non-local */ + break; + } + ret |= call(trans->TransName, closure); + } + return ret; +} + +int TRANS(CreateListener) (XtransConnInfo ciptr, char *port, unsigned int flags) { return ciptr->transptr->CreateListener (ciptr, port, flags); } +/* maintained for backwards compatibility */ int TRANS(NoListen) (const char * protocol) { - Xtransport *trans; - int i = 0, ret = 0; + int enabled = False; + return TRANS(ForEachTransport)(protocol, TRANS(SetListenProc), &enabled); +} - if ((trans = TRANS(SelectTransport)(protocol)) == NULL) - { - prmsg (1,"TransNoListen: unable to find transport: %s\n", - protocol); +/* Suitable for passing to ForEachTransport */ +int +TRANS(SetListenProc) (const char * protocol, void *closure) + +{ + return TRANS(SetListen) (protocol, *(int *) closure); +} + +int +TRANS(SetListen) (const char * protocol, Bool enabled) + +{ + Xtransport *trans; + + prmsg (2, "SetListen(%s, %s)\n", protocol, enabled ? "True" : "False"); + if ((trans = TRANS(SelectTransport)(protocol)) == NULL) + { + prmsg (1, "TransSetListen: unable to find transport: %s\n", protocol); return -1; - } - if (trans->flags & TRANS_ALIAS) { - if (trans->nolisten) - while (trans->nolisten[i]) { - ret |= TRANS(NoListen)(trans->nolisten[i]); - i++; - } - } - - trans->flags |= TRANS_NOLISTEN; - return ret; + } + + if (enabled) + trans->flags &= ~TRANS_NOLISTEN; + else + trans->flags |= TRANS_NOLISTEN; + return 0; } +Bool +TRANS(GetListen) (const char * protocol) + +{ + Xtransport *trans; + + prmsg (2, "GetListen(%s)\n", protocol); + + if ((trans = TRANS(SelectTransport)(protocol)) == NULL) + { + prmsg (1, "TransGetListen: unable to find transport: %s\n", protocol); + return -1; + } + + return (trans->flags & TRANS_NOLISTEN) ? False : True; +} + +const char ** +TRANS(GetListenAliases) (const char * protocol) + +{ + Xtransport *trans; + + prmsg (2, "GetListenAliases(%s)\n", protocol); + + if ((trans = TRANS(SelectTransport)(protocol)) == NULL) + { + prmsg (1, "TransGetListenAliases: unable to find transport: %s\n", + protocol); + return NULL; + } + + if (trans->flags & TRANS_ALIAS) + return trans->nolisten; + else + return NULL; +} + + int TRANS(ResetListener) (XtransConnInfo ciptr) diff --git a/Xtrans.h b/Xtrans.h index 53b8b62..d174421 100644 --- a/Xtrans.h +++ b/Xtrans.h @@ -57,6 +57,16 @@ from The Open Group. #include #endif +#ifndef Bool +#define Bool int +#endif +#ifndef True +#define True 1 +#endif +#ifndef False +#define False 0 +#endif + #ifdef __clang__ /* Not all clients make use of all provided statics */ #pragma clang diagnostic push @@ -295,6 +305,17 @@ int TRANS(SetOption)( int /* arg */ ); +typedef int (*TransportCallbackProc)( + const char * /* transport name */, + void * /* closure */ +); + +_X_HIDDEN int TRANS(ForEachTransport)( + const char * /* filter */, + TransportCallbackProc /* call */, + void * /* closure */ +); + #ifdef TRANS_SERVER int TRANS(CreateListener)( @@ -307,6 +328,24 @@ int TRANS(NoListen) ( const char* /* protocol*/ ); +_X_HIDDEN int TRANS(SetListen) ( + const char *, /* protocol */ + Bool /* enabled */ +); + +_X_HIDDEN int TRANS(SetListenProc) ( + const char *, /* protocol */ + void * /* closure - pointer to int enabled value */ +); + +_X_HIDDEN Bool TRANS(GetListen) ( + const char * /* protocol */ +); + +_X_HIDDEN const char ** TRANS(GetListenAliases) ( + const char * /* protocol */ +); + int TRANS(ResetListener)( XtransConnInfo /* ciptr */ ); diff --git a/configure.ac b/configure.ac index 8c3aa3d..137370a 100644 --- a/configure.ac +++ b/configure.ac @@ -21,7 +21,7 @@ # Initialize Autoconf AC_PREREQ([2.60]) -AC_INIT([xtrans], [1.3.0], +AC_INIT([xtrans], [1.3.99.0], [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], [xtrans]) AC_CONFIG_SRCDIR([Makefile.am]) diff --git a/doc/xtrans.xml b/doc/xtrans.xml index d9dba6a..75af9bb 100644 --- a/doc/xtrans.xml +++ b/doc/xtrans.xml @@ -24,7 +24,7 @@ X Version 11, Release &fullrelvers; - Version 1.2 + Version 1.3 19931994 NCR Corporation - Dayton, Ohio, USA @@ -88,6 +88,33 @@ in this Software without prior written authorization from The Open Group. X Window System is a trademark of The Open Group, Inc. + + +Copyright © 2013, Oracle and/or its affiliates. All rights reserved. + + +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 (including the next +paragraph) 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. + + The X Transport Interface @@ -750,6 +777,70 @@ the number of transports returned, and connections_ret is the list of transports. + + + + Bool TRANS(GetListen) + const char *protocol + + + +(Introduced in Xtrans 1.3.) +This function returns whether or not a transport protocol is enabled in the +transport table used for future calls to +TRANS(MakeAllCOTSServerListeners) +or TRANS(MakeAllCLTSServerListeners). + + +Since transports with TRANS_ALIAS set may alias to multiple +underlying transports, this function will not work with them. Callers +will instead need to either use TRANS(GetListenAliases) +to get the aliased list of transports to check individually, or use +TRANS(ForEachTransport) to iterate over the alias list. + + + + + + int TRANS(SetListen) + const char *protocol + Bool enabled + + + +(Introduced in Xtrans 1.3.) +This function enables or disables a transport protocol in the transport table +used for future calls to TRANS(MakeAllCOTSServerListeners) +or TRANS(MakeAllCLTSServerListeners), by setting or +clearing the TRANS_NOLISTEN flag. It does not affect +existing open listening connections. All known transport protocols currently +default to enabled. + + +Since transports with TRANS_ALIAS set may alias to multiple +underlying transports, this function will not work with them. Callers +will instead need to either use TRANS(GetListenAliases) +to get the aliased list of transports to set individually, or use +TRANS(ForEachTransport) to iterate over the alias list. + + + + + + const char ** TRANS(GetListenAliases) + const char *protocol + + + +(Introduced in Xtrans 1.3.) +If protocol names a transport alias (a transport with +TRANS_ALIAS set), this function returns a NULL terminated list of transports +that it aliases to, such as { "inet", "inet6", NULL } for +"tcp" If protocol is unrecognized +or matches a transport without TRANS_ALIAS set, NULL is +returned. + + @@ -777,6 +868,89 @@ protocol definition (ie FamilyInternet, FamilyLocal)). + + + + int TRANS(ForEachTransport) + const char *filter + TransportCallbackProc call + void *closure + + + typedef int (*TransportCallbackProc) + const char *transport + void *closure + + + +(Introduced in Xtrans 1.3.) +This function calls call once for each transport type, +matching the specified filter, passing the transport +name and closure. The filter +may be any recognized transport name, transport alias, or one of the +following special filter set names: + + + + + + + Filter + Description + + + + + all + All available transport types + + + all-local + All available local transport types, i.e. only allowing connection to the same host, as determined by the TRANS_LOCAL flag. + + + all-remote + All available remote transport types, allowing connections over networks to other hosts, as determined by lack of the TRANS_LOCAL flag. + + + all-sets + Instead of transports, calls call once + for each name which can be passed to the filter + argument, except for itself. Currently iterates over the list + { "all", "all-local", "all-remote" }. + + + + + + + + + + int TRANS(SetListenProc) + const char *protocol + void *closure + + + +(Introduced in Xtrans 1.3.) +This function can be used with TRANS(ForEachTransport) +to call TRANS(SetListen) for each transport matching a +filter or alias. The closure must be a pointer to +an int containing the value to be passed as the +enabled to TRANS(SetListen). + + +For instance, to implement a --nolisten +option to a command, you could do: + +int enable = False; + +if (_XSERVTransForEachTransport(argv[i], TRANS(SetListenProc), &enable)) + fprintf(stderr, "Failed to disable listening on transport %s", argv[i]); + + + -- 1.7.9.2 -------------- next part -------------- From b809f1e22dc10c205ef65b036e25ef3fdc5d6ced Mon Sep 17 00:00:00 2001 From: Alan Coopersmith Date: Tue, 23 Sep 2014 23:26:55 -0700 Subject: [PATCH 3/3] WIP draft of -listen flag support for xserer Signed-off-by: Alan Coopersmith --- configure.ac | 2 +- man/Xserver.man | 7 +++++++ os/connection.c | 52 +++++++++++++++++++++++++++++++++++++++++++++ os/utils.c | 63 ++++++++++++++++++++++++++++++++++++++++++++++++++----- 4 files changed, 118 insertions(+), 6 deletions(-) diff --git a/configure.ac b/configure.ac index 435a38f..f595366 100644 --- a/configure.ac +++ b/configure.ac @@ -795,7 +795,7 @@ FIXESPROTO="fixesproto >= 5.0" DAMAGEPROTO="damageproto >= 1.1" XCMISCPROTO="xcmiscproto >= 1.2.0" BIGREQSPROTO="bigreqsproto >= 1.1.0" -XTRANS="xtrans >= 1.2.2" +XTRANS="xtrans >= 1.2.99" dnl List of libraries that require a specific version LIBAPPLEWM="applewm >= 1.4" diff --git a/man/Xserver.man b/man/Xserver.man index b103551..e5bef49 100644 --- a/man/Xserver.man +++ b/man/Xserver.man @@ -189,6 +189,13 @@ MB. .B \-nocursor disable the display of the pointer cursor. .TP 8 +.B \-listen \fItrans-type\fP +enables a transport type. This option may be issued multiple times to enable +listening to different transport types. If both -listen & -nolisten flags +are specified, they accumulate in left-to-right order. A special trans-type +name of "help" may be used to print a list of all known transport type names +(including aliases to other types). +.TP 8 .B \-nolisten \fItrans-type\fP disables a transport type. For example, TCP/IP connections can be disabled with diff --git a/os/connection.c b/os/connection.c index 6cd8bcf..5d343b7 100644 --- a/os/connection.c +++ b/os/connection.c @@ -378,6 +378,37 @@ TryCreateSocket(int num, int *partial) &ListenTransConns) >= 0); } +/* Callback for routine to get list of enabled & disabled transports */ +struct listen_entry { + const char *transport_name; + struct xorg_list entry; +}; + +struct listen_states { + struct xorg_list enabled_list; + struct xorg_list disabled_list; +}; + +static int +GetListenState (const char * protocol, void *closure) +{ + Bool enabled = _XSERVTransGetListen(protocol); + struct listen_states *states = (struct listen_states *) closure; + struct listen_entry *new_entry; + + BUG_RETURN_VAL(enabled == -1, -1); + + new_entry = malloc(sizeof(struct listen_entry)); + BUG_RETURN_VAL(new_entry == NULL, -1); + + new_entry->transport_name = protocol; + if (enabled) + xorg_list_add(&new_entry->entry, &states->enabled_list); + else + xorg_list_add(&new_entry->entry, &states->disabled_list); + return 0; +} + /***************** * CreateWellKnownSockets * At initialization, create the sockets to listen on for new clients. @@ -388,6 +419,8 @@ CreateWellKnownSockets(void) { int i; int partial; + struct listen_states states; + struct listen_entry *iterator, *next; FD_ZERO(&AllSockets); FD_ZERO(&AllClients); @@ -403,6 +436,25 @@ CreateWellKnownSockets(void) FD_ZERO(&WellKnownConnections); + /* Log list of enabled & disabled transports */ + xorg_list_init(&states.enabled_list); + xorg_list_init(&states.disabled_list); + _XSERVTransForEachTransport("all", GetListenState, &states); + LogMessageVerb(X_NOTICE, 3, "Opening listening connections on:"); + xorg_list_for_each_entry_safe(iterator, next, &states.enabled_list, entry) { + LogMessageVerb(X_NONE, 3, " %s", iterator->transport_name); + xorg_list_del(&iterator->entry); + free(iterator); + } + LogMessageVerb(X_NONE, 3, "\n"); + LogMessageVerb(X_NOTICE, 3, "Listening disabled on:"); + xorg_list_for_each_entry_safe(iterator, next, &states.disabled_list, entry) { + LogMessageVerb(X_NONE, 3, " %s", iterator->transport_name); + xorg_list_del(&iterator->entry); + free(iterator); + } + LogMessageVerb(X_NONE, 3, "\n"); + /* display is initialized to "0" by main(). It is then set to the display * number if specified on the command line, or to NULL when the -displayfd * option is used. */ diff --git a/os/utils.c b/os/utils.c index e396ba4..1aa1ba6 100644 --- a/os/utils.c +++ b/os/utils.c @@ -485,6 +485,47 @@ AdjustWaitForDelay(pointer waitTime, unsigned long newdelay) } } +static int +PrintListeners (const char * protocol, _X_UNUSED void *closure) +{ + const char **aliases = _XSERVTransGetListenAliases(protocol); + + if (aliases == NULL) { /* Not an alias */ + Bool enabled = _XSERVTransGetListen(protocol); + BUG_RETURN_VAL(enabled == -1, -1); + + ErrorF(" - %s (%s)\n", protocol, enabled ? "enabled" : "disabled"); + } else { + int i; + + ErrorF(" - %s (alias for:", protocol); + for (i = 0; aliases[i] != NULL; i++) { + ErrorF("%s %s", (i > 0) ? "," : "", aliases[i]); + } + ErrorF(")\n"); + } + return 0; +} + +static int +PrintTransport (const char * protocol, _X_UNUSED void *closure) +{ + int *count = (int *) closure; + ErrorF("%s %s", (*count > 0) ? "," : "", protocol); + *count += 1; + return 0; +} + +static int +PrintTransportSet (const char *set, _X_UNUSED void *closure) +{ + int count = 0; + ErrorF(" - %s (alias for:", set); + _XSERVTransForEachTransport(set, PrintTransport, &count); + ErrorF(")\n"); + return 0; +} + void UseMsg(void) { @@ -522,10 +563,11 @@ UseMsg(void) #ifdef RLIMIT_STACK ErrorF("-ls int limit stack space to N Kb\n"); #endif + ErrorF("-listen string enable listening on protocol\n"); + ErrorF("-nolisten string disable listening on protocol\n"); #ifdef LOCK_SERVER ErrorF("-nolock disable the locking mechanism\n"); #endif - ErrorF("-nolisten string don't listen on protocol\n"); ErrorF("-noreset don't reset after last client exists\n"); ErrorF("-background [none] create root window with no background\n"); ErrorF("-reset reset after last client exists\n"); @@ -778,11 +820,22 @@ ProcessCommandLine(int argc, char *argv[]) nolock = TRUE; } #endif - else if (strcmp(argv[i], "-nolisten") == 0) { + else if ((strcmp(argv[i], "-listen") == 0) || + (strcmp(argv[i], "-nolisten") == 0)) { + int enable = (strcmp(argv[i], "-listen") == 0) ? True : False; + if (++i < argc) { - if (_XSERVTransNoListen(argv[i])) - ErrorF("Failed to disable listen for %s transport", - argv[i]); + if (strcmp(argv[i], "help") == 0) { + ErrorF("Transports available to listen on:\n"); + _XSERVTransForEachTransport("all", PrintListeners, NULL); + _XSERVTransForEachTransport("all-sets", PrintTransportSet, NULL); + exit(0); + } + + if (_XSERVTransForEachTransport( + argv[i], _XSERVTransSetListenProc, &enable)) + ErrorF("Failed to %s listening on transport %s", + enable ? "enable" : "disable", argv[i]); } else UseMsg(); -- 1.7.9.2 From chris at chris-wilson.co.uk Tue Sep 23 23:46:53 2014 From: chris at chris-wilson.co.uk (Chris Wilson) Date: Wed, 24 Sep 2014 07:46:53 +0100 Subject: [PATCH driver/intel] Allow copy_front() to fail and clean up gracefully if it does In-Reply-To: <1411539479-7946-1-git-send-email-eich@freedesktop.org> References: <1411539479-7946-1-git-send-email-eich@freedesktop.org> Message-ID: <20140924064653.GL8727@nuc-i3427.alporthouse.com> On Wed, Sep 24, 2014 at 08:17:59AM +0200, Egbert Eich wrote: > From: Egbert Eich > > copy_front() calls sna_pixmap_force_to_gpu() which may fail. If we pretend > to have been successful and continue the caller sna_mode_resize() may finish > successfully pretending a mode change has succeeded which might leave a mode > behind which is unusable. Show me the actual bug. If the copy fails, the new framebuffer contents are just left uninitialised (normal X behaviour) until they get "immediately" redrawn. The subsequent modeset does not depend upon the screen Pixmap fitting into GPU memory, but that it can fit individual CRTC into the GTT. -Chris -- Chris Wilson, Intel Open Source Technology Centre From chris at chris-wilson.co.uk Wed Sep 24 00:02:03 2014 From: chris at chris-wilson.co.uk (Chris Wilson) Date: Wed, 24 Sep 2014 08:02:03 +0100 Subject: [PATCH] uxa/video: only call intel_xvmc_adaptor_init when xvmc is enabled In-Reply-To: <1411495991-18081-1-git-send-email-tjakobi@math.uni-bielefeld.de> References: <1411495991-18081-1-git-send-email-tjakobi@math.uni-bielefeld.de> Message-ID: <20140924070203.GM8727@nuc-i3427.alporthouse.com> On Tue, Sep 23, 2014 at 08:13:11PM +0200, tobias.jakobi1 at uni-bielefeld.de wrote: > Signed-off-by: Tobias Jakobi Thank you, I had stumbled across it but had forgotten to send the fix. Pushed, -Chris -- Chris Wilson, Intel Open Source Technology Centre From chris at chris-wilson.co.uk Wed Sep 24 00:08:46 2014 From: chris at chris-wilson.co.uk (Chris Wilson) Date: Wed, 24 Sep 2014 08:08:46 +0100 Subject: [PATCH driver/intel] In sna_pixmap_alloc_gpu() process user selected tiling thru kgem_choose_tiling() In-Reply-To: <1411539512-7988-1-git-send-email-eich@freedesktop.org> References: <1411539512-7988-1-git-send-email-eich@freedesktop.org> Message-ID: <20140924070846.GA23098@nuc-i3427.alporthouse.com> On Wed, Sep 24, 2014 at 08:18:32AM +0200, Egbert Eich wrote: > From: Egbert Eich > > In sna_pixmap_alloc_gpu() a different than the default tiling may be picked > by a usage hint. Before passing the tiling to kgem_create_2d() fix it up > by calling kgem_choose_tiling(). This avoids kgem_surface_size() not being able > to find a surface size for the tiling value. > > Signed-off-by: Egbert Eich Tweaked the commit log and pushed: commit dbe6d105a60ff28419b549d439bbb29f50b28f08 Author: Egbert Eich Date: Wed Sep 24 08:18:32 2014 +0200 sna: Validate framebuffer tiling before creation In sna_pixmap_alloc_gpu() a different than the default tiling may be picked by a usage hint. Before passing the tiling to kgem_create_2d() fix it up by calling kgem_choose_tiling(). This avoids kgem_surface_size() not being a to find a surface size for the tiling value. Fixes regression from commit a10781b70f222f3997928fa979f6292617f79316 [2.99.913] Author: Chris Wilson Date: Tue Jul 1 15:11:07 2014 +0100 sna: Enforce LinearFramebuffer option Signed-off-by: Egbert Eich -- Chris Wilson, Intel Open Source Technology Centre From michel at daenzer.net Wed Sep 24 00:48:10 2014 From: michel at daenzer.net (=?UTF-8?q?Michel=20D=C3=A4nzer?=) Date: Wed, 24 Sep 2014 16:48:10 +0900 Subject: [PATCH] glamor: Fix leak of converted_bits in _glamor_upload_bits_to_pixmap_texture Message-ID: <1411544890-20372-1-git-send-email-michel@daenzer.net> From: Michel D?nzer ==9530== 808,575,600 bytes in 5,904 blocks are definitely lost in loss record 4,602 of 4,602 ==9530== at 0x4C28C20: malloc (vg_replace_malloc.c:296) ==9530== by 0xAD29C98: _glamor_upload_bits_to_pixmap_texture (glamor_pixmap.c:771) ==9530== by 0xAD2AE95: glamor_upload_sub_pixmap_to_texture (glamor_pixmap.c:1031) ==9530== by 0xAD2BD55: glamor_upload_pixmap_to_texture (glamor_pixmap.c:1057) ==9530== by 0xAD1C2E6: glamor_composite_choose_shader (glamor_render.c:1025) ==9530== by 0xAD1C629: glamor_composite_with_shader (glamor_render.c:1174) ==9530== by 0xAD1DA77: glamor_composite_clipped_region (glamor_render.c:1542) ==9530== by 0xAD1E849: _glamor_composite (glamor_render.c:1689) ==9530== by 0xAD1ED90: glamor_composite (glamor_render.c:1758) ==9530== by 0x519FD6: damageComposite (damage.c:502) ==9530== by 0xAD27AA3: glamor_trapezoids (glamor_trapezoid.c:147) ==9530== by 0xAD27B51: glamor_trapezoids (glamor_trapezoid.c:101) Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=84176 Signed-off-by: Michel D?nzer --- Maybe more could be done per the XXX comment in that function? glamor/glamor_pixmap.c | 1 + 1 file changed, 1 insertion(+) diff --git a/glamor/glamor_pixmap.c b/glamor/glamor_pixmap.c index 11e9ebb..355fe4b 100644 --- a/glamor/glamor_pixmap.c +++ b/glamor/glamor_pixmap.c @@ -774,6 +774,7 @@ _glamor_upload_bits_to_pixmap_texture(PixmapPtr pixmap, GLenum format, return FALSE; bits = glamor_color_convert_to_bits(bits, converted_bits, w, h, stride, no_alpha, revert, swap_rb); + free(converted_bits); if (bits == NULL) { ErrorF("Failed to convert pixmap no_alpha %d," "revert mode %d, swap mode %d\n", no_alpha, revert, swap_rb); -- 2.1.1 From thellstrom at vmware.com Wed Sep 24 02:12:50 2014 From: thellstrom at vmware.com (Thomas Hellstrom) Date: Wed, 24 Sep 2014 11:12:50 +0200 Subject: vmmouse kernel driver Message-ID: <54228B12.30201@vmware.com> Hi! While looking at a vmmouse kernel driver, I wonder how the Xorg evdev driver can be configured to receive both absolute and relative events from the same device as the vmmouse sometimes sends absolute events and sometimes relative. Is the "IgnoreAbsoluteAxes" "False" option sufficient? Thanks, Thomas From eich at freedesktop.org Wed Sep 24 03:34:29 2014 From: eich at freedesktop.org (Egbert Eich) Date: Wed, 24 Sep 2014 12:34:29 +0200 Subject: [PATCH driver/intel] Allow copy_front() to fail and clean up gracefully if it does In-Reply-To: chris@chris-wilson.co.uk wrote on Wednesday, 24 September 2014 at 07:46:53 +0100 References: <1411539479-7946-1-git-send-email-eich@freedesktop.org> <20140924064653.GL8727@nuc-i3427.alporthouse.com> Message-ID: <21538.40501.536981.986719@linux-qknr.fritz.box> Chris Wilson writes: > On Wed, Sep 24, 2014 at 08:17:59AM +0200, Egbert Eich wrote: > > From: Egbert Eich > > > > copy_front() calls sna_pixmap_force_to_gpu() which may fail. If we pretend > > to have been successful and continue the caller sna_mode_resize() may finish > > successfully pretending a mode change has succeeded which might leave a mode > > behind which is unusable. > > Show me the actual bug. If the copy fails, the new framebuffer contents > are just left uninitialised (normal X behaviour) until they get > "immediately" redrawn. The subsequent modeset does not depend upon the screen > Pixmap fitting into GPU memory, but that it can fit individual CRTC into > the GTT. Then the mode should have failed somewhere else maybe. The underlying issue of the problem was fixed by the other patch I have sent today. This problem caused kgem_surface_size() to return NULL and thus kgem_create_2d() and ulitmately sna_pixmap_force_to_gpu() to fail. With the the other fix applied kgem_surface_size() doesn't fail any longer for my test case - still it may fail for other reasons. Here is the test scenario: Pineview Chipset, start a bare X server (without the other patch applied to the driver), start xterm on it. On my system 'xrandr -q' gives: Screen 0: minimum 8 x 8, current 1366 x 768, maximum 32767 x 32767 LVDS1 connected 1366x768+0+0 (normal left inverted right x axis y axis) 222mm x 125mm 1366x768 60.0*+ 1024x768 60.0 800x600 60.3 56.2 640x480 59.9 VGA1 disconnected (normal left inverted right x axis y axis) VIRTUAL1 disconnected (normal left inverted right x axis y axis) now run 'xrandr --output LVDS1 --panning 3048x768' (or whatever other output it uses). Without the other patch applied kgem_surface_size() fails, without *both* patches applied the mode set succeeds and 'xandr -q' now gives: Screen 0: minimum 8 x 8, current 3048 x 768, maximum 32767 x 32767 LVDS1 connected 3048x768+0+0 (normal left inverted right x axis y axis) 222mm x 125mm panning 3048x768+0+0 1366x768 60.0*+ 1024x768 60.0 800x600 60.3 56.2 640x480 59.9 VGA1 disconnected (normal left inverted right x axis y axis) VIRTUAL1 disconnected (normal left inverted right x axis y axis) Observation 1: Screen doesn't pan: when moving the cursor to the right edge, screen and cursor become out of sync, screen content doesnt get update ie. starting a new application (like xclock) succeeds but nothing is drawn). Observation 2: Terminating xterm makes the server reset which fails with intel(0): [intel] Failed to allocate video resources for front buffer 3048x768 at depth 24 in sna_create_screen_resources() due to sna_pixmap_force_to_gpu() failing. The reason for the failure is the same as described above. As I said: these failures go away with the other patch I posted today and which you OKed and the code in this patch is no longer triggered. Still there are other conditions under which kgem_surface_size() may return 0. For panning one needs to be able to draw into the screen pixmap outside of the area exposed by the crtc. Cheers, Egbert. From chris at chris-wilson.co.uk Wed Sep 24 04:03:27 2014 From: chris at chris-wilson.co.uk (Chris Wilson) Date: Wed, 24 Sep 2014 12:03:27 +0100 Subject: [PATCH driver/intel] Allow copy_front() to fail and clean up gracefully if it does In-Reply-To: <21538.40501.536981.986719@linux-qknr.fritz.box> References: <1411539479-7946-1-git-send-email-eich@freedesktop.org> <20140924064653.GL8727@nuc-i3427.alporthouse.com> <21538.40501.536981.986719@linux-qknr.fritz.box> Message-ID: <20140924110327.GI23098@nuc-i3427.alporthouse.com> On Wed, Sep 24, 2014 at 12:34:29PM +0200, Egbert Eich wrote: > Here is the test scenario: > > Pineview Chipset, start a bare X server (without the other patch applied > to the driver), start xterm on it. > > On my system 'xrandr -q' gives: > > Screen 0: minimum 8 x 8, current 1366 x 768, maximum 32767 x 32767 > LVDS1 connected 1366x768+0+0 (normal left inverted right x axis y axis) 222mm x 125mm > 1366x768 60.0*+ > 1024x768 60.0 > 800x600 60.3 56.2 > 640x480 59.9 > VGA1 disconnected (normal left inverted right x axis y axis) > VIRTUAL1 disconnected (normal left inverted right x axis y axis) > > now run 'xrandr --output LVDS1 --panning 3048x768' (or whatever > other output it uses). > > For panning one needs to be able to draw into the screen pixmap outside > of the area exposed by the crtc. Note that the screen pixmap still exists and is drawn into by the clients. What should happen with the panning is that the CRTC is updated through set_mode_major which invalidates the new CRTC location in the big screen Pixmap and the contents copied during the next shadow update. That's the theory at least... -Chris -- Chris Wilson, Intel Open Source Technology Centre From eich at suse.com Wed Sep 24 04:23:26 2014 From: eich at suse.com (Egbert Eich) Date: Wed, 24 Sep 2014 13:23:26 +0200 Subject: [PATCH driver/intel] Allow copy_front() to fail and clean up gracefully if it does In-Reply-To: chris@chris-wilson.co.uk wrote on Wednesday, 24 September 2014 at 12:03:27 +0100 References: <1411539479-7946-1-git-send-email-eich@freedesktop.org> <20140924064653.GL8727@nuc-i3427.alporthouse.com> <21538.40501.536981.986719@linux-qknr.fritz.box> <20140924110327.GI23098@nuc-i3427.alporthouse.com> Message-ID: <21538.43438.290116.157288@linux-qknr.fritz.box> Chris Wilson writes: > On Wed, Sep 24, 2014 at 12:34:29PM +0200, Egbert Eich wrote: > > > > For panning one needs to be able to draw into the screen pixmap outside > > of the area exposed by the crtc. > > Note that the screen pixmap still exists and is drawn into by the > clients. What should happen with the panning is that the CRTC is updated > through set_mode_major which invalidates the new CRTC location in the big > screen Pixmap and the contents copied during the next shadow update. > > That's the theory at least... Ok, so this isn't working. I will look into this as it's easy for me to trigger this situation. But this still doesn't address the failing sna_create_screen_resources(). Cheers, Egbert. From chris at chris-wilson.co.uk Wed Sep 24 04:29:37 2014 From: chris at chris-wilson.co.uk (Chris Wilson) Date: Wed, 24 Sep 2014 12:29:37 +0100 Subject: [PATCH driver/intel] Allow copy_front() to fail and clean up gracefully if it does In-Reply-To: <21538.43438.290116.157288@linux-qknr.fritz.box> References: <1411539479-7946-1-git-send-email-eich@freedesktop.org> <20140924064653.GL8727@nuc-i3427.alporthouse.com> <21538.40501.536981.986719@linux-qknr.fritz.box> <20140924110327.GI23098@nuc-i3427.alporthouse.com> <21538.43438.290116.157288@linux-qknr.fritz.box> Message-ID: <20140924112937.GJ23098@nuc-i3427.alporthouse.com> On Wed, Sep 24, 2014 at 01:23:26PM +0200, Egbert Eich wrote: > Chris Wilson writes: > > On Wed, Sep 24, 2014 at 12:34:29PM +0200, Egbert Eich wrote: > > > > > > For panning one needs to be able to draw into the screen pixmap outside > > > of the area exposed by the crtc. > > > > Note that the screen pixmap still exists and is drawn into by the > > clients. What should happen with the panning is that the CRTC is updated > > through set_mode_major which invalidates the new CRTC location in the big > > screen Pixmap and the contents copied during the next shadow update. > > > > That's the theory at least... > > Ok, so this isn't working. I will look into this as it's easy for me > to trigger this situation. > But this still doesn't address the failing sna_create_screen_resources(). Could you send me a --enable-debug=full logfile for that case? -Chris -- Chris Wilson, Intel Open Source Technology Centre From chris at chris-wilson.co.uk Wed Sep 24 06:24:12 2014 From: chris at chris-wilson.co.uk (Chris Wilson) Date: Wed, 24 Sep 2014 14:24:12 +0100 Subject: [PATCH driver/intel] Allow copy_front() to fail and clean up gracefully if it does In-Reply-To: <21538.43438.290116.157288@linux-qknr.fritz.box> References: <1411539479-7946-1-git-send-email-eich@freedesktop.org> <20140924064653.GL8727@nuc-i3427.alporthouse.com> <21538.40501.536981.986719@linux-qknr.fritz.box> <20140924110327.GI23098@nuc-i3427.alporthouse.com> <21538.43438.290116.157288@linux-qknr.fritz.box> Message-ID: <20140924132412.GB30278@nuc-i3427.alporthouse.com> On Wed, Sep 24, 2014 at 01:23:26PM +0200, Egbert Eich wrote: > Chris Wilson writes: > > On Wed, Sep 24, 2014 at 12:34:29PM +0200, Egbert Eich wrote: > > > > > > For panning one needs to be able to draw into the screen pixmap outside > > > of the area exposed by the crtc. > > > > Note that the screen pixmap still exists and is drawn into by the > > clients. What should happen with the panning is that the CRTC is updated > > through set_mode_major which invalidates the new CRTC location in the big > > screen Pixmap and the contents copied during the next shadow update. > > > > That's the theory at least... > > Ok, so this isn't working. I will look into this as it's easy for me > to trigger this situation. Are you using an OpenGL compositor? So far bare X, awesome, dwm, enlightenment and kwin/xrender behave correctly. But gnome-shell and kwin/gl are broken, which is not an issue with the ddx. -Chris -- Chris Wilson, Intel Open Source Technology Centre From jon.turney at dronecode.org.uk Wed Sep 24 07:12:43 2014 From: jon.turney at dronecode.org.uk (Jon TURNEY) Date: Wed, 24 Sep 2014 15:12:43 +0100 Subject: [PULL] hw/xwin X11 <-> Windows clipboard integration refactoring Message-ID: <20140924141240.GA5712@tambora> Hi Keith, This is a refactoring of the X11 <-> Windows clipboard integration code, which cleans up some cruft, makes it straightforward to build it correctly for 64-bit targets by undefining _XSERVER64, and perhaps paves the way to moving this code into a separate library. Please consider pulling into master. Thanks. The following changes since commit d3427717f2c6a473dc3d20631dff653e4e37228e: xwayland: Snap damage reports to the bounding box (2014-09-11 23:40:30 -0600) are available in the git repository at: git://people.freedesktop.org/~jturney/xserver xwin-clipboard-refactoring for you to fetch changes up to 1d6334dd0ca99923b6b55c5c047ef6b5c325f66c: hw/xwin: Undefine _XSERVER64 in hw/xwin/winclipboard (2014-09-13 14:19:06 +0100) ---------------------------------------------------------------- Jon TURNEY (30): hw/xwin: Remove left-over pthread_exit() in clipboard code hw/xwin: Push winClipboardShutdown() into winclipboardinit.c hw/xwin: Hoist clipboard thread restart up one level hw/xwin: winProcEstablishConnection doesn't need to check if clipboard started hw/xwin: Hoist setting of g_fClipboardStarted flag up one level hw/xwin: Remove g_fClipboardLaunched, it's value is identical to g_fClipboardStarted hw/xwin: Remove SetSelectionOwner wrapper, use XFixesSetSelectionOwnerNotify event instead hw/xwin: Move winClipboardCreateMessagingWindow() to winclipboardthread.c hw/xwin: Eliminate g_pClipboardDisplay and g_iClipboardWindow globals hw/xwin: Hoist use of winSetAuthorization() and winGetDisplayName() up one level hw/xwin: Add remaining clipboard globals to winglobals.h hw/xwin: Make g_hwndClipboard static hw/xwin: Move clipboard integration code down to a subdirectory hw/xwin: Return a shutdown flag from winClipboardProc() if we should stop trying hw/xwin: Separate libwinclipboard interface and internal header files hw/xwin: Add fUseUnicode as parameter to winClipboardProc() hw/xwin: Look up atoms in winClipboardProc() hw/xwin: Changes in error logging to make libwinclipboard more useful as a library hw/xwin: Add xwinclip test client hw/xwin: Remove standard includes from internal.h and add them where needed hw/xwin: Remove unused X includes from internal.h and add them where needed hw/xwin: Use header for prototypes in textconv.c hw/xwin: Move WIN_MSG_QUEUE_FNAME to where it's used hw/xwin: Remove setjmp()/longjmp() error constants hw/xwin: Improve comment about why we can't XCloseDisplay() hw/xwin: Remove XOpenDisplay() retry code hw/xwin: In clipboard function prototypes, use Window type, not int type hw/xwin: Add a basic manpage for xwinclip hw/xwin: Only add to XSetIOErrorHandler() handler chain once hw/xwin: Undefine _XSERVER64 in hw/xwin/winclipboard configure.ac | 3 +- hw/xwin/InitInput.c | 1 - hw/xwin/InitOutput.c | 38 --- hw/xwin/Makefile.am | 15 +- hw/xwin/win.h | 2 +- hw/xwin/winclipboard/Makefile.am | 25 ++ hw/xwin/winclipboard/debug.c | 52 ++++ .../{winclipboard.h => winclipboard/internal.h} | 79 ++---- .../textconv.c} | 18 +- .../thread.c} | 314 +++++++++++---------- hw/xwin/winclipboard/winclipboard.h | 36 +++ .../wndproc.c} | 126 +++++---- .../xevents.c} | 197 +++++++++++-- hw/xwin/winclipboard/xwinclip.c | 127 +++++++++ hw/xwin/winclipboard/xwinclip.man | 61 ++++ hw/xwin/winclipboardinit.c | 150 +++++----- hw/xwin/winclipboardwrappers.c | 226 +-------------- hw/xwin/windialogs.c | 7 - hw/xwin/winglobals.c | 13 - hw/xwin/winglobals.h | 4 +- hw/xwin/winwndproc.c | 3 + 21 files changed, 853 insertions(+), 644 deletions(-) create mode 100644 hw/xwin/winclipboard/Makefile.am create mode 100644 hw/xwin/winclipboard/debug.c rename hw/xwin/{winclipboard.h => winclipboard/internal.h} (63%) rename hw/xwin/{winclipboardtextconv.c => winclipboard/textconv.c} (93%) rename hw/xwin/{winclipboardthread.c => winclipboard/thread.c} (61%) create mode 100644 hw/xwin/winclipboard/winclipboard.h rename hw/xwin/{winclipboardwndproc.c => winclipboard/wndproc.c} (83%) rename hw/xwin/{winclipboardxevents.c => winclipboard/xevents.c} (82%) create mode 100644 hw/xwin/winclipboard/xwinclip.c create mode 100644 hw/xwin/winclipboard/xwinclip.man From jnsptrsn1 at gmail.com Wed Sep 24 12:13:10 2014 From: jnsptrsn1 at gmail.com (Jonas Petersen) Date: Wed, 24 Sep 2014 21:13:10 +0200 Subject: [PATCH libX11] xcb_io: Fix Xlib 32-bit request number issues Message-ID: <1411585990-6423-1-git-send-email-jnsptrsn1@gmail.com> By design, on 32-bit systems, the Xlib internal 32-bit request sequence numbers may wrap. There is some locations within xcb_io.c that are not wrap-safe though. The value of last_flushed relies on request to be sequential all the time. This is not given in the moment when the sequence has just wrapped. Applications may then crash with a "Fatal IO error 11 (Resource temporarily unavailable)". This patch fixes this by "unwrapping" the sequence number when needed to retain the sequence relative to last_flushed. It also contains some additional optimizations. Signed-off-by: Jonas Petersen --- src/Xxcbint.h | 2 +- src/xcb_io.c | 27 +++++++++++++++++++++------ 2 files changed, 22 insertions(+), 7 deletions(-) diff --git a/src/Xxcbint.h b/src/Xxcbint.h index bf41c23..feee775 100644 --- a/src/Xxcbint.h +++ b/src/Xxcbint.h @@ -31,7 +31,7 @@ typedef struct _X11XCBPrivate { char *reply_data; int reply_length; int reply_consumed; - uint64_t last_flushed; + unsigned long last_flushed; enum XEventQueueOwner event_owner; XID next_xid; diff --git a/src/xcb_io.c b/src/xcb_io.c index 5987329..03af1f9 100644 --- a/src/xcb_io.c +++ b/src/xcb_io.c @@ -59,15 +59,19 @@ static void require_socket(Display *dpy) { if(dpy->bufmax == dpy->buffer) { - uint64_t sent; + uint64_t sent64; + unsigned long sent; int flags = 0; /* if we don't own the event queue, we have to ask XCB * to set our errors aside for us. */ if(dpy->xcb->event_owner != XlibOwnsEventQueue) flags = XCB_REQUEST_CHECKED; if(!xcb_take_socket(dpy->xcb->connection, return_socket, dpy, - flags, &sent)) + flags, &sent64)) _XIOError(dpy); + + sent = sent64; + /* Xlib uses unsigned long for sequence numbers. XCB * uses 64-bit internally, but currently exposes an * unsigned int API. If these differ, Xlib cannot track @@ -77,7 +81,7 @@ static void require_socket(Display *dpy) * 64-bit sequence numbers. */ if (sizeof(unsigned long) > sizeof(unsigned int) && dpy->xcb->event_owner == XlibOwnsEventQueue && - (sent - dpy->last_request_read >= (UINT64_C(1) << 32))) { + (long) (sent - dpy->last_request_read) < 0) { throw_thread_fail_assert("Sequence number wrapped " "beyond 32 bits while Xlib " "did not own the socket", @@ -455,7 +459,7 @@ void _XSend(Display *dpy, const char *data, long size) static const xReq dummy_request; static char const pad[3]; struct iovec vec[3]; - uint64_t requests; + uint64_t requests, unwrapped_request; _XExtension *ext; xcb_connection_t *c = dpy->xcb->connection; if(dpy->flags & XlibDisplayIOError) @@ -464,6 +468,13 @@ void _XSend(Display *dpy, const char *data, long size) if(dpy->bufptr == dpy->buffer && !size) return; + unwrapped_request = dpy->request; + /* If there was a sequence number wrap since our last flush, + * make sure the sequence number we use, stays in sequence + * with dpy->xcb->last_flush. */ + if (sizeof(uint64_t) > sizeof(unsigned long) && dpy->request < dpy->xcb->last_flushed) + unwrapped_request += UINT64_C(1) << 32; + /* iff we asked XCB to set aside errors, we must pick those up * eventually. iff there are async handlers, we may have just * issued requests that will generate replies. in either case, @@ -471,10 +482,14 @@ void _XSend(Display *dpy, const char *data, long size) if(dpy->xcb->event_owner != XlibOwnsEventQueue || dpy->async_handlers) { uint64_t sequence; - for(sequence = dpy->xcb->last_flushed + 1; sequence <= dpy->request; ++sequence) + for(sequence = (uint64_t) dpy->xcb->last_flushed + 1; sequence <= unwrapped_request; ++sequence) + /* On systems where unsigned long is 32 bits, the 64-bit sequence + * passed to append_pending_request might get trimmed off. + * This is logically correct and expected, as it's simply + * 're-wrapping' the 'unwrapped' sequence number. */ append_pending_request(dpy, sequence); } - requests = dpy->request - dpy->xcb->last_flushed; + requests = unwrapped_request - dpy->xcb->last_flushed; dpy->xcb->last_flushed = dpy->request; vec[0].iov_base = dpy->buffer; -- 1.9.1 From mrmazda at earthlink.net Wed Sep 24 12:23:21 2014 From: mrmazda at earthlink.net (Felix Miata) Date: Wed, 24 Sep 2014 15:23:21 -0400 Subject: F21/F22: xorg-x11-drv: which for SiS? In-Reply-To: References: <5420EE06.7060302@earthlink.net> Message-ID: <54231A29.8050204@earthlink.net> La?rcio de Sousa wrote on 2014-09-23 08:05 (GMT-0300): > 2014-09-23 3:37 GMT-03:00 Jasper St. Pierre composed: >> Felix Miata wrote: >>> xorg-x11-drv-sis seems to have disappeared. Did that happen on purpose? It >>> still exists as a selelection in Bugzilla. Xorg is looking for sis module but >>> cannot find it. Gfxchip here is Z7/Z9 (XG20 core). Is it now supposed to be >>> using some other (not installed) driver? Before today's upgrade, X still >>> worked. >> Seems to exist to me: >> http://cgit.freedesktop.org/xorg/driver/xf86-video-sis/ > According to > http://pkgs.fedoraproject.org/cgit/xorg-x11-drv-sis.git/commit/?id=95dc18d4c803988702974635badb391cc50b6a63 > this package is dead for Fedora 21 and later due to lack of KMS support. Not exactly. My OP here was intended to goto the devel at lists.fedoraproject.org list, but I copied and pasted the wrong address from an email that had been sent both places. I later sent it there, and ultimately was told (by ajax) that lack of maintainer was the reason for its elimination[1], and not just from Rawhide, but the package is gone from Fedora 19, 20 & 21 repos as well. I have the SiS driver working in Rawhide by installing Cauldron's rpm. The VESA driver is garbage for widescreen displays. e.g. neither 1440x900 nor 1920x1080 are available[2]. [1] https://lists.fedoraproject.org/pipermail/devel/2014-September/202632.html [2] https://lists.fedoraproject.org/pipermail/devel/2014-September/202617.html -- "The wise are known for their understanding, and pleasant words are persuasive." Proverbs 16:21 (New Living Translation) Team OS/2 ** Reg. Linux User #211409 ** a11y rocks! Felix Miata *** http://fm.no-ip.com/ From eric at anholt.net Wed Sep 24 13:22:18 2014 From: eric at anholt.net (Eric Anholt) Date: Wed, 24 Sep 2014 13:22:18 -0700 Subject: [PATCH] glamor: Fix leak of converted_bits in _glamor_upload_bits_to_pixmap_texture In-Reply-To: <1411544890-20372-1-git-send-email-michel@daenzer.net> References: <1411544890-20372-1-git-send-email-michel@daenzer.net> Message-ID: <8738bgn4zp.fsf@eliezer.anholt.net> Michel D?nzer writes: > From: Michel D?nzer > > ==9530== 808,575,600 bytes in 5,904 blocks are definitely lost in loss record 4,602 of 4,602 > ==9530== at 0x4C28C20: malloc (vg_replace_malloc.c:296) > ==9530== by 0xAD29C98: _glamor_upload_bits_to_pixmap_texture (glamor_pixmap.c:771) > ==9530== by 0xAD2AE95: glamor_upload_sub_pixmap_to_texture (glamor_pixmap.c:1031) > ==9530== by 0xAD2BD55: glamor_upload_pixmap_to_texture (glamor_pixmap.c:1057) > ==9530== by 0xAD1C2E6: glamor_composite_choose_shader (glamor_render.c:1025) > ==9530== by 0xAD1C629: glamor_composite_with_shader (glamor_render.c:1174) > ==9530== by 0xAD1DA77: glamor_composite_clipped_region (glamor_render.c:1542) > ==9530== by 0xAD1E849: _glamor_composite (glamor_render.c:1689) > ==9530== by 0xAD1ED90: glamor_composite (glamor_render.c:1758) > ==9530== by 0x519FD6: damageComposite (damage.c:502) > ==9530== by 0xAD27AA3: glamor_trapezoids (glamor_trapezoid.c:147) > ==9530== by 0xAD27B51: glamor_trapezoids (glamor_trapezoid.c:101) > > Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=84176 > Signed-off-by: Michel D?nzer Reviewed-by: Eric Anholt -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 818 bytes Desc: not available URL: From eich at suse.com Wed Sep 24 14:33:07 2014 From: eich at suse.com (Egbert Eich) Date: Wed, 24 Sep 2014 23:33:07 +0200 Subject: [PATCH driver/intel] Allow copy_front() to fail and clean up gracefully if it does In-Reply-To: chris@chris-wilson.co.uk wrote on Wednesday, 24 September 2014 at 14:24:12 +0100 References: <1411539479-7946-1-git-send-email-eich@freedesktop.org> <20140924064653.GL8727@nuc-i3427.alporthouse.com> <21538.40501.536981.986719@linux-qknr.fritz.box> <20140924110327.GI23098@nuc-i3427.alporthouse.com> <21538.43438.290116.157288@linux-qknr.fritz.box> <20140924132412.GB30278@nuc-i3427.alporthouse.com> Message-ID: <21539.14483.322190.673731@linux-qknr.fritz.box> Chris Wilson writes: > On Wed, Sep 24, 2014 at 01:23:26PM +0200, Egbert Eich wrote: > > Chris Wilson writes: > > > On Wed, Sep 24, 2014 at 12:34:29PM +0200, Egbert Eich wrote: > > > > > > > > For panning one needs to be able to draw into the screen pixmap outside > > > > of the area exposed by the crtc. > > > > > > Note that the screen pixmap still exists and is drawn into by the > > > clients. What should happen with the panning is that the CRTC is updated > > > through set_mode_major which invalidates the new CRTC location in the big > > > screen Pixmap and the contents copied during the next shadow update. > > > > > > That's the theory at least... > > > > Ok, so this isn't working. I will look into this as it's easy for me > > to trigger this situation. > > Are you using an OpenGL compositor? So far bare X, awesome, dwm, > enlightenment and kwin/xrender behave correctly. But gnome-shell and > kwin/gl are broken, which is not an issue with the ddx. No, as I wrote earlier I'm using bare X. I'm not using the latest driver bits however. Will try and do this and get back to you. Cheers, Egbert. From ajax at redhat.com Wed Sep 24 14:43:27 2014 From: ajax at redhat.com (Adam Jackson) Date: Wed, 24 Sep 2014 17:43:27 -0400 Subject: [PATCH] xinerama: Implement graphics exposures for window->pixmap copies Message-ID: <1411595007-18884-1-git-send-email-ajax@redhat.com> This code is using GetImage to accumulate a logical view of the window image (since the windows will be clipped to their containing screen), and then PutImage to load that back into the pixmap. What it wasn't doing was constructing a region for the obscured areas of the window and emitting graphics exposures for same. This special case for window->pixmap copies (and corresponding lack of graphics exposures) appears to date back to cvs revision 3.15 of this file in xfree86, which makes it almost exactly fifteen years old. It's possible that we could do better now, since Composite would mean that for redirected windows we would in fact have consistent window contents on every screen. Would be slightly ugly to have Xinerama know about Composite at the dispatch level, but then this is Xinerama we're talking about, nothing's pretty here. Signed-off-by: Adam Jackson --- Xext/panoramiXprocs.c | 63 +++++++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 53 insertions(+), 10 deletions(-) diff --git a/Xext/panoramiXprocs.c b/Xext/panoramiXprocs.c index 83a2e08..fdf68a7 100644 --- a/Xext/panoramiXprocs.c +++ b/Xext/panoramiXprocs.c @@ -1050,7 +1050,7 @@ PanoramiXClearToBackground(ClientPtr client) int PanoramiXCopyArea(ClientPtr client) { - int j, result, srcx, srcy, dstx, dsty; + int j, result, srcx, srcy, dstx, dsty, width, height; PanoramiXRes *gc, *src, *dst; Bool srcIsRoot = FALSE; Bool dstIsRoot = FALSE; @@ -1091,6 +1091,8 @@ PanoramiXCopyArea(ClientPtr client) srcy = stuff->srcY; dstx = stuff->dstX; dsty = stuff->dstY; + width = stuff->width; + height = stuff->height; if ((dst->type == XRT_PIXMAP) && (src->type == XRT_WINDOW)) { DrawablePtr drawables[MAXSCREENS]; DrawablePtr pDst; @@ -1105,13 +1107,12 @@ PanoramiXCopyArea(ClientPtr client) return rc; } - pitch = PixmapBytePad(stuff->width, drawables[0]->depth); - if (!(data = calloc(1, stuff->height * pitch))) + pitch = PixmapBytePad(width, drawables[0]->depth); + if (!(data = calloc(1, height * pitch))) return BadAlloc; - XineramaGetImageData(drawables, srcx, srcy, - stuff->width, stuff->height, ZPixmap, ~0, data, - pitch, srcIsRoot); + XineramaGetImageData(drawables, srcx, srcy, width, height, ZPixmap, ~0, + data, pitch, srcIsRoot); FOR_NSCREENS_BACKWARD(j) { stuff->gc = gc->info[j].id; @@ -1123,14 +1124,56 @@ PanoramiXCopyArea(ClientPtr client) } (*pGC->ops->PutImage) (pDst, pGC, pDst->depth, dstx, dsty, - stuff->width, stuff->height, - 0, ZPixmap, data); - + width, height, 0, ZPixmap, data); if (dstShared) break; } - free(data); + + if (pGC->graphicsExposures) { + RegionRec rgn; + int dx, dy; + + /* create region for source box */ + BoxRec sourceBox = { srcx, srcy, srcx + width, srcy + height }; + RegionInit(&rgn, &sourceBox, 1); + + dx = drawables[0]->x; + dy = drawables[0]->y; + if (srcIsRoot) { + dx += screenInfo.screens[0]->x; + dy += screenInfo.screens[0]->y; + } + + /* translate from source-relative to screen */ + RegionTranslate(&rgn, dx, dy); + + /* subtract the (screen-space) clips of the source drawables */ + FOR_NSCREENS(j) { + RegionPtr sd; + + if (pGC->subWindowMode == IncludeInferiors) + sd = NotClippedByChildren((WindowPtr)drawables[j]); + else + sd = &((WindowPtr)drawables[j])->clipList; + + RegionSubtract(&rgn, &rgn, sd); + + if (pGC->subWindowMode == IncludeInferiors) + RegionDestroy(sd); + } + + /* -dx/-dy to get back to dest-relative, plus request offsets */ + RegionTranslate(&rgn, -dx + dstx, -dy + dsty); + + /* intersect with gc clip; just one screen is fine because pixmap */ + RegionIntersect(&rgn, &rgn, pGC->pCompositeClip); + + /* and expose */ + pGC->pScreen->SendGraphicsExpose(client, &rgn, dst->info[0].id, + X_CopyArea, 0); + RegionUninit(&rgn); + } } else { DrawablePtr pDst = NULL, pSrc = NULL; -- 1.9.3 From michel at daenzer.net Wed Sep 24 23:27:22 2014 From: michel at daenzer.net (=?UTF-8?q?Michel=20D=C3=A4nzer?=) Date: Thu, 25 Sep 2014 15:27:22 +0900 Subject: [PATCH] glamor: Use GL_STREAM_READ also for read/write access to a PBO Message-ID: <1411626442-14411-1-git-send-email-michel@daenzer.net> From: Michel D?nzer Otherwise the CPU may end up reading from non-cacheable memory, which is very slow. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=84178 Signed-off-by: Michel D?nzer --- Keeping gl_usage in case we need to add back GLAMOR_ACCESS_WO. glamor/glamor_prepare.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/glamor/glamor_prepare.c b/glamor/glamor_prepare.c index 561c55d..fb85d90 100644 --- a/glamor/glamor_prepare.c +++ b/glamor/glamor_prepare.c @@ -84,10 +84,7 @@ glamor_prep_pixmap_box(PixmapPtr pixmap, glamor_access_t access, BoxPtr box) if (priv->base.pbo == 0) glGenBuffers(1, &priv->base.pbo); - if (access == GLAMOR_ACCESS_RW) - gl_usage = GL_DYNAMIC_DRAW; - else - gl_usage = GL_STREAM_READ; + gl_usage = GL_STREAM_READ; glBindBuffer(GL_PIXEL_PACK_BUFFER, priv->base.pbo); glBufferData(GL_PIXEL_PACK_BUFFER, -- 2.1.1 From markus at selfnet.de Wed Sep 24 23:57:22 2014 From: markus at selfnet.de (Markus Wick) Date: Thu, 25 Sep 2014 08:57:22 +0200 Subject: [PATCH] glamor: Use =?UTF-8?Q?GL=5FSTREAM=5FREAD=20also=20for?= =?UTF-8?Q?=20read/write=20access=20to=20a=20PBO?= In-Reply-To: <1411626442-14411-1-git-send-email-michel@daenzer.net> References: <1411626442-14411-1-git-send-email-michel@daenzer.net> Message-ID: Am 2014-09-25 08:27, schrieb Michel D?nzer: > From: Michel D?nzer > > Otherwise the CPU may end up reading from non-cacheable memory, which > is > very slow. > > Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=84178 > Signed-off-by: Michel D?nzer > --- > > Keeping gl_usage in case we need to add back GLAMOR_ACCESS_WO. > > glamor/glamor_prepare.c | 5 +---- > 1 file changed, 1 insertion(+), 4 deletions(-) > > diff --git a/glamor/glamor_prepare.c b/glamor/glamor_prepare.c > index 561c55d..fb85d90 100644 > --- a/glamor/glamor_prepare.c > +++ b/glamor/glamor_prepare.c > @@ -84,10 +84,7 @@ glamor_prep_pixmap_box(PixmapPtr pixmap, > glamor_access_t access, BoxPtr box) > if (priv->base.pbo == 0) > glGenBuffers(1, &priv->base.pbo); > > - if (access == GLAMOR_ACCESS_RW) > - gl_usage = GL_DYNAMIC_DRAW; > - else > - gl_usage = GL_STREAM_READ; > + gl_usage = GL_STREAM_READ; > > glBindBuffer(GL_PIXEL_PACK_BUFFER, priv->base.pbo); > glBufferData(GL_PIXEL_PACK_BUFFER, Was the write only patch merged? If so, this should be changed to use GL_STREAM_DRAW for WO. But you're right, for RW, it should be STREAM (used once) READ (accessed by the CPU), so Reviewed-by: Markus Wick From michel at daenzer.net Thu Sep 25 00:14:03 2014 From: michel at daenzer.net (=?UTF-8?B?TWljaGVsIETDpG56ZXI=?=) Date: Thu, 25 Sep 2014 16:14:03 +0900 Subject: [PATCH] glamor: Use GL_STREAM_READ also for read/write access to a PBO In-Reply-To: References: <1411626442-14411-1-git-send-email-michel@daenzer.net> Message-ID: <5423C0BB.4010402@daenzer.net> On 25.09.2014 15:57, Markus Wick wrote: > Am 2014-09-25 08:27, schrieb Michel D?nzer: >> From: Michel D?nzer >> >> Otherwise the CPU may end up reading from non-cacheable memory, which is >> very slow. >> >> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=84178 >> Signed-off-by: Michel D?nzer >> --- >> >> Keeping gl_usage in case we need to add back GLAMOR_ACCESS_WO. >> >> glamor/glamor_prepare.c | 5 +---- >> 1 file changed, 1 insertion(+), 4 deletions(-) >> >> diff --git a/glamor/glamor_prepare.c b/glamor/glamor_prepare.c >> index 561c55d..fb85d90 100644 >> --- a/glamor/glamor_prepare.c >> +++ b/glamor/glamor_prepare.c >> @@ -84,10 +84,7 @@ glamor_prep_pixmap_box(PixmapPtr pixmap, >> glamor_access_t access, BoxPtr box) >> if (priv->base.pbo == 0) >> glGenBuffers(1, &priv->base.pbo); >> >> - if (access == GLAMOR_ACCESS_RW) >> - gl_usage = GL_DYNAMIC_DRAW; >> - else >> - gl_usage = GL_STREAM_READ; >> + gl_usage = GL_STREAM_READ; >> >> glBindBuffer(GL_PIXEL_PACK_BUFFER, priv->base.pbo); >> glBufferData(GL_PIXEL_PACK_BUFFER, > > Was the write only patch merged? No, nothing's needed GLAMOR_ACCESS_WO yet. > If so, this should be changed to use GL_STREAM_DRAW for WO. Agreed. > But you're right, for RW, it should be STREAM (used once) READ (accessed > by the CPU), so > > Reviewed-by: Markus Wick Thanks! -- Earthling Michel D?nzer | http://www.amd.com Libre software enthusiast | Mesa and X developer From hdegoede at redhat.com Thu Sep 25 05:45:08 2014 From: hdegoede at redhat.com (Hans de Goede) Date: Thu, 25 Sep 2014 14:45:08 +0200 Subject: F21/F22: xorg-x11-drv: which for SiS? In-Reply-To: <54231A29.8050204@earthlink.net> References: <5420EE06.7060302@earthlink.net> <54231A29.8050204@earthlink.net> Message-ID: <54240E54.1010504@redhat.com> Hi, On 09/24/2014 09:23 PM, Felix Miata wrote: > La?rcio de Sousa wrote on 2014-09-23 08:05 (GMT-0300): > >> 2014-09-23 3:37 GMT-03:00 Jasper St. Pierre composed: > >>> Felix Miata wrote: > >>>> xorg-x11-drv-sis seems to have disappeared. Did that happen on purpose? It >>>> still exists as a selelection in Bugzilla. Xorg is looking for sis module but >>>> cannot find it. Gfxchip here is Z7/Z9 (XG20 core). Is it now supposed to be >>>> using some other (not installed) driver? Before today's upgrade, X still >>>> worked. > >>> Seems to exist to me: > >>> http://cgit.freedesktop.org/xorg/driver/xf86-video-sis/ > >> According to >> http://pkgs.fedoraproject.org/cgit/xorg-x11-drv-sis.git/commit/?id=95dc18d4c803988702974635badb391cc50b6a63 > >> this package is dead for Fedora 21 and later due to lack of KMS support. > > Not exactly. My OP here was intended to goto the > devel at lists.fedoraproject.org list, but I copied and pasted the wrong address > from an email that had been sent both places. I later sent it there, and > ultimately was told (by ajax) that lack of maintainer was the reason for its > elimination[1], and not just from Rawhide, but the package is gone from > Fedora 19, 20 & 21 repos as well. No it is not, it has been retired for F-21 and later. And as I've already told you in a reply to devel at lists.fedoraproject.org, you are free to step up to maintain it in Fedora and unretire it. I've even offered my help in doing so, and that offer still stands. Regards, Hans From eich at suse.com Thu Sep 25 06:16:23 2014 From: eich at suse.com (Egbert Eich) Date: Thu, 25 Sep 2014 15:16:23 +0200 Subject: [PATCH driver/intel] Allow copy_front() to fail and clean up gracefully if it does In-Reply-To: chris@chris-wilson.co.uk wrote on Wednesday, 24 September 2014 at 14:24:12 +0100 References: <1411539479-7946-1-git-send-email-eich@freedesktop.org> <20140924064653.GL8727@nuc-i3427.alporthouse.com> <21538.40501.536981.986719@linux-qknr.fritz.box> <20140924110327.GI23098@nuc-i3427.alporthouse.com> <21538.43438.290116.157288@linux-qknr.fritz.box> <20140924132412.GB30278@nuc-i3427.alporthouse.com> Message-ID: <21540.5543.837761.121827@linux-qknr.fritz.box> Chris Wilson writes: > On Wed, Sep 24, 2014 at 01:23:26PM +0200, Egbert Eich wrote: > > Chris Wilson writes: > > > On Wed, Sep 24, 2014 at 12:34:29PM +0200, Egbert Eich wrote: > > > > > > > > For panning one needs to be able to draw into the screen pixmap outside > > > > of the area exposed by the crtc. > > > > > > Note that the screen pixmap still exists and is drawn into by the > > > clients. What should happen with the panning is that the CRTC is updated > > > through set_mode_major which invalidates the new CRTC location in the big > > > screen Pixmap and the contents copied during the next shadow update. > > > > > > That's the theory at least... > > > > Ok, so this isn't working. I will look into this as it's easy for me > > to trigger this situation. > > Are you using an OpenGL compositor? So far bare X, awesome, dwm, > enlightenment and kwin/xrender behave correctly. But gnome-shell and > kwin/gl are broken, which is not an issue with the ddx. > -Chris With that patch from me which you accepted, yes, but even without it, a fallback should be used but this doesn't work. I found this: In sna_pixmap_move_to_gpu() you move a CPU bo to the GPU if available and feasable. Shouldn't you check for the proper pitch alignment as well? Without it, use_shadow() fails in sna_crtc_attach(), thus fb_get() is called for a bo that was previously created for the cpu which may not be what is expected by the GPU. Quickly hacking in a test for 64bit alignment (which isn't correct for all use cases) fixes the panning issue for me. Cheers, Egbert. From chris at chris-wilson.co.uk Thu Sep 25 08:10:26 2014 From: chris at chris-wilson.co.uk (Chris Wilson) Date: Thu, 25 Sep 2014 16:10:26 +0100 Subject: [PATCH driver/intel] Allow copy_front() to fail and clean up gracefully if it does In-Reply-To: <21540.5543.837761.121827@linux-qknr.fritz.box> References: <1411539479-7946-1-git-send-email-eich@freedesktop.org> <20140924064653.GL8727@nuc-i3427.alporthouse.com> <21538.40501.536981.986719@linux-qknr.fritz.box> <20140924110327.GI23098@nuc-i3427.alporthouse.com> <21538.43438.290116.157288@linux-qknr.fritz.box> <20140924132412.GB30278@nuc-i3427.alporthouse.com> <21540.5543.837761.121827@linux-qknr.fritz.box> Message-ID: <20140925151026.GC24221@nuc-i3427.alporthouse.com> On Thu, Sep 25, 2014 at 03:16:23PM +0200, Egbert Eich wrote: > Chris Wilson writes: > > On Wed, Sep 24, 2014 at 01:23:26PM +0200, Egbert Eich wrote: > > > Chris Wilson writes: > > > > On Wed, Sep 24, 2014 at 12:34:29PM +0200, Egbert Eich wrote: > > > > > > > > > > For panning one needs to be able to draw into the screen pixmap outside > > > > > of the area exposed by the crtc. > > > > > > > > Note that the screen pixmap still exists and is drawn into by the > > > > clients. What should happen with the panning is that the CRTC is updated > > > > through set_mode_major which invalidates the new CRTC location in the big > > > > screen Pixmap and the contents copied during the next shadow update. > > > > > > > > That's the theory at least... > > > > > > Ok, so this isn't working. I will look into this as it's easy for me > > > to trigger this situation. > > > > Are you using an OpenGL compositor? So far bare X, awesome, dwm, > > enlightenment and kwin/xrender behave correctly. But gnome-shell and > > kwin/gl are broken, which is not an issue with the ddx. > > -Chris > > With that patch from me which you accepted, yes, but even without it, > a fallback should be used but this doesn't work. > I found this: > In sna_pixmap_move_to_gpu() you move a CPU bo to the GPU if available > and feasable. Shouldn't you check for the proper pitch alignment as well? Oh, it fails to test for scanout bo, right. That's a nasty little corner case that only befalls a linear scanout. > Without it, use_shadow() fails in sna_crtc_attach(), thus fb_get() is > called for a bo that was previously created for the cpu which may not > be what is expected by the GPU. > Quickly hacking in a test for 64bit alignment (which isn't correct for > all use cases) fixes the panning issue for me. Good to know, thanks -Chris -- Chris Wilson, Intel Open Source Technology Centre From chris at chris-wilson.co.uk Thu Sep 25 08:54:04 2014 From: chris at chris-wilson.co.uk (Chris Wilson) Date: Thu, 25 Sep 2014 16:54:04 +0100 Subject: [PATCH driver/intel] Allow copy_front() to fail and clean up gracefully if it does In-Reply-To: <20140925151026.GC24221@nuc-i3427.alporthouse.com> References: <1411539479-7946-1-git-send-email-eich@freedesktop.org> <20140924064653.GL8727@nuc-i3427.alporthouse.com> <21538.40501.536981.986719@linux-qknr.fritz.box> <20140924110327.GI23098@nuc-i3427.alporthouse.com> <21538.43438.290116.157288@linux-qknr.fritz.box> <20140924132412.GB30278@nuc-i3427.alporthouse.com> <21540.5543.837761.121827@linux-qknr.fritz.box> <20140925151026.GC24221@nuc-i3427.alporthouse.com> Message-ID: <20140925155404.GD24221@nuc-i3427.alporthouse.com> On Thu, Sep 25, 2014 at 04:10:26PM +0100, Chris Wilson wrote: > On Thu, Sep 25, 2014 at 03:16:23PM +0200, Egbert Eich wrote: > > Chris Wilson writes: > > > On Wed, Sep 24, 2014 at 01:23:26PM +0200, Egbert Eich wrote: > > > > Chris Wilson writes: > > > > > On Wed, Sep 24, 2014 at 12:34:29PM +0200, Egbert Eich wrote: > > > > > > > > > > > > For panning one needs to be able to draw into the screen pixmap outside > > > > > > of the area exposed by the crtc. > > > > > > > > > > Note that the screen pixmap still exists and is drawn into by the > > > > > clients. What should happen with the panning is that the CRTC is updated > > > > > through set_mode_major which invalidates the new CRTC location in the big > > > > > screen Pixmap and the contents copied during the next shadow update. > > > > > > > > > > That's the theory at least... > > > > > > > > Ok, so this isn't working. I will look into this as it's easy for me > > > > to trigger this situation. > > > > > > Are you using an OpenGL compositor? So far bare X, awesome, dwm, > > > enlightenment and kwin/xrender behave correctly. But gnome-shell and > > > kwin/gl are broken, which is not an issue with the ddx. > > > -Chris > > > > With that patch from me which you accepted, yes, but even without it, > > a fallback should be used but this doesn't work. > > I found this: > > In sna_pixmap_move_to_gpu() you move a CPU bo to the GPU if available > > and feasable. Shouldn't you check for the proper pitch alignment as well? > > Oh, it fails to test for scanout bo, right. That's a nasty little corner > case that only befalls a linear scanout. > > > Without it, use_shadow() fails in sna_crtc_attach(), thus fb_get() is > > called for a bo that was previously created for the cpu which may not > > be what is expected by the GPU. > > Quickly hacking in a test for 64bit alignment (which isn't correct for > > all use cases) fixes the panning issue for me. > > Good to know, thanks Also realised that even this should be fixed up as a last resort by falling back to the shadow CRTC allocation. That band-aid should be working again. Hopefully commit 9f7c1a4c4f2a6352263c36e75a984ed4095adbc0 Author: Chris Wilson Date: Thu Sep 25 16:29:14 2014 +0100 sna: Check for scanout pitch restrictions on linear GPU bo When converting a linear cached CPU bo into an uncached GPU bo, we must be careful to adhere to the scanout restrictions if they apply for this transfer or this Pixmap. Reported-by: Egbert Eich Signed-off-by: Chris Wilson catches all the cases where we need to check the alignment on the pitch before changing the cache level. If not, it now explicitly converts the bo before making the framebuffer. -Chris -- Chris Wilson, Intel Open Source Technology Centre From mrmazda at earthlink.net Thu Sep 25 09:01:50 2014 From: mrmazda at earthlink.net (Felix Miata) Date: Thu, 25 Sep 2014 12:01:50 -0400 Subject: F21/F22: xorg-x11-drv: which for SiS? In-Reply-To: <54240E54.1010504@redhat.com> References: <5420EE06.7060302@earthlink.net> <54231A29.8050204@earthlink.net> <54240E54.1010504@redhat.com> Message-ID: <54243C6E.6000503@earthlink.net> Hans de Goede wrote on 2014-09-25 08:45 (GMT-0400): >>> this package is dead for Fedora 21 and later due to lack of KMS support. >> Not exactly. My OP here was intended to goto the >> devel at lists.fedoraproject.org list, but I copied and pasted the wrong address >> from an email that had been sent both places. I later sent it there, and >> ultimately was told (by ajax) that lack of maintainer was the reason for its >> elimination[1], and not just from Rawhide, but the package is gone from >> Fedora 19, 20 & 21 repos as well. > No it is not, it has been retired for F-21 and later. I looked for it on all F18, F19, F20, F21 & Rawhide repos I could find, and found it nowhere. Had I found it on any of them I wouldn't have looked for, found, and installed it from another distro's rpm. > And as I've already told > you in a reply to devel at lists.fedoraproject.org, you are free to step up to > maintain it in Fedora and unretire it. I've even offered my help in doing so, > and that offer still stands. I don't, and won't, "maintain" any software packages. My supply of round tuits is chronically short of need as is. I don't program. One language is all I can handle. What I do do is I routinely test on more than a dozen non-recent, mostly single core, mostly 32 bit CPU, computers. One of the newer ones has onboard Z7/Z9 (XG20 core), LGA775, and neither AGP nor PCIe slots, a server board. My supply of PCI gfxcards include none that make better sense to me to keep in my test stack than its onboard Z7/Z9. Testing is my primary contribution to FOSS, spotting, confirming across distros, versions, and/or hardware as necessary, and reporting what FOSS evolution, intentional or otherwise, leaves working no longer. It's something contributors with only latest/greatest hardware, and virtual machines, cannot do. The sis and mga drivers are yet more cases of pushing hardware toward landfills and recyclers before their suitability to task naturally expires. Fedora seems to be the leader in this anti-eco-friendly realm. -- "The wise are known for their understanding, and pleasant words are persuasive." Proverbs 16:21 (New Living Translation) Team OS/2 ** Reg. Linux User #211409 ** a11y rocks! Felix Miata *** http://fm.no-ip.com/ From ajax at redhat.com Thu Sep 25 10:37:17 2014 From: ajax at redhat.com (Adam Jackson) Date: Thu, 25 Sep 2014 13:37:17 -0400 Subject: [PATCH 01/19] damageext: dixLookupDrawable(M_WINDOW) -> dixLookupWindow In-Reply-To: <1411666655-1089-1-git-send-email-ajax@redhat.com> References: <1411666655-1089-1-git-send-email-ajax@redhat.com> Message-ID: <1411666655-1089-2-git-send-email-ajax@redhat.com> Signed-off-by: Adam Jackson --- damageext/damageext.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/damageext/damageext.c b/damageext/damageext.c index 886f56d..4928379 100644 --- a/damageext/damageext.c +++ b/damageext/damageext.c @@ -687,9 +687,8 @@ PanoramiXDamageCreate(ClientPtr client) rc = BadAlloc; } else { damage->damage[i] = pDamage; - rc = dixLookupDrawable(&pDrawable, draw->info[i].id, client, - M_WINDOW, - DixGetAttrAccess | DixReadAccess); + rc = dixLookupWindow((WindowPtr *)&pDrawable, draw->info[i].id, + client, DixGetAttrAccess | DixReadAccess); } if (rc != Success) break; -- 1.9.3 From ajax at redhat.com Thu Sep 25 10:37:16 2014 From: ajax at redhat.com (Adam Jackson) Date: Thu, 25 Sep 2014 13:37:16 -0400 Subject: [PATCH 00/19] Assorted cleanups Message-ID: <1411666655-1089-1-git-send-email-ajax@redhat.com> Approximately zero functional change. The only two I'd be even a little unsure of are 8 and 18, and those only because there might be a binary driver actually using what they're removing. - ajax From ajax at redhat.com Thu Sep 25 10:37:18 2014 From: ajax at redhat.com (Adam Jackson) Date: Thu, 25 Sep 2014 13:37:18 -0400 Subject: [PATCH 02/19] exa, kdrive: Remove redundant BitsPerPixel macros In-Reply-To: <1411666655-1089-1-git-send-email-ajax@redhat.com> References: <1411666655-1089-1-git-send-email-ajax@redhat.com> Message-ID: <1411666655-1089-3-git-send-email-ajax@redhat.com> We already get this from servermd.h Signed-off-by: Adam Jackson --- exa/exa_priv.h | 12 ------------ hw/kdrive/src/kdrive.h | 13 ------------- 2 files changed, 25 deletions(-) diff --git a/exa/exa_priv.h b/exa/exa_priv.h index 61a1f4c..88bfd37 100644 --- a/exa/exa_priv.h +++ b/exa/exa_priv.h @@ -214,18 +214,6 @@ typedef struct { DevPrivateKeyRec gcPrivateKeyRec; } ExaScreenPrivRec, *ExaScreenPrivPtr; -/* - * This is the only completely portable way to - * compute this info. - */ -#ifndef BitsPerPixel -#define BitsPerPixel(d) (\ - PixmapWidthPaddingInfo[d].notPower2 ? \ - (PixmapWidthPaddingInfo[d].bytesPerPixel * 8) : \ - ((1 << PixmapWidthPaddingInfo[d].padBytesLog2) * 8 / \ - (PixmapWidthPaddingInfo[d].padRoundUp+1))) -#endif - extern DevPrivateKeyRec exaScreenPrivateKeyRec; #define exaScreenPrivateKey (&exaScreenPrivateKeyRec) diff --git a/hw/kdrive/src/kdrive.h b/hw/kdrive/src/kdrive.h index 066a134..e1d2b59 100644 --- a/hw/kdrive/src/kdrive.h +++ b/hw/kdrive/src/kdrive.h @@ -330,19 +330,6 @@ typedef struct _KdPointerMatrix { int matrix[2][3]; } KdPointerMatrix; -/* - * This is the only completely portable way to - * compute this info. - */ - -#ifndef BitsPerPixel -#define BitsPerPixel(d) (\ - PixmapWidthPaddingInfo[d].notPower2 ? \ - (PixmapWidthPaddingInfo[d].bytesPerPixel * 8) : \ - ((1 << PixmapWidthPaddingInfo[d].padBytesLog2) * 8 / \ - (PixmapWidthPaddingInfo[d].padRoundUp+1))) -#endif - extern DevPrivateKeyRec kdScreenPrivateKeyRec; #define kdScreenPrivateKey (&kdScreenPrivateKeyRec) -- 1.9.3 From ajax at redhat.com Thu Sep 25 10:37:19 2014 From: ajax at redhat.com (Adam Jackson) Date: Thu, 25 Sep 2014 13:37:19 -0400 Subject: [PATCH 03/19] input: Remove unused SetKeySymsMap In-Reply-To: <1411666655-1089-1-git-send-email-ajax@redhat.com> References: <1411666655-1089-1-git-send-email-ajax@redhat.com> Message-ID: <1411666655-1089-4-git-send-email-ajax@redhat.com> Signed-off-by: Adam Jackson --- dix/devices.c | 57 --------------------------------------------------------- include/input.h | 3 --- 2 files changed, 60 deletions(-) diff --git a/dix/devices.c b/dix/devices.c index f17a3ac..3fb7ca0 100644 --- a/dix/devices.c +++ b/dix/devices.c @@ -1214,63 +1214,6 @@ QueryMinMaxKeyCodes(KeyCode *minCode, KeyCode *maxCode) } } -/* Notably, this function does not expand the destination's keycode range, or - * notify clients. */ -Bool -SetKeySymsMap(KeySymsPtr dst, KeySymsPtr src) -{ - int i, j; - KeySym *tmp; - int rowDif = src->minKeyCode - dst->minKeyCode; - - /* if keysym map size changes, grow map first */ - if (src->mapWidth < dst->mapWidth) { - for (i = src->minKeyCode; i <= src->maxKeyCode; i++) { -#define SI(r, c) (((r - src->minKeyCode) * src->mapWidth) + (c)) -#define DI(r, c) (((r - dst->minKeyCode) * dst->mapWidth) + (c)) - for (j = 0; j < src->mapWidth; j++) - dst->map[DI(i, j)] = src->map[SI(i, j)]; - for (j = src->mapWidth; j < dst->mapWidth; j++) - dst->map[DI(i, j)] = NoSymbol; -#undef SI -#undef DI - } - return TRUE; - } - else if (src->mapWidth > dst->mapWidth) { - i = sizeof(KeySym) * src->mapWidth * - (dst->maxKeyCode - dst->minKeyCode + 1); - tmp = calloc(sizeof(KeySym), i); - if (!tmp) - return FALSE; - - if (dst->map) { - for (i = 0; i <= dst->maxKeyCode - dst->minKeyCode; i++) - memmove(&tmp[i * src->mapWidth], &dst->map[i * dst->mapWidth], - dst->mapWidth * sizeof(KeySym)); - free(dst->map); - } - dst->mapWidth = src->mapWidth; - dst->map = tmp; - } - else if (!dst->map) { - i = sizeof(KeySym) * src->mapWidth * - (dst->maxKeyCode - dst->minKeyCode + 1); - tmp = calloc(sizeof(KeySym), i); - if (!tmp) - return FALSE; - - dst->map = tmp; - dst->mapWidth = src->mapWidth; - } - - memmove(&dst->map[rowDif * dst->mapWidth], src->map, - (src->maxKeyCode - src->minKeyCode + 1) * - dst->mapWidth * sizeof(KeySym)); - - return TRUE; -} - Bool InitButtonClassDeviceStruct(DeviceIntPtr dev, int numButtons, Atom *labels, CARD8 *map) diff --git a/include/input.h b/include/input.h index 1b2102f..35ceafa 100644 --- a/include/input.h +++ b/include/input.h @@ -287,9 +287,6 @@ extern _X_EXPORT int dixLookupDevice(DeviceIntPtr * /* dev */ , extern _X_EXPORT void QueryMinMaxKeyCodes(KeyCode * /*minCode */ , KeyCode * /*maxCode */ ); -extern _X_EXPORT Bool SetKeySymsMap(KeySymsPtr /*dst */ , - KeySymsPtr /*src */ ); - extern _X_EXPORT Bool InitButtonClassDeviceStruct(DeviceIntPtr /*device */ , int /*numButtons */ , Atom * /* labels */ , -- 1.9.3 From ajax at redhat.com Thu Sep 25 10:37:20 2014 From: ajax at redhat.com (Adam Jackson) Date: Thu, 25 Sep 2014 13:37:20 -0400 Subject: [PATCH 04/19] loader: Deobfuscate RTLD_* macro stuff In-Reply-To: <1411666655-1089-1-git-send-email-ajax@redhat.com> References: <1411666655-1089-1-git-send-email-ajax@redhat.com> Message-ID: <1411666655-1089-5-git-send-email-ajax@redhat.com> POSIX requires that these be named correctly, no need to be clever. Signed-off-by: Adam Jackson --- hw/xfree86/loader/loader.c | 22 ++-------------------- 1 file changed, 2 insertions(+), 20 deletions(-) diff --git a/hw/xfree86/loader/loader.c b/hw/xfree86/loader/loader.c index cc41dcb..3132984 100644 --- a/hw/xfree86/loader/loader.c +++ b/hw/xfree86/loader/loader.c @@ -71,24 +71,6 @@ #include #include -#if defined(DL_LAZY) -#define DLOPEN_LAZY DL_LAZY -#elif defined(RTLD_LAZY) -#define DLOPEN_LAZY RTLD_LAZY -#elif defined(__FreeBSD__) -#define DLOPEN_LAZY 1 -#else -#define DLOPEN_LAZY 0 -#endif - -#if defined(LD_GLOBAL) -#define DLOPEN_GLOBAL LD_GLOBAL -#elif defined(RTLD_GLOBAL) -#define DLOPEN_GLOBAL RTLD_GLOBAL -#else -#define DLOPEN_GLOBAL 0 -#endif - #else #error i have no dynamic linker and i must scream #endif @@ -128,7 +110,7 @@ LoaderOpen(const char *module, int *errmaj, int *errmin) xf86Msg(X_INFO, "Loading %s\n", module); - if (!(ret = dlopen(module, DLOPEN_LAZY | DLOPEN_GLOBAL))) { + if (!(ret = dlopen(module, RTLD_LAZY | RTLD_GLOBAL))) { xf86Msg(X_ERROR, "Failed to load %s: %s\n", module, dlerror()); if (errmaj) *errmaj = LDR_NOLOAD; @@ -151,7 +133,7 @@ LoaderSymbol(const char *name) return p; if (!global_scope) - global_scope = dlopen(NULL, DLOPEN_LAZY | DLOPEN_GLOBAL); + global_scope = dlopen(NULL, RTLD_LAZY | RTLD_GLOBAL); if (global_scope) return dlsym(global_scope, name); -- 1.9.3 From ajax at redhat.com Thu Sep 25 10:37:21 2014 From: ajax at redhat.com (Adam Jackson) Date: Thu, 25 Sep 2014 13:37:21 -0400 Subject: [PATCH 05/19] loader: Remove some baklava code In-Reply-To: <1411666655-1089-1-git-send-email-ajax@redhat.com> References: <1411666655-1089-1-git-send-email-ajax@redhat.com> Message-ID: <1411666655-1089-6-git-send-email-ajax@redhat.com> Signed-off-by: Adam Jackson --- hw/xfree86/loader/loadmod.c | 113 +++++++++++++++++++------------------------- 1 file changed, 48 insertions(+), 65 deletions(-) diff --git a/hw/xfree86/loader/loadmod.c b/hw/xfree86/loader/loadmod.c index 21ccb1b..7021bdd 100644 --- a/hw/xfree86/loader/loadmod.c +++ b/hw/xfree86/loader/loadmod.c @@ -77,12 +77,8 @@ typedef struct _pattern { static char *FindModule(const char *, const char *, const char **, PatternPtr); static Bool CheckVersion(const char *, XF86ModuleVersionInfo *, const XF86ModReqInfo *); -static void UnloadModuleOrDriver(ModuleDescPtr mod); static char *LoaderGetCanonicalName(const char *, PatternPtr); static void RemoveChild(ModuleDescPtr); -static ModuleDescPtr doLoadModule(const char *, const char *, const char **, - const char **, void *, - const XF86ModReqInfo *, int *, int *); const ModuleVersions LoaderVersionInfo = { XORG_VERSION_CURRENT, @@ -754,8 +750,8 @@ LoadSubModule(void *_parent, const char *module, return NULL; } - submod = doLoadModule(module, NULL, subdirlist, patternlist, options, - modreq, errmaj, errmin); + submod = LoadModule(module, NULL, subdirlist, patternlist, options, + modreq, errmaj, errmin); if (submod && submod != (ModuleDescPtr) 1) { parent->child = AddSibling(parent->child, submod); submod->parent = parent; @@ -818,10 +814,47 @@ static const char *compiled_in_modules[] = { NULL }; -static ModuleDescPtr -doLoadModule(const char *module, const char *path, const char **subdirlist, - const char **patternlist, void *options, - const XF86ModReqInfo * modreq, int *errmaj, int *errmin) +/* + * LoadModule: load a module + * + * module The module name. Normally this is not a filename but the + * module's "canonical name. A full pathname is, however, + * also accepted. + * path A comma separated list of module directories. + * subdirlist A NULL terminated list of subdirectories to search. When + * NULL, the default "stdSubdirs" list is used. The default + * list is also substituted for entries with value DEFAULT_LIST. + * patternlist A NULL terminated list of regular expressions used to find + * module filenames. Each regex should contain exactly one + * subexpression that corresponds to the canonical module name. + * When NULL, the default "stdPatterns" list is used. The + * default list is also substituted for entries with value + * DEFAULT_LIST. + * options A NULL terminated list of Options that are passed to the + * module's SetupProc function. + * modreq An optional XF86ModReqInfo* containing + * version/ABI/vendor-ABI requirements to check for when + * loading the module. The following fields of the + * XF86ModReqInfo struct are checked: + * majorversion - must match the module's majorversion exactly + * minorversion - the module's minorversion must be >= this + * patchlevel - the module's minorversion.patchlevel must be + * >= this. Patchlevel is ignored when + * minorversion is not set. + * abiclass - (string) must match the module's abiclass + * abiversion - must be consistent with the module's + * abiversion (major equal, minor no older) + * moduleclass - string must match the module's moduleclass + * string + * "don't care" values are ~0 for numbers, and NULL for strings + * errmaj Major error return. + * errmin Minor error return. + * + */ +ModuleDescPtr +LoadModule(const char *module, const char *path, const char **subdirlist, + const char **patternlist, void *options, + const XF86ModReqInfo * modreq, int *errmaj, int *errmin) { XF86ModuleData *initdata = NULL; char **pathlist = NULL; @@ -1009,61 +1042,11 @@ doLoadModule(const char *module, const char *path, const char **subdirlist, return ret; } -/* - * LoadModule: load a module - * - * module The module name. Normally this is not a filename but the - * module's "canonical name. A full pathname is, however, - * also accepted. - * path A comma separated list of module directories. - * subdirlist A NULL terminated list of subdirectories to search. When - * NULL, the default "stdSubdirs" list is used. The default - * list is also substituted for entries with value DEFAULT_LIST. - * patternlist A NULL terminated list of regular expressions used to find - * module filenames. Each regex should contain exactly one - * subexpression that corresponds to the canonical module name. - * When NULL, the default "stdPatterns" list is used. The - * default list is also substituted for entries with value - * DEFAULT_LIST. - * options A NULL terminated list of Options that are passed to the - * module's SetupProc function. - * modreq An optional XF86ModReqInfo* containing - * version/ABI/vendor-ABI requirements to check for when - * loading the module. The following fields of the - * XF86ModReqInfo struct are checked: - * majorversion - must match the module's majorversion exactly - * minorversion - the module's minorversion must be >= this - * patchlevel - the module's minorversion.patchlevel must be - * >= this. Patchlevel is ignored when - * minorversion is not set. - * abiclass - (string) must match the module's abiclass - * abiversion - must be consistent with the module's - * abiversion (major equal, minor no older) - * moduleclass - string must match the module's moduleclass - * string - * "don't care" values are ~0 for numbers, and NULL for strings - * errmaj Major error return. - * errmin Minor error return. - * - */ -ModuleDescPtr -LoadModule(const char *module, const char *path, const char **subdirlist, - const char **patternlist, void *options, - const XF86ModReqInfo * modreq, int *errmaj, int *errmin) -{ - return doLoadModule(module, path, subdirlist, patternlist, options, - modreq, errmaj, errmin); -} - void -UnloadModule(void *mod) +UnloadModule(void *_mod) { - UnloadModuleOrDriver((ModuleDescPtr) mod); -} + ModuleDescPtr mod = _mod; -static void -UnloadModuleOrDriver(ModuleDescPtr mod) -{ if (mod == (ModuleDescPtr) 1) return; @@ -1083,9 +1066,9 @@ UnloadModuleOrDriver(ModuleDescPtr mod) } if (mod->child) - UnloadModuleOrDriver(mod->child); + UnloadModule(mod->child); if (mod->sib) - UnloadModuleOrDriver(mod->sib); + UnloadModule(mod->sib); free(mod->path); free(mod->name); free(mod); @@ -1100,7 +1083,7 @@ UnloadSubModule(void *_mod) if (mod == (ModuleDescPtr) 1) return; RemoveChild(mod); - UnloadModuleOrDriver(mod); + UnloadModule(mod); } static void -- 1.9.3 From ajax at redhat.com Thu Sep 25 10:37:22 2014 From: ajax at redhat.com (Adam Jackson) Date: Thu, 25 Sep 2014 13:37:22 -0400 Subject: [PATCH 06/19] mi: Remove Windows 8-bpp colormap compatibility In-Reply-To: <1411666655-1089-1-git-send-email-ajax@redhat.com> References: <1411666655-1089-1-git-send-email-ajax@redhat.com> Message-ID: <1411666655-1089-7-git-send-email-ajax@redhat.com> Nice, but not something our Windows servers build, and not something that belongs in mi anyway. Signed-off-by: Adam Jackson --- mi/micmap.c | 44 -------------------------------------------- 1 file changed, 44 deletions(-) diff --git a/mi/micmap.c b/mi/micmap.c index 4648b9a..1aeb359 100644 --- a/mi/micmap.c +++ b/mi/micmap.c @@ -235,42 +235,7 @@ miExpandDirectColors(ColormapPtr pmap, int ndef, xColorItem * indefs, Bool miCreateDefColormap(ScreenPtr pScreen) { -/* - * In the following sources PC X server vendors may want to delete - * "_not_tog" from "#ifdef WIN32_not_tog" - */ -#ifdef WIN32_not_tog - /* - * these are the MS-Windows desktop colors, adjusted for X's 16-bit - * color specifications. - */ - static xColorItem citems[] = { - {0, 0, 0, 0, 0, 0}, - {1, 0x8000, 0, 0, 0, 0}, - {2, 0, 0x8000, 0, 0, 0}, - {3, 0x8000, 0x8000, 0, 0, 0}, - {4, 0, 0, 0x8000, 0, 0}, - {5, 0x8000, 0, 0x8000, 0, 0}, - {6, 0, 0x8000, 0x8000, 0, 0}, - {7, 0xc000, 0xc000, 0xc000, 0, 0}, - {8, 0xc000, 0xdc00, 0xc000, 0, 0}, - {9, 0xa600, 0xca00, 0xf000, 0, 0}, - {246, 0xff00, 0xfb00, 0xf000, 0, 0}, - {247, 0xa000, 0xa000, 0xa400, 0, 0}, - {248, 0x8000, 0x8000, 0x8000, 0, 0}, - {249, 0xff00, 0, 0, 0, 0}, - {250, 0, 0xff00, 0, 0, 0}, - {251, 0xff00, 0xff00, 0, 0, 0}, - {252, 0, 0, 0xff00, 0, 0}, - {253, 0xff00, 0, 0xff00, 0, 0}, - {254, 0, 0xff00, 0xff00, 0, 0}, - {255, 0xff00, 0xff00, 0xff00, 0, 0} - }; -#define NUM_DESKTOP_COLORS sizeof citems / sizeof citems[0] - int i; -#else unsigned short zero = 0, ones = 0xFFFF; -#endif Pixel wp, bp; VisualPtr pVisual; ColormapPtr cmap; @@ -294,21 +259,12 @@ miCreateDefColormap(ScreenPtr pScreen) if (pScreen->rootDepth > 1) { wp = pScreen->whitePixel; bp = pScreen->blackPixel; -#ifdef WIN32_not_tog - for (i = 0; i < NUM_DESKTOP_COLORS; i++) { - if (AllocColor(cmap, - &citems[i].red, &citems[i].green, &citems[i].blue, - &citems[i].pixel, 0) != Success) - return FALSE; - } -#else if ((AllocColor(cmap, &ones, &ones, &ones, &wp, 0) != Success) || (AllocColor(cmap, &zero, &zero, &zero, &bp, 0) != Success)) return FALSE; pScreen->whitePixel = wp; pScreen->blackPixel = bp; -#endif } (*pScreen->InstallColormap) (cmap); -- 1.9.3 From ajax at redhat.com Thu Sep 25 10:37:23 2014 From: ajax at redhat.com (Adam Jackson) Date: Thu, 25 Sep 2014 13:37:23 -0400 Subject: [PATCH 07/19] vfb: Don't reimplement micmap so much In-Reply-To: <1411666655-1089-1-git-send-email-ajax@redhat.com> References: <1411666655-1089-1-git-send-email-ajax@redhat.com> Message-ID: <1411666655-1089-8-git-send-email-ajax@redhat.com> We know we're atop fb which is atop micmap, the only thing we need to hook is InstallColormap to handle the xwd colormap change. Signed-off-by: Adam Jackson --- hw/vfb/InitOutput.c | 55 +++-------------------------------------------------- 1 file changed, 3 insertions(+), 52 deletions(-) diff --git a/hw/vfb/InitOutput.c b/hw/vfb/InitOutput.c index 9c49264..bcaaa85 100644 --- a/hw/vfb/InitOutput.c +++ b/hw/vfb/InitOutput.c @@ -380,26 +380,10 @@ ddxProcessArgument(int argc, char *argv[], int i) return 0; } -static DevPrivateKeyRec cmapScrPrivateKeyRec; - -#define cmapScrPrivateKey (&cmapScrPrivateKeyRec) - -#define GetInstalledColormap(s) ((ColormapPtr) dixLookupPrivate(&(s)->devPrivates, cmapScrPrivateKey)) -#define SetInstalledColormap(s,c) (dixSetPrivate(&(s)->devPrivates, cmapScrPrivateKey, c)) - -static int -vfbListInstalledColormaps(ScreenPtr pScreen, Colormap * pmaps) -{ - /* By the time we are processing requests, we can guarantee that there - * is always a colormap installed */ - *pmaps = GetInstalledColormap(pScreen)->mid; - return 1; -} - static void vfbInstallColormap(ColormapPtr pmap) { - ColormapPtr oldpmap = GetInstalledColormap(pmap->pScreen); + ColormapPtr oldpmap = GetInstalledmiColormap(pmap->pScreen); if (pmap != oldpmap) { int entries; @@ -410,11 +394,7 @@ vfbInstallColormap(ColormapPtr pmap) xColorItem *defs; int i; - if (oldpmap != (ColormapPtr) None) - WalkTree(pmap->pScreen, TellLostMap, (char *) &oldpmap->mid); - /* Install pmap */ - SetInstalledColormap(pmap->pScreen, pmap); - WalkTree(pmap->pScreen, TellGainedMap, (char *) &pmap->mid); + miInstallColormap(pmap); entries = pmap->pVisual->ColormapEntries; pXWDHeader = vfbScreens[pmap->pScreen->myNum].pXWDHeader; @@ -452,28 +432,12 @@ vfbInstallColormap(ColormapPtr pmap) } static void -vfbUninstallColormap(ColormapPtr pmap) -{ - ColormapPtr curpmap = GetInstalledColormap(pmap->pScreen); - - if (pmap == curpmap) { - if (pmap->mid != pmap->pScreen->defColormap) { - dixLookupResourceByType((void **) &curpmap, - pmap->pScreen->defColormap, - RT_COLORMAP, serverClient, - DixInstallAccess); - (*pmap->pScreen->InstallColormap) (curpmap); - } - } -} - -static void vfbStoreColors(ColormapPtr pmap, int ndef, xColorItem * pdefs) { XWDColor *pXWDCmap; int i; - if (pmap != GetInstalledColormap(pmap->pScreen)) { + if (pmap != GetInstalledmiColormap(pmap->pScreen)) { return; } @@ -761,18 +725,10 @@ static Bool vfbCloseScreen(ScreenPtr pScreen) { vfbScreenInfoPtr pvfb = &vfbScreens[pScreen->myNum]; - int i; pScreen->CloseScreen = pvfb->closeScreen; /* - * XXX probably lots of stuff to clean. For now, - * clear installed colormaps so that server reset works correctly. - */ - for (i = 0; i < screenInfo.numScreens; i++) - SetInstalledColormap(screenInfo.screens[i], NULL); - - /* * fb overwrites miCloseScreen, so do this here */ if (pScreen->devPrivate) @@ -790,9 +746,6 @@ vfbScreenInit(ScreenPtr pScreen, int argc, char **argv) int ret; char *pbits; - if (!dixRegisterPrivateKey(&cmapScrPrivateKeyRec, PRIVATE_SCREEN, 0)) - return FALSE; - if (dpix == 0) dpix = 100; @@ -859,8 +812,6 @@ vfbScreenInit(ScreenPtr pScreen, int argc, char **argv) return FALSE; pScreen->InstallColormap = vfbInstallColormap; - pScreen->UninstallColormap = vfbUninstallColormap; - pScreen->ListInstalledColormaps = vfbListInstalledColormaps; pScreen->SaveScreen = vfbSaveScreen; pScreen->StoreColors = vfbStoreColors; -- 1.9.3 From ajax at redhat.com Thu Sep 25 10:37:24 2014 From: ajax at redhat.com (Adam Jackson) Date: Thu, 25 Sep 2014 13:37:24 -0400 Subject: [PATCH 08/19] xfree86: Remove xv clip notify driver hook In-Reply-To: <1411666655-1089-1-git-send-email-ajax@redhat.com> References: <1411666655-1089-1-git-send-email-ajax@redhat.com> Message-ID: <1411666655-1089-9-git-send-email-ajax@redhat.com> Nothing's using it. Signed-off-by: Adam Jackson --- hw/xfree86/common/xf86xv.c | 4 ---- hw/xfree86/common/xf86xv.h | 3 --- hw/xfree86/common/xf86xvpriv.h | 1 - 3 files changed, 8 deletions(-) diff --git a/hw/xfree86/common/xf86xv.c b/hw/xfree86/common/xf86xv.c index d342bde..0e67690 100644 --- a/hw/xfree86/common/xf86xv.c +++ b/hw/xfree86/common/xf86xv.c @@ -1117,10 +1117,6 @@ xf86XVClipNotify(WindowPtr pWin, int dx, int dy) pPriv->pCompositeClip = NULL; - if (pPriv->AdaptorRec->ClipNotify) - (*pPriv->AdaptorRec->ClipNotify) (pPriv->pScrn, pPriv->DevPriv.ptr, - pWin, dx, dy); - pPriv->clipChanged = TRUE; if (ScreenPriv->PostValidateTree == PostValidateTreeUndefined) { diff --git a/hw/xfree86/common/xf86xv.h b/hw/xfree86/common/xf86xv.h index c6455d7..6f8662c 100644 --- a/hw/xfree86/common/xf86xv.h +++ b/hw/xfree86/common/xf86xv.h @@ -95,8 +95,6 @@ typedef int (*QueryImageAttributesFuncPtr) (ScrnInfoPtr pScrn, int image, unsigned short *width, unsigned short *height, int *pitches, int *offsets); -typedef void (*ClipNotifyFuncPtr) (ScrnInfoPtr pScrn, void *data, - WindowPtr window, int dx, int dy); typedef enum { XV_OFF, @@ -145,7 +143,6 @@ typedef struct { PutImageFuncPtr PutImage; ReputImageFuncPtr ReputImage; /* image/still */ QueryImageAttributesFuncPtr QueryImageAttributes; - ClipNotifyFuncPtr ClipNotify; } XF86VideoAdaptorRec, *XF86VideoAdaptorPtr; typedef struct { diff --git a/hw/xfree86/common/xf86xvpriv.h b/hw/xfree86/common/xf86xvpriv.h index c0dff16..8fb22e6 100644 --- a/hw/xfree86/common/xf86xvpriv.h +++ b/hw/xfree86/common/xf86xvpriv.h @@ -61,7 +61,6 @@ typedef struct { PutImageFuncPtr PutImage; ReputImageFuncPtr ReputImage; QueryImageAttributesFuncPtr QueryImageAttributes; - ClipNotifyFuncPtr ClipNotify; } XvAdaptorRecPrivate, *XvAdaptorRecPrivatePtr; typedef struct { -- 1.9.3 From ajax at redhat.com Thu Sep 25 10:37:25 2014 From: ajax at redhat.com (Adam Jackson) Date: Thu, 25 Sep 2014 13:37:25 -0400 Subject: [PATCH 09/19] xfree86: Remove some can't-happen printf from xf86CreateRootWindow In-Reply-To: <1411666655-1089-1-git-send-email-ajax@redhat.com> References: <1411666655-1089-1-git-send-email-ajax@redhat.com> Message-ID: <1411666655-1089-10-git-send-email-ajax@redhat.com> Signed-off-by: Adam Jackson --- hw/xfree86/common/xf86Init.c | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/hw/xfree86/common/xf86Init.c b/hw/xfree86/common/xf86Init.c index b197c1c..6051fd2 100644 --- a/hw/xfree86/common/xf86Init.c +++ b/hw/xfree86/common/xf86Init.c @@ -314,14 +314,6 @@ xf86CreateRootWindow(WindowPtr pWin) DebugF("xf86CreateRootWindow(%p)\n", pWin); - if (pScreen->CreateWindow != xf86CreateRootWindow) { - /* Can't find hook we are hung on */ - xf86DrvMsg(pScreen->myNum, X_WARNING /* X_ERROR */ , - "xf86CreateRootWindow %p called when not in pScreen->CreateWindow %p n", - (void *) xf86CreateRootWindow, - (void *) pScreen->CreateWindow); - } - /* Unhook this function ... */ pScreen->CreateWindow = create_window; dixSetPrivate(&pScreen->devPrivates, xf86CreateRootWindowKey, NULL); @@ -349,15 +341,8 @@ xf86CreateRootWindow(WindowPtr pWin) ret &= (err == Success); } - else { - xf86Msg(X_ERROR, "xf86CreateRootWindow unexpectedly called with " - "non-root window %p (parent %p)\n", - (void *) pWin, (void *) pWin->parent); - ret = FALSE; - } } - DebugF("xf86CreateRootWindow() returns %d\n", ret); return ret; } -- 1.9.3 From ajax at redhat.com Thu Sep 25 10:37:26 2014 From: ajax at redhat.com (Adam Jackson) Date: Thu, 25 Sep 2014 13:37:26 -0400 Subject: [PATCH 10/19] xfree86: Remove Option "TextClockFreq" In-Reply-To: <1411666655-1089-1-git-send-email-ajax@redhat.com> References: <1411666655-1089-1-git-send-email-ajax@redhat.com> Message-ID: <1411666655-1089-11-git-send-email-ajax@redhat.com> No modern driver pays attention to this. Presumably there existed hardware once where you couldn't just read the right values out of the CRTC. Signed-off-by: Adam Jackson --- hw/xfree86/common/xf86Config.c | 1 - hw/xfree86/common/xf86Configure.c | 1 - hw/xfree86/common/xf86str.h | 2 -- hw/xfree86/man/xorg.conf.man | 6 ------ hw/xfree86/parser/Device.c | 10 ---------- hw/xfree86/parser/xf86Parser.h | 1 - hw/xfree86/parser/xf86tokens.h | 1 - hw/xwin/winconfig.h | 1 - 8 files changed, 23 deletions(-) diff --git a/hw/xfree86/common/xf86Config.c b/hw/xfree86/common/xf86Config.c index 779ba6f..53e61a0 100644 --- a/hw/xfree86/common/xf86Config.c +++ b/hw/xfree86/common/xf86Config.c @@ -2168,7 +2168,6 @@ configDevice(GDevPtr devicep, XF86ConfDevicePtr conf_device, Bool active) devicep->IOBase = conf_device->dev_io_base; devicep->clockchip = conf_device->dev_clockchip; devicep->busID = conf_device->dev_busid; - devicep->textClockFreq = conf_device->dev_textclockfreq; devicep->chipID = conf_device->dev_chipid; devicep->chipRev = conf_device->dev_chiprev; devicep->options = conf_device->dev_option_lst; diff --git a/hw/xfree86/common/xf86Configure.c b/hw/xfree86/common/xf86Configure.c index 967bfbc..8dbca3a 100644 --- a/hw/xfree86/common/xf86Configure.c +++ b/hw/xfree86/common/xf86Configure.c @@ -267,7 +267,6 @@ configureDeviceSection(int screennum) for (i = 0; (i < MAXDACSPEEDS) && (i < CONF_MAXDACSPEEDS); i++) ptr->dev_dacSpeeds[i] = DevToConfig[screennum].GDev.dacSpeeds[i]; ptr->dev_videoram = DevToConfig[screennum].GDev.videoRam; - ptr->dev_textclockfreq = DevToConfig[screennum].GDev.textClockFreq; ptr->dev_bios_base = DevToConfig[screennum].GDev.BiosBase; ptr->dev_mem_base = DevToConfig[screennum].GDev.MemBase; ptr->dev_io_base = DevToConfig[screennum].GDev.IOBase; diff --git a/hw/xfree86/common/xf86str.h b/hw/xfree86/common/xf86str.h index a81e886..9ad1b90 100644 --- a/hw/xfree86/common/xf86str.h +++ b/hw/xfree86/common/xf86str.h @@ -403,7 +403,6 @@ typedef struct { Bool active; Bool inUse; int videoRam; - int textClockFreq; unsigned long BiosBase; /* Base address of video BIOS */ unsigned long MemBase; /* Frame buffer base address */ unsigned long IOBase; @@ -753,7 +752,6 @@ typedef struct _ScrnInfoRec { unsigned long memPhysBase; /* Physical address of FB */ unsigned long fbOffset; /* Offset of FB in the above */ int memClk; /* memory clock */ - int textClockFreq; /* clock of text mode */ Bool flipPixels; /* swap default black/white */ void *options; diff --git a/hw/xfree86/man/xorg.conf.man b/hw/xfree86/man/xorg.conf.man index 378f26b..d26c3cc 100644 --- a/hw/xfree86/man/xorg.conf.man +++ b/hw/xfree86/man/xorg.conf.man @@ -1449,12 +1449,6 @@ This optional entry specifies the chip revision number. This can be used to override the auto-detection, but that should only be done when the driver-specific documentation recommends it. .TP 7 -.BI "TextClockFreq " "freq" -This optional entry specifies the pixel clock frequency that is used -for the regular text mode. -The frequency is specified in MHz. -This is rarely used. -.TP 7 .BI "MatchSeat " "seat\-id" Only apply this .B Device diff --git a/hw/xfree86/parser/Device.c b/hw/xfree86/parser/Device.c index d3ac293..28c274d 100644 --- a/hw/xfree86/parser/Device.c +++ b/hw/xfree86/parser/Device.c @@ -83,7 +83,6 @@ xf86ConfigSymTabRec DeviceTab[] = { {CARD, "card"}, {DRIVER, "driver"}, {BUSID, "busid"}, - {TEXTCLOCKFRQ, "textclockfreq"}, {IRQ, "irq"}, {SCREEN, "screen"}, {-1, ""}, @@ -212,11 +211,6 @@ xf86parseDeviceSection(void) ptr->dev_clocks = i; xf86unGetToken(token); break; - case TEXTCLOCKFRQ: - if ((token = xf86getSubToken(&(ptr->dev_comment))) != NUMBER) - Error(NUMBER_MSG, "TextClockFreq"); - ptr->dev_textclockfreq = (int) (xf86_lex_val.realnum * 1000.0 + 0.5); - break; case MATCHSEAT: if (xf86getSubToken(&(ptr->dev_comment)) != STRING) Error(QUOTE_MSG, "MatchSeat"); @@ -312,10 +306,6 @@ xf86printDeviceSection(FILE * cf, XF86ConfDevicePtr ptr) fprintf(cf, "%.1f ", (double) ptr->dev_clock[i] / 1000.0); fprintf(cf, "\n"); } - if (ptr->dev_textclockfreq) { - fprintf(cf, "\tTextClockFreq %.1f\n", - (double) ptr->dev_textclockfreq / 1000.0); - } if (ptr->dev_busid) fprintf(cf, "\tBusID \"%s\"\n", ptr->dev_busid); if (ptr->dev_screen > 0) diff --git a/hw/xfree86/parser/xf86Parser.h b/hw/xfree86/parser/xf86Parser.h index 3fa5b71..73187f3 100644 --- a/hw/xfree86/parser/xf86Parser.h +++ b/hw/xfree86/parser/xf86Parser.h @@ -211,7 +211,6 @@ typedef struct { const char *dev_ramdac; int dev_dacSpeeds[CONF_MAXDACSPEEDS]; int dev_videoram; - int dev_textclockfreq; unsigned long dev_bios_base; unsigned long dev_mem_base; unsigned long dev_io_base; diff --git a/hw/xfree86/parser/xf86tokens.h b/hw/xfree86/parser/xf86tokens.h index 5c01ce7..8e15f12 100644 --- a/hw/xfree86/parser/xf86tokens.h +++ b/hw/xfree86/parser/xf86tokens.h @@ -187,7 +187,6 @@ typedef enum { CHIPREV, CARD, BUSID, - TEXTCLOCKFRQ, IRQ, /* Keyboard tokens */ diff --git a/hw/xwin/winconfig.h b/hw/xwin/winconfig.h index 798c779..f079368 100644 --- a/hw/xwin/winconfig.h +++ b/hw/xwin/winconfig.h @@ -57,7 +57,6 @@ typedef struct { Bool active; Bool inUse; int videoRam; - int textClockFreq; void *options; int screen; /* For multi-CRTC cards */ } GDevRec, *GDevPtr; -- 1.9.3 From ajax at redhat.com Thu Sep 25 10:37:27 2014 From: ajax at redhat.com (Adam Jackson) Date: Thu, 25 Sep 2014 13:37:27 -0400 Subject: [PATCH 11/19] xfree86: Remove spurious xf86ConfigError In-Reply-To: <1411666655-1089-1-git-send-email-ajax@redhat.com> References: <1411666655-1089-1-git-send-email-ajax@redhat.com> Message-ID: <1411666655-1089-12-git-send-email-ajax@redhat.com> READABLE. Signed-off-by: Adam Jackson --- hw/xfree86/common/xf86Config.c | 48 +++++++++++------------------------------- 1 file changed, 12 insertions(+), 36 deletions(-) diff --git a/hw/xfree86/common/xf86Config.c b/hw/xfree86/common/xf86Config.c index 53e61a0..546055d 100644 --- a/hw/xfree86/common/xf86Config.c +++ b/hw/xfree86/common/xf86Config.c @@ -571,25 +571,6 @@ xf86DriverlistFromCompile(void) return driverlist; } -/* - * xf86ConfigError -- - * Print a READABLE ErrorMessage!!! All information that is - * available is printed. - */ -static void -_X_ATTRIBUTE_PRINTF(1, 2) -xf86ConfigError(const char *msg, ...) -{ - va_list ap; - - ErrorF("\nConfig Error:\n"); - va_start(ap, msg); - VErrorF(msg, ap); - va_end(ap); - ErrorF("\n"); - return; -} - static void configFiles(XF86ConfFilesPtr fileconf) { @@ -994,9 +975,8 @@ configServerFlags(XF86ConfFlagsPtr flagsconf, XF86OptionPtr layoutopts) if ((i >= 0) && (i < MAX_TIME_IN_MIN)) ScreenSaverTime = defaultScreenSaverTime = i * MILLI_PER_MIN; else if (i != -1) - xf86ConfigError - ("BlankTime value %d outside legal range of 0 - %d minutes", i, - MAX_TIME_IN_MIN); + ErrorF("BlankTime value %d outside legal range of 0 - %d minutes\n", + i, MAX_TIME_IN_MIN); #ifdef DPMSExtension i = -1; @@ -1004,25 +984,22 @@ configServerFlags(XF86ConfFlagsPtr flagsconf, XF86OptionPtr layoutopts) if ((i >= 0) && (i < MAX_TIME_IN_MIN)) DPMSStandbyTime = i * MILLI_PER_MIN; else if (i != -1) - xf86ConfigError - ("StandbyTime value %d outside legal range of 0 - %d minutes", i, - MAX_TIME_IN_MIN); + ErrorF("StandbyTime value %d outside legal range of 0 - %d minutes\n", + i, MAX_TIME_IN_MIN); i = -1; xf86GetOptValInteger(FlagOptions, FLAG_DPMS_SUSPENDTIME, &i); if ((i >= 0) && (i < MAX_TIME_IN_MIN)) DPMSSuspendTime = i * MILLI_PER_MIN; else if (i != -1) - xf86ConfigError - ("SuspendTime value %d outside legal range of 0 - %d minutes", i, - MAX_TIME_IN_MIN); + ErrorF("SuspendTime value %d outside legal range of 0 - %d minutes\n", + i, MAX_TIME_IN_MIN); i = -1; xf86GetOptValInteger(FlagOptions, FLAG_DPMS_OFFTIME, &i); if ((i >= 0) && (i < MAX_TIME_IN_MIN)) DPMSOffTime = i * MILLI_PER_MIN; else if (i != -1) - xf86ConfigError - ("OffTime value %d outside legal range of 0 - %d minutes", i, - MAX_TIME_IN_MIN); + ErrorF("OffTime value %d outside legal range of 0 - %d minutes\n", + i, MAX_TIME_IN_MIN); #endif i = -1; @@ -1037,7 +1014,7 @@ configServerFlags(XF86ConfFlagsPtr flagsconf, XF86OptionPtr layoutopts) case -1: break; default: - xf86ConfigError("Pixmap option's value (%d) must be 24 or 32\n", i); + ErrorF("Pixmap option's value (%d) must be 24 or 32\n", i); return FALSE; } if (xf86Pix24 != Pix24DontCare) { @@ -2049,8 +2026,8 @@ configMonitor(MonPtr monitorp, XF86ConfMonitorPtr conf_monitor) badgamma = monitorp->gamma.blue; } if (badgamma > GAMMA_ZERO) { - xf86ConfigError("Gamma value %.f is out of range (%.2f - %.1f)\n", - badgamma, GAMMA_MIN, GAMMA_MAX); + ErrorF("Gamma value %.f is out of range (%.2f - %.1f)\n", badgamma, + GAMMA_MIN, GAMMA_MAX); return FALSE; } @@ -2109,8 +2086,7 @@ configDisplay(DispPtr displayp, XF86ConfDisplayPtr conf_display) if (conf_display->disp_visual) { displayp->defaultVisual = lookupVisual(conf_display->disp_visual); if (displayp->defaultVisual == -1) { - xf86ConfigError("Invalid visual name: \"%s\"", - conf_display->disp_visual); + ErrorF("Invalid visual name: \"%s\"\n", conf_display->disp_visual); return FALSE; } } -- 1.9.3 From ajax at redhat.com Thu Sep 25 10:37:29 2014 From: ajax at redhat.com (Adam Jackson) Date: Thu, 25 Sep 2014 13:37:29 -0400 Subject: [PATCH 13/19] xfree86: Remove DisplayID support In-Reply-To: <1411666655-1089-1-git-send-email-ajax@redhat.com> References: <1411666655-1089-1-git-send-email-ajax@redhat.com> Message-ID: <1411666655-1089-14-git-send-email-ajax@redhat.com> Not actually wired up so it's fairly useless. Signed-off-by: Adam Jackson --- hw/xfree86/ddc/ddc.c | 58 ----- hw/xfree86/ddc/xf86DDC.h | 5 - hw/xfree86/modes/Makefile.am | 1 - hw/xfree86/modes/xf86DisplayIDModes.c | 444 ---------------------------------- 4 files changed, 508 deletions(-) delete mode 100644 hw/xfree86/modes/xf86DisplayIDModes.c diff --git a/hw/xfree86/ddc/ddc.c b/hw/xfree86/ddc/ddc.c index 04d1a09..15e4beb 100644 --- a/hw/xfree86/ddc/ddc.c +++ b/hw/xfree86/ddc/ddc.c @@ -468,61 +468,3 @@ xf86DoEDID_DDC2(ScrnInfoPtr pScrn, I2CBusPtr pBus) { return xf86DoEEDID(pScrn, pBus, FALSE); } - -/* XXX write me */ -static void * -DDC2ReadDisplayID(void) -{ - return FALSE; -} - -/** - * Attempts to probe the monitor for DisplayID information, if NoDDC and - * NoDDC2 are unset. DisplayID blocks are interpreted and the results - * returned in an xf86MonPtr. - * - * This function does not affect the list of modes used by drivers -- it is up - * to the driver to decide policy on what to do with DisplayID information. - * - * @return pointer to a new xf86MonPtr containing the DisplayID information. - * @return NULL if no monitor attached or failure to interpret the DisplayID. - */ -xf86MonPtr -xf86DoDisplayID(ScrnInfoPtr pScrn, I2CBusPtr pBus) -{ - unsigned char *did = NULL; - xf86MonPtr tmp = NULL; - I2CDevPtr dev = NULL; - - /* Default DDC and DDC2 to enabled. */ - Bool noddc = FALSE, noddc2 = FALSE; - OptionInfoPtr options; - - options = malloc(sizeof(DDCOptions)); - if (!options) - return NULL; - memcpy(options, DDCOptions, sizeof(DDCOptions)); - xf86ProcessOptions(pScrn->scrnIndex, pScrn->options, options); - - xf86GetOptValBool(options, DDCOPT_NODDC, &noddc); - xf86GetOptValBool(options, DDCOPT_NODDC2, &noddc2); - free(options); - - if (noddc || noddc2) - return NULL; - - if (!(dev = DDC2Init(pBus))) - return NULL; - - if ((did = DDC2ReadDisplayID())) { - tmp = calloc(1, sizeof(*tmp)); - if (!tmp) - return NULL; - - tmp->scrnIndex = pScrn->scrnIndex; - tmp->flags |= MONITOR_DISPLAYID; - tmp->rawData = did; - } - - return tmp; -} diff --git a/hw/xfree86/ddc/xf86DDC.h b/hw/xfree86/ddc/xf86DDC.h index de8e718..727813f 100644 --- a/hw/xfree86/ddc/xf86DDC.h +++ b/hw/xfree86/ddc/xf86DDC.h @@ -48,11 +48,6 @@ extern _X_EXPORT Bool xf86SetDDCproperties(ScrnInfoPtr pScreen, xf86MonPtr DDC); extern _X_EXPORT Bool xf86MonitorIsHDMI(xf86MonPtr mon); -extern _X_EXPORT xf86MonPtr xf86DoDisplayID(ScrnInfoPtr pScrn, I2CBusPtr pBus); - -extern _X_EXPORT void - xf86DisplayIDMonitorSet(int scrnIndex, MonPtr mon, xf86MonPtr DDC); - extern _X_EXPORT DisplayModePtr FindDMTMode(int hsize, int vsize, int refresh, Bool rb); diff --git a/hw/xfree86/modes/Makefile.am b/hw/xfree86/modes/Makefile.am index 220643f..6eb162a 100644 --- a/hw/xfree86/modes/Makefile.am +++ b/hw/xfree86/modes/Makefile.am @@ -10,7 +10,6 @@ libxf86modes_la_SOURCES = \ xf86Cursors.c \ xf86cvt.c \ xf86gtf.c \ - xf86DisplayIDModes.c \ xf86EdidModes.c \ xf86Modes.c \ xf86Modes.h \ diff --git a/hw/xfree86/modes/xf86DisplayIDModes.c b/hw/xfree86/modes/xf86DisplayIDModes.c deleted file mode 100644 index c2e7718..0000000 --- a/hw/xfree86/modes/xf86DisplayIDModes.c +++ /dev/null @@ -1,444 +0,0 @@ -/* - * Copyright 2009 Red Hat, Inc. - * - * 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 - * on the rights to use, copy, modify, merge, publish, distribute, sub - * license, and/or sell copies of the Software, and to permit persons to whom - * them Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) 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 MERCHANTIBILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS 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. - * - * Authors: - * Adam Jackson - */ - -#include "xorg-config.h" -#include "xf86.h" -#include "xf86Modes.h" -#include "xf86str.h" -#include "edid.h" -#include "xf86DDC.h" - -typedef void (*did_proc) (int scrnIndex, unsigned char *data, void *closure); - -#define DID_PRODUCT_ID 0x00 -#define DID_DISPLAY_PARAMETERS 0x01 -#define DID_COLOR_INFO 0x02 -#define DID_TIMING_1_DETAILED 0x03 -#define DID_TIMING_2_DETAILED 0x04 -#define DID_TIMING_3_SHORT 0x05 -#define DID_TIMING_4_DMT 0x06 -#define DID_TIMING_VESA 0x07 -#define DID_TIMING_CEA 0x08 -#define DID_TIMING_RANGE_LIMITS 0x09 -#define DID_PRODUCT_SERIAL 0x0A -#define DID_ASCII_STRING 0x0B -#define DID_DISPLAY_DEVICE 0x0C -#define DID_POWER_SEQUENCING 0x0D -#define DID_TRANSFER_INFO 0x0E -#define DID_DISPLAY_INTERFACE 0x0F -#define DID_STEREO 0x10 -#define DID_VENDOR 0x7F - -#define extract_le16(x, i) ((x[i+1] << 8) + (x[i])) -#define extract_le24(x, i) ((x[i+2] << 16) + (x[i+1] << 8) + (x[i])) - -static DisplayModePtr -modeCalloc(void) -{ - return calloc(1, sizeof(DisplayModeRec)); -} - -/* - * How awesome is it to have two detailed timing formats, neither of which - * are compatible with the format in EDID? So awesome. - */ - -static void -didDetailedTiming1(int i, unsigned char *x, MonPtr mon) -{ - DisplayModePtr m = modeCalloc(); - - if (!m) - return; - - m->Clock = extract_le24(x, 0); - - m->HDisplay = extract_le16(x, 4); - m->HSyncStart = m->HDisplay + (extract_le16(x, 8) & 0x7f); - m->HSyncEnd = m->HSyncStart + extract_le16(x, 10); - m->HTotal = m->HDisplay + extract_le16(x, 6); - m->Flags |= (x[9] & 0x80) ? V_PHSYNC : V_NHSYNC; - - m->VDisplay = extract_le16(x, 12); - m->VSyncStart = m->VDisplay + (extract_le16(x, 16) & 0x7f); - m->VSyncEnd = m->VSyncStart + extract_le16(x, 18); - m->VTotal = m->VDisplay + extract_le16(x, 14); - m->Flags |= (x[17] & 0x80) ? V_PVSYNC : V_NVSYNC; - - m->type = M_T_DRIVER; - if (x[3] & 0x80) - m->type |= M_T_PREFERRED; - - /* XXX double check handling of this */ - if (x[3] & 0x10) - m->Flags |= V_INTERLACE; - - mon->Modes = xf86ModesAdd(mon->Modes, m); -} - -/* XXX no sync bits. what to do? */ -static void -didDetailedTiming2(int i, unsigned char *x, MonPtr mon) -{ - DisplayModePtr mode = modeCalloc(); - - if (!mode) - return; - - mode->Clock = extract_le24(x, 0); - - /* horiz sizes are in character cells, not pixels, hence * 8 */ - mode->HDisplay = ((extract_le16(x, 4) & 0x01ff) + 1) * 8; - mode->HSyncStart = mode->HDisplay + (((x[6] & 0xf0) >> 4) + 1) * 8; - mode->HSyncEnd = mode->HSyncStart + ((x[6] & 0x0f) + 1) * 8; - mode->HTotal = mode->HDisplay + ((x[5] >> 1) + 1) * 8; - - mode->VDisplay = extract_le16(x, 7) & 0x07ff; - mode->VSyncStart = mode->VDisplay + (x[10] >> 4) + 1; - mode->VSyncEnd = mode->VSyncStart + (x[10] & 0x0f) + 1; - mode->VTotal = mode->VDisplay + x[9]; - - mode->status = M_T_DRIVER; - if (x[3] & 0x80) - mode->status |= M_T_PREFERRED; - - /* XXX double check handling of this */ - if (x[3] & 0x10) - mode->Flags |= V_INTERLACE; - - mon->Modes = xf86ModesAdd(mon->Modes, mode); -} - -static void -didShortTiming(int i, unsigned char *x, MonPtr mon) -{ - DisplayModePtr m; - int w, h, r; - - w = (x[1] + 1) * 8; - switch (x[0] & 0x0f) { - case 0: - h = w; - break; - case 1: - h = (w * 4) / 5; - break; - case 2: - h = (w * 3) / 4; - break; - case 3: - h = (w * 9) / 15; - break; - case 4: - h = (w * 9) / 16; - break; - case 5: - h = (w * 10) / 16; - break; - default: - return; - } - r = (x[2] & 0x7f) + 1; - - m = xf86CVTMode(w, h, r, ! !(x[0] & 0x10), ! !(x[2] & 0x80)); - - m->type = M_T_DRIVER; - if (x[0] & 0x80) - m->type |= M_T_PREFERRED; - - mon->Modes = xf86ModesAdd(mon->Modes, m); -} - -static void -didDMTTiming(int i, unsigned char *x, void *closure) -{ - MonPtr mon = closure; - - mon->Modes = xf86ModesAdd(mon->Modes, xf86DuplicateMode(DMTModes + *x)); -} - -#define RB 1 -#define INT 2 -static const struct did_dmt { - short w, h, r, f; -} did_dmt[] = { - /* byte 3 */ - {640, 350, 85, 0}, - {640, 400, 85, 0}, - {720, 400, 85, 0}, - {640, 480, 60, 0}, - {640, 480, 72, 0}, - {640, 480, 75, 0}, - {640, 480, 85, 0}, - {800, 600, 56, 0}, - /* byte 4 */ - {800, 600, 60, 0}, - {800, 600, 72, 0}, - {800, 600, 75, 0}, - {800, 600, 85, 0}, - {800, 600, 120, RB}, - {848, 480, 60, 0}, - {1024, 768, 43, INT}, - {1024, 768, 60, 0}, - /* byte 5 */ - {1024, 768, 70, 0}, - {1024, 768, 75, 0}, - {1024, 768, 85, 0}, - {1024, 768, 120, RB}, - {1152, 864, 75, 0}, - {1280, 768, 60, RB}, - {1280, 768, 60, 0}, - {1280, 768, 75, 0}, - /* byte 6 */ - {1280, 768, 85, 0}, - {1280, 768, 120, RB}, - {1280, 800, 60, RB}, - {1280, 800, 60, 0}, - {1280, 800, 75, 0}, - {1280, 800, 85, 0}, - {1280, 800, 120, RB}, - {1280, 960, 60, 0}, - /* byte 7 */ - {1280, 960, 85, 0}, - {1280, 960, 120, RB}, - {1280, 1024, 60, 0}, - {1280, 1024, 75, 0}, - {1280, 1024, 85, 0}, - {1280, 1024, 120, RB}, - {1360, 768, 60, 0}, - {1360, 768, 120, RB}, - /* byte 8 */ - {1400, 1050, 60, RB}, - {1400, 1050, 60, 0}, - {1400, 1050, 75, 0}, - {1400, 1050, 85, 0}, - {1400, 1050, 120, RB}, - {1440, 900, 60, RB}, - {1440, 900, 60, 0}, - {1440, 900, 75, 0}, - /* byte 9 */ - {1440, 900, 85, 0}, - {1440, 900, 120, RB}, - {1600, 1200, 60, 0}, - {1600, 1200, 65, 0}, - {1600, 1200, 70, 0}, - {1600, 1200, 75, 0}, - {1600, 1200, 85, 0}, - {1600, 1200, 120, RB}, - /* byte a */ - {1680, 1050, 60, RB}, - {1680, 1050, 60, 0}, - {1680, 1050, 75, 0}, - {1680, 1050, 85, 0}, - {1680, 1050, 120, RB}, - {1792, 1344, 60, 0}, - {1792, 1344, 75, 0}, - {1792, 1344, 120, RB}, - /* byte b */ - {1856, 1392, 60, 0}, - {1856, 1392, 75, 0}, - {1856, 1392, 120, RB}, - {1920, 1200, 60, RB}, - {1920, 1200, 60, 0}, - {1920, 1200, 75, 0}, - {1920, 1200, 85, 0}, - {1920, 1200, 120, RB}, - /* byte c */ - {1920, 1440, 60, 0}, - {1920, 1440, 75, 0}, - {1920, 1440, 120, RB}, - {2560, 1600, 60, RB}, - {2560, 1600, 60, 0}, - {2560, 1600, 75, 0}, - {2560, 1600, 85, 0}, - {2560, 1600, 120, RB}, -}; - -static void -didVesaTiming(int scrn, unsigned char *x, MonPtr mon) -{ - int i, j; - - x += 3; - - for (i = 0; i < 10; i++) - for (j = 0; j < 8; j++) - if (x[i] & (1 << j)) { - const struct did_dmt *d = &(did_dmt[i * 8 + j]); - - if (d->f == INT) - continue; - mon->Modes = xf86ModesAdd(mon->Modes, - FindDMTMode(d->w, d->h, d->r, - d->f == RB)); - } - -} - -static void -handleDisplayIDBlock(int scrnIndex, unsigned char *x, void *closure) -{ - MonPtr mon = closure; - - switch (x[0]) { - case DID_DISPLAY_PARAMETERS: - /* w/h are in decimillimeters */ - mon->widthmm = (extract_le16(x, 3) + 5) / 10; - mon->heightmm = (extract_le16(x, 5) + 5) / 10; - /* XXX pixel count, feature flags, gamma, aspect, color depth */ - break; - - case DID_TIMING_RANGE_LIMITS: - { - int n; - - mon->maxPixClock = max(mon->maxPixClock, extract_le24(x, 6) * 10); - - n = mon->nHsync++; - if (n < MAX_HSYNC) { - mon->hsync[n].lo = x[9]; - mon->hsync[n].hi = x[10]; - } - else { - n = MAX_HSYNC; - } - n = mon->nVrefresh++; - if (n < MAX_VREFRESH) { - mon->vrefresh[n].lo = x[13]; - mon->vrefresh[n].hi = x[14]; - } - else { - n = MAX_VREFRESH; - } - break; - } - - case DID_TIMING_1_DETAILED: - { - int i; - - for (i = 0; i < x[2]; i += 20) - didDetailedTiming1(scrnIndex, x + i + 3, mon); - break; - } - - case DID_TIMING_2_DETAILED: - { - int i; - - for (i = 0; i < x[2]; i += 11) - didDetailedTiming2(scrnIndex, x + i + 3, mon); - break; - } - - case DID_TIMING_3_SHORT: - { - int i; - - for (i = 0; i < x[2]; i += 3) - didShortTiming(scrnIndex, x + i + 3, mon); - break; - } - - case DID_TIMING_4_DMT: - { - int i; - - for (i = 0; i < x[2]; i++) - didDMTTiming(scrnIndex, x + i + 3, mon); - break; - } - - case DID_TIMING_VESA: - didVesaTiming(scrnIndex, x, mon); - break; - - /* XXX pixel format, ar, orientation, subpixel, dot pitch, bit depth */ - case DID_DISPLAY_DEVICE: - - /* XXX interface, links, color encoding, ss, drm */ - case DID_DISPLAY_INTERFACE: - - /* XXX stereo */ - case DID_STEREO: - - /* nothing interesting in these */ - case DID_COLOR_INFO: - case DID_PRODUCT_SERIAL: - case DID_ASCII_STRING: - case DID_POWER_SEQUENCING: - case DID_TRANSFER_INFO: - case DID_VENDOR: - break; - - /* warn about anything else */ - default: - xf86DrvMsg(scrnIndex, X_WARNING, - "Unknown DisplayID block type %hx\n", x[0]); - break; - } -} - -static void -forEachDisplayIDBlock(int scrnIndex, unsigned char *did, did_proc proc, - void *closure) -{ - int num_extensions = did[3]; - int section_size = did[1]; - unsigned char *block; - - do { - if ((did[0] & 0xf0) != 0x10) /* not 1.x, abort */ - return; - /* XXX also, checksum */ - - block = did + 4; - - while (section_size > 0) { - int block_size = (block[2] + 2); - - proc(scrnIndex, block, closure); - - section_size -= block_size; - block += block_size; - } - - did += (did[1] + 5); - } while (num_extensions--); -} - -/* - * Fill out MonPtr with xf86MonPtr information. - */ -void -xf86DisplayIDMonitorSet(int scrnIndex, MonPtr mon, xf86MonPtr DDC) -{ - if (!mon || !DDC) - return; - - mon->DDC = DDC; - - forEachDisplayIDBlock(scrnIndex, DDC->rawData, handleDisplayIDBlock, mon); -} -- 1.9.3 From ajax at redhat.com Thu Sep 25 10:37:28 2014 From: ajax at redhat.com (Adam Jackson) Date: Thu, 25 Sep 2014 13:37:28 -0400 Subject: [PATCH 12/19] xfree86: Remove useless back-pointer to pScrn from colormap code In-Reply-To: <1411666655-1089-1-git-send-email-ajax@redhat.com> References: <1411666655-1089-1-git-send-email-ajax@redhat.com> Message-ID: <1411666655-1089-13-git-send-email-ajax@redhat.com> Signed-off-by: Adam Jackson --- hw/xfree86/common/xf86cmap.c | 46 +++++++++++++++++++------------------------- 1 file changed, 20 insertions(+), 26 deletions(-) diff --git a/hw/xfree86/common/xf86cmap.c b/hw/xfree86/common/xf86cmap.c index 3f9c880..c4bae56 100644 --- a/hw/xfree86/common/xf86cmap.c +++ b/hw/xfree86/common/xf86cmap.c @@ -74,7 +74,6 @@ typedef struct _CMapLink { } CMapLink, *CMapLinkPtr; typedef struct { - ScrnInfoPtr pScrn; CloseScreenProcPtr CloseScreen; CreateColormapProcPtr CreateColormap; DestroyColormapProcPtr DestroyColormap; @@ -123,7 +122,7 @@ static int CMapSetDGAMode(ScrnInfoPtr, int, DGADevicePtr); #endif static int CMapChangeGamma(ScrnInfoPtr, Gamma); -static void ComputeGamma(CMapScreenPtr); +static void ComputeGamma(ScrnInfoPtr, CMapScreenPtr); static Bool CMapAllocateColormapPrivate(ColormapPtr); static void CMapRefreshColors(ColormapPtr, int, int *); static void CMapSetOverscan(ColormapPtr, int, int *); @@ -194,7 +193,6 @@ xf86HandleColormaps(ScreenPtr pScreen, pScreen->InstallColormap = CMapInstallColormap; pScreen->StoreColors = CMapStoreColors; - pScreenPriv->pScrn = pScrn; pScrn->LoadPalette = loadPalette; pScrn->SetOverscan = setOverscan; pScreenPriv->maxColors = maxColors; @@ -221,7 +219,7 @@ xf86HandleColormaps(ScreenPtr pScreen, #endif pScrn->ChangeGamma = CMapChangeGamma; - ComputeGamma(pScreenPriv); + ComputeGamma(pScrn, pScreenPriv); /* get the default map */ dixLookupResourceByType((void **) &pDefMap, pScreen->defColormap, @@ -660,8 +658,7 @@ CMapRefreshColors(ColormapPtr pmap, int defs, int *indices) } if (LOAD_PALETTE(pmap)) - (*pScrn->LoadPalette) (pScreenPriv->pScrn, defs, indices, - colors, pmap->pVisual); + (*pScrn->LoadPalette) (pScrn, defs, indices, colors, pmap->pVisual); if (pScrn->SetOverscan) CMapSetOverscan(pmap, defs, indices); @@ -822,7 +819,7 @@ CMapSetOverscan(ColormapPtr pmap, int defs, int *indices) #ifdef DEBUGOVERSCAN ErrorF("SetOverscan() called from CmapSetOverscan\n"); #endif - pScrn->SetOverscan(pScreenPriv->pScrn, overscan); + pScrn->SetOverscan(pScrn, overscan); } } } @@ -851,7 +848,7 @@ CMapUnwrapScreen(ScreenPtr pScreen) } static void -ComputeGamma(CMapScreenPtr priv) +ComputeGamma(ScrnInfoPtr pScrn, CMapScreenPtr priv) { int elements = priv->gammaElements - 1; double RedGamma, GreenGamma, BlueGamma; @@ -859,28 +856,25 @@ ComputeGamma(CMapScreenPtr priv) #ifndef DONT_CHECK_GAMMA /* This check is to catch drivers that are not initialising pScrn->gamma */ - if (priv->pScrn->gamma.red < GAMMA_MIN || - priv->pScrn->gamma.red > GAMMA_MAX || - priv->pScrn->gamma.green < GAMMA_MIN || - priv->pScrn->gamma.green > GAMMA_MAX || - priv->pScrn->gamma.blue < GAMMA_MIN || - priv->pScrn->gamma.blue > GAMMA_MAX) { - - xf86DrvMsgVerb(priv->pScrn->scrnIndex, X_WARNING, 0, + if (pScrn->gamma.red < GAMMA_MIN || pScrn->gamma.red > GAMMA_MAX || + pScrn->gamma.green < GAMMA_MIN || pScrn->gamma.green > GAMMA_MAX || + pScrn->gamma.blue < GAMMA_MIN || pScrn->gamma.blue > GAMMA_MAX) { + + xf86DrvMsgVerb(pScrn->scrnIndex, X_WARNING, 0, "The %s driver didn't call xf86SetGamma() to initialise\n" - "\tthe gamma values.\n", priv->pScrn->driverName); - xf86DrvMsgVerb(priv->pScrn->scrnIndex, X_WARNING, 0, + "\tthe gamma values.\n", pScrn->driverName); + xf86DrvMsgVerb(pScrn->scrnIndex, X_WARNING, 0, "PLEASE FIX THE `%s' DRIVER!\n", - priv->pScrn->driverName); - priv->pScrn->gamma.red = 1.0; - priv->pScrn->gamma.green = 1.0; - priv->pScrn->gamma.blue = 1.0; + pScrn->driverName); + pScrn->gamma.red = 1.0; + pScrn->gamma.green = 1.0; + pScrn->gamma.blue = 1.0; } #endif - RedGamma = 1.0 / (double) priv->pScrn->gamma.red; - GreenGamma = 1.0 / (double) priv->pScrn->gamma.green; - BlueGamma = 1.0 / (double) priv->pScrn->gamma.blue; + RedGamma = 1.0 / (double) pScrn->gamma.red; + GreenGamma = 1.0 / (double) pScrn->gamma.green; + BlueGamma = 1.0 / (double) pScrn->gamma.blue; for (i = 0; i <= elements; i++) { if (RedGamma == 1.0) @@ -933,7 +927,7 @@ CMapChangeGamma(ScrnInfoPtr pScrn, Gamma gamma) pScrn->gamma.green = gamma.green; pScrn->gamma.blue = gamma.blue; - ComputeGamma(pScreenPriv); + ComputeGamma(pScrn, pScreenPriv); /* mark all colormaps on this screen */ pLink = pScreenPriv->maps; -- 1.9.3 From ajax at redhat.com Thu Sep 25 10:37:31 2014 From: ajax at redhat.com (Adam Jackson) Date: Thu, 25 Sep 2014 13:37:31 -0400 Subject: [PATCH 15/19] xfree86: Remove unused xf86Info.useDefaultFontPathFrom In-Reply-To: <1411666655-1089-1-git-send-email-ajax@redhat.com> References: <1411666655-1089-1-git-send-email-ajax@redhat.com> Message-ID: <1411666655-1089-16-git-send-email-ajax@redhat.com> Signed-off-by: Adam Jackson --- hw/xfree86/common/xf86Config.c | 2 -- hw/xfree86/common/xf86Privstr.h | 1 - 2 files changed, 3 deletions(-) diff --git a/hw/xfree86/common/xf86Config.c b/hw/xfree86/common/xf86Config.c index 8f16be3..3eb7a0f 100644 --- a/hw/xfree86/common/xf86Config.c +++ b/hw/xfree86/common/xf86Config.c @@ -959,10 +959,8 @@ configServerFlags(XF86ConfFlagsPtr flagsconf, XF86OptionPtr layoutopts) XkbFreeRMLVOSet(&set, FALSE); xf86Info.useDefaultFontPath = TRUE; - xf86Info.useDefaultFontPathFrom = X_DEFAULT; if (xf86GetOptValBool(FlagOptions, FLAG_USE_DEFAULT_FONT_PATH, &value)) { xf86Info.useDefaultFontPath = value; - xf86Info.useDefaultFontPathFrom = X_CONFIG; } /* Make sure that timers don't overflow CARD32's after multiplying */ diff --git a/hw/xfree86/common/xf86Privstr.h b/hw/xfree86/common/xf86Privstr.h index 45eb278..9e3c0dc 100644 --- a/hw/xfree86/common/xf86Privstr.h +++ b/hw/xfree86/common/xf86Privstr.h @@ -99,7 +99,6 @@ typedef struct { MessageType glxVisualsFrom; Bool useDefaultFontPath; - MessageType useDefaultFontPathFrom; Bool ignoreABI; Bool forceInputDevices; /* force xorg.conf or built-in input devices */ -- 1.9.3 From ajax at redhat.com Thu Sep 25 10:37:30 2014 From: ajax at redhat.com (Adam Jackson) Date: Thu, 25 Sep 2014 13:37:30 -0400 Subject: [PATCH 14/19] xfree86: Remove xf86Info.log In-Reply-To: <1411666655-1089-1-git-send-email-ajax@redhat.com> References: <1411666655-1089-1-git-send-email-ajax@redhat.com> Message-ID: <1411666655-1089-15-git-send-email-ajax@redhat.com> SUBCLASS ALL THE THINGS Signed-off-by: Adam Jackson --- hw/xfree86/common/xf86Config.c | 2 -- hw/xfree86/common/xf86Globals.c | 1 - hw/xfree86/common/xf86Privstr.h | 1 - 3 files changed, 4 deletions(-) diff --git a/hw/xfree86/common/xf86Config.c b/hw/xfree86/common/xf86Config.c index 546055d..8f16be3 100644 --- a/hw/xfree86/common/xf86Config.c +++ b/hw/xfree86/common/xf86Config.c @@ -874,12 +874,10 @@ configServerFlags(XF86ConfFlagsPtr flagsconf, XF86OptionPtr layoutopts) if ((s = xf86GetOptValString(FlagOptions, FLAG_LOG))) { if (!xf86NameCmp(s, "flush")) { xf86Msg(X_CONFIG, "Flushing logfile enabled\n"); - xf86Info.log = LogFlush; LogSetParameter(XLOG_FLUSH, TRUE); } else if (!xf86NameCmp(s, "sync")) { xf86Msg(X_CONFIG, "Syncing logfile enabled\n"); - xf86Info.log = LogSync; LogSetParameter(XLOG_FLUSH, TRUE); LogSetParameter(XLOG_SYNC, TRUE); } diff --git a/hw/xfree86/common/xf86Globals.c b/hw/xfree86/common/xf86Globals.c index 984c39b..93a35b8 100644 --- a/hw/xfree86/common/xf86Globals.c +++ b/hw/xfree86/common/xf86Globals.c @@ -120,7 +120,6 @@ xf86InfoRec xf86Info = { .pixmap24 = Pix24DontCare, .pix24From = X_DEFAULT, .pmFlag = TRUE, - .log = LogNone, .disableRandR = FALSE, .randRFrom = X_DEFAULT, #if defined(CONFIG_HAL) || defined(CONFIG_UDEV) || defined(CONFIG_WSCONS) diff --git a/hw/xfree86/common/xf86Privstr.h b/hw/xfree86/common/xf86Privstr.h index 410ef17..45eb278 100644 --- a/hw/xfree86/common/xf86Privstr.h +++ b/hw/xfree86/common/xf86Privstr.h @@ -91,7 +91,6 @@ typedef struct { Pix24Flags pixmap24; MessageType pix24From; Bool pmFlag; - Log log; Bool disableRandR; MessageType randRFrom; Bool aiglx; -- 1.9.3 From ajax at redhat.com Thu Sep 25 10:37:33 2014 From: ajax at redhat.com (Adam Jackson) Date: Thu, 25 Sep 2014 13:37:33 -0400 Subject: [PATCH 17/19] xfree86: Remove pointless xf86PrintMarkers In-Reply-To: <1411666655-1089-1-git-send-email-ajax@redhat.com> References: <1411666655-1089-1-git-send-email-ajax@redhat.com> Message-ID: <1411666655-1089-18-git-send-email-ajax@redhat.com> Signed-off-by: Adam Jackson --- hw/xfree86/common/xf86Init.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/hw/xfree86/common/xf86Init.c b/hw/xfree86/common/xf86Init.c index 6051fd2..017dcb6 100644 --- a/hw/xfree86/common/xf86Init.c +++ b/hw/xfree86/common/xf86Init.c @@ -233,12 +233,6 @@ xf86PrintBanner(void) "\tto make sure that you have the latest version.\n"); } -static void -xf86PrintMarkers(void) -{ - LogPrintMarkers(); -} - Bool xf86PrivsElevated(void) { @@ -406,7 +400,7 @@ InitOutput(ScreenInfo * pScreenInfo, int argc, char **argv) xf86ServerName = argv[0]; xf86PrintBanner(); - xf86PrintMarkers(); + LogPrintMarkers(); if (xf86LogFile) { time_t t; const char *ct; -- 1.9.3 From ajax at redhat.com Thu Sep 25 10:37:32 2014 From: ajax at redhat.com (Adam Jackson) Date: Thu, 25 Sep 2014 13:37:32 -0400 Subject: [PATCH 16/19] xfree86: configServerFlags never fails, make it return void In-Reply-To: <1411666655-1089-1-git-send-email-ajax@redhat.com> References: <1411666655-1089-1-git-send-email-ajax@redhat.com> Message-ID: <1411666655-1089-17-git-send-email-ajax@redhat.com> Signed-off-by: Adam Jackson --- hw/xfree86/common/xf86Config.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/hw/xfree86/common/xf86Config.c b/hw/xfree86/common/xf86Config.c index 3eb7a0f..bca5b45 100644 --- a/hw/xfree86/common/xf86Config.c +++ b/hw/xfree86/common/xf86Config.c @@ -760,7 +760,7 @@ static OptionInfoRec FlagOptions[] = { {0}, FALSE}, }; -static Bool +static void configServerFlags(XF86ConfFlagsPtr flagsconf, XF86OptionPtr layoutopts) { XF86OptionPtr optp, tmp; @@ -1046,8 +1046,6 @@ configServerFlags(XF86ConfFlagsPtr flagsconf, XF86OptionPtr layoutopts) xf86Info.dri2From = X_CONFIG; } #endif - - return TRUE; } Bool @@ -2474,11 +2472,7 @@ xf86HandleConfigFile(Bool autoconfig) } #endif /* Now process everything else */ - if (!configServerFlags(xf86configptr->conf_flags, xf86ConfigLayout.options)) { - ErrorF("Problem when converting the config data structures\n"); - return CONFIG_PARSE_ERROR; - } - + configServerFlags(xf86configptr->conf_flags, xf86ConfigLayout.options); configFiles(xf86configptr->conf_files); configExtensions(xf86configptr->conf_extensions); #ifdef XF86DRI -- 1.9.3 From ajax at redhat.com Thu Sep 25 10:37:35 2014 From: ajax at redhat.com (Adam Jackson) Date: Thu, 25 Sep 2014 13:37:35 -0400 Subject: [PATCH 19/19] x86emu: Undefine _NO_INLINE In-Reply-To: <1411666655-1089-1-git-send-email-ajax@redhat.com> References: <1411666655-1089-1-git-send-email-ajax@redhat.com> Message-ID: <1411666655-1089-20-git-send-email-ajax@redhat.com> Never defined by the server. Signed-off-by: Adam Jackson --- hw/xfree86/x86emu/x86emu/x86emui.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/xfree86/x86emu/x86emu/x86emui.h b/hw/xfree86/x86emu/x86emu/x86emui.h index 5e20d97..01bd92a 100644 --- a/hw/xfree86/x86emu/x86emu/x86emui.h +++ b/hw/xfree86/x86emu/x86emu/x86emui.h @@ -46,7 +46,7 @@ * dramatically in this case). */ -#if defined(__cplusplus) && !defined(_NO_INLINE) +#if defined(__cplusplus) #define _INLINE inline #else #define _INLINE static -- 1.9.3 From ajax at redhat.com Thu Sep 25 10:37:34 2014 From: ajax at redhat.com (Adam Jackson) Date: Thu, 25 Sep 2014 13:37:34 -0400 Subject: [PATCH 18/19] xfree86: Remove driver entity hooks and private In-Reply-To: <1411666655-1089-1-git-send-email-ajax@redhat.com> References: <1411666655-1089-1-git-send-email-ajax@redhat.com> Message-ID: <1411666655-1089-19-git-send-email-ajax@redhat.com> No driver is using these, as far as I know. Signed-off-by: Adam Jackson --- hw/xfree86/common/xf86.h | 3 --- hw/xfree86/common/xf86Bus.c | 41 ----------------------------------------- hw/xfree86/common/xf86Bus.h | 4 ---- hw/xfree86/common/xf86Events.c | 4 ---- hw/xfree86/common/xf86Helper.c | 3 --- hw/xfree86/common/xf86Init.c | 3 --- hw/xfree86/common/xf86PM.c | 3 --- hw/xfree86/common/xf86Priv.h | 2 -- hw/xfree86/common/xf86pciBus.c | 5 ----- hw/xfree86/doc/ddxDesign.xml | 22 ++-------------------- 10 files changed, 2 insertions(+), 88 deletions(-) diff --git a/hw/xfree86/common/xf86.h b/hw/xfree86/common/xf86.h index 49ff35b..25e2190 100644 --- a/hw/xfree86/common/xf86.h +++ b/hw/xfree86/common/xf86.h @@ -156,9 +156,6 @@ extern _X_EXPORT GDevPtr xf86GetDevFromEntity(int entityIndex, int instance); extern _X_EXPORT void xf86RemoveEntityFromScreen(ScrnInfoPtr pScrn, int entityIndex); extern _X_EXPORT EntityInfoPtr xf86GetEntityInfo(int entityIndex); -extern _X_EXPORT Bool xf86SetEntityFuncs(int entityIndex, EntityProc init, - EntityProc enter, EntityProc leave, - void *); extern _X_EXPORT Bool xf86IsEntityPrimary(int entityIndex); extern _X_EXPORT ScrnInfoPtr xf86FindScreenForEntity(int entityIndex); diff --git a/hw/xfree86/common/xf86Bus.c b/hw/xfree86/common/xf86Bus.c index bd3e4e3..a520e12 100644 --- a/hw/xfree86/common/xf86Bus.c +++ b/hw/xfree86/common/xf86Bus.c @@ -290,19 +290,6 @@ xf86IsEntityPrimary(int entityIndex) } Bool -xf86SetEntityFuncs(int entityIndex, EntityProc init, EntityProc enter, - EntityProc leave, void *private) -{ - if (entityIndex >= xf86NumEntities) - return FALSE; - xf86Entities[entityIndex]->entityInit = init; - xf86Entities[entityIndex]->entityEnter = enter; - xf86Entities[entityIndex]->entityLeave = leave; - xf86Entities[entityIndex]->private = private; - return TRUE; -} - -Bool xf86DriverHasEntities(DriverPtr drvp) { int i; @@ -519,30 +506,6 @@ xf86GetDevFromEntity(int entityIndex, int instance) } /* - * xf86AccessEnter() -- gets called to save the text mode VGA IO - * resources when reentering the server after a VT switch. - */ -void -xf86AccessEnter(void) -{ - int i; - - for (i = 0; i < xf86NumEntities; i++) - if (xf86Entities[i]->entityEnter) - xf86Entities[i]->entityEnter(i, xf86Entities[i]->private); -} - -void -xf86AccessLeave(void) -{ - int i; - - for (i = 0; i < xf86NumEntities; i++) - if (xf86Entities[i]->entityLeave) - xf86Entities[i]->entityLeave(i, xf86Entities[i]->private); -} - -/* * xf86PostProbe() -- Allocate all non conflicting resources * This function gets called by xf86Init(). */ @@ -566,10 +529,6 @@ xf86PostProbe(void) )) FatalError("Cannot run in framebuffer mode. Please specify busIDs " " for all framebuffer devices\n"); - - for (i = 0; i < xf86NumEntities; i++) - if (xf86Entities[i]->entityInit) - xf86Entities[i]->entityInit(i, xf86Entities[i]->private); } int diff --git a/hw/xfree86/common/xf86Bus.h b/hw/xfree86/common/xf86Bus.h index c59625d..52b497a 100644 --- a/hw/xfree86/common/xf86Bus.h +++ b/hw/xfree86/common/xf86Bus.h @@ -48,10 +48,6 @@ typedef struct { DriverPtr driver; int chipset; int entityProp; - EntityProc entityInit; - EntityProc entityEnter; - EntityProc entityLeave; - void *private; Bool active; Bool inUse; BusRec bus; diff --git a/hw/xfree86/common/xf86Events.c b/hw/xfree86/common/xf86Events.c index 16b3e28..27206d9 100644 --- a/hw/xfree86/common/xf86Events.c +++ b/hw/xfree86/common/xf86Events.c @@ -492,8 +492,6 @@ xf86VTLeave(void) for (i = 0; i < xf86NumGPUScreens; i++) xf86GPUScreens[i]->LeaveVT(xf86GPUScreens[i]); - xf86AccessLeave(); /* We need this here, otherwise */ - if (!xf86VTSwitchAway()) goto switch_failed; @@ -519,7 +517,6 @@ xf86VTLeave(void) switch_failed: DebugF("xf86VTSwitch: Leave failed\n"); - xf86AccessEnter(); for (i = 0; i < xf86NumScreens; i++) { if (!xf86Screens[i]->EnterVT(xf86Screens[i])) FatalError("EnterVT failed for screen %d\n", i); @@ -564,7 +561,6 @@ xf86VTEnter(void) if (xorgHWAccess) xf86EnableIO(); - xf86AccessEnter(); for (i = 0; i < xf86NumScreens; i++) { xf86Screens[i]->vtSema = TRUE; if (!xf86Screens[i]->EnterVT(xf86Screens[i])) diff --git a/hw/xfree86/common/xf86Helper.c b/hw/xfree86/common/xf86Helper.c index e2b32a0..eebf182 100644 --- a/hw/xfree86/common/xf86Helper.c +++ b/hw/xfree86/common/xf86Helper.c @@ -1764,7 +1764,6 @@ xf86ConfigFbEntityInactive(EntityInfoPtr pEnt, EntityProc init, if ((pScrn = xf86FindScreenForEntity(pEnt->index))) xf86RemoveEntityFromScreen(pScrn, pEnt->index); - xf86SetEntityFuncs(pEnt->index, init, enter, leave, private); } ScrnInfoPtr @@ -1792,8 +1791,6 @@ xf86ConfigFbEntity(ScrnInfoPtr pScrn, int scrnFlag, int entityIndex, pScrn = xf86AllocateScreen(pEnt->driver, scrnFlag); xf86AddEntityToScreen(pScrn, entityIndex); - xf86SetEntityFuncs(entityIndex, init, enter, leave, private); - free(pEnt); return pScrn; } diff --git a/hw/xfree86/common/xf86Init.c b/hw/xfree86/common/xf86Init.c index 017dcb6..f1d03a6 100644 --- a/hw/xfree86/common/xf86Init.c +++ b/hw/xfree86/common/xf86Init.c @@ -822,7 +822,6 @@ InitOutput(ScreenInfo * pScreenInfo, int argc, char **argv) #ifdef HAS_USL_VTS ioctl(xf86Info.consoleFd, VT_RELDISP, VT_ACKACQ); #endif - xf86AccessEnter(); OsBlockSIGIO(); sigio_blocked = TRUE; } @@ -1100,8 +1099,6 @@ AbortDDX(enum ExitCode error) } } - xf86AccessLeave(); - /* * This is needed for an abnormal server exit, since the normal exit stuff * MUST also be performed (i.e. the vt must be left in a defined state) diff --git a/hw/xfree86/common/xf86PM.c b/hw/xfree86/common/xf86PM.c index 9e49e8e..3cb227d 100644 --- a/hw/xfree86/common/xf86PM.c +++ b/hw/xfree86/common/xf86PM.c @@ -116,8 +116,6 @@ suspend(pmEvent event, Bool undo) xf86Screens[i]->vtSema = FALSE; } } - xf86AccessLeave(); - } static void @@ -126,7 +124,6 @@ resume(pmEvent event, Bool undo) int i; InputInfoPtr pInfo; - xf86AccessEnter(); for (i = 0; i < xf86NumScreens; i++) { if (xf86Screens[i]->PMEvent) xf86Screens[i]->PMEvent(xf86Screens[i], event, undo); diff --git a/hw/xfree86/common/xf86Priv.h b/hw/xfree86/common/xf86Priv.h index 6e374eb..f50f471 100644 --- a/hw/xfree86/common/xf86Priv.h +++ b/hw/xfree86/common/xf86Priv.h @@ -112,8 +112,6 @@ extern int xf86NumGPUScreens; /* xf86Bus.c */ extern _X_EXPORT Bool xf86BusConfig(void); extern _X_EXPORT void xf86BusProbe(void); -extern _X_EXPORT void xf86AccessEnter(void); -extern _X_EXPORT void xf86AccessLeave(void); extern _X_EXPORT void xf86PostProbe(void); extern _X_EXPORT void xf86ClearEntityListForScreen(ScrnInfoPtr pScrn); extern _X_EXPORT void xf86AddDevToEntity(int entityIndex, GDevPtr dev); diff --git a/hw/xfree86/common/xf86pciBus.c b/hw/xfree86/common/xf86pciBus.c index e86ecb9..7c0b4f9 100644 --- a/hw/xfree86/common/xf86pciBus.c +++ b/hw/xfree86/common/xf86pciBus.c @@ -1019,9 +1019,6 @@ xf86ConfigPciEntityInactive(EntityInfoPtr pEnt, PciChipsets * p_chip, if ((pScrn = xf86FindScreenForEntity(pEnt->index))) xf86RemoveEntityFromScreen(pScrn, pEnt->index); - - /* shared resources are only needed when entity is active: remove */ - xf86SetEntityFuncs(pEnt->index, init, enter, leave, private); } ScrnInfoPtr @@ -1056,8 +1053,6 @@ xf86ConfigPciEntity(ScrnInfoPtr pScrn, int scrnFlag, int entityIndex, } free(pEnt); - xf86SetEntityFuncs(entityIndex, init, enter, leave, private); - return pScrn; } diff --git a/hw/xfree86/doc/ddxDesign.xml b/hw/xfree86/doc/ddxDesign.xml index 6a9de9e..bf11f79 100644 --- a/hw/xfree86/doc/ddxDesign.xml +++ b/hw/xfree86/doc/ddxDesign.xml @@ -835,13 +835,8 @@ Here is what InitOutput() does: the driver will fail immediately. This is usually best done with the xf86ConfigPciEntity() helper function for PCI and xf86ConfigIsaEntity() for ISA - (see the RAC section). It is possible to - register some entity specific functions with those helpers. When - not using the helpers, the xf86AddEntityToScreen() - xf86ClaimFixedResources() and - xf86SetEntityFuncs() should be used instead (see - the RAC section). - + (see the RAC section). + If a chipset is specified in an active device section which the @@ -2756,19 +2751,6 @@ available at the driver level:
- Bool xf86SetEntityFuncs(int entityIndex, EntityProc init, - EntityProc enter, EntityProc leave, pointer); - -
- This function registers with an entity the init, - enter, leave functions along - with the pointer to their private area. - - -
- -
- void xf86AddEntityToScreen(ScrnInfoPtr pScrn, int entityIndex);
-- 1.9.3 From ajax at redhat.com Thu Sep 25 11:11:40 2014 From: ajax at redhat.com (Adam Jackson) Date: Thu, 25 Sep 2014 14:11:40 -0400 Subject: [PATCH] xinerama: Implement graphics exposures for window->pixmap copies (v2) In-Reply-To: <1411595007-18884-1-git-send-email-ajax@redhat.com> References: <1411595007-18884-1-git-send-email-ajax@redhat.com> Message-ID: <1411668700-2939-1-git-send-email-ajax@redhat.com> This code is using GetImage to accumulate a logical view of the window image (since the windows will be clipped to their containing screen), and then PutImage to load that back into the pixmap. What it wasn't doing was constructing a region for the obscured areas of the window and emitting graphics exposures for same. This special case for window->pixmap copies (and corresponding lack of graphics exposures) appears to date back to cvs revision 3.15 of this file in xfree86, which makes it almost exactly fifteen years old. It's possible that we could do better now, since Composite would mean that for redirected windows we would in fact have consistent window contents on every screen. Would be slightly ugly to have Xinerama know about Composite at the dispatch level, but then this is Xinerama we're talking about, nothing's pretty here. v2: Fix coordinate translation when the source is the root window Signed-off-by: Adam Jackson --- Xext/panoramiXprocs.c | 70 +++++++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 60 insertions(+), 10 deletions(-) diff --git a/Xext/panoramiXprocs.c b/Xext/panoramiXprocs.c index 83a2e08..8e3120d 100644 --- a/Xext/panoramiXprocs.c +++ b/Xext/panoramiXprocs.c @@ -1050,7 +1050,7 @@ PanoramiXClearToBackground(ClientPtr client) int PanoramiXCopyArea(ClientPtr client) { - int j, result, srcx, srcy, dstx, dsty; + int j, result, srcx, srcy, dstx, dsty, width, height; PanoramiXRes *gc, *src, *dst; Bool srcIsRoot = FALSE; Bool dstIsRoot = FALSE; @@ -1091,6 +1091,8 @@ PanoramiXCopyArea(ClientPtr client) srcy = stuff->srcY; dstx = stuff->dstX; dsty = stuff->dstY; + width = stuff->width; + height = stuff->height; if ((dst->type == XRT_PIXMAP) && (src->type == XRT_WINDOW)) { DrawablePtr drawables[MAXSCREENS]; DrawablePtr pDst; @@ -1105,13 +1107,12 @@ PanoramiXCopyArea(ClientPtr client) return rc; } - pitch = PixmapBytePad(stuff->width, drawables[0]->depth); - if (!(data = calloc(1, stuff->height * pitch))) + pitch = PixmapBytePad(width, drawables[0]->depth); + if (!(data = calloc(1, height * pitch))) return BadAlloc; - XineramaGetImageData(drawables, srcx, srcy, - stuff->width, stuff->height, ZPixmap, ~0, data, - pitch, srcIsRoot); + XineramaGetImageData(drawables, srcx, srcy, width, height, ZPixmap, ~0, + data, pitch, srcIsRoot); FOR_NSCREENS_BACKWARD(j) { stuff->gc = gc->info[j].id; @@ -1123,14 +1124,63 @@ PanoramiXCopyArea(ClientPtr client) } (*pGC->ops->PutImage) (pDst, pGC, pDst->depth, dstx, dsty, - stuff->width, stuff->height, - 0, ZPixmap, data); - + width, height, 0, ZPixmap, data); if (dstShared) break; } - free(data); + + if (pGC->graphicsExposures) { + RegionRec rgn; + int dx, dy; + + /* create region for source box */ + BoxRec sourceBox = { srcx, srcy, srcx + width, srcy + height }; + RegionInit(&rgn, &sourceBox, 1); + + dx = drawables[0]->x; + dy = drawables[0]->y; + if (srcIsRoot) { + dx += screenInfo.screens[0]->x; + dy += screenInfo.screens[0]->y; + } + + /* translate from source-relative to screen */ + RegionTranslate(&rgn, dx, dy); + + /* subtract the (screen-space) clips of the source drawables */ + FOR_NSCREENS(j) { + ScreenPtr screen = screenInfo.screens[j]; + RegionPtr sd; + + if (pGC->subWindowMode == IncludeInferiors) + sd = NotClippedByChildren((WindowPtr)drawables[j]); + else + sd = &((WindowPtr)drawables[j])->clipList; + + if (srcIsRoot) + RegionTranslate(&rgn, -screen->x, -screen->y); + + RegionSubtract(&rgn, &rgn, sd); + + if (srcIsRoot) + RegionTranslate(&rgn, screen->x, screen->y); + + if (pGC->subWindowMode == IncludeInferiors) + RegionDestroy(sd); + } + + /* -dx/-dy to get back to dest-relative, plus request offsets */ + RegionTranslate(&rgn, -dx + dstx, -dy + dsty); + + /* intersect with gc clip; just one screen is fine because pixmap */ + RegionIntersect(&rgn, &rgn, pGC->pCompositeClip); + + /* and expose */ + pGC->pScreen->SendGraphicsExpose(client, &rgn, dst->info[0].id, + X_CopyArea, 0); + RegionUninit(&rgn); + } } else { DrawablePtr pDst = NULL, pSrc = NULL; -- 1.9.3 From eric at anholt.net Thu Sep 25 12:03:28 2014 From: eric at anholt.net (Eric Anholt) Date: Thu, 25 Sep 2014 12:03:28 -0700 Subject: [PATCH] glamor: Use GL_STREAM_READ also for read/write access to a PBO In-Reply-To: <1411626442-14411-1-git-send-email-michel@daenzer.net> References: <1411626442-14411-1-git-send-email-michel@daenzer.net> Message-ID: <87h9zvcykf.fsf@eliezer.anholt.net> Michel D?nzer writes: > From: Michel D?nzer > > Otherwise the CPU may end up reading from non-cacheable memory, which is > very slow. > > Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=84178 > Signed-off-by: Michel D?nzer Reviewed-by: Eric Anholt -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 818 bytes Desc: not available URL: From mark.kettenis at xs4all.nl Thu Sep 25 14:04:52 2014 From: mark.kettenis at xs4all.nl (Mark Kettenis) Date: Thu, 25 Sep 2014 23:04:52 +0200 (CEST) Subject: [PATCH 04/19] loader: Deobfuscate RTLD_* macro stuff In-Reply-To: <1411666655-1089-5-git-send-email-ajax@redhat.com> (message from Adam Jackson on Thu, 25 Sep 2014 13:37:20 -0400) References: <1411666655-1089-1-git-send-email-ajax@redhat.com> <1411666655-1089-5-git-send-email-ajax@redhat.com> Message-ID: <201409252104.s8PL4q1J017502@glazunov.sibelius.xs4all.nl> > From: Adam Jackson > Date: Thu, 25 Sep 2014 13:37:20 -0400 > > POSIX requires that these be named correctly, no need to be clever. None of the BSDs have needed those compatibility defines for quite some time, and I doubt anything else still supported cares. Reviewed-by: Mark Kettenis > Signed-off-by: Adam Jackson > --- > hw/xfree86/loader/loader.c | 22 ++-------------------- > 1 file changed, 2 insertions(+), 20 deletions(-) > > diff --git a/hw/xfree86/loader/loader.c b/hw/xfree86/loader/loader.c > index cc41dcb..3132984 100644 > --- a/hw/xfree86/loader/loader.c > +++ b/hw/xfree86/loader/loader.c > @@ -71,24 +71,6 @@ > #include > #include > > -#if defined(DL_LAZY) > -#define DLOPEN_LAZY DL_LAZY > -#elif defined(RTLD_LAZY) > -#define DLOPEN_LAZY RTLD_LAZY > -#elif defined(__FreeBSD__) > -#define DLOPEN_LAZY 1 > -#else > -#define DLOPEN_LAZY 0 > -#endif > - > -#if defined(LD_GLOBAL) > -#define DLOPEN_GLOBAL LD_GLOBAL > -#elif defined(RTLD_GLOBAL) > -#define DLOPEN_GLOBAL RTLD_GLOBAL > -#else > -#define DLOPEN_GLOBAL 0 > -#endif > - > #else > #error i have no dynamic linker and i must scream > #endif > @@ -128,7 +110,7 @@ LoaderOpen(const char *module, int *errmaj, int *errmin) > > xf86Msg(X_INFO, "Loading %s\n", module); > > - if (!(ret = dlopen(module, DLOPEN_LAZY | DLOPEN_GLOBAL))) { > + if (!(ret = dlopen(module, RTLD_LAZY | RTLD_GLOBAL))) { > xf86Msg(X_ERROR, "Failed to load %s: %s\n", module, dlerror()); > if (errmaj) > *errmaj = LDR_NOLOAD; > @@ -151,7 +133,7 @@ LoaderSymbol(const char *name) > return p; > > if (!global_scope) > - global_scope = dlopen(NULL, DLOPEN_LAZY | DLOPEN_GLOBAL); > + global_scope = dlopen(NULL, RTLD_LAZY | RTLD_GLOBAL); > > if (global_scope) > return dlsym(global_scope, name); > -- > 1.9.3 > > _______________________________________________ > xorg-devel at lists.x.org: X.Org development > Archives: http://lists.x.org/archives/xorg-devel > Info: http://lists.x.org/mailman/listinfo/xorg-devel > From mark.kettenis at xs4all.nl Thu Sep 25 14:25:25 2014 From: mark.kettenis at xs4all.nl (Mark Kettenis) Date: Thu, 25 Sep 2014 23:25:25 +0200 (CEST) Subject: [PATCH 18/19] xfree86: Remove driver entity hooks and private In-Reply-To: <1411666655-1089-19-git-send-email-ajax@redhat.com> (message from Adam Jackson on Thu, 25 Sep 2014 13:37:34 -0400) References: <1411666655-1089-1-git-send-email-ajax@redhat.com> <1411666655-1089-19-git-send-email-ajax@redhat.com> Message-ID: <201409252125.s8PLPPSe028925@glazunov.sibelius.xs4all.nl> > From: Adam Jackson > Date: Thu, 25 Sep 2014 13:37:34 -0400 > > No driver is using these, as far as I know. The xf86-video-mga driver uses these, but only if DISABLE_VGA_IO is defined, and by default it isn't, and there is no configure option to turn it on. I'm a bit worried about silently ignoring the arguments passed to xf86ConfigFbEntity* and xf86ConfigPciEntity*. Perhaps throw a fatal error if any of the function pointers is non-NULL? > Signed-off-by: Adam Jackson > --- > hw/xfree86/common/xf86.h | 3 --- > hw/xfree86/common/xf86Bus.c | 41 ----------------------------------------- > hw/xfree86/common/xf86Bus.h | 4 ---- > hw/xfree86/common/xf86Events.c | 4 ---- > hw/xfree86/common/xf86Helper.c | 3 --- > hw/xfree86/common/xf86Init.c | 3 --- > hw/xfree86/common/xf86PM.c | 3 --- > hw/xfree86/common/xf86Priv.h | 2 -- > hw/xfree86/common/xf86pciBus.c | 5 ----- > hw/xfree86/doc/ddxDesign.xml | 22 ++-------------------- > 10 files changed, 2 insertions(+), 88 deletions(-) > > diff --git a/hw/xfree86/common/xf86.h b/hw/xfree86/common/xf86.h > index 49ff35b..25e2190 100644 > --- a/hw/xfree86/common/xf86.h > +++ b/hw/xfree86/common/xf86.h > @@ -156,9 +156,6 @@ extern _X_EXPORT GDevPtr xf86GetDevFromEntity(int entityIndex, int instance); > extern _X_EXPORT void xf86RemoveEntityFromScreen(ScrnInfoPtr pScrn, > int entityIndex); > extern _X_EXPORT EntityInfoPtr xf86GetEntityInfo(int entityIndex); > -extern _X_EXPORT Bool xf86SetEntityFuncs(int entityIndex, EntityProc init, > - EntityProc enter, EntityProc leave, > - void *); > extern _X_EXPORT Bool xf86IsEntityPrimary(int entityIndex); > extern _X_EXPORT ScrnInfoPtr xf86FindScreenForEntity(int entityIndex); > > diff --git a/hw/xfree86/common/xf86Bus.c b/hw/xfree86/common/xf86Bus.c > index bd3e4e3..a520e12 100644 > --- a/hw/xfree86/common/xf86Bus.c > +++ b/hw/xfree86/common/xf86Bus.c > @@ -290,19 +290,6 @@ xf86IsEntityPrimary(int entityIndex) > } > > Bool > -xf86SetEntityFuncs(int entityIndex, EntityProc init, EntityProc enter, > - EntityProc leave, void *private) > -{ > - if (entityIndex >= xf86NumEntities) > - return FALSE; > - xf86Entities[entityIndex]->entityInit = init; > - xf86Entities[entityIndex]->entityEnter = enter; > - xf86Entities[entityIndex]->entityLeave = leave; > - xf86Entities[entityIndex]->private = private; > - return TRUE; > -} > - > -Bool > xf86DriverHasEntities(DriverPtr drvp) > { > int i; > @@ -519,30 +506,6 @@ xf86GetDevFromEntity(int entityIndex, int instance) > } > > /* > - * xf86AccessEnter() -- gets called to save the text mode VGA IO > - * resources when reentering the server after a VT switch. > - */ > -void > -xf86AccessEnter(void) > -{ > - int i; > - > - for (i = 0; i < xf86NumEntities; i++) > - if (xf86Entities[i]->entityEnter) > - xf86Entities[i]->entityEnter(i, xf86Entities[i]->private); > -} > - > -void > -xf86AccessLeave(void) > -{ > - int i; > - > - for (i = 0; i < xf86NumEntities; i++) > - if (xf86Entities[i]->entityLeave) > - xf86Entities[i]->entityLeave(i, xf86Entities[i]->private); > -} > - > -/* > * xf86PostProbe() -- Allocate all non conflicting resources > * This function gets called by xf86Init(). > */ > @@ -566,10 +529,6 @@ xf86PostProbe(void) > )) > FatalError("Cannot run in framebuffer mode. Please specify busIDs " > " for all framebuffer devices\n"); > - > - for (i = 0; i < xf86NumEntities; i++) > - if (xf86Entities[i]->entityInit) > - xf86Entities[i]->entityInit(i, xf86Entities[i]->private); > } > > int > diff --git a/hw/xfree86/common/xf86Bus.h b/hw/xfree86/common/xf86Bus.h > index c59625d..52b497a 100644 > --- a/hw/xfree86/common/xf86Bus.h > +++ b/hw/xfree86/common/xf86Bus.h > @@ -48,10 +48,6 @@ typedef struct { > DriverPtr driver; > int chipset; > int entityProp; > - EntityProc entityInit; > - EntityProc entityEnter; > - EntityProc entityLeave; > - void *private; > Bool active; > Bool inUse; > BusRec bus; > diff --git a/hw/xfree86/common/xf86Events.c b/hw/xfree86/common/xf86Events.c > index 16b3e28..27206d9 100644 > --- a/hw/xfree86/common/xf86Events.c > +++ b/hw/xfree86/common/xf86Events.c > @@ -492,8 +492,6 @@ xf86VTLeave(void) > for (i = 0; i < xf86NumGPUScreens; i++) > xf86GPUScreens[i]->LeaveVT(xf86GPUScreens[i]); > > - xf86AccessLeave(); /* We need this here, otherwise */ > - > if (!xf86VTSwitchAway()) > goto switch_failed; > > @@ -519,7 +517,6 @@ xf86VTLeave(void) > > switch_failed: > DebugF("xf86VTSwitch: Leave failed\n"); > - xf86AccessEnter(); > for (i = 0; i < xf86NumScreens; i++) { > if (!xf86Screens[i]->EnterVT(xf86Screens[i])) > FatalError("EnterVT failed for screen %d\n", i); > @@ -564,7 +561,6 @@ xf86VTEnter(void) > > if (xorgHWAccess) > xf86EnableIO(); > - xf86AccessEnter(); > for (i = 0; i < xf86NumScreens; i++) { > xf86Screens[i]->vtSema = TRUE; > if (!xf86Screens[i]->EnterVT(xf86Screens[i])) > diff --git a/hw/xfree86/common/xf86Helper.c b/hw/xfree86/common/xf86Helper.c > index e2b32a0..eebf182 100644 > --- a/hw/xfree86/common/xf86Helper.c > +++ b/hw/xfree86/common/xf86Helper.c > @@ -1764,7 +1764,6 @@ xf86ConfigFbEntityInactive(EntityInfoPtr pEnt, EntityProc init, > > if ((pScrn = xf86FindScreenForEntity(pEnt->index))) > xf86RemoveEntityFromScreen(pScrn, pEnt->index); > - xf86SetEntityFuncs(pEnt->index, init, enter, leave, private); > } > > ScrnInfoPtr > @@ -1792,8 +1791,6 @@ xf86ConfigFbEntity(ScrnInfoPtr pScrn, int scrnFlag, int entityIndex, > pScrn = xf86AllocateScreen(pEnt->driver, scrnFlag); > xf86AddEntityToScreen(pScrn, entityIndex); > > - xf86SetEntityFuncs(entityIndex, init, enter, leave, private); > - > free(pEnt); > return pScrn; > } > diff --git a/hw/xfree86/common/xf86Init.c b/hw/xfree86/common/xf86Init.c > index 017dcb6..f1d03a6 100644 > --- a/hw/xfree86/common/xf86Init.c > +++ b/hw/xfree86/common/xf86Init.c > @@ -822,7 +822,6 @@ InitOutput(ScreenInfo * pScreenInfo, int argc, char **argv) > #ifdef HAS_USL_VTS > ioctl(xf86Info.consoleFd, VT_RELDISP, VT_ACKACQ); > #endif > - xf86AccessEnter(); > OsBlockSIGIO(); > sigio_blocked = TRUE; > } > @@ -1100,8 +1099,6 @@ AbortDDX(enum ExitCode error) > } > } > > - xf86AccessLeave(); > - > /* > * This is needed for an abnormal server exit, since the normal exit stuff > * MUST also be performed (i.e. the vt must be left in a defined state) > diff --git a/hw/xfree86/common/xf86PM.c b/hw/xfree86/common/xf86PM.c > index 9e49e8e..3cb227d 100644 > --- a/hw/xfree86/common/xf86PM.c > +++ b/hw/xfree86/common/xf86PM.c > @@ -116,8 +116,6 @@ suspend(pmEvent event, Bool undo) > xf86Screens[i]->vtSema = FALSE; > } > } > - xf86AccessLeave(); > - > } > > static void > @@ -126,7 +124,6 @@ resume(pmEvent event, Bool undo) > int i; > InputInfoPtr pInfo; > > - xf86AccessEnter(); > for (i = 0; i < xf86NumScreens; i++) { > if (xf86Screens[i]->PMEvent) > xf86Screens[i]->PMEvent(xf86Screens[i], event, undo); > diff --git a/hw/xfree86/common/xf86Priv.h b/hw/xfree86/common/xf86Priv.h > index 6e374eb..f50f471 100644 > --- a/hw/xfree86/common/xf86Priv.h > +++ b/hw/xfree86/common/xf86Priv.h > @@ -112,8 +112,6 @@ extern int xf86NumGPUScreens; > /* xf86Bus.c */ > extern _X_EXPORT Bool xf86BusConfig(void); > extern _X_EXPORT void xf86BusProbe(void); > -extern _X_EXPORT void xf86AccessEnter(void); > -extern _X_EXPORT void xf86AccessLeave(void); > extern _X_EXPORT void xf86PostProbe(void); > extern _X_EXPORT void xf86ClearEntityListForScreen(ScrnInfoPtr pScrn); > extern _X_EXPORT void xf86AddDevToEntity(int entityIndex, GDevPtr dev); > diff --git a/hw/xfree86/common/xf86pciBus.c b/hw/xfree86/common/xf86pciBus.c > index e86ecb9..7c0b4f9 100644 > --- a/hw/xfree86/common/xf86pciBus.c > +++ b/hw/xfree86/common/xf86pciBus.c > @@ -1019,9 +1019,6 @@ xf86ConfigPciEntityInactive(EntityInfoPtr pEnt, PciChipsets * p_chip, > > if ((pScrn = xf86FindScreenForEntity(pEnt->index))) > xf86RemoveEntityFromScreen(pScrn, pEnt->index); > - > - /* shared resources are only needed when entity is active: remove */ > - xf86SetEntityFuncs(pEnt->index, init, enter, leave, private); > } > > ScrnInfoPtr > @@ -1056,8 +1053,6 @@ xf86ConfigPciEntity(ScrnInfoPtr pScrn, int scrnFlag, int entityIndex, > } > free(pEnt); > > - xf86SetEntityFuncs(entityIndex, init, enter, leave, private); > - > return pScrn; > } > > diff --git a/hw/xfree86/doc/ddxDesign.xml b/hw/xfree86/doc/ddxDesign.xml > index 6a9de9e..bf11f79 100644 > --- a/hw/xfree86/doc/ddxDesign.xml > +++ b/hw/xfree86/doc/ddxDesign.xml > @@ -835,13 +835,8 @@ Here is what InitOutput() does: > the driver will fail immediately. This is usually best done with > the xf86ConfigPciEntity() helper function > for PCI and xf86ConfigIsaEntity() for ISA > - (see the RAC section). It is possible to > - register some entity specific functions with those helpers. When > - not using the helpers, the xf86AddEntityToScreen() > - xf86ClaimFixedResources() and > - xf86SetEntityFuncs() should be used instead (see > - the RAC section). > - > + (see the RAC section). > + > > > If a chipset is specified in an active device section which the > @@ -2756,19 +2751,6 @@ available at the driver level: > >
> > - Bool xf86SetEntityFuncs(int entityIndex, EntityProc init, > - EntityProc enter, EntityProc leave, pointer); > - > -
> - This function registers with an entity the init, > - enter, leave functions along > - with the pointer to their private area. > - > - > -
> - > -
> - > void xf86AddEntityToScreen(ScrnInfoPtr pScrn, int entityIndex); > >
> -- > 1.9.3 > > _______________________________________________ > xorg-devel at lists.x.org: X.Org development > Archives: http://lists.x.org/archives/xorg-devel > Info: http://lists.x.org/mailman/listinfo/xorg-devel > From mark.kettenis at xs4all.nl Thu Sep 25 14:33:06 2014 From: mark.kettenis at xs4all.nl (Mark Kettenis) Date: Thu, 25 Sep 2014 23:33:06 +0200 (CEST) Subject: [PATCH 19/19] x86emu: Undefine _NO_INLINE In-Reply-To: <1411666655-1089-20-git-send-email-ajax@redhat.com> (message from Adam Jackson on Thu, 25 Sep 2014 13:37:35 -0400) References: <1411666655-1089-1-git-send-email-ajax@redhat.com> <1411666655-1089-20-git-send-email-ajax@redhat.com> Message-ID: <201409252133.s8PLX5T6029560@glazunov.sibelius.xs4all.nl> > From: Adam Jackson > Date: Thu, 25 Sep 2014 13:37:35 -0400 > > Never defined by the server. Fairly certain it was never intended to be defined by the server, but used as a compile-time option to make debugging easier. > Signed-off-by: Adam Jackson > --- > hw/xfree86/x86emu/x86emu/x86emui.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/hw/xfree86/x86emu/x86emu/x86emui.h b/hw/xfree86/x86emu/x86emu/x86emui.h > index 5e20d97..01bd92a 100644 > --- a/hw/xfree86/x86emu/x86emu/x86emui.h > +++ b/hw/xfree86/x86emu/x86emu/x86emui.h > @@ -46,7 +46,7 @@ > * dramatically in this case). > */ > > -#if defined(__cplusplus) && !defined(_NO_INLINE) > +#if defined(__cplusplus) > #define _INLINE inline > #else > #define _INLINE static > -- > 1.9.3 > > _______________________________________________ > xorg-devel at lists.x.org: X.Org development > Archives: http://lists.x.org/archives/xorg-devel > Info: http://lists.x.org/mailman/listinfo/xorg-devel > From eric at anholt.net Thu Sep 25 15:32:30 2014 From: eric at anholt.net (Eric Anholt) Date: Thu, 25 Sep 2014 15:32:30 -0700 Subject: [PATCH 06/19] mi: Remove Windows 8-bpp colormap compatibility In-Reply-To: <1411666655-1089-7-git-send-email-ajax@redhat.com> References: <1411666655-1089-1-git-send-email-ajax@redhat.com> <1411666655-1089-7-git-send-email-ajax@redhat.com> Message-ID: <87mw9ntjpd.fsf@eliezer.anholt.net> Adam Jackson writes: > Nice, but not something our Windows servers build, and not something > that belongs in mi anyway. > > Signed-off-by: Adam Jackson Reviewed-by: Eric Anholt -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 818 bytes Desc: not available URL: From eric at anholt.net Thu Sep 25 15:35:50 2014 From: eric at anholt.net (Eric Anholt) Date: Thu, 25 Sep 2014 15:35:50 -0700 Subject: [PATCH 08/19] xfree86: Remove xv clip notify driver hook In-Reply-To: <1411666655-1089-9-git-send-email-ajax@redhat.com> References: <1411666655-1089-1-git-send-email-ajax@redhat.com> <1411666655-1089-9-git-send-email-ajax@redhat.com> Message-ID: <87k34rtjjt.fsf@eliezer.anholt.net> Adam Jackson writes: > Nothing's using it. Reviewed-by: Eric Anholt -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 818 bytes Desc: not available URL: From eric at anholt.net Thu Sep 25 15:37:16 2014 From: eric at anholt.net (Eric Anholt) Date: Thu, 25 Sep 2014 15:37:16 -0700 Subject: [PATCH 10/19] xfree86: Remove Option "TextClockFreq" In-Reply-To: <1411666655-1089-11-git-send-email-ajax@redhat.com> References: <1411666655-1089-1-git-send-email-ajax@redhat.com> <1411666655-1089-11-git-send-email-ajax@redhat.com> Message-ID: <87h9zvtjhf.fsf@eliezer.anholt.net> Adam Jackson writes: > No modern driver pays attention to this. Presumably there existed > hardware once where you couldn't just read the right values out of the > CRTC. Reviewed-by: Eric Anholt -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 818 bytes Desc: not available URL: From eric at anholt.net Thu Sep 25 15:41:13 2014 From: eric at anholt.net (Eric Anholt) Date: Thu, 25 Sep 2014 15:41:13 -0700 Subject: [PATCH 11/19] xfree86: Remove spurious xf86ConfigError In-Reply-To: <1411666655-1089-12-git-send-email-ajax@redhat.com> References: <1411666655-1089-1-git-send-email-ajax@redhat.com> <1411666655-1089-12-git-send-email-ajax@redhat.com> Message-ID: <87d2ajtjau.fsf@eliezer.anholt.net> Adam Jackson writes: > -/* > - * xf86ConfigError -- > - * Print a READABLE ErrorMessage!!! All information that is > - * available is printed. > - */ > -static void > -_X_ATTRIBUTE_PRINTF(1, 2) > -xf86ConfigError(const char *msg, ...) > -{ > - va_list ap; > - > - ErrorF("\nConfig Error:\n"); > - va_start(ap, msg); > - VErrorF(msg, ap); > - va_end(ap); > - ErrorF("\n"); > - return; > -} Yeah, doesn't seem useful, really. (also, the "return;" as the last statement is just the best) Reviewed-by: Eric Anholt -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 818 bytes Desc: not available URL: From eric at anholt.net Thu Sep 25 15:42:27 2014 From: eric at anholt.net (Eric Anholt) Date: Thu, 25 Sep 2014 15:42:27 -0700 Subject: [PATCH 12/19] xfree86: Remove useless back-pointer to pScrn from colormap code In-Reply-To: <1411666655-1089-13-git-send-email-ajax@redhat.com> References: <1411666655-1089-1-git-send-email-ajax@redhat.com> <1411666655-1089-13-git-send-email-ajax@redhat.com> Message-ID: <87a95ntj8s.fsf@eliezer.anholt.net> Adam Jackson writes: > Signed-off-by: Adam Jackson > --- > hw/xfree86/common/xf86cmap.c | 46 +++++++++++++++++++------------------------- > 1 file changed, 20 insertions(+), 26 deletions(-) Looks nicer to me. Reviewed-by: Eric Anholt -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 818 bytes Desc: not available URL: From eric at anholt.net Thu Sep 25 15:45:06 2014 From: eric at anholt.net (Eric Anholt) Date: Thu, 25 Sep 2014 15:45:06 -0700 Subject: [PATCH 13/19] xfree86: Remove DisplayID support In-Reply-To: <1411666655-1089-14-git-send-email-ajax@redhat.com> References: <1411666655-1089-1-git-send-email-ajax@redhat.com> <1411666655-1089-14-git-send-email-ajax@redhat.com> Message-ID: <877g0rtj4d.fsf@eliezer.anholt.net> Adam Jackson writes: > Not actually wired up so it's fairly useless. Reviewed-by: Eric Anholt -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 818 bytes Desc: not available URL: From eric at anholt.net Thu Sep 25 15:47:45 2014 From: eric at anholt.net (Eric Anholt) Date: Thu, 25 Sep 2014 15:47:45 -0700 Subject: [PATCH 14/19] xfree86: Remove xf86Info.log In-Reply-To: <1411666655-1089-15-git-send-email-ajax@redhat.com> References: <1411666655-1089-1-git-send-email-ajax@redhat.com> <1411666655-1089-15-git-send-email-ajax@redhat.com> Message-ID: <874mvvtizy.fsf@eliezer.anholt.net> Adam Jackson writes: > SUBCLASS ALL THE THINGS Isn't the Log enum dead now? Other than that, Reviewed-by: Eric Anholt -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 818 bytes Desc: not available URL: From eric at anholt.net Thu Sep 25 15:48:28 2014 From: eric at anholt.net (Eric Anholt) Date: Thu, 25 Sep 2014 15:48:28 -0700 Subject: [PATCH 15/19] xfree86: Remove unused xf86Info.useDefaultFontPathFrom In-Reply-To: <1411666655-1089-16-git-send-email-ajax@redhat.com> References: <1411666655-1089-1-git-send-email-ajax@redhat.com> <1411666655-1089-16-git-send-email-ajax@redhat.com> Message-ID: <871tqztiyr.fsf@eliezer.anholt.net> Adam Jackson writes: > Signed-off-by: Adam Jackson Reviewed-by: Eric Anholt -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 818 bytes Desc: not available URL: From eric at anholt.net Thu Sep 25 15:54:08 2014 From: eric at anholt.net (Eric Anholt) Date: Thu, 25 Sep 2014 15:54:08 -0700 Subject: [PATCH 16/19] xfree86: configServerFlags never fails, make it return void In-Reply-To: <1411666655-1089-17-git-send-email-ajax@redhat.com> References: <1411666655-1089-1-git-send-email-ajax@redhat.com> <1411666655-1089-17-git-send-email-ajax@redhat.com> Message-ID: <87y4t7s44v.fsf@eliezer.anholt.net> Adam Jackson writes: > Signed-off-by: Adam Jackson Patches 16, 17, and 19 are also: Reviewed-by: Eric Anholt -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 818 bytes Desc: not available URL: From peter.hutterer at who-t.net Thu Sep 25 18:36:34 2014 From: peter.hutterer at who-t.net (Peter Hutterer) Date: Fri, 26 Sep 2014 11:36:34 +1000 Subject: vmmouse kernel driver In-Reply-To: <54228B12.30201@vmware.com> References: <54228B12.30201@vmware.com> Message-ID: <20140926013634.GA30270@jelly.bne.redhat.com> On Wed, Sep 24, 2014 at 11:12:50AM +0200, Thomas Hellstrom wrote: > While looking at a vmmouse kernel driver, I wonder how the Xorg evdev > driver can be configured to receive both absolute and relative events > from the same device as the vmmouse sometimes sends absolute events and > sometimes relative. Is the "IgnoreAbsoluteAxes" "False" option sufficient? at the same time, or depending on the configuration? The IgnoreAbsoluteAxes/IgnoreRelativeAxes options simply disable one of the two on startup, allowing the other one to be initialized. that's for virtual devices mostly used in VMs because our device autodetection fails there. So short answer: yes, should be sufficient provided you stay in that mode for the lifetime of the device. Cheers, Peter From alexdeucher at gmail.com Thu Sep 25 19:55:28 2014 From: alexdeucher at gmail.com (Alex Deucher) Date: Thu, 25 Sep 2014 22:55:28 -0400 Subject: F21/F22: xorg-x11-drv: which for SiS? In-Reply-To: <54243C6E.6000503@earthlink.net> References: <5420EE06.7060302@earthlink.net> <54231A29.8050204@earthlink.net> <54240E54.1010504@redhat.com> <54243C6E.6000503@earthlink.net> Message-ID: On Thu, Sep 25, 2014 at 12:01 PM, Felix Miata wrote: > Hans de Goede wrote on 2014-09-25 08:45 (GMT-0400): > >>>> this package is dead for Fedora 21 and later due to lack of KMS support. > >>> Not exactly. My OP here was intended to goto the >>> devel at lists.fedoraproject.org list, but I copied and pasted the wrong address >>> from an email that had been sent both places. I later sent it there, and >>> ultimately was told (by ajax) that lack of maintainer was the reason for its >>> elimination[1], and not just from Rawhide, but the package is gone from >>> Fedora 19, 20 & 21 repos as well. > >> No it is not, it has been retired for F-21 and later. > > I looked for it on all F18, F19, F20, F21 & Rawhide repos I could find, and > found it nowhere. Had I found it on any of them I wouldn't have looked for, > found, and installed it from another distro's rpm. > >> And as I've already told >> you in a reply to devel at lists.fedoraproject.org, you are free to step up to >> maintain it in Fedora and unretire it. I've even offered my help in doing so, >> and that offer still stands. > > I don't, and won't, "maintain" any software packages. My supply of round > tuits is chronically short of need as is. > > I don't program. One language is all I can handle. > > What I do do is I routinely test on more than a dozen non-recent, mostly > single core, mostly 32 bit CPU, computers. One of the newer ones has onboard > Z7/Z9 (XG20 core), LGA775, and neither AGP nor PCIe slots, a server board. My > supply of PCI gfxcards include none that make better sense to me to keep in > my test stack than its onboard Z7/Z9. > > Testing is my primary contribution to FOSS, spotting, confirming across > distros, versions, and/or hardware as necessary, and reporting what FOSS > evolution, intentional or otherwise, leaves working no longer. It's something > contributors with only latest/greatest hardware, and virtual machines, cannot do. > > The sis and mga drivers are yet more cases of pushing hardware toward > landfills and recyclers before their suitability to task naturally expires. > Fedora seems to be the leader in this anti-eco-friendly realm. Most developers have limited numbers of round tuits as well. This older hardware still works perfectly fine with older versions of distros or distros focused on older hardware. In many cases the older hardware can't handle the requirements of the newer distros. Additionally, older hardware gets tested less and less on newer distros so there is less and less chance of everything just working smoothly. Even if you test it, there's a good chance developers won't have enough round tuits to actually fix the problem if you encounter one. And speaking of anti-eco-friendly, a lot of older hardware uses more power than newer hardware so it has it's own anti-eco-friendly costs. You should be recycling anyway ;) Alex From mrmazda at earthlink.net Thu Sep 25 21:40:53 2014 From: mrmazda at earthlink.net (Felix Miata) Date: Fri, 26 Sep 2014 00:40:53 -0400 Subject: F21/F22: xorg-x11-drv: which for SiS? In-Reply-To: References: <5420EE06.7060302@earthlink.net> <54231A29.8050204@earthlink.net> <54240E54.1010504@redhat.com> <54243C6E.6000503@earthlink.net> Message-ID: <5424EE55.9010403@earthlink.net> Alex Deucher wrote on 2014-09-25 22:55 (UCT-0400): > On Thu, Sep 25, 2014 at 12:01 PM, Felix Miata wrote: ... >> The sis and mga drivers are yet more cases of pushing hardware toward >> landfills and recyclers before their suitability to task naturally expires. >> Fedora seems to be the leader in this anti-eco-friendly realm. > Most developers have limited numbers of round tuits as well. I'm sure that's true. A lot surely depends on their motivation to do whatever it is they do. Keeping old hardware going isn't likely to improve income or prestige. Something else has to be the motivation, and that motivation to be able to sustain needs arbitrary obstacles to that end avoided. > This older hardware still works perfectly fine with older versions of > distros or distros focused on older hardware. People need internet access that's secure, regardless of the age of their hardware. They don't upgrade an OS because they want to, but because they need to keep safe, and need access to web tools new enough not to cause access denial. Older versions thus become inappropriate. People who use some particular spin or distro don't appreciate being forced to choose between changing to something unfamiliar, or familiarity coupled with newfound insecurity, particularly if they know the insecurity trigger is nothing but a compilation flag (e.g. sse2 for qt5, IIRC). > In many cases the older > hardware can't handle the requirements of the newer distros. 3D? More bling? A bazillion background daemons some people might use? Often the "requirements" are no more than a compilation switch that's an arbitary choice, not to deny use to hardware on account of its age, which it does do, but to add nominally more speed to help compensate for code and feature bloat. Not everybody cares to have everything happen instantly, either at all, or to spend any money to get more. DEs like Mate, TDE, IceWM and XFCE exist why? So excessive requirements aren't insurmountable or unnecessary obstacles. > Additionally, older hardware gets tested less and less on newer > distros so there is less and less chance of everything just working > smoothly. Hence reasons I do what I do. I have the hardware to do it, so I test with it, and report problems found. > Even if you test it, there's a good chance developers won't > have enough round tuits to actually fix the problem if you encounter > one. Unfortunate, but true. Of course for some, those round tuits are allocated and/or provided by commercial interests that don't profit from old machines keeping on keeping on. Lack by others need not be impediments to those with more noble motivation and availability. > And speaking of anti-eco-friendly, a lot of older hardware uses > more power than newer hardware How much is "a lot"? How does one tell whether any particular proposed replacement in fact uses more or less than that which is in use? Marketing specs are typically less than entirely trustworthy, designed to produce sales, not compare to out-the-door products. Full size desktops from 9 or more years ago typically got by just fine on 200w or 250w power supplies, significantly less than typically recommended for newer. Newer gfxcards often require *2* fans blowing on their coolers, not just one, or the none from yesteryear's machines I test on. That means heat generation, and thus power consumption, from the video component of newer systems has gone up, making buildings' A/C systems work harder whether there are eco-friendly labels on the machines or not. I'm aware of no hard and fast rules to make any determination whether any particular replacement would really be better. Much power, maybe in many cases most, consumed by older computers in actual use went into CRTs putting heat into the environment. That translates into consumption from newer, using less power hungry panel displays, skewed when compared to older, which often today are being used with newer, less expensive, space saving displays. Energy Star has been around long enough that very little not featuring it remains in use. > so it has it's own anti-eco-friendly > costs. You should be recycling anyway ;) Where did I write anything that says I'm not? You expect people to purchase newer just so that they can recycle working older? The bulk of machines I've acquired, including those I kept to test on, were gratis acquisitions, recycling on its own level. Without more such, I'd have to invest money above my past pattern. For what, just to give other recyclers something to do? The motherboard that spawned this thread is actually my latest acquistion, one of my 5 newest counting the two that run here 24/7. Refurbing old machines with new operating systems and giving them new homes *is* recycling, recycling which arbitrary cutoff of driver support for would put a stop to. -- "The wise are known for their understanding, and pleasant words are persuasive." Proverbs 16:21 (New Living Translation) Team OS/2 ** Reg. Linux User #211409 ** a11y rocks! Felix Miata *** http://fm.no-ip.com/ From thellstrom at vmware.com Fri Sep 26 00:06:28 2014 From: thellstrom at vmware.com (Thomas Hellstrom) Date: Fri, 26 Sep 2014 09:06:28 +0200 Subject: vmmouse kernel driver In-Reply-To: <20140926013634.GA30270@jelly.bne.redhat.com> References: <54228B12.30201@vmware.com> <20140926013634.GA30270@jelly.bne.redhat.com> Message-ID: <54251074.4050901@vmware.com> Hi! On 09/26/2014 03:36 AM, Peter Hutterer wrote: > On Wed, Sep 24, 2014 at 11:12:50AM +0200, Thomas Hellstrom wrote: >> While looking at a vmmouse kernel driver, I wonder how the Xorg evdev >> driver can be configured to receive both absolute and relative events >> from the same device as the vmmouse sometimes sends absolute events and >> sometimes relative. Is the "IgnoreAbsoluteAxes" "False" option sufficient? > at the same time, or depending on the configuration? The > IgnoreAbsoluteAxes/IgnoreRelativeAxes options simply disable one of the two > on startup, allowing the other one to be initialized. that's for virtual > devices mostly used in VMs because our device autodetection fails there. > > So short answer: yes, should be sufficient provided you stay in that mode > for the lifetime of the device. Thanks for the answer. The problem is we don't. We could suddenly decide that apparently somebody applied a screen tranformation or is running a game and revert back to relative events. Otherwise the preferred choice is absolute events for minimal cursor latency. I know that for this reason the virtual USB mice are duplicated: one for absolute events and one for relative events but I haven't looked to closely at what level this actually happens. But whatever solution that emerges needs to work also with the new compositors. I guess I have to look at somehow make the mouse appear as two different ps2 mice from within the kernel driver... /Thomas > > Cheers, > Peter > _______________________________________________ > xorg-devel at lists.x.org: X.Org development > Archives: https://urldefense.proofpoint.com/v1/url?u=http://lists.x.org/archives/xorg-devel&k=oIvRg1%2BdGAgOoM1BIlLLqw%3D%3D%0A&r=l5Ago9ekmVFZ3c4M6eauqrJWGwjf6fTb%2BP3CxbBFkVM%3D%0A&m=FGvv1Co9p8r5mGWroOXsHsaTmEVAUnijyLABVdnczFE%3D%0A&s=ef21fa1c111563c7c60238324a5d1ea3a992f49ba1ce31c03d7b980731a69da4 > Info: https://urldefense.proofpoint.com/v1/url?u=http://lists.x.org/mailman/listinfo/xorg-devel&k=oIvRg1%2BdGAgOoM1BIlLLqw%3D%3D%0A&r=l5Ago9ekmVFZ3c4M6eauqrJWGwjf6fTb%2BP3CxbBFkVM%3D%0A&m=FGvv1Co9p8r5mGWroOXsHsaTmEVAUnijyLABVdnczFE%3D%0A&s=8e8e5c990a3b5417880f61a5a4d9380346489af4268c8117780de04a894ed53e From smout.jan at gmail.com Fri Sep 26 03:40:57 2014 From: smout.jan at gmail.com (Jan Smout) Date: Fri, 26 Sep 2014 12:40:57 +0200 Subject: [PATCH libX11] xcb_io: Fix Xlib 32-bit request number issues In-Reply-To: <1411585990-6423-1-git-send-email-jnsptrsn1@gmail.com> References: <1411585990-6423-1-git-send-email-jnsptrsn1@gmail.com> Message-ID: Keith Packard doesn't seem very responsive (as in 'completely ignoring the subject') Thank you for persisting, Jonas. On 24 September 2014 21:13, Jonas Petersen wrote: > By design, on 32-bit systems, the Xlib internal 32-bit request sequence > numbers may wrap. There is some locations within xcb_io.c that are not > wrap-safe though. The value of last_flushed relies on request to be > sequential all the time. This is not given in the moment when the > sequence has just wrapped. Applications may then crash with a > "Fatal IO error 11 (Resource temporarily unavailable)". > > This patch fixes this by "unwrapping" the sequence number when needed to > retain the sequence relative to last_flushed. It also contains some > additional optimizations. > > Signed-off-by: Jonas Petersen > --- > src/Xxcbint.h | 2 +- > src/xcb_io.c | 27 +++++++++++++++++++++------ > 2 files changed, 22 insertions(+), 7 deletions(-) > > diff --git a/src/Xxcbint.h b/src/Xxcbint.h > index bf41c23..feee775 100644 > --- a/src/Xxcbint.h > +++ b/src/Xxcbint.h > @@ -31,7 +31,7 @@ typedef struct _X11XCBPrivate { > char *reply_data; > int reply_length; > int reply_consumed; > - uint64_t last_flushed; > + unsigned long last_flushed; > enum XEventQueueOwner event_owner; > XID next_xid; > > diff --git a/src/xcb_io.c b/src/xcb_io.c > index 5987329..03af1f9 100644 > --- a/src/xcb_io.c > +++ b/src/xcb_io.c > @@ -59,15 +59,19 @@ static void require_socket(Display *dpy) > { > if(dpy->bufmax == dpy->buffer) > { > - uint64_t sent; > + uint64_t sent64; > + unsigned long sent; > int flags = 0; > /* if we don't own the event queue, we have to ask XCB > * to set our errors aside for us. */ > if(dpy->xcb->event_owner != XlibOwnsEventQueue) > flags = XCB_REQUEST_CHECKED; > if(!xcb_take_socket(dpy->xcb->connection, return_socket, > dpy, > - flags, &sent)) > + flags, &sent64)) > _XIOError(dpy); > + > + sent = sent64; > + > /* Xlib uses unsigned long for sequence numbers. XCB > * uses 64-bit internally, but currently exposes an > * unsigned int API. If these differ, Xlib cannot track > @@ -77,7 +81,7 @@ static void require_socket(Display *dpy) > * 64-bit sequence numbers. */ > if (sizeof(unsigned long) > sizeof(unsigned int) && > dpy->xcb->event_owner == XlibOwnsEventQueue && > - (sent - dpy->last_request_read >= (UINT64_C(1) << > 32))) { > + (long) (sent - dpy->last_request_read) < 0) { > throw_thread_fail_assert("Sequence number wrapped " > "beyond 32 bits while > Xlib " > "did not own the socket", > @@ -455,7 +459,7 @@ void _XSend(Display *dpy, const char *data, long size) > static const xReq dummy_request; > static char const pad[3]; > struct iovec vec[3]; > - uint64_t requests; > + uint64_t requests, unwrapped_request; > _XExtension *ext; > xcb_connection_t *c = dpy->xcb->connection; > if(dpy->flags & XlibDisplayIOError) > @@ -464,6 +468,13 @@ void _XSend(Display *dpy, const char *data, long size) > if(dpy->bufptr == dpy->buffer && !size) > return; > > + unwrapped_request = dpy->request; > + /* If there was a sequence number wrap since our last flush, > + * make sure the sequence number we use, stays in sequence > + * with dpy->xcb->last_flush. */ > + if (sizeof(uint64_t) > sizeof(unsigned long) && dpy->request < > dpy->xcb->last_flushed) > + unwrapped_request += UINT64_C(1) << 32; > + > /* iff we asked XCB to set aside errors, we must pick those up > * eventually. iff there are async handlers, we may have just > * issued requests that will generate replies. in either case, > @@ -471,10 +482,14 @@ void _XSend(Display *dpy, const char *data, long > size) > if(dpy->xcb->event_owner != XlibOwnsEventQueue || > dpy->async_handlers) > { > uint64_t sequence; > - for(sequence = dpy->xcb->last_flushed + 1; sequence <= > dpy->request; ++sequence) > + for(sequence = (uint64_t) dpy->xcb->last_flushed + 1; > sequence <= unwrapped_request; ++sequence) > + /* On systems where unsigned long is 32 bits, the > 64-bit sequence > + * passed to append_pending_request might get > trimmed off. > + * This is logically correct and expected, as it's > simply > + * 're-wrapping' the 'unwrapped' sequence number. > */ > append_pending_request(dpy, sequence); > } > - requests = dpy->request - dpy->xcb->last_flushed; > + requests = unwrapped_request - dpy->xcb->last_flushed; > dpy->xcb->last_flushed = dpy->request; > > vec[0].iov_base = dpy->buffer; > -- > 1.9.1 > > _______________________________________________ > xorg-devel at lists.x.org: X.Org development > Archives: http://lists.x.org/archives/xorg-devel > Info: http://lists.x.org/mailman/listinfo/xorg-devel > -- Life is complex, it has a real part and an imaginary part. -------------- next part -------------- An HTML attachment was scrubbed... URL: From hdegoede at redhat.com Fri Sep 26 05:44:15 2014 From: hdegoede at redhat.com (Hans de Goede) Date: Fri, 26 Sep 2014 14:44:15 +0200 Subject: vmmouse kernel driver In-Reply-To: <54251074.4050901@vmware.com> References: <54228B12.30201@vmware.com> <20140926013634.GA30270@jelly.bne.redhat.com> <54251074.4050901@vmware.com> Message-ID: <54255F9F.5090906@redhat.com> Hi, On 09/26/2014 09:06 AM, Thomas Hellstrom wrote: > Hi! > > On 09/26/2014 03:36 AM, Peter Hutterer wrote: >> On Wed, Sep 24, 2014 at 11:12:50AM +0200, Thomas Hellstrom wrote: >>> While looking at a vmmouse kernel driver, I wonder how the Xorg evdev >>> driver can be configured to receive both absolute and relative events >>> from the same device as the vmmouse sometimes sends absolute events and >>> sometimes relative. Is the "IgnoreAbsoluteAxes" "False" option sufficient? >> at the same time, or depending on the configuration? The >> IgnoreAbsoluteAxes/IgnoreRelativeAxes options simply disable one of the two >> on startup, allowing the other one to be initialized. that's for virtual >> devices mostly used in VMs because our device autodetection fails there. >> >> So short answer: yes, should be sufficient provided you stay in that mode >> for the lifetime of the device. > > Thanks for the answer. The problem is we don't. We could suddenly decide > that apparently somebody applied a screen tranformation or is running a > game and revert back to relative events. > Otherwise the preferred choice is absolute events for minimal cursor > latency. > > I know that for this reason the virtual USB mice are duplicated: one for > absolute events and one for relative events but I haven't looked to > closely at what level this actually happens. > > But whatever solution that emerges needs to work also with the new > compositors. I guess I have to look at somehow make the mouse appear as > two different ps2 mice from within the kernel driver... Actually one ps/2 device(mouse) which registers 2 input devices, that is more or less quite normal for trackpoint / touchpad combo's which are interfaced over a single ps/2 connection (some use ps/2 multiplexing, but others both touchpad and trackpoint ps/2 packets are send over the same ps/2 device). See drivers/input/mouse/alps.c for an example of this, search for "dev2" to all the code dealing with the second device. This way you can simply register both an absolute and a relative device, and send events out of the right one depending on the mode. That is probably the best way to deal with this. Regards, Hans From alexdeucher at gmail.com Fri Sep 26 06:52:09 2014 From: alexdeucher at gmail.com (Alex Deucher) Date: Fri, 26 Sep 2014 09:52:09 -0400 Subject: F21/F22: xorg-x11-drv: which for SiS? In-Reply-To: <5424EE55.9010403@earthlink.net> References: <5420EE06.7060302@earthlink.net> <54231A29.8050204@earthlink.net> <54240E54.1010504@redhat.com> <54243C6E.6000503@earthlink.net> <5424EE55.9010403@earthlink.net> Message-ID: On Fri, Sep 26, 2014 at 12:40 AM, Felix Miata wrote: > Alex Deucher wrote on 2014-09-25 22:55 (UCT-0400): > >> On Thu, Sep 25, 2014 at 12:01 PM, Felix Miata wrote: > ... >>> The sis and mga drivers are yet more cases of pushing hardware toward >>> landfills and recyclers before their suitability to task naturally expires. >>> Fedora seems to be the leader in this anti-eco-friendly realm. > >> Most developers have limited numbers of round tuits as well. > > I'm sure that's true. A lot surely depends on their motivation to do whatever > it is they do. Keeping old hardware going isn't likely to improve income or > prestige. Something else has to be the motivation, and that motivation to be > able to sustain needs arbitrary obstacles to that end avoided. > There will keep being new hardware and newer hardware usually has more users than older hardware. If it comes down to fixing a bug that affects 20 people on recent hardware and 1 person on older hardware it's a no brainer. >> This older hardware still works perfectly fine with older versions of >> distros or distros focused on older hardware. > > People need internet access that's secure, regardless of the age of their > hardware. They don't upgrade an OS because they want to, but because they > need to keep safe, and need access to web tools new enough not to cause > access denial. Older versions thus become inappropriate. People who use some > particular spin or distro don't appreciate being forced to choose between > changing to something unfamiliar, or familiarity coupled with newfound > insecurity, particularly if they know the insecurity trigger is nothing but a > compilation flag (e.g. sse2 for qt5, IIRC). Yes, yes, the old security argument. On that same point, while a newer software stack may fix some vulnerabilities, it may also introduce vulnerabilities on older hardware due to lack of testing or bitrot in older drivers. Additionally older drivers may have some inherent vulnerabilities. E.g., non-KMS drivers require the xserver run as root and bang on the hw directly from userspace which makes it incompatible with some newer security paradigms. > >> In many cases the older >> hardware can't handle the requirements of the newer distros. > > 3D? More bling? A bazillion background daemons some people might use? Often > the "requirements" are no more than a compilation switch that's an arbitary > choice, not to deny use to hardware on account of its age, which it does do, > but to add nominally more speed to help compensate for code and feature > bloat. Not everybody cares to have everything happen instantly, either at > all, or to spend any money to get more. DEs like Mate, TDE, IceWM and XFCE > exist why? So excessive requirements aren't insurmountable or unnecessary > obstacles. No one is stopping you from using a different DE or a lighter-weight distro. A lot of people like the new features. Some of these new features are a bad match for older hardware not only from a pure size perspective. They may require features or paradigms that are not really possible or exposed with older hardware. Having to support multiple interface modules to keep older and older hardware working adds overhead too. > >> Additionally, older hardware gets tested less and less on newer >> distros so there is less and less chance of everything just working >> smoothly. > > Hence reasons I do what I do. I have the hardware to do it, so I test with > it, and report problems found. > >> Even if you test it, there's a good chance developers won't >> have enough round tuits to actually fix the problem if you encounter >> one. > > Unfortunate, but true. Of course for some, those round tuits are allocated > and/or provided by commercial interests that don't profit from old machines > keeping on keeping on. Lack by others need not be impediments to those with > more noble motivation and availability. > Sure. But so far no one has stepped up with that motivation for these particular drivers. >> And speaking of anti-eco-friendly, a lot of older hardware uses >> more power than newer hardware > > How much is "a lot"? How does one tell whether any particular proposed > replacement in fact uses more or less than that which is in use? Marketing > specs are typically less than entirely trustworthy, designed to produce > sales, not compare to out-the-door products. > > Full size desktops from 9 or more years ago typically got by just fine on > 200w or 250w power supplies, significantly less than typically recommended > for newer. Newer gfxcards often require *2* fans blowing on their coolers, > not just one, or the none from yesteryear's machines I test on. That means > heat generation, and thus power consumption, from the video component of > newer systems has gone up, making buildings' A/C systems work harder whether > there are eco-friendly labels on the machines or not. > > I'm aware of no hard and fast rules to make any determination whether any > particular replacement would really be better. Much power, maybe in many > cases most, consumed by older computers in actual use went into CRTs putting > heat into the environment. That translates into consumption from newer, using > less power hungry panel displays, skewed when compared to older, which often > today are being used with newer, less expensive, space saving displays. > Energy Star has been around long enough that very little not featuring it > remains in use. There were giant power hungry cards then and there are giant power hungry cards now. By the same token, there are lots of cards both then and now with more modest power requirements. Overall though, the power use (especially at idle) is significantly lower with newer hardware. Today's monster cards use very little power at idle, much less than the monster cards of years past. Process shrinks and fine grained dynamic clocking and voltage adjustments, and improved clock and power gating save a lot of power compared to older asics. Just looking at monitors, CRTs used tons of power. LCDs reduced power usage a lot. Switching the backlighting on LCDs to LEDs also saves a lot of power. Old monitors used more power than new ones. Old motherboards and graphics chips did as well. Just look at battery life in laptops or tablets. While battery technology has improved somewhat, much of the improvement is from lower power use of the components in the laptops. > >> so it has it's own anti-eco-friendly >> costs. You should be recycling anyway ;) > > Where did I write anything that says I'm not? You expect people to purchase > newer just so that they can recycle working older? The bulk of machines I've > acquired, including those I kept to test on, were gratis acquisitions, > recycling on its own level. Without more such, I'd have to invest money above > my past pattern. For what, just to give other recyclers something to do? The > motherboard that spawned this thread is actually my latest acquistion, one of > my 5 newest counting the two that run here 24/7. Refurbing old machines with > new operating systems and giving them new homes *is* recycling, recycling > which arbitrary cutoff of driver support for would put a stop to. I was making a joke about your reference to landfills :) As has been said over and over, it's not arbitrary. Someone has to do the work to maintain, package, and audit these old packages. If there is no one there to do the work what do you expect? The older your hardware is, the fewer people are interested in it; at some point you run out of interested people. Alex From laerciosousa at sme-mogidascruzes.sp.gov.br Fri Sep 26 07:52:04 2014 From: laerciosousa at sme-mogidascruzes.sp.gov.br (=?UTF-8?Q?La=C3=A9rcio_de_Sousa?=) Date: Fri, 26 Sep 2014 11:52:04 -0300 Subject: Writing a new driver for nested Xorg servers based on Xephyr code Message-ID: Hi there! Some time ago, I've asked you about current situation of video drivers for nested Xorg servers as an alternative to Xephyr. This is mentioned in http://www.x.org/wiki/Releases/7.8/ Currently there's a project named xf86-video-nested, which is written somehow independently from Xephyr, but seems no longer maintained. Now I've started playing with xf86-video-nested and Xephyr code, trying to merge as much code as possible. It's still in an embrionary stage, so I want to ask you some questions: * Is there an official position from X.Org development team about deprecating Xephyr in favour of a driver based approach for nesting Xorg server? Or at least let both approaches coexist (maybe moving common code to a shared library, as I've asked you previously)? * In case I decide to proceed with Xephyr code merging into a video driver, should I do it in current project xf86-video-nested, or fork a new one (e.g. xf86-video-ephyr)? * I'm currently working on mapping Kdrive/Xephyr command line options to xorg.conf options for the driver. Which Kdrive/Xephyr options are really suitable for this mapping, and which ones are just reimplementations of command line options already present in Xorg itself? I'm pushing my progress to https://github.com/oiteam/xf86-video-ephyr, if you want to take a look. My main motivation with this project is providing a suitable way for single-card multiseat configuration on systemd-logind based systems, so I'm not so focused on implementing a "nested input driver" at the moment. Thanks for your attention! -- *La?rcio de Sousa* *Orientador de Inform?tica* *Escola Municipal "Professor Eul?lio Gruppi"* *Rua Ismael da Silva Mello, 559, Mogi Moderno* *Mogi das Cruzes - SPCEP 08717-390* Telefone: (11) 4726-8313 -------------- next part -------------- An HTML attachment was scrubbed... URL: From ajax at redhat.com Fri Sep 26 08:09:41 2014 From: ajax at redhat.com (Adam Jackson) Date: Fri, 26 Sep 2014 11:09:41 -0400 Subject: [PATCH 14/19] xfree86: Remove xf86Info.log In-Reply-To: <874mvvtizy.fsf@eliezer.anholt.net> References: <1411666655-1089-1-git-send-email-ajax@redhat.com> <1411666655-1089-15-git-send-email-ajax@redhat.com> <874mvvtizy.fsf@eliezer.anholt.net> Message-ID: <1411744181.20066.0.camel@dmt> On Thu, 2014-09-25 at 15:47 -0700, Eric Anholt wrote: > Adam Jackson writes: > > > SUBCLASS ALL THE THINGS > > Isn't the Log enum dead now? Indeed. Will fold that into v2. - ajax From eich at suse.com Fri Sep 26 09:05:07 2014 From: eich at suse.com (Egbert Eich) Date: Fri, 26 Sep 2014 18:05:07 +0200 Subject: [PATCH driver/intel] Allow copy_front() to fail and clean up gracefully if it does In-Reply-To: chris@chris-wilson.co.uk wrote on Thursday, 25 September 2014 at 16:54:04 +0100 References: <1411539479-7946-1-git-send-email-eich@freedesktop.org> <20140924064653.GL8727@nuc-i3427.alporthouse.com> <21538.40501.536981.986719@linux-qknr.fritz.box> <20140924110327.GI23098@nuc-i3427.alporthouse.com> <21538.43438.290116.157288@linux-qknr.fritz.box> <20140924132412.GB30278@nuc-i3427.alporthouse.com> <21540.5543.837761.121827@linux-qknr.fritz.box> <20140925151026.GC24221@nuc-i3427.alporthouse.com> <20140925155404.GD24221@nuc-i3427.alporthouse.com> Message-ID: <21541.36531.282126.182260@linux-qknr.fritz.box> Hi Chris, Chris Wilson writes: > > Also realised that even this should be fixed up as a last resort by > falling back to the shadow CRTC allocation. That band-aid should be > working again. > > Hopefully > > commit 9f7c1a4c4f2a6352263c36e75a984ed4095adbc0 > Author: Chris Wilson > Date: Thu Sep 25 16:29:14 2014 +0100 > > sna: Check for scanout pitch restrictions on linear GPU bo > > When converting a linear cached CPU bo into an uncached GPU bo, we must > be careful to adhere to the scanout restrictions if they apply for this > transfer or this Pixmap. > > Reported-by: Egbert Eich > Signed-off-by: Chris Wilson > > catches all the cases where we need to check the alignment on the pitch > before changing the cache level. If not, it now explicitly converts the > bo before making the framebuffer. thanks for looking into this! I can confirm that the patch works. I took a brief look into why the server terminates at server reset when the the patch which fixes the tiling isn't applied. This happens in sna_create_screen_resources() when sna_pixmap_force_to_gpu() fails and the entire creatSecreenResources fails. Since sna_pixmap_force_to_gpu() is allowed to fail at other places as alternatives will be used I looked who might need this call. The only thing I found was sna_copy_fbcon() which will fail in assert(priv && priv->gpu_bo). sna_copy_fbcon() is however not vital: The fix below made this work for me. This is a simple hack, one could also use a bo to a supported front buffer instead of insisiting a GPU bo. Later on use_shadow() should take care of a the failure of sna_pixmap_force_to_gpu() in sna_create_screen_resources(). Or can you think of another reason why this is needed so early? Cheers, Egbert. From: Egbert Eich Date: Fri, 26 Sep 2014 17:57:55 +0200 Subject: [PATCH driver/intel] In sna_create_screen_resources() don't make sna_pixmap_force_to_gpu() mandatory Signed-off-by: Egbert Eich --- src/sna/sna_display.c | 3 ++- src/sna/sna_driver.c | 11 +---------- 2 files changed, 3 insertions(+), 11 deletions(-) diff --git a/src/sna/sna_display.c b/src/sna/sna_display.c index 0aa7557..a55bdb9 100644 --- a/src/sna/sna_display.c +++ b/src/sna/sna_display.c @@ -1625,7 +1625,8 @@ void sna_copy_fbcon(struct sna *sna) assert((sna->flags & SNA_IS_HOSTED) == 0); priv = sna_pixmap(sna->front); - assert(priv && priv->gpu_bo); + if (!priv || !priv->gpu_bo) + return; /* Scan the connectors for a framebuffer and assume that is the fbcon */ VG_CLEAR(fbcon); diff --git a/src/sna/sna_driver.c b/src/sna/sna_driver.c index 7eed214..fe2a6ec 100644 --- a/src/sna/sna_driver.c +++ b/src/sna/sna_driver.c @@ -248,16 +248,7 @@ static Bool sna_create_screen_resources(ScreenPtr screen) return FALSE; } - if (!sna_pixmap_force_to_gpu(new_front, MOVE_READ)) { - xf86DrvMsg(screen->myNum, X_ERROR, - "[intel] Failed to allocate video resources for front buffer %dx%d at depth %d\n", - screen->width, - screen->height, - screen->rootDepth); - screen->DestroyPixmap(new_front); - return FALSE; - } - + sna_pixmap_force_to_gpu(new_front, MOVE_READ); screen->SetScreenPixmap(new_front); assert(screen->GetScreenPixmap(screen) == new_front); assert(sna->front == new_front); -- 1.8.4.5 From keithp at keithp.com Thu Sep 25 12:07:52 2014 From: keithp at keithp.com (Keith Packard) Date: Thu, 25 Sep 2014 12:07:52 -0700 Subject: [PATCH 03/11] dix: Drop the third argument from WindowExposuresProcPtr In-Reply-To: <1411061040-13053-4-git-send-email-ajax@redhat.com> References: <1411061040-13053-1-git-send-email-ajax@redhat.com> <1411061040-13053-4-git-send-email-ajax@redhat.com> Message-ID: <86vbobo6wn.fsf@hiro.keithp.com> Adam Jackson writes: > A careful read shows that it was always NULL. It hasn't always been; as > the DDX spec indicates, it was the "occluded region that has backing > store", but since that backing store code is long gone, we can nuke it. > > mi{,Overlay}WindowExposures get slightly simpler here, and will get even > simpler in just a moment. > > Signed-off-by: Adam Jackson > --- > dix/window.c | 2 +- > fb/fboverlay.c | 5 ++--- > fb/fboverlay.h | 4 +--- > hw/dmx/dmxwindow.c | 4 ++-- > hw/dmx/dmxwindow.h | 3 +-- > hw/kdrive/ephyr/ephyr.c | 2 +- > hw/kdrive/src/kxv.c | 6 +++--- > hw/xfree86/common/xf86xv.c | 6 +++--- > hw/xfree86/dri/dri.c | 4 ++-- > hw/xfree86/dri/dri.h | 3 +-- > hw/xnest/Window.c | 4 ++-- > hw/xnest/XNWindow.h | 3 +-- > include/scrnintstr.h | 3 +-- > mi/mi.h | 4 +--- > mi/miexpose.c | 15 +++------------ > mi/mioverlay.c | 30 ++++++++---------------------- > mi/miwindow.c | 4 ++-- > 17 files changed, 35 insertions(+), 67 deletions(-) Do you want to attempt to fix XQuartz, or do you want to let Jeremy clean up from this afterwards? Otherwise, this is Reviewed-by: Keith Packard -- keith.packard at intel.com -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 810 bytes Desc: not available URL: From ajax at redhat.com Fri Sep 26 12:30:21 2014 From: ajax at redhat.com (Adam Jackson) Date: Fri, 26 Sep 2014 15:30:21 -0400 Subject: [PULL] Dead code cleanups Message-ID: <1411759821.20066.12.camel@dmt> The xf86Info.log change also removes the enum; the rest are as reviewed. --- The following changes since commit cc59be38b7eff52a1d003b390f2994c73ee0b3e9: os: Don't listen to 'tcp' by default. Add '-listen' option. [v2] (2014-09-22 13:52:20 -0700) are available in the git repository at: ssh://people.freedesktop.org/~ajax/xserver.git dead-code for you to fetch changes up to 4433bc6d53e651b3dc4112099a153c2574f30797: x86emu: Undefine _NO_INLINE (2014-09-26 15:27:18 -0400) ---------------------------------------------------------------- Adam Jackson (12): loader: Deobfuscate RTLD_* macro stuff mi: Remove Windows 8-bpp colormap compatibility xfree86: Remove xv clip notify driver hook xfree86: Remove Option "TextClockFreq" xfree86: Remove spurious xf86ConfigError xfree86: Remove useless back-pointer to pScrn from colormap code xfree86: Remove DisplayID support xfree86: Remove xf86Info.log (v2) xfree86: Remove unused xf86Info.useDefaultFontPathFrom xfree86: configServerFlags never fails, make it return void xfree86: Remove pointless xf86PrintMarkers x86emu: Undefine _NO_INLINE hw/xfree86/common/xf86Config.c | 63 ++----- hw/xfree86/common/xf86Configure.c | 1 - hw/xfree86/common/xf86Globals.c | 1 - hw/xfree86/common/xf86Init.c | 8 +- hw/xfree86/common/xf86Privstr.h | 8 - hw/xfree86/common/xf86cmap.c | 46 +++-- hw/xfree86/common/xf86str.h | 2 - hw/xfree86/common/xf86xv.c | 4 - hw/xfree86/common/xf86xv.h | 3 - hw/xfree86/common/xf86xvpriv.h | 1 - hw/xfree86/ddc/ddc.c | 58 ------- hw/xfree86/ddc/xf86DDC.h | 5 - hw/xfree86/loader/loader.c | 22 +-- hw/xfree86/man/xorg.conf.man | 6 - hw/xfree86/modes/Makefile.am | 1 - hw/xfree86/modes/xf86DisplayIDModes.c | 444 ------------------------------------------------- hw/xfree86/parser/Device.c | 10 -- hw/xfree86/parser/xf86Parser.h | 1 - hw/xfree86/parser/xf86tokens.h | 1 - hw/xfree86/x86emu/x86emu/x86emui.h | 2 +- hw/xwin/winconfig.h | 1 - mi/micmap.c | 44 ----- 22 files changed, 38 insertions(+), 694 deletions(-) delete mode 100644 hw/xfree86/modes/xf86DisplayIDModes.c - ajax From chris at chris-wilson.co.uk Fri Sep 26 12:58:52 2014 From: chris at chris-wilson.co.uk (Chris Wilson) Date: Fri, 26 Sep 2014 20:58:52 +0100 Subject: [PATCH driver/intel] Allow copy_front() to fail and clean up gracefully if it does In-Reply-To: <21541.36531.282126.182260@linux-qknr.fritz.box> References: <1411539479-7946-1-git-send-email-eich@freedesktop.org> <20140924064653.GL8727@nuc-i3427.alporthouse.com> <21538.40501.536981.986719@linux-qknr.fritz.box> <20140924110327.GI23098@nuc-i3427.alporthouse.com> <21538.43438.290116.157288@linux-qknr.fritz.box> <20140924132412.GB30278@nuc-i3427.alporthouse.com> <21540.5543.837761.121827@linux-qknr.fritz.box> <20140925151026.GC24221@nuc-i3427.alporthouse.com> <20140925155404.GD24221@nuc-i3427.alporthouse.com> <21541.36531.282126.182260@linux-qknr.fritz.box> Message-ID: <20140926195851.GC19278@nuc-i3427.alporthouse.com> On Fri, Sep 26, 2014 at 06:05:07PM +0200, Egbert Eich wrote: > > Hi Chris, > > Chris Wilson writes: > > > > Also realised that even this should be fixed up as a last resort by > > falling back to the shadow CRTC allocation. That band-aid should be > > working again. > > > > Hopefully > > > > commit 9f7c1a4c4f2a6352263c36e75a984ed4095adbc0 > > Author: Chris Wilson > > Date: Thu Sep 25 16:29:14 2014 +0100 > > > > sna: Check for scanout pitch restrictions on linear GPU bo > > > > When converting a linear cached CPU bo into an uncached GPU bo, we must > > be careful to adhere to the scanout restrictions if they apply for this > > transfer or this Pixmap. > > > > Reported-by: Egbert Eich > > Signed-off-by: Chris Wilson > > > > catches all the cases where we need to check the alignment on the pitch > > before changing the cache level. If not, it now explicitly converts the > > bo before making the framebuffer. > > thanks for looking into this! I can confirm that the patch works. > > I took a brief look into why the server terminates at server reset > when the the patch which fixes the tiling isn't applied. > This happens in sna_create_screen_resources() when sna_pixmap_force_to_gpu() > fails and the entire creatSecreenResources fails. > Since sna_pixmap_force_to_gpu() is allowed to fail at other places > as alternatives will be used I looked who might need this call. > The only thing I found was sna_copy_fbcon() which will fail in > assert(priv && priv->gpu_bo). sna_copy_fbcon() is however not vital: > The fix below made this work for me. > This is a simple hack, one could also use a bo to a supported front > buffer instead of insisiting a GPU bo. > > Later on use_shadow() should take care of a the failure of > sna_pixmap_force_to_gpu() in sna_create_screen_resources(). > > Or can you think of another reason why this is needed so early? The move-to-gpu exists so that we initialise the GPU bo early on so that we didn't incur any delay when the time came to display the framebuffer. (It also helped making the headless case similar to normal setups for testing purposes.) I thought making it fatal would help detect configuration errors easier - but indeed the modeset has a good chance of recovering from the error. I am convinced (at least by 3/4 of that patch, I still want the assert(priv)!) Thanks, -Chris -- Chris Wilson, Intel Open Source Technology Centre From chris at chris-wilson.co.uk Fri Sep 26 13:05:41 2014 From: chris at chris-wilson.co.uk (Chris Wilson) Date: Fri, 26 Sep 2014 21:05:41 +0100 Subject: [PATCH driver/intel] Allow copy_front() to fail and clean up gracefully if it does In-Reply-To: <21541.36531.282126.182260@linux-qknr.fritz.box> References: <1411539479-7946-1-git-send-email-eich@freedesktop.org> <20140924064653.GL8727@nuc-i3427.alporthouse.com> <21538.40501.536981.986719@linux-qknr.fritz.box> <20140924110327.GI23098@nuc-i3427.alporthouse.com> <21538.43438.290116.157288@linux-qknr.fritz.box> <20140924132412.GB30278@nuc-i3427.alporthouse.com> <21540.5543.837761.121827@linux-qknr.fritz.box> <20140925151026.GC24221@nuc-i3427.alporthouse.com> <20140925155404.GD24221@nuc-i3427.alporthouse.com> <21541.36531.282126.182260@linux-qknr.fritz.box> Message-ID: <20140926200541.GD19278@nuc-i3427.alporthouse.com> On Fri, Sep 26, 2014 at 06:05:07PM +0200, Egbert Eich wrote: > From: Egbert Eich > Date: Fri, 26 Sep 2014 17:57:55 +0200 > Subject: [PATCH driver/intel] In sna_create_screen_resources() don't make > sna_pixmap_force_to_gpu() mandatory > > Signed-off-by: Egbert Eich Pushed a slight variation, commit f785035d5bd42a778d4be0bf3ff8678bd7a7e503 Author: Chris Wilson Date: Fri Sep 26 21:01:43 2014 +0100 sna: Allow move-to-gpu to fail during ScreenCreateResources Before we attach the Screen Pixmap to the scanout, we will have to create a GPU bo and apply any fixups as required. Therefore failing to pre-emptively move it during ScreenCreateResource is not fatal and the failure can be simply ignored. Suggested-by: Egbert Eich Signed-off-by: Chris Wilson Thanks, -Chris -- Chris Wilson, Intel Open Source Technology Centre From mattst88 at gmail.com Fri Sep 26 13:13:06 2014 From: mattst88 at gmail.com (Matt Turner) Date: Fri, 26 Sep 2014 13:13:06 -0700 Subject: [PATCH libX11] xcb_io: Fix Xlib 32-bit request number issues In-Reply-To: References: <1411585990-6423-1-git-send-email-jnsptrsn1@gmail.com> Message-ID: On Fri, Sep 26, 2014 at 3:40 AM, Jan Smout wrote: > Keith Packard doesn't seem very responsive (as in 'completely ignoring the > subject') Perhaps you should try Ccing him? (now Cc'd) From keithp at keithp.com Fri Sep 26 19:40:03 2014 From: keithp at keithp.com (Keith Packard) Date: Fri, 26 Sep 2014 19:40:03 -0700 Subject: [PATCH] glamor: Export glamor_copy for drivers Message-ID: <1411785603-13788-1-git-send-email-keithp@keithp.com> Export glamor_copy so that it can be used before the server is fully initialized to copy console frame buffer contents to the screen frame buffer when using the -background none command line option. Signed-off-by: Keith Packard --- glamor/glamor.h | 14 ++++++++++++++ glamor/glamor_priv.h | 12 ------------ 2 files changed, 14 insertions(+), 12 deletions(-) diff --git a/glamor/glamor.h b/glamor/glamor.h index 405dbe8..8738a54 100644 --- a/glamor/glamor.h +++ b/glamor/glamor.h @@ -322,6 +322,20 @@ extern _X_EXPORT void glamor_destroy_gc(GCPtr gc); extern Bool _X_EXPORT glamor_change_window_attributes(WindowPtr pWin, unsigned long mask); extern void _X_EXPORT glamor_copy_window(WindowPtr window, DDXPointRec old_origin, RegionPtr src_region); +#define HAS_GLAMOR_COPY 1 + +extern void _X_EXPORT glamor_copy(DrawablePtr src, + DrawablePtr dst, + GCPtr gc, + BoxPtr box, + int nbox, + int dx, + int dy, + Bool reverse, + Bool upsidedown, + Pixel bitplane, + void *closure); + /* Glamor rendering/drawing functions with XXX_nf. * nf means no fallback within glamor internal if possible. If glamor * fail to accelerate the operation, glamor will return a false, and the diff --git a/glamor/glamor_priv.h b/glamor/glamor_priv.h index c089db8..947e376 100644 --- a/glamor/glamor_priv.h +++ b/glamor/glamor_priv.h @@ -964,18 +964,6 @@ glamor_poly_segment(DrawablePtr drawable, GCPtr gc, int nseg, xSegment *segs); /* glamor_copy.c */ -void -glamor_copy(DrawablePtr src, - DrawablePtr dst, - GCPtr gc, - BoxPtr box, - int nbox, - int dx, - int dy, - Bool reverse, - Bool upsidedown, - Pixel bitplane, - void *closure); RegionPtr glamor_copy_area(DrawablePtr src, DrawablePtr dst, GCPtr gc, -- 2.1.1 From keithp at keithp.com Fri Sep 26 20:23:35 2014 From: keithp at keithp.com (Keith Packard) Date: Fri, 26 Sep 2014 20:23:35 -0700 Subject: [PATCH libX11] xcb_io: Fix Xlib 32-bit request number issues In-Reply-To: References: <1411585990-6423-1-git-send-email-jnsptrsn1@gmail.com> Message-ID: <867g0pu4p4.fsf@hiro.keithp.com> Matt Turner writes: > On Fri, Sep 26, 2014 at 3:40 AM, Jan Smout wrote: >> Keith Packard doesn't seem very responsive (as in 'completely ignoring the >> subject') > > Perhaps you should try Ccing him? (now Cc'd) The problem is that reviewing this patch is *really hard*. The last time, I think I spent a solid couple of days thinking about this and making sure I'd caught all of the cases. I'm still not sure it's right, but I guess it's probably better than what we have? -- keith.packard at intel.com -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 810 bytes Desc: not available URL: From keithp at keithp.com Fri Sep 26 20:35:31 2014 From: keithp at keithp.com (Keith Packard) Date: Fri, 26 Sep 2014 20:35:31 -0700 Subject: [PATCH 0/4] v3: xf86-video-intel: Replace glamor support In-Reply-To: <1408256001-18414-1-git-send-email-keithp@keithp.com> References: <1408256001-18414-1-git-send-email-keithp@keithp.com> Message-ID: <1411788935-31059-1-git-send-email-keithp@keithp.com> With all of the preparatory patches applied, here's the remaining short sequence of patches necessary to conver the intel driver over to using glamor directly, rather than indirectly through UXA. I've removed the (scary) changes which moved the initial mode setting to the first invocation of the block handler. That required exporting another function from glamor in the server (patch already on the list) so that I could copy the existing console contents to the new frame buffer before GCs were ready to go. The final patch in this sequence moves the mode set from ScreenInit to CreateScreenResources so that it occurs after the contents have been initialized from the console. That is independent of the rest of the sequence and serves to avoid a brief flicker of black during server initialization. Again, the plan when actually merging this into the driver will be to squash the first two patches so that we can bisect across this change without losing glamor entirely; the patches are provided separately here because it's a lot easier to review them this way. Keith Packard (4): Remove glamor support from driver Add glamor back into the driver Add "none" acceleration option Delay mode set until fb contents copied from console configure.ac | 46 ++--- src/Makefile.am | 9 +- src/intel_module.c | 14 +- src/uxa/Makefile.am | 46 +++-- src/uxa/intel.h | 17 ++ src/uxa/intel_display.c | 72 +++++-- src/uxa/intel_dri.c | 294 ++++++++-------------------- src/uxa/intel_dri3.c | 58 +++--- src/uxa/intel_driver.c | 479 ++++++++++++++++++++++++++++++++++------------ src/uxa/intel_glamor.c | 384 +++++++++++++++++++------------------ src/uxa/intel_glamor.h | 59 ++---- src/uxa/intel_none.c | 299 +++++++++++++++++++++++++++++ src/uxa/intel_none.h | 46 +++++ src/uxa/intel_uxa.c | 174 ++++++++++++----- src/uxa/intel_uxa.h | 12 +- src/uxa/intel_uxa_video.c | 1 - src/uxa/intel_video.c | 75 +++++--- src/uxa/uxa-accel.c | 230 ---------------------- src/uxa/uxa-glamor.h | 65 ------- src/uxa/uxa-glyphs.c | 28 --- src/uxa/uxa-render.c | 91 --------- src/uxa/uxa.c | 11 -- src/uxa/uxa.h | 16 -- 23 files changed, 1328 insertions(+), 1198 deletions(-) create mode 100644 src/uxa/intel_none.c create mode 100644 src/uxa/intel_none.h delete mode 100644 src/uxa/uxa-glamor.h -- 2.1.1 From keithp at keithp.com Fri Sep 26 20:35:34 2014 From: keithp at keithp.com (Keith Packard) Date: Fri, 26 Sep 2014 20:35:34 -0700 Subject: [PATCH 3/4] Add "none" acceleration option In-Reply-To: <1411788935-31059-1-git-send-email-keithp@keithp.com> References: <1408256001-18414-1-git-send-email-keithp@keithp.com> <1411788935-31059-1-git-send-email-keithp@keithp.com> Message-ID: <1411788935-31059-4-git-send-email-keithp@keithp.com> This uses fb directly, and supports DRI2 and DRI3. Signed-off-by: Keith Packard --- configure.ac | 39 +++---- src/Makefile.am | 9 +- src/intel_module.c | 14 +-- src/uxa/Makefile.am | 2 + src/uxa/intel.h | 6 + src/uxa/intel_display.c | 8 ++ src/uxa/intel_dri.c | 4 + src/uxa/intel_dri3.c | 49 +++++--- src/uxa/intel_driver.c | 171 +++++++++++++++++++-------- src/uxa/intel_glamor.c | 4 + src/uxa/intel_none.c | 299 ++++++++++++++++++++++++++++++++++++++++++++++++ src/uxa/intel_none.h | 46 ++++++++ src/uxa/intel_uxa.c | 3 + 13 files changed, 545 insertions(+), 109 deletions(-) create mode 100644 src/uxa/intel_none.c create mode 100644 src/uxa/intel_none.h diff --git a/configure.ac b/configure.ac index 36f6e63..1ebd377 100644 --- a/configure.ac +++ b/configure.ac @@ -419,7 +419,6 @@ if test "x$UXA" = "xauto"; then fi if test "x$UXA" != "xno"; then AC_DEFINE(USE_UXA, 1, [Enable UXA support]) - PKG_CHECK_MODULES(DRMINTEL, [libdrm_intel >= $uxa_requires_libdrm]) required_pixman_version=0.24 UXA=yes fi @@ -440,6 +439,8 @@ if test "x$GLAMOR" != "xno"; then AC_DEFINE(USE_GLAMOR, 1, [Enable glamor acceleration]) fi +PKG_CHECK_MODULES(DRMINTEL, [libdrm_intel >= $uxa_requires_libdrm]) + PKG_CHECK_MODULES(XORG, [xorg-server >= $required_xorg_server_version xproto fontsproto pixman-1 >= $required_pixman_version $REQUIRED_MODULES]) ABI_VERSION=`$PKG_CONFIG --variable=abi_videodrv xorg-server` @@ -684,6 +685,8 @@ if test "x$accel" = "xauto"; then else if test "x$GLAMOR" != "xno"; then accel="glamor" + else + accel="none" fi fi fi @@ -692,11 +695,9 @@ if test "x$accel" = "xauto"; then fi fi -have_accel="none" if test "x$accel" = "xsna"; then if test "x$SNA" != "xno"; then AC_DEFINE(DEFAULT_ACCEL_METHOD, SNA, [Default acceleration method]) - have_accel="yes" else AC_MSG_ERROR([SNA requested as default, but is not enabled]) fi @@ -705,7 +706,6 @@ fi if test "x$accel" = "xuxa"; then if test "x$UXA" != "xno"; then AC_DEFINE(DEFAULT_ACCEL_METHOD, UXA, [Default acceleration method]) - have_accel="yes" else AC_MSG_ERROR([UXA requested as default, but is not enabled]) fi @@ -714,22 +714,15 @@ fi if test "x$accel" = "xglamor"; then if test "x$GLAMOR" != "xno"; then AC_DEFINE(DEFAULT_ACCEL_METHOD, GLAMOR, [Default acceleration method]) - have_accel="yes" else AC_MSG_ERROR([glamor acceleration requested as default, but is not enabled]) fi fi -if test "x$have_accel" = "xnone"; then - if test "x$KMS" = "xyes"; then - if test "x$SNA" != "xno" -o "x$UXA" != "xno"; then - AC_DEFINE(DEFAULT_ACCEL_METHOD, NOACCEL, [Default acceleration method]) - else - AC_MSG_ERROR([Invalid default acceleration option]) - fi - fi - accel="none" +if test "x$accel" = "xnone"; then + AC_DEFINE(DEFAULT_ACCEL_METHOD, NOACCEL, [Default acceleration method]) fi + AC_MSG_RESULT($accel) xp_msg="" @@ -882,11 +875,6 @@ test -e `pwd $0`/README && cat `pwd $0`/README accel_msg="" if test "x$SNA" != "xno"; then - if test "$accel" = "none"; then - accel_msg="$accel_msg *none" - else - accel_msg="$accel_msg none" - fi if test "$accel" = "sna"; then accel_msg="$accel_msg *sna" else @@ -894,13 +882,6 @@ if test "x$SNA" != "xno"; then fi fi if test "x$UXA" != "xno"; then - if test "x$SNA" = "xno"; then - if test "$accel" = "none"; then - accel_msg="$accel_msg *none" - else - accel_msg="$accel_msg none" - fi - fi if test "$accel" = "uxa"; then accel_msg="$accel_msg *uxa" else @@ -915,6 +896,12 @@ if test "x$GLAMOR" != "xno"; then fi fi +if test "$accel" = "none"; then + accel_msg="$accel_msg *none" +else + accel_msg="$accel_msg none" +fi + if test "x$dri_msg" = "x"; then dri_msg=" none" fi diff --git a/src/Makefile.am b/src/Makefile.am index aa8b47e..ce6f836 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -18,7 +18,7 @@ # 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. -SUBDIRS = render_program legacy +SUBDIRS = render_program legacy uxa # this is obnoxious: # -module lets us name the module exactly how we want @@ -41,18 +41,13 @@ endif intel_drv_la_LTLIBRARIES = intel_drv.la intel_drv_la_LDFLAGS = -module -avoid-version intel_drv_ladir = $(moduledir)/drivers -intel_drv_la_LIBADD = legacy/liblegacy.la $(PCIACCESS_LIBS) $(XORG_LIBS) +intel_drv_la_LIBADD = legacy/liblegacy.la uxa/libuxa.la $(PCIACCESS_LIBS) $(XORG_LIBS) if SNA SUBDIRS += sna intel_drv_la_LIBADD += sna/libsna.la endif -if UXA -SUBDIRS += uxa -intel_drv_la_LIBADD += uxa/libuxa.la -endif - NULL:=# intel_drv_la_SOURCES = \ diff --git a/src/intel_module.c b/src/intel_module.c index 57ac5ef..536bf37 100644 --- a/src/intel_module.c +++ b/src/intel_module.c @@ -564,20 +564,18 @@ intel_scrn_create(DriverPtr driver, #if KMS switch (get_accel_method()) { #if USE_SNA - case NOACCEL: case SNA: return sna_init_scrn(scrn, entity_num); #endif -#if USE_UXA -#if !USE_SNA - case NOACCEL: -#endif +#if USE_GLAMOR case GLAMOR: +#endif +#if USE_UXA case UXA: - return intel_init_scrn(scrn); #endif - - default: break; + case NOACCEL: + default: + return intel_init_scrn(scrn); } #endif diff --git a/src/uxa/Makefile.am b/src/uxa/Makefile.am index 5d342d3..81b5c0a 100644 --- a/src/uxa/Makefile.am +++ b/src/uxa/Makefile.am @@ -31,6 +31,8 @@ libuxa_la_SOURCES = \ intel_driver.c \ intel_glamor.h \ intel_memory.c \ + intel_none.c \ + intel_none.h \ intel_video.c \ intel_video.h \ intel_video_overlay.c \ diff --git a/src/uxa/intel.h b/src/uxa/intel.h index 3c1a321..3cf61db 100644 --- a/src/uxa/intel.h +++ b/src/uxa/intel.h @@ -112,6 +112,7 @@ enum dri_type { }; enum accel_type { + ACCEL_NONE, #if USE_GLAMOR ACCEL_GLAMOR, #endif @@ -126,9 +127,11 @@ typedef struct intel_screen_private { enum accel_type accel; +#if USE_UXA #define RENDER_BATCH I915_EXEC_RENDER #define BLT_BATCH I915_EXEC_BLT unsigned int current_batch; +#endif void *modes; drm_intel_bo *front_buffer, *back_buffer; @@ -474,6 +477,9 @@ void I830DRI2FrameEventHandler(unsigned int frame, unsigned int tv_sec, void I830DRI2FlipEventHandler(unsigned int frame, unsigned int tv_sec, unsigned int tv_usec, DRI2FrameEventPtr flip_info); +Bool +intel_fb_init(ScreenPtr screen, void *pbits); + /* intel_dri3.c */ Bool intel_dri3_screen_init(ScreenPtr screen); diff --git a/src/uxa/intel_display.c b/src/uxa/intel_display.c index e9efa0d..6159841 100644 --- a/src/uxa/intel_display.c +++ b/src/uxa/intel_display.c @@ -63,6 +63,7 @@ #if USE_GLAMOR #include "intel_glamor.h" #endif +#include "intel_none.h" #define KNOWN_MODE_FLAGS ((1<<14)-1) @@ -1631,6 +1632,10 @@ intel_xf86crtc_resize(ScrnInfoPtr scrn, int width, int height) goto fail; break; #endif + case ACCEL_NONE: + if (!intel_none_create_screen_resources(scrn->pScreen)) + goto fail; + break; } for (i = 0; i < xf86_config->num_crtc; i++) { @@ -2476,6 +2481,9 @@ intel_copy_pixmap(PixmapPtr src, PixmapPtr dst) { ret = intel_uxa_copy_pixmap(src, dst); break; #endif + case ACCEL_NONE: + ret = intel_none_copy_pixmap(src, dst); + break; } return ret; } diff --git a/src/uxa/intel_dri.c b/src/uxa/intel_dri.c index f191af7..47ac0d4 100644 --- a/src/uxa/intel_dri.c +++ b/src/uxa/intel_dri.c @@ -72,6 +72,7 @@ USE OR OTHER DEALINGS IN THE SOFTWARE. #if USE_GLAMOR #include "intel_glamor.h" #endif +#include "intel_none.h" typedef struct { int refcnt; @@ -646,6 +647,9 @@ intel_exchange_pixmap_buffers(struct intel_screen_private *intel, PixmapPtr fron intel_uxa_exchange_buffers(intel, front, back); break; #endif + case ACCEL_NONE: + intel_none_exchange_buffers(intel, front, back); + break; } DamageRegionProcessPending(&front->drawable); diff --git a/src/uxa/intel_dri3.c b/src/uxa/intel_dri3.c index 2c44442..dae0c71 100644 --- a/src/uxa/intel_dri3.c +++ b/src/uxa/intel_dri3.c @@ -59,7 +59,6 @@ static PixmapPtr intel_dri3_pixmap_from_fd(ScreenPtr screen, { ScrnInfoPtr scrn = xf86ScreenToScrn(screen); intel_screen_private *intel = intel_get_screen_private(scrn); - struct intel_uxa_pixmap *priv; PixmapPtr pixmap; dri_bo *bo; @@ -87,14 +86,19 @@ static PixmapPtr intel_dri3_pixmap_from_fd(ScreenPtr screen, if (bo == NULL) goto free_pixmap; - intel_uxa_set_pixmap_bo(pixmap, bo); + intel_set_pixmap_bo(pixmap, bo); dri_bo_unreference(bo); - priv = intel_uxa_get_pixmap_private(pixmap); - if (priv == NULL) - goto free_pixmap; - - priv->pinned |= PIN_DRI3; +#if USE_UXA + if (intel->accel == ACCEL_UXA) { + struct intel_uxa_pixmap *priv; + priv = intel_uxa_get_pixmap_private(pixmap); + if (priv == NULL) + goto free_pixmap; + + priv->pinned |= PIN_DRI3; + } +#endif return pixmap; @@ -108,23 +112,30 @@ static int intel_dri3_fd_from_pixmap(ScreenPtr screen, CARD16 *stride, CARD32 *size) { - struct intel_uxa_pixmap *priv; - int fd; + dri_bo *bo; + int fd; - priv = intel_uxa_get_pixmap_private(pixmap); - if (!priv) - return -1; + bo = intel_get_pixmap_bo(pixmap); + if (!bo) + return -1; - if (intel_pixmap_pitch(pixmap) > UINT16_MAX) + if (drm_intel_bo_gem_export_to_prime(bo, &fd) < 0) return -1; - if (drm_intel_bo_gem_export_to_prime(priv->bo, &fd) < 0) - return -1; - - priv->pinned |= PIN_DRI3; - +#if USE_UXA + if (intel_get_screen_private(xf86ScreenToScrn(screen))->accel== ACCEL_UXA) { + struct intel_uxa_pixmap *priv; + + if (intel_pixmap_pitch(pixmap) > UINT16_MAX) + return -1; + priv = intel_uxa_get_pixmap_private(pixmap); + if (!priv) + return -1; + priv->pinned |= PIN_DRI3; + } +#endif *stride = intel_pixmap_pitch(pixmap); - *size = priv->bo->size; + *size = bo->size; return fd; } diff --git a/src/uxa/intel_driver.c b/src/uxa/intel_driver.c index 2e78fb3..619ac50 100644 --- a/src/uxa/intel_driver.c +++ b/src/uxa/intel_driver.c @@ -62,6 +62,7 @@ USE OR OTHER DEALINGS IN THE SOFTWARE. #include "intel.h" #include "intel_video.h" #include "uxa_module.h" +#include "intel_none.h" #ifdef INTEL_XVMC #define _INTEL_XVMC_SERVER_ @@ -179,6 +180,10 @@ static Bool i830CreateScreenResources(ScreenPtr screen) return FALSE; break; #endif + case ACCEL_NONE: + if (!intel_none_create_screen_resources(screen)) + return FALSE; + break; } intel_copy_fb(scrn); @@ -202,6 +207,9 @@ intel_set_pixmap_bo(PixmapPtr pixmap, dri_bo *bo) intel_uxa_set_pixmap_bo(pixmap, bo); break; #endif + case ACCEL_NONE: + intel_none_set_pixmap_bo(pixmap, bo); + break; default: ErrorF("No accel architecture, cannot set pixmap bo\n"); break; @@ -223,6 +231,8 @@ intel_get_pixmap_bo(PixmapPtr pixmap) case ACCEL_UXA: return intel_uxa_get_pixmap_bo(pixmap); #endif + case ACCEL_NONE: + return intel_none_get_pixmap_bo(pixmap); default: ErrorF("No accel architecture, cannot set pixmap bo\n"); return NULL; @@ -243,6 +253,8 @@ intel_flush(intel_screen_private *intel) intel_batch_submit(intel->scrn); break; #endif + default: + break; } } @@ -279,6 +291,9 @@ static void intel_check_accel_option(ScrnInfoPtr scrn) accel_method = UXA; else #endif + if (strcasecmp(s, "none") == 0) + accel_method = NOACCEL; + else accel_method = DEFAULT_ACCEL_METHOD; } switch (accel_method) { @@ -293,6 +308,9 @@ static void intel_check_accel_option(ScrnInfoPtr scrn) intel->accel = ACCEL_UXA; break; #endif + case NOACCEL: + intel->accel = ACCEL_NONE; + break; } } @@ -379,10 +397,13 @@ static int intel_init_bufmgr(intel_screen_private *intel) if (!intel->bufmgr) return FALSE; - if (xf86ReturnOptValBool(intel->Options, OPTION_BUFFER_CACHE, TRUE)) - drm_intel_bufmgr_gem_enable_reuse(intel->bufmgr); - drm_intel_bufmgr_gem_set_vma_cache_size(intel->bufmgr, 512); - drm_intel_bufmgr_gem_enable_fenced_relocs(intel->bufmgr); +#if USE_UXA + if (intel->accel == ACCEL_UXA) { + if (xf86ReturnOptValBool(intel->Options, OPTION_BUFFER_CACHE, TRUE)) + drm_intel_bufmgr_gem_enable_reuse(intel->bufmgr); + drm_intel_bufmgr_gem_set_vma_cache_size(intel->bufmgr, 512); + drm_intel_bufmgr_gem_enable_fenced_relocs(intel->bufmgr); + } list_init(&intel->batch_pixmaps); @@ -391,6 +412,7 @@ static int intel_init_bufmgr(intel_screen_private *intel) drm_intel_bo_alloc(intel->bufmgr, "wa scratch", 4096, 4096); } +#endif return TRUE; } @@ -400,7 +422,10 @@ static void intel_bufmgr_fini(intel_screen_private *intel) if (intel->bufmgr == NULL) return; - drm_intel_bo_unreference(intel->wa_scratch_bo); +#if USE_UXA + if (intel->accel == ACCEL_UXA) + drm_intel_bo_unreference(intel->wa_scratch_bo); +#endif drm_intel_bufmgr_destroy(intel->bufmgr); } @@ -714,7 +739,11 @@ static Bool I830PreInit(ScrnInfoPtr scrn, int flags) PreInitCleanup(scrn); xf86DrvMsg(scrn->scrnIndex, X_ERROR, "Failed to pre init glamor display.\n"); +#if USE_UXA intel->accel = ACCEL_UXA; +#else + intel->accel = ACCEL_NONE; +#endif } break; #endif @@ -725,12 +754,14 @@ static Bool I830PreInit(ScrnInfoPtr scrn, int flags) switch (intel->accel) { #if USE_UXA case ACCEL_UXA: + /* fall through ... */ +#endif + case ACCEL_NONE: #if HAVE_DRI3 if (intel->dri3 != DRI_DISABLED && !xf86LoadSubModule(scrn, "dri3")) intel->dri3 = DRI_DISABLED; #endif break; -#endif default: break; } @@ -768,7 +799,7 @@ redisplay_dirty(ScreenPtr screen, PixmapDirtyUpdatePtr dirty) intel_flush(intel); if (!intel->has_prime_vmap_flush) { - drm_intel_bo *bo = intel_uxa_get_pixmap_bo(dirty->slave_dst->master_pixmap); + drm_intel_bo *bo = (drm_intel_bo *) intel_get_pixmap_bo(dirty->slave_dst->master_pixmap); was_blocked = xf86BlockSIGIO(); drm_intel_bo_map(bo, FALSE); drm_intel_bo_unmap(bo); @@ -812,8 +843,12 @@ I830BlockHandler(BLOCKHANDLER_ARGS_DECL) intel->BlockHandler = screen->BlockHandler; screen->BlockHandler = I830BlockHandler; - intel_uxa_block_handler(intel); - intel_video_block_handler(intel); +#if USE_UXA + if (intel->accel == ACCEL_UXA) { + intel_uxa_block_handler(intel); + intel_video_block_handler(intel); + } +#endif #ifdef INTEL_PIXMAP_SHARING intel_dirty_update(screen); #endif @@ -961,12 +996,46 @@ I830UeventFini(ScrnInfoPtr scrn) } #endif /* HAVE_UDEV */ +Bool +intel_fb_init(ScreenPtr screen, void *pbits) +{ + ScrnInfoPtr scrn = xf86ScreenToScrn(screen); + VisualPtr visual; + + /* Must be first, before anything else installs screen callbacks. */ + if (!fbScreenInit(screen, pbits, + scrn->virtualX, scrn->virtualY, + scrn->xDpi, scrn->yDpi, + scrn->displayWidth, scrn->bitsPerPixel)) + return FALSE; + + if (scrn->bitsPerPixel > 8) { + /* Fixup RGB ordering */ + visual = screen->visuals + screen->numVisuals; + while (--visual >= screen->visuals) { + if ((visual->class | DynamicClass) == DirectColor) { + visual->offsetRed = scrn->offset.red; + visual->offsetGreen = scrn->offset.green; + visual->offsetBlue = scrn->offset.blue; + visual->redMask = scrn->mask.red; + visual->greenMask = scrn->mask.green; + visual->blueMask = scrn->mask.blue; + } + } + } + + fbPictureInit(screen, NULL, 0); + + xf86SetBlackWhitePixels(screen); + + return TRUE; +} + static Bool I830ScreenInit(SCREEN_INIT_ARGS_DECL) { ScrnInfoPtr scrn = xf86ScreenToScrn(screen); intel_screen_private *intel = intel_get_screen_private(scrn); - VisualPtr visual; #if USE_UXA #ifdef INTEL_XVMC MessageType from; @@ -997,32 +1066,6 @@ I830ScreenInit(SCREEN_INIT_ARGS_DECL) if (!miSetPixmapDepths()) return FALSE; - /* Must be first, before anything else installs screen callbacks. */ - if (!fbScreenInit(screen, NULL, - scrn->virtualX, scrn->virtualY, - scrn->xDpi, scrn->yDpi, - scrn->displayWidth, scrn->bitsPerPixel)) - return FALSE; - - if (scrn->bitsPerPixel > 8) { - /* Fixup RGB ordering */ - visual = screen->visuals + screen->numVisuals; - while (--visual >= screen->visuals) { - if ((visual->class | DynamicClass) == DirectColor) { - visual->offsetRed = scrn->offset.red; - visual->offsetGreen = scrn->offset.green; - visual->offsetBlue = scrn->offset.blue; - visual->redMask = scrn->mask.red; - visual->greenMask = scrn->mask.green; - visual->blueMask = scrn->mask.blue; - } - } - } - - fbPictureInit(screen, NULL, 0); - - xf86SetBlackWhitePixels(screen); - switch (intel->accel) { #if USE_GLAMOR case ACCEL_GLAMOR: @@ -1044,6 +1087,22 @@ I830ScreenInit(SCREEN_INIT_ARGS_DECL) "Hardware acceleration initialization failed\n"); return FALSE; } + break; +#endif + case ACCEL_NONE: + if (!intel_none_init(screen)) { + xf86DrvMsg(scrn->scrnIndex, X_ERROR, + "Screen initialization failed\n"); + return FALSE; + } + } + + switch (intel->accel) { +#if USE_UXA + case ACCEL_UXA: + /* fall through ... */ +#endif /* USE_UXA */ + case ACCEL_NONE: #if HAVE_DRI3 if (!intel_sync_init(screen)) intel->dri3 = DRI_DISABLED; @@ -1051,7 +1110,8 @@ I830ScreenInit(SCREEN_INIT_ARGS_DECL) intel->dri3 = DRI_ACTIVE; #endif break; -#endif + default: + break; } #if HAVE_DRI2 @@ -1143,6 +1203,9 @@ I830ScreenInit(SCREEN_INIT_ARGS_DECL) xf86DrvMsg(scrn->scrnIndex, from, "Intel XvMC decoder %sabled\n", intel->XvMCEnabled ? "en" : "dis"); #endif + /* fall through */ +#endif + case ACCEL_NONE: #if HAVE_DRI3 switch (intel->dri3) { case DRI_ACTIVE: @@ -1162,7 +1225,6 @@ I830ScreenInit(SCREEN_INIT_ARGS_DECL) xf86DrvMsg(scrn->scrnIndex, X_INFO, "DRI3: Not available\n"); #endif -#endif break; default: break; @@ -1271,16 +1333,9 @@ static Bool I830CloseScreen(CLOSE_SCREEN_ARGS_DECL) #endif #if USE_UXA case ACCEL_UXA: - - TimerFree(intel->cache_expire); - intel->cache_expire = NULL; - - intel_batch_teardown(scrn); - - if (INTEL_INFO(intel)->gen >= 040 && INTEL_INFO(intel)->gen < 0100) - gen4_render_state_cleanup(scrn); - if (intel->uxa_driver) { + TimerFree(intel->cache_expire); + intel->cache_expire = NULL; uxa_driver_fini(screen); free(intel->uxa_driver); intel->uxa_driver = NULL; @@ -1311,9 +1366,28 @@ static Bool I830CloseScreen(CLOSE_SCREEN_ARGS_DECL) I830LeaveVT(VT_FUNC_ARGS(0)); } + switch (intel->accel) { +#if USE_UXA + case ACCEL_UXA: + intel_batch_teardown(scrn); + + if (INTEL_INFO(intel)->gen >= 040 && INTEL_INFO(intel)->gen < 0100) + gen4_render_state_cleanup(scrn); + + i965_free_video(scrn); + /* fall through ... */ +#endif + case ACCEL_NONE: +#if HAVE_DRI3 + intel_sync_close(screen); +#endif + break; + default: + break; + } + xf86_cursors_fini(screen); - i965_free_video(scrn); screen->CloseScreen = intel->CloseScreen; (*screen->CloseScreen) (CLOSE_SCREEN_ARGS); @@ -1335,7 +1409,6 @@ static Bool I830CloseScreen(CLOSE_SCREEN_ARGS_DECL) } intel_sync_close(screen); #endif - break; #endif default: diff --git a/src/uxa/intel_glamor.c b/src/uxa/intel_glamor.c index 893ba9f..00aa971 100644 --- a/src/uxa/intel_glamor.c +++ b/src/uxa/intel_glamor.c @@ -36,6 +36,7 @@ #define GLAMOR_FOR_XORG 1 #include #include +#include #include "intel.h" #include "i915_drm.h" @@ -210,6 +211,9 @@ intel_glamor_init(ScreenPtr screen) { ScrnInfoPtr scrn = xf86ScreenToScrn(screen); + if (!intel_fb_init(screen, NULL)) + return FALSE; + if (!dixRegisterPrivateKey(&intel_glamor_pixmap_key, PRIVATE_PIXMAP, sizeof (struct intel_glamor_pixmap))) return FALSE; diff --git a/src/uxa/intel_none.c b/src/uxa/intel_none.c new file mode 100644 index 0000000..c9c0354 --- /dev/null +++ b/src/uxa/intel_none.c @@ -0,0 +1,299 @@ +/* + * Copyright ? 2014 Keith Packard + * + * Permission to use, copy, modify, distribute, and sell this software and its + * documentation for any purpose is hereby granted without fee, provided that + * the above copyright notice appear in all copies and that both that copyright + * notice and this permission notice appear in supporting documentation, and + * that the name of the copyright holders not be used in advertising or + * publicity pertaining to distribution of the software without specific, + * written prior permission. The copyright holders make no representations + * about the suitability of this software for any purpose. It is provided "as + * is" without express or implied warranty. + * + * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, + * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO + * EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY SPECIAL, INDIRECT OR + * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, + * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER + * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE + * OF THIS SOFTWARE. + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include +#include +#include +#include +#include +#include +#include + +#include "xorg-server.h" +#include "xf86.h" +#include "xf86_OSproc.h" +#include "xf86cmap.h" +#include "xf86drm.h" +#include "compiler.h" +#include "mipointer.h" +#include "micmap.h" +#include +#include "fb.h" +#include "miscstruct.h" +#include "dixstruct.h" +#include "xf86xv.h" +#include "shadow.h" +#include "intel.h" +#include "intel_video.h" +#include "intel_none.h" +#include "intel_bufmgr.h" + +struct intel_none_screen { + DestroyPixmapProcPtr DestroyPixmap; + CreatePixmapProcPtr CreatePixmap; +}; + +static DevPrivateKeyRec intel_none_screen_key; + +static inline struct intel_none_screen *intel_none_get_screen(ScreenPtr screen) +{ + return dixGetPrivateAddr(&screen->devPrivates, &intel_none_screen_key); +} + +struct intel_none_pixmap { + drm_intel_bo *bo; +}; + +static DevPrivateKeyRec intel_none_pixmap_key; + +static inline struct intel_none_pixmap *intel_none_get_pixmap(PixmapPtr pixmap) +{ + return dixGetPrivateAddr(&pixmap->devPrivates, &intel_none_pixmap_key); +} + +dri_bo * +intel_none_get_pixmap_bo(PixmapPtr pixmap) +{ + return (dri_bo *) intel_none_get_pixmap(pixmap)->bo; +} + +Bool +intel_none_set_pixmap_bo(PixmapPtr pixmap, dri_bo *d_bo) +{ + struct intel_none_pixmap *none_pixmap = intel_none_get_pixmap(pixmap); + drm_intel_bo *bo = (drm_intel_bo *) d_bo; + + if (bo) { + if (drm_intel_gem_bo_map_gtt(bo) != 0) + return FALSE; + } + + if (none_pixmap->bo) { + drm_intel_bo_unreference(none_pixmap->bo); + none_pixmap->bo = NULL; + pixmap->devPrivate.ptr = NULL; + } + + if (bo) { + pixmap->devPrivate.ptr = bo->virtual; + dri_bo_reference(d_bo); + none_pixmap->bo = bo; + } + return TRUE; +} + +static Bool +intel_none_need_bo(unsigned usage) +{ + if (usage == CREATE_PIXMAP_USAGE_BACKING_PIXMAP) + return TRUE; + if (usage & INTEL_CREATE_PIXMAP_DRI2) + return TRUE; + return FALSE; +} + +static PixmapPtr +intel_none_create_pixmap(ScreenPtr screen, int width, int height, int depth, + unsigned usage) +{ + struct intel_none_screen *none_screen = intel_none_get_screen(screen); + PixmapPtr pixmap; + + screen->CreatePixmap = none_screen->CreatePixmap; + if (!intel_none_need_bo(usage) || width == 0 || height == 0) { + pixmap = screen->CreatePixmap(screen, width, height, depth, usage); + goto done; + } + + pixmap = screen->CreatePixmap(screen, 0, 0, depth, usage); + + if (pixmap && width && height) { + unsigned int size, tiling; + int ret, stride; + struct intel_none_pixmap *none_pixmap = intel_none_get_pixmap(pixmap); + ScrnInfoPtr scrn = xf86ScreenToScrn(screen); + intel_screen_private *intel = intel_get_screen_private(scrn); + + tiling = I915_TILING_X; + size = intel_compute_size(intel, + width, height, + pixmap->drawable.bitsPerPixel, usage, + &tiling, &stride); + none_pixmap->bo = drm_intel_bo_alloc(intel->bufmgr, + "pixmap", size, 0); + + if (!none_pixmap->bo) { + screen->DestroyPixmap(pixmap); + pixmap = NULL; + goto done; + } + + if (tiling != I915_TILING_NONE) + drm_intel_bo_set_tiling(none_pixmap->bo, &tiling, stride); + + ret = drm_intel_gem_bo_map_gtt(none_pixmap->bo); + if (ret) { + screen->DestroyPixmap(pixmap); + pixmap = NULL; + goto done; + } + + screen->ModifyPixmapHeader(pixmap, width, height, 0, 0, stride, + none_pixmap->bo->virtual); + } +done: + none_screen->CreatePixmap = screen->CreatePixmap; + screen->CreatePixmap = intel_none_create_pixmap; + return pixmap; +} + +static Bool +intel_none_destroy_pixmap(PixmapPtr pixmap) +{ + ScreenPtr screen = pixmap->drawable.pScreen; + struct intel_none_screen *none_screen = intel_none_get_screen(screen); + struct intel_none_pixmap *none_pixmap = intel_none_get_pixmap(pixmap); + Bool ret; + + screen->DestroyPixmap = none_screen->DestroyPixmap; + if (pixmap->refcnt <= 1) { + if (none_pixmap->bo) { + drm_intel_bo_unreference(none_pixmap->bo); + none_pixmap->bo = NULL; + } + } + + ret = screen->DestroyPixmap(pixmap); + + none_screen->DestroyPixmap = screen->DestroyPixmap; + screen->DestroyPixmap = intel_none_destroy_pixmap; + return ret; +} + +Bool +intel_none_init(ScreenPtr screen) +{ + ScrnInfoPtr scrn = xf86ScreenToScrn(screen); + intel_screen_private *intel = intel_get_screen_private(scrn); + struct intel_none_screen *none_screen; + dri_bo *bo = intel->front_buffer; + int ret; + + ret = drm_intel_gem_bo_map_gtt(bo); + if (ret) + return FALSE; + + if (!intel_fb_init(screen, bo->virtual)) + return FALSE; + + if (!dixRegisterPrivateKey(&intel_none_screen_key, PRIVATE_SCREEN, sizeof (struct intel_none_screen))) + return FALSE; + + if (!dixRegisterPrivateKey(&intel_none_pixmap_key, PRIVATE_PIXMAP, sizeof (struct intel_none_pixmap))) + return FALSE; + + none_screen = intel_none_get_screen(screen); + + none_screen->CreatePixmap = screen->CreatePixmap; + screen->CreatePixmap = intel_none_create_pixmap; + + none_screen->DestroyPixmap = screen->DestroyPixmap; + screen->DestroyPixmap = intel_none_destroy_pixmap; + + return TRUE; +} + +Bool +intel_none_create_screen_resources(ScreenPtr screen) +{ + ScrnInfoPtr scrn = xf86ScreenToScrn(screen); + PixmapPtr pixmap; + intel_screen_private *intel = intel_get_screen_private(scrn); + dri_bo *bo = intel->front_buffer; + + pixmap = screen->GetScreenPixmap(screen); + + if (!intel_none_set_pixmap_bo(pixmap, bo)) + return FALSE; + + if (!screen->ModifyPixmapHeader(pixmap, + scrn->virtualX, + scrn->virtualY, + -1, -1, + intel->front_pitch, + NULL)) + return FALSE; + + scrn->displayWidth = intel->front_pitch / intel->cpp; + + return TRUE; +} + +void +intel_none_exchange_buffers(struct intel_screen_private *intel, + PixmapPtr front, + PixmapPtr back) +{ + struct intel_none_pixmap *front_priv, *back_priv; + dri_bo *tmp; + + front_priv = intel_none_get_pixmap(front); + back_priv = intel_none_get_pixmap(back); + tmp = front_priv->bo; + front_priv->bo = back_priv->bo; + back_priv->bo = tmp; +} + +Bool +intel_none_copy_pixmap(PixmapPtr src_pixmap, PixmapPtr dst_pixmap) +{ + FbBits *src; + FbStride srcStride; + int srcBpp; + int srcXoff, srcYoff; + FbBits *dst; + FbStride dstStride; + int dstBpp; + int dstXoff, dstYoff; + int width, height; + + width = min (src_pixmap->drawable.width, dst_pixmap->drawable.width); + height = min (src_pixmap->drawable.height, dst_pixmap->drawable.height); + + fbGetDrawable(&src_pixmap->drawable, src, srcStride, srcBpp, srcXoff, srcYoff); + fbGetDrawable(&dst_pixmap->drawable, dst, dstStride, dstBpp, dstXoff, dstYoff); + + pixman_blt((uint32_t *) src, + (uint32_t *) dst, + srcStride, + dstStride, + srcBpp, + dstBpp, + srcXoff, srcYoff, dstXoff, dstYoff, + width, height); + return TRUE; +} + diff --git a/src/uxa/intel_none.h b/src/uxa/intel_none.h new file mode 100644 index 0000000..ec587c0 --- /dev/null +++ b/src/uxa/intel_none.h @@ -0,0 +1,46 @@ +/* + * Copyright ? 2014 Keith Packard + * + * Permission to use, copy, modify, distribute, and sell this software and its + * documentation for any purpose is hereby granted without fee, provided that + * the above copyright notice appear in all copies and that both that copyright + * notice and this permission notice appear in supporting documentation, and + * that the name of the copyright holders not be used in advertising or + * publicity pertaining to distribution of the software without specific, + * written prior permission. The copyright holders make no representations + * about the suitability of this software for any purpose. It is provided "as + * is" without express or implied warranty. + * + * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, + * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO + * EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY SPECIAL, INDIRECT OR + * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, + * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER + * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE + * OF THIS SOFTWARE. + */ + +#ifndef _INTEL_NONE_H_ +#define _INTEL_NONE_H_ + +Bool +intel_none_init(ScreenPtr screen); + +Bool +intel_none_create_screen_resources(ScreenPtr screen); + +dri_bo * +intel_none_get_pixmap_bo(PixmapPtr pixmap); + +Bool +intel_none_set_pixmap_bo(PixmapPtr pixmap, dri_bo *dri_bo); + +void +intel_none_exchange_buffers(struct intel_screen_private *intel, + PixmapPtr front, + PixmapPtr back); + +Bool +intel_none_copy_pixmap(PixmapPtr src_pixmap, PixmapPtr dst_pixmap); + +#endif /* _INTEL_NONE_H_ */ diff --git a/src/uxa/intel_uxa.c b/src/uxa/intel_uxa.c index b078921..cd1d0a5 100644 --- a/src/uxa/intel_uxa.c +++ b/src/uxa/intel_uxa.c @@ -1277,6 +1277,9 @@ Bool intel_uxa_init(ScreenPtr screen) ScrnInfoPtr scrn = xf86ScreenToScrn(screen); intel_screen_private *intel = intel_get_screen_private(scrn); + if (!intel_fb_init(screen, NULL)) + return FALSE; + intel_batch_init(scrn); if (INTEL_INFO(intel)->gen >= 040 && INTEL_INFO(intel)->gen < 0100) -- 2.1.1 From keithp at keithp.com Fri Sep 26 20:35:33 2014 From: keithp at keithp.com (Keith Packard) Date: Fri, 26 Sep 2014 20:35:33 -0700 Subject: [PATCH 2/4] Add glamor back into the driver In-Reply-To: <1411788935-31059-1-git-send-email-keithp@keithp.com> References: <1408256001-18414-1-git-send-email-keithp@keithp.com> <1411788935-31059-1-git-send-email-keithp@keithp.com> Message-ID: <1411788935-31059-3-git-send-email-keithp@keithp.com> This adds glamor support back into the driver, but instad of going through UXA, this uses it directly instead. Supports DRI2 directly and DRI3 via glamor. Signed-off-by: Keith Packard --- configure.ac | 42 ++++++- src/intel_driver.h | 2 +- src/intel_module.c | 5 +- src/uxa/Makefile.am | 46 +++++-- src/uxa/intel.h | 11 ++ src/uxa/intel_display.c | 66 +++++++--- src/uxa/intel_dri.c | 188 +++++++++++++--------------- src/uxa/intel_driver.c | 322 +++++++++++++++++++++++++++++++++++++----------- src/uxa/intel_glamor.c | 321 +++++++++++++++++++++++++++++++++++++++++++++++ src/uxa/intel_glamor.h | 63 ++++++++++ src/uxa/intel_uxa.c | 122 ++++++++++++++++++ src/uxa/intel_uxa.h | 11 ++ src/uxa/intel_video.c | 65 +++++++--- 13 files changed, 1033 insertions(+), 231 deletions(-) create mode 100644 src/uxa/intel_glamor.c create mode 100644 src/uxa/intel_glamor.h diff --git a/configure.ac b/configure.ac index b762da9..36f6e63 100644 --- a/configure.ac +++ b/configure.ac @@ -424,6 +424,22 @@ if test "x$UXA" != "xno"; then UXA=yes fi +AC_ARG_ENABLE(glamor, + AS_HELP_STRING([--enable-glamor], + [Enable glamor, a new GL-based acceleration [default=no]]), + [GLAMOR="$enableval"], + [GLAMOR="no"]) +if test "x$GLAMOR" != "xno"; then + if pkg-config --exists "xorg-server >= 1.15.99.901"; then + GLAMOR="yes (using Xorg glamor module)" + else + PKG_CHECK_MODULES(LIBGLAMOR, [glamor >= 0.6.0]) + PKG_CHECK_MODULES(LIBGLAMOR_EGL, [glamor-egl]) + GLAMOR="yes (using libglamor)" + fi + AC_DEFINE(USE_GLAMOR, 1, [Enable glamor acceleration]) +fi + PKG_CHECK_MODULES(XORG, [xorg-server >= $required_xorg_server_version xproto fontsproto pixman-1 >= $required_pixman_version $REQUIRED_MODULES]) ABI_VERSION=`$PKG_CONFIG --variable=abi_videodrv xorg-server` @@ -626,6 +642,10 @@ AC_MSG_CHECKING([whether to include UXA support]) AC_MSG_RESULT([$UXA]) AM_CONDITIONAL(UXA, test "x$UXA" != "xno") +AC_MSG_CHECKING([whether to include GLAMOR support]) +AC_MSG_RESULT([$GLAMOR]) +AM_CONDITIONAL(GLAMOR, test "x$GLAMOR" != "xno") + AC_MSG_CHECKING([whether to include SNA support]) AM_CONDITIONAL(SNA, test "x$SNA" != "xno") AC_MSG_RESULT([$SNA]) @@ -646,7 +666,7 @@ fi AC_ARG_WITH(default-accel, AS_HELP_STRING([--with-default-accel], - [Select the default acceleration method out of none, sna, or uxa [default is sna if enabled, otherwise uxa]]), + [Select the default acceleration method out of glamor, none, sna, or uxa [default is sna if enabled, otherwise uxa]]), [accel="$withval"], [accel="auto"]) if test "x$accel" = "xyes"; then @@ -661,6 +681,10 @@ if test "x$accel" = "xauto"; then else if test "x$UXA" != "xno"; then accel="uxa" + else + if test "x$GLAMOR" != "xno"; then + accel="glamor" + fi fi fi if test "x$accel" = "xauto" -a "x$KMS" = "xyes"; then @@ -687,6 +711,15 @@ if test "x$accel" = "xuxa"; then fi fi +if test "x$accel" = "xglamor"; then + if test "x$GLAMOR" != "xno"; then + AC_DEFINE(DEFAULT_ACCEL_METHOD, GLAMOR, [Default acceleration method]) + have_accel="yes" + else + AC_MSG_ERROR([glamor acceleration requested as default, but is not enabled]) + fi +fi + if test "x$have_accel" = "xnone"; then if test "x$KMS" = "xyes"; then if test "x$SNA" != "xno" -o "x$UXA" != "xno"; then @@ -874,6 +907,13 @@ if test "x$UXA" != "xno"; then accel_msg="$accel_msg uxa" fi fi +if test "x$GLAMOR" != "xno"; then + if test "$accel" = "glamor"; then + accel_msg="$accel_msg *glamor" + else + accel_msg="$accel_msg glamor" + fi +fi if test "x$dri_msg" = "x"; then dri_msg=" none" diff --git a/src/intel_driver.h b/src/intel_driver.h index 172ebc4..13e2688 100644 --- a/src/intel_driver.h +++ b/src/intel_driver.h @@ -136,7 +136,7 @@ int intel_put_master(ScrnInfoPtr scrn); void intel_put_device(ScrnInfoPtr scrn); #define IS_DEFAULT_ACCEL_METHOD(x) ({ \ - enum { NOACCEL, SNA, UXA } default_accel_method__ = DEFAULT_ACCEL_METHOD; \ + enum { NOACCEL, SNA, UXA, GLAMOR } default_accel_method__ = DEFAULT_ACCEL_METHOD; \ default_accel_method__ == x; \ }) diff --git a/src/intel_module.c b/src/intel_module.c index d7b42f6..57ac5ef 100644 --- a/src/intel_module.c +++ b/src/intel_module.c @@ -489,7 +489,7 @@ _xf86findDriver(const char *ident, XF86ConfDevicePtr p) return NULL; } -static enum accel_method { NOACCEL, SNA, UXA } get_accel_method(void) +static enum accel_method { NOACCEL, SNA, UXA, GLAMOR } get_accel_method(void) { enum accel_method accel_method = DEFAULT_ACCEL_METHOD; XF86ConfDevicePtr dev; @@ -509,6 +509,8 @@ static enum accel_method { NOACCEL, SNA, UXA } get_accel_method(void) accel_method = SNA; else if (strcasecmp(s, "uxa") == 0) accel_method = UXA; + else if (strcasecmp(s, "glamor") == 0) + accel_method = GLAMOR; } } @@ -570,6 +572,7 @@ intel_scrn_create(DriverPtr driver, #if !USE_SNA case NOACCEL: #endif + case GLAMOR: case UXA: return intel_init_scrn(scrn); #endif diff --git a/src/uxa/Makefile.am b/src/uxa/Makefile.am index 426f598..5d342d3 100644 --- a/src/uxa/Makefile.am +++ b/src/uxa/Makefile.am @@ -25,21 +25,26 @@ AM_CFLAGS += -I$(top_srcdir)/xvmc -I$(top_srcdir)/src -I$(top_srcdir)/src/render noinst_LTLIBRARIES = libuxa.la libuxa_la_LIBADD = $(UDEV_LIBS) $(DRMINTEL_LIBS) $(DRM_LIBS) libuxa_la_SOURCES = \ - intel_uxa.h \ - brw_defines.h \ - brw_structs.h \ common.h \ intel.h \ - intel_batchbuffer.c \ - intel_batchbuffer.h \ intel_display.c \ intel_driver.c \ + intel_glamor.h \ intel_memory.c \ - intel_uxa.c \ intel_video.c \ intel_video.h \ intel_video_overlay.c \ intel_video_overlay.h \ + $(NULL) + +if UXA +libuxa_la_SOURCES += \ + intel_uxa.h \ + intel_batchbuffer.c \ + intel_batchbuffer.h \ + brw_defines.h \ + brw_structs.h \ + intel_uxa.c \ intel_uxa_video.c \ i830_3d.c \ i830_render.c \ @@ -60,8 +65,18 @@ libuxa_la_SOURCES = \ uxa-glyphs.c \ uxa-render.c \ uxa-priv.h \ - uxa-unaccel.c + uxa-unaccel.c \ + $(NULL) +endif + +if GLAMOR +AM_CFLAGS += $(LIBGLAMOR_CFLAGS) +libuxa_la_LIBADD += $(LIBGLAMOR_LIBS) +libuxa_la_SOURCES += \ + intel_glamor.h \ + intel_glamor.c \ $(NULL) +endif if DRI2 AM_CFLAGS += $(DRI2_CFLAGS) @@ -74,6 +89,17 @@ libuxa_la_LIBADD += \ $(NULL) endif +if UXA + +if XVMC +AM_CFLAGS += -I$(top_srcdir)/xvmc +libuxa_la_SOURCES += \ + intel_hwmc.c \ + $(NULL) +endif + +endif + if DRI3 libuxa_la_SOURCES += \ intel_dri3.c \ @@ -87,9 +113,3 @@ libuxa_la_SOURCES += \ $(NULL) endif -if XVMC -AM_CFLAGS += -I$(top_srcdir)/xvmc -libuxa_la_SOURCES += \ - intel_hwmc.c \ - $(NULL) -endif diff --git a/src/uxa/intel.h b/src/uxa/intel.h index 52de980..3c1a321 100644 --- a/src/uxa/intel.h +++ b/src/uxa/intel.h @@ -111,10 +111,21 @@ enum dri_type { DRI_ACTIVE }; +enum accel_type { +#if USE_GLAMOR + ACCEL_GLAMOR, +#endif +#if USE_UXA + ACCEL_UXA, +#endif +}; + typedef struct intel_screen_private { ScrnInfoPtr scrn; int cpp; + enum accel_type accel; + #define RENDER_BATCH I915_EXEC_RENDER #define BLT_BATCH I915_EXEC_BLT unsigned int current_batch; diff --git a/src/uxa/intel_display.c b/src/uxa/intel_display.c index 395774a..e9efa0d 100644 --- a/src/uxa/intel_display.c +++ b/src/uxa/intel_display.c @@ -60,6 +60,10 @@ #include "intel_uxa.h" #endif +#if USE_GLAMOR +#include "intel_glamor.h" +#endif + #define KNOWN_MODE_FLAGS ((1<<14)-1) struct intel_drm_queue { @@ -688,7 +692,10 @@ intel_set_scanout_pixmap(xf86CrtcPtr crtc, PixmapPtr ppix) return TRUE; } - bo = intel_get_pixmap_bo(ppix); + bo = intel_get_pixmap_bo(ppix); + if (!bo) + return FALSE; + if (intel->front_buffer) { ErrorF("have front buffer\n"); } @@ -1611,8 +1618,20 @@ intel_xf86crtc_resize(ScrnInfoPtr scrn, int width, int height) scrn->virtualX = width; scrn->virtualY = height; - if (!intel_uxa_create_screen_resources(scrn->pScreen)) - goto fail; + switch (intel->accel) { +#if USE_GLAMOR + case ACCEL_GLAMOR: + if (!intel_glamor_create_screen_resources(scrn->pScreen)) + goto fail; + break; +#endif +#if USE_UXA + case ACCEL_UXA: + if (!intel_uxa_create_screen_resources(scrn->pScreen)) + goto fail; + break; +#endif + } for (i = 0; i < xf86_config->num_crtc; i++) { xf86CrtcPtr crtc = xf86_config->crtc[i]; @@ -2440,6 +2459,27 @@ out_free_fb: return pixmap; } +static Bool +intel_copy_pixmap(PixmapPtr src, PixmapPtr dst) { + ScrnInfoPtr scrn = xf86ScreenToScrn(dst->drawable.pScreen); + intel_screen_private *intel = intel_get_screen_private(scrn); + Bool ret = FALSE; + + switch (intel->accel) { +#if USE_GLAMOR + case ACCEL_GLAMOR: + ret = intel_glamor_copy_pixmap(src, dst); + break; +#endif +#if USE_UXA + case ACCEL_UXA: + ret = intel_uxa_copy_pixmap(src, dst); + break; +#endif + } + return ret; +} + void intel_copy_fb(ScrnInfoPtr scrn) { xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(scrn); @@ -2450,9 +2490,6 @@ void intel_copy_fb(ScrnInfoPtr scrn) struct intel_crtc *intel_crtc; int i, fbcon_id; - if (intel->force_fallback) - return; - fbcon_id = 0; for (i = 0; i < xf86_config->num_crtc; i++) { intel_crtc = xf86_config->crtc[i]->driver_private; @@ -2474,22 +2511,13 @@ void intel_copy_fb(ScrnInfoPtr scrn) if (dst == NullPixmap) goto cleanup_src; - if (!intel->uxa_driver->prepare_copy(src, dst, - -1, -1, - GXcopy, FB_ALLONES)) - goto cleanup_dst; - - intel->uxa_driver->copy(dst, - 0, 0, - 0, 0, - scrn->virtualX, scrn->virtualY); - intel->uxa_driver->done_copy(dst); + if (intel_copy_pixmap(src, dst)) { #if ABI_VIDEODRV_VERSION >= SET_ABI_VERSION(10, 0) - pScreen->canDoBGNoneRoot = TRUE; + pScreen->canDoBGNoneRoot = TRUE; #endif + } -cleanup_dst: - (*pScreen->DestroyPixmap)(dst); + (*pScreen->DestroyPixmap)(dst); cleanup_src: (*pScreen->DestroyPixmap)(src); } diff --git a/src/uxa/intel_dri.c b/src/uxa/intel_dri.c index b302221..f191af7 100644 --- a/src/uxa/intel_dri.c +++ b/src/uxa/intel_dri.c @@ -69,6 +69,9 @@ USE OR OTHER DEALINGS IN THE SOFTWARE. #if USE_UXA #include "intel_uxa.h" #endif +#if USE_GLAMOR +#include "intel_glamor.h" +#endif typedef struct { int refcnt; @@ -83,16 +86,28 @@ static int i830_client_key; static uint32_t pixmap_flink(PixmapPtr pixmap) { - struct intel_uxa_pixmap *priv = intel_uxa_get_pixmap_private(pixmap); + dri_bo *bo = intel_get_pixmap_bo(pixmap); uint32_t name; - if (priv == NULL || priv->bo == NULL) + if (bo == NULL) return 0; - if (dri_bo_flink(priv->bo, &name) != 0) + if (dri_bo_flink(bo, &name) != 0) return 0; - priv->pinned |= PIN_DRI2; +#if USE_UXA + switch (intel_get_screen_private(xf86ScreenToScrn(pixmap->drawable.pScreen))->accel) { + case ACCEL_UXA: + { + struct intel_uxa_pixmap *priv = intel_uxa_get_pixmap_private(pixmap); + priv->pinned |= PIN_DRI2; + + break; + } + default: + break; + } +#endif return name; } @@ -381,81 +396,15 @@ I830DRI2CopyRegion(DrawablePtr drawable, RegionPtr pRegion, (*gc->funcs->ChangeClip) (gc, CT_REGION, pCopyClip, 0); ValidateGC(dst, gc); - /* Wait for the scanline to be outside the region to be copied */ - if (scrn->vtSema && - pixmap_is_scanout(get_drawable_pixmap(dst)) && - intel->swapbuffers_wait && INTEL_INFO(intel)->gen < 060) { - BoxPtr box; - BoxRec crtcbox; - int y1, y2; - int event, load_scan_lines_pipe; - xf86CrtcPtr crtc; - Bool full_height = FALSE; - - box = REGION_EXTENTS(unused, gc->pCompositeClip); - crtc = intel_covering_crtc(scrn, box, NULL, &crtcbox); - - /* - * Make sure the CRTC is valid and this is the real front - * buffer - */ - if (crtc != NULL && !crtc->rotatedData) { - int pipe = intel_crtc_to_pipe(crtc); - - /* - * Make sure we don't wait for a scanline that will - * never occur - */ - y1 = (crtcbox.y1 <= box->y1) ? box->y1 - crtcbox.y1 : 0; - y2 = (box->y2 <= crtcbox.y2) ? - box->y2 - crtcbox.y1 : crtcbox.y2 - crtcbox.y1; - - if (y1 == 0 && y2 == (crtcbox.y2 - crtcbox.y1)) - full_height = TRUE; - - /* - * Pre-965 doesn't have SVBLANK, so we need a bit - * of extra time for the blitter to start up and - * do its job for a full height blit - */ - if (full_height && INTEL_INFO(intel)->gen < 040) - y2 -= 2; - - if (pipe == 0) { - event = MI_WAIT_FOR_PIPEA_SCAN_LINE_WINDOW; - load_scan_lines_pipe = - MI_LOAD_SCAN_LINES_DISPLAY_PIPEA; - if (full_height && INTEL_INFO(intel)->gen >= 040) - event = MI_WAIT_FOR_PIPEA_SVBLANK; - } else { - event = MI_WAIT_FOR_PIPEB_SCAN_LINE_WINDOW; - load_scan_lines_pipe = - MI_LOAD_SCAN_LINES_DISPLAY_PIPEB; - if (full_height && INTEL_INFO(intel)->gen >= 040) - event = MI_WAIT_FOR_PIPEB_SVBLANK; - } - - if (crtc->mode.Flags & V_INTERLACE) { - /* DSL count field lines */ - y1 /= 2; - y2 /= 2; - } - - BEGIN_BATCH(5); - /* - * The documentation says that the LOAD_SCAN_LINES - * command always comes in pairs. Don't ask me why. - */ - OUT_BATCH(MI_LOAD_SCAN_LINES_INCL | - load_scan_lines_pipe); - OUT_BATCH((y1 << 16) | (y2-1)); - OUT_BATCH(MI_LOAD_SCAN_LINES_INCL | - load_scan_lines_pipe); - OUT_BATCH((y1 << 16) | (y2-1)); - OUT_BATCH(MI_WAIT_FOR_EVENT | event); - ADVANCE_BATCH(); - } - } + switch (intel->accel) { +#if USE_UXA + case ACCEL_UXA: + intel_uxa_wait_scanline(dst, gc); + break; +#endif + default: + break; + } /* It's important that this copy gets submitted before the * direct rendering client submits rendering for the next @@ -477,7 +426,7 @@ I830DRI2CopyRegion(DrawablePtr drawable, RegionPtr pRegion, /* And make sure the WAIT_FOR_EVENT is queued before any * modesetting/dpms operations on the pipe. */ - intel_batch_submit(scrn); + intel_flush(intel); } static void @@ -671,10 +620,9 @@ i830_dri2_del_frame_event(DRI2FrameEventPtr info) free(info); } -static struct intel_uxa_pixmap * +static void intel_exchange_pixmap_buffers(struct intel_screen_private *intel, PixmapPtr front, PixmapPtr back) { - struct intel_uxa_pixmap *new_front = NULL, *new_back; RegionRec region; /* Post damage on the front buffer so that listeners, such @@ -687,16 +635,20 @@ intel_exchange_pixmap_buffers(struct intel_screen_private *intel, PixmapPtr fron region.data = NULL; DamageRegionAppend(&front->drawable, ®ion); - new_front = intel_uxa_get_pixmap_private(back); - new_back = intel_uxa_get_pixmap_private(front); - intel_uxa_set_pixmap_private(front, new_front); - intel_uxa_set_pixmap_private(back, new_back); - new_front->busy = 1; - new_back->busy = -1; + switch (intel->accel) { +#if USE_GLAMOR + case ACCEL_GLAMOR: + intel_glamor_exchange_buffers(intel, front, back); + break; +#endif +#if USE_UXA + case ACCEL_UXA: + intel_uxa_exchange_buffers(intel, front, back); + break; +#endif + } DamageRegionProcessPending(&front->drawable); - - return new_front; } static void @@ -704,7 +656,6 @@ I830DRI2ExchangeBuffers(struct intel_screen_private *intel, DRI2BufferPtr front, { I830DRI2BufferPrivatePtr front_priv, back_priv; int tmp; - struct intel_uxa_pixmap *new_front; front_priv = front->driverPrivate; back_priv = back->driverPrivate; @@ -715,11 +666,12 @@ I830DRI2ExchangeBuffers(struct intel_screen_private *intel, DRI2BufferPtr front, back->name = tmp; /* Swap pixmap bos */ - new_front = intel_exchange_pixmap_buffers(intel, - front_priv->pixmap, - back_priv->pixmap); + intel_exchange_pixmap_buffers(intel, + front_priv->pixmap, + back_priv->pixmap); + dri_bo_unreference (intel->front_buffer); - intel->front_buffer = new_front->bo; + intel->front_buffer = intel_get_pixmap_bo(front_priv->pixmap); dri_bo_reference (intel->front_buffer); } @@ -797,6 +749,26 @@ I830DRI2ScheduleFlip(struct intel_screen_private *intel, drm_intel_bo_disable_reuse(new_back); dri_bo_flink(new_back, &intel->back_name); +#if USE_GLAMOR + if (intel->accel == ACCEL_GLAMOR) { + I830DRI2BufferPrivatePtr drvpriv; + PixmapPtr front_pixmap, back_pixmap; + ScreenPtr screen; + + screen = draw->pScreen; + drvpriv = info->front->driverPrivate; + front_pixmap = drvpriv->pixmap; + + back_pixmap = intel_glamor_create_back_pixmap(screen, + front_pixmap, + new_back); + if (back_pixmap == NULL) { + drm_intel_bo_unreference(new_back); + return FALSE; + } + intel->back_pixmap = back_pixmap; + } +#endif } else { new_back = intel->back_buffer; intel->back_buffer = NULL; @@ -841,8 +813,6 @@ can_exchange(DrawablePtr drawable, DRI2BufferPtr front, DRI2BufferPtr back) I830DRI2BufferPrivatePtr back_priv = back->driverPrivate; PixmapPtr front_pixmap = front_priv->pixmap; PixmapPtr back_pixmap = back_priv->pixmap; - struct intel_uxa_pixmap *front_intel = intel_uxa_get_pixmap_private(front_pixmap); - struct intel_uxa_pixmap *back_intel = intel_uxa_get_pixmap_private(back_pixmap); if (!pScrn->vtSema) return FALSE; @@ -874,12 +844,24 @@ can_exchange(DrawablePtr drawable, DRI2BufferPtr front, DRI2BufferPtr back) return FALSE; #endif - /* prevent an implicit tiling mode change */ - if (front_intel->tiling != back_intel->tiling) - return FALSE; - - if (front_intel->pinned & ~(PIN_SCANOUT | PIN_DRI2)) - return FALSE; + switch (intel->accel) { +#if USE_UXA + case ACCEL_UXA: + { + struct intel_uxa_pixmap *front_intel = intel_uxa_get_pixmap_private(front_pixmap); + struct intel_uxa_pixmap *back_intel = intel_uxa_get_pixmap_private(back_pixmap); + /* prevent an implicit tiling mode change */ + if (front_intel->tiling != back_intel->tiling) + return FALSE; + + if (front_intel->pinned & ~(PIN_SCANOUT | PIN_DRI2)) + return FALSE; + break; + } +#endif + default: + break; + } return TRUE; } diff --git a/src/uxa/intel_driver.c b/src/uxa/intel_driver.c index eb9dc45..2e78fb3 100644 --- a/src/uxa/intel_driver.c +++ b/src/uxa/intel_driver.c @@ -72,6 +72,10 @@ USE OR OTHER DEALINGS IN THE SOFTWARE. #include "intel_uxa.h" #endif +#if USE_GLAMOR +#include "intel_glamor.h" +#endif + #include "intel_options.h" #include "i915_drm.h" @@ -162,8 +166,20 @@ static Bool i830CreateScreenResources(ScreenPtr screen) if (!(*screen->CreateScreenResources) (screen)) return FALSE; - if (!intel_uxa_create_screen_resources(screen)) - return FALSE; + switch (intel->accel) { +#if USE_GLAMOR + case ACCEL_GLAMOR: + if (!intel_glamor_create_screen_resources(screen)) + return FALSE; + break; +#endif +#if USE_UXA + case ACCEL_UXA: + if (!intel_uxa_create_screen_resources(screen)) + return FALSE; + break; +#endif + } intel_copy_fb(scrn); return TRUE; @@ -172,19 +188,62 @@ static Bool i830CreateScreenResources(ScreenPtr screen) void intel_set_pixmap_bo(PixmapPtr pixmap, dri_bo *bo) { - intel_uxa_set_pixmap_bo(pixmap, bo); + ScrnInfoPtr scrn = xf86ScreenToScrn(pixmap->drawable.pScreen); + intel_screen_private *intel = intel_get_screen_private(scrn); + + switch (intel->accel) { +#if USE_GLAMOR + case ACCEL_GLAMOR: + intel_glamor_set_pixmap_bo(pixmap, bo); + break; +#endif +#if USE_UXA + case ACCEL_UXA: + intel_uxa_set_pixmap_bo(pixmap, bo); + break; +#endif + default: + ErrorF("No accel architecture, cannot set pixmap bo\n"); + break; + } } dri_bo * intel_get_pixmap_bo(PixmapPtr pixmap) { - return intel_uxa_get_pixmap_bo(pixmap); + ScrnInfoPtr scrn = xf86ScreenToScrn(pixmap->drawable.pScreen); + intel_screen_private *intel = intel_get_screen_private(scrn); + + switch (intel->accel) { +#if USE_GLAMOR + case ACCEL_GLAMOR: + return intel_glamor_get_pixmap_bo(pixmap); +#endif +#if USE_UXA + case ACCEL_UXA: + return intel_uxa_get_pixmap_bo(pixmap); +#endif + default: + ErrorF("No accel architecture, cannot set pixmap bo\n"); + return NULL; + } } void intel_flush(intel_screen_private *intel) { - intel_batch_submit(intel->scrn); + switch (intel->accel) { +#if USE_GLAMOR + case ACCEL_GLAMOR: + intel_glamor_flush(intel); + break; +#endif +#if USE_UXA + case ACCEL_UXA: + intel_batch_submit(intel->scrn); + break; +#endif + } } static void PreInitCleanup(ScrnInfoPtr scrn) @@ -202,6 +261,41 @@ static void intel_check_chipset_option(ScrnInfoPtr scrn) intel_detect_chipset(scrn, intel->pEnt); } +static void intel_check_accel_option(ScrnInfoPtr scrn) +{ + intel_screen_private *intel = intel_get_screen_private(scrn); + enum { NOACCEL, SNA, UXA, GLAMOR } accel_method = DEFAULT_ACCEL_METHOD; + const char *s; + + s = xf86GetOptValString(intel->Options, OPTION_ACCEL_METHOD); + if (s != NULL) { +#if USE_GLAMOR + if (strcasecmp(s, "glamor") == 0) + accel_method = GLAMOR; + else +#endif +#if USE_UXA + if (strcasecmp(s, "uxa") == 0) + accel_method = UXA; + else +#endif + accel_method = DEFAULT_ACCEL_METHOD; + } + switch (accel_method) { + default: +#if USE_GLAMOR + case GLAMOR: + intel->accel = ACCEL_GLAMOR; + break; +#endif +#if USE_UXA + case UXA: + intel->accel = ACCEL_UXA; + break; +#endif + } +} + static Bool I830GetEarlyOptions(ScrnInfoPtr scrn) { intel_screen_private *intel = intel_get_screen_private(scrn); @@ -526,6 +620,7 @@ static Bool I830PreInit(ScrnInfoPtr scrn, int flags) intel_setup_capabilities(scrn); intel_check_chipset_option(scrn); intel_check_dri_option(scrn); + intel_check_accel_option(scrn); if (!intel_init_bufmgr(intel)) { PreInitCleanup(scrn); @@ -612,14 +707,37 @@ static Bool I830PreInit(ScrnInfoPtr scrn, int flags) return FALSE; } - /* Load the dri modules if requested. */ -#if HAVE_DRI2 - if (intel->dri2 != DRI_DISABLED && !xf86LoadSubModule(scrn, "dri2")) - intel->dri2 = DRI_DISABLED; + switch (intel->accel) { +#if USE_GLAMOR + case ACCEL_GLAMOR: + if (!intel_glamor_pre_init(scrn)) { + PreInitCleanup(scrn); + xf86DrvMsg(scrn->scrnIndex, X_ERROR, + "Failed to pre init glamor display.\n"); + intel->accel = ACCEL_UXA; + } + break; #endif + default: + break; + } + + switch (intel->accel) { +#if USE_UXA + case ACCEL_UXA: #if HAVE_DRI3 - if (intel->dri3 != DRI_DISABLED && !xf86LoadSubModule(scrn, "dri3")) - intel->dri3 = DRI_DISABLED; + if (intel->dri3 != DRI_DISABLED && !xf86LoadSubModule(scrn, "dri3")) + intel->dri3 = DRI_DISABLED; +#endif + break; +#endif + default: + break; + } + +#if HAVE_DRI2 + if (intel->dri2 != DRI_DISABLED && !xf86LoadSubModule(scrn, "dri2")) + intel->dri2 = DRI_DISABLED; #endif return TRUE; @@ -849,9 +967,11 @@ I830ScreenInit(SCREEN_INIT_ARGS_DECL) ScrnInfoPtr scrn = xf86ScreenToScrn(screen); intel_screen_private *intel = intel_get_screen_private(scrn); VisualPtr visual; +#if USE_UXA #ifdef INTEL_XVMC MessageType from; #endif +#endif struct pci_device *const device = intel->PciInfo; int fb_bar = IS_GEN2(intel) ? 0 : 2; @@ -903,22 +1023,40 @@ I830ScreenInit(SCREEN_INIT_ARGS_DECL) xf86SetBlackWhitePixels(screen); - if (!intel_uxa_init(screen)) { - xf86DrvMsg(scrn->scrnIndex, X_ERROR, - "Hardware acceleration initialization failed\n"); - return FALSE; - } - -#if HAVE_DRI2 - if (intel->dri2 == DRI_NONE && I830DRI2ScreenInit(screen)) - intel->dri2 = DRI_ACTIVE; + switch (intel->accel) { +#if USE_GLAMOR + case ACCEL_GLAMOR: + if (!intel_glamor_init(screen)) { + xf86DrvMsg(scrn->scrnIndex, X_ERROR, + "Glamor acceleration initialization failed\n"); + return FALSE; + } + /* XXX indirect GL under Glamor doesn't work because of recursion during + * buffer creation + */ + enableIndirectGLX = FALSE; + break; #endif - +#if USE_UXA + case ACCEL_UXA: + if (!intel_uxa_init(screen)) { + xf86DrvMsg(scrn->scrnIndex, X_ERROR, + "Hardware acceleration initialization failed\n"); + return FALSE; + } #if HAVE_DRI3 - if (!intel_sync_init(screen)) - intel->dri3 = DRI_DISABLED; - if (intel->dri3 == DRI_NONE && intel_dri3_screen_init(screen)) - intel->dri3 = DRI_ACTIVE; + if (!intel_sync_init(screen)) + intel->dri3 = DRI_DISABLED; + if (intel->dri3 == DRI_NONE && intel_dri3_screen_init(screen)) + intel->dri3 = DRI_ACTIVE; +#endif + break; +#endif + } + +#if HAVE_DRI2 + if (intel->dri2 == DRI_NONE && I830DRI2ScreenInit(screen)) + intel->dri2 = DRI_ACTIVE; #endif if (xf86ReturnOptValBool(intel->Options, OPTION_PRESENT, TRUE)) @@ -973,19 +1111,6 @@ I830ScreenInit(SCREEN_INIT_ARGS_DECL) xf86DPMSInit(screen, xf86DPMSSet, 0); -#ifdef INTEL_XVMC - if (INTEL_INFO(intel)->gen >= 040) - intel->XvMCEnabled = TRUE; - from = (intel->dri2 == DRI_ACTIVE && - xf86GetOptValBool(intel->Options, OPTION_XVMC, - &intel->XvMCEnabled) ? X_CONFIG : X_DEFAULT); - xf86DrvMsg(scrn->scrnIndex, from, "Intel XvMC decoder %sabled\n", - intel->XvMCEnabled ? "en" : "dis"); -#endif - /* Init video */ - if (intel->XvEnabled) - intel_video_init(screen); - #if HAVE_DRI2 switch (intel->dri2) { case DRI_ACTIVE: @@ -1006,25 +1131,46 @@ I830ScreenInit(SCREEN_INIT_ARGS_DECL) "DRI2: Not available\n"); #endif + switch (intel->accel) { +#if USE_UXA + case ACCEL_UXA: +#ifdef INTEL_XVMC + if (INTEL_INFO(intel)->gen >= 040) + intel->XvMCEnabled = TRUE; + from = (intel->dri2 == DRI_ACTIVE && + xf86GetOptValBool(intel->Options, OPTION_XVMC, + &intel->XvMCEnabled) ? X_CONFIG : X_DEFAULT); + xf86DrvMsg(scrn->scrnIndex, from, "Intel XvMC decoder %sabled\n", + intel->XvMCEnabled ? "en" : "dis"); +#endif #if HAVE_DRI3 - switch (intel->dri3) { - case DRI_ACTIVE: - xf86DrvMsg(scrn->scrnIndex, X_INFO, - "DRI3: Enabled\n"); - break; - case DRI_DISABLED: - xf86DrvMsg(scrn->scrnIndex, X_INFO, - "DRI3: Disabled\n"); - break; - case DRI_NONE: - xf86DrvMsg(scrn->scrnIndex, X_INFO, - "DRI3: Failed\n"); - break; - } + switch (intel->dri3) { + case DRI_ACTIVE: + xf86DrvMsg(scrn->scrnIndex, X_INFO, + "DRI3: Enabled\n"); + break; + case DRI_DISABLED: + xf86DrvMsg(scrn->scrnIndex, X_INFO, + "DRI3: Disabled\n"); + break; + case DRI_NONE: + xf86DrvMsg(scrn->scrnIndex, X_INFO, + "DRI3: Failed\n"); + break; + } #else - xf86DrvMsg(scrn->scrnIndex, X_INFO, - "DRI3: Not available\n"); + xf86DrvMsg(scrn->scrnIndex, X_INFO, + "DRI3: Not available\n"); #endif +#endif + break; + default: + break; + } + + /* Init video */ + if (intel->XvEnabled) + intel_video_init(screen); if (serverGeneration == 1) xf86ShowUnusedOptions(scrn->scrnIndex, scrn->options); @@ -1117,14 +1263,33 @@ static Bool I830CloseScreen(CLOSE_SCREEN_ARGS_DECL) DeleteCallback(&FlushCallback, intel_flush_callback, scrn); - TimerFree(intel->cache_expire); - intel->cache_expire = NULL; + switch (intel->accel) { +#if USE_GLAMOR + case ACCEL_GLAMOR: + intel_glamor_close_screen(screen); + break; +#endif +#if USE_UXA + case ACCEL_UXA: - if (intel->uxa_driver) { - uxa_driver_fini(screen); - free(intel->uxa_driver); - intel->uxa_driver = NULL; - } + TimerFree(intel->cache_expire); + intel->cache_expire = NULL; + + intel_batch_teardown(scrn); + + if (INTEL_INFO(intel)->gen >= 040 && INTEL_INFO(intel)->gen < 0100) + gen4_render_state_cleanup(scrn); + + if (intel->uxa_driver) { + uxa_driver_fini(screen); + free(intel->uxa_driver); + intel->uxa_driver = NULL; + } + break; +#endif + default: + break; + } if (intel->back_pixmap) { screen->DestroyPixmap(intel->back_pixmap); @@ -1146,11 +1311,6 @@ static Bool I830CloseScreen(CLOSE_SCREEN_ARGS_DECL) I830LeaveVT(VT_FUNC_ARGS(0)); } - intel_batch_teardown(scrn); - - if (INTEL_INFO(intel)->gen >= 040 && INTEL_INFO(intel)->gen < 0100) - gen4_render_state_cleanup(scrn); - xf86_cursors_fini(screen); i965_free_video(scrn); @@ -1158,17 +1318,29 @@ static Bool I830CloseScreen(CLOSE_SCREEN_ARGS_DECL) screen->CloseScreen = intel->CloseScreen; (*screen->CloseScreen) (CLOSE_SCREEN_ARGS); - if (intel->dri2 == DRI_ACTIVE) { - I830DRI2CloseScreen(screen); - intel->dri2 = DRI_NONE; - } +#if HAVE_DRI2 + if (intel->dri2 == DRI_ACTIVE) { + I830DRI2CloseScreen(screen); + intel->dri2 = DRI_NONE; + } +#endif - if (intel->dri3 == DRI_ACTIVE) { - /* nothing to do here? */ - intel->dri3 = DRI_NONE; - } + switch (intel->accel) { +#if USE_UXA + case ACCEL_UXA: +#if HAVE_DRI3 + if (intel->dri3 == DRI_ACTIVE) { + /* nothing to do here? */ + intel->dri3 = DRI_NONE; + } + intel_sync_close(screen); +#endif - intel_sync_close(screen); + break; +#endif + default: + break; + } xf86GARTCloseScreen(scrn->scrnIndex); diff --git a/src/uxa/intel_glamor.c b/src/uxa/intel_glamor.c new file mode 100644 index 0000000..893ba9f --- /dev/null +++ b/src/uxa/intel_glamor.c @@ -0,0 +1,321 @@ +/* + * Copyright ? 2011 Intel Corporation. + * + * 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 (including + * the next paragraph) 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. + * + * Authors: + * Zhigang Gong + * + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "xorg-server.h" +#include +#define GLAMOR_FOR_XORG 1 +#include +#include + +#include "intel.h" +#include "i915_drm.h" +#include "intel_glamor.h" +#include "intel_options.h" + +struct intel_glamor_pixmap { + dri_bo *bo; +}; + +static DevPrivateKeyRec intel_glamor_pixmap_key; + +static inline struct intel_glamor_pixmap *intel_glamor_get_pixmap(PixmapPtr pixmap) +{ + return dixGetPrivateAddr(&pixmap->devPrivates, &intel_glamor_pixmap_key); +} + +dri_bo * +intel_glamor_get_pixmap_bo(PixmapPtr pixmap) +{ + dri_bo *bo = intel_glamor_get_pixmap(pixmap)->bo; + + if (!bo) { + ScreenPtr screen = pixmap->drawable.pScreen; + CARD16 stride; + CARD32 size; + int fd; + + fd = glamor_fd_from_pixmap(screen, + pixmap, + &stride, + &size); + + if (fd >= 0) { + ScrnInfoPtr scrn = xf86ScreenToScrn(screen); + intel_screen_private *intel = intel_get_screen_private(scrn); + + bo = drm_intel_bo_gem_create_from_prime(intel->bufmgr, + fd, + size); + close(fd); + intel_glamor_get_pixmap(pixmap)->bo = bo; + } + } + return bo; +} + +static void +intel_glamor_reference_pixmap_bo(PixmapPtr pixmap, drm_intel_bo *bo) +{ + struct intel_glamor_pixmap *glamor_pixmap = intel_glamor_get_pixmap(pixmap); + + if (glamor_pixmap->bo) { + ErrorF("Unreference bo %d size %lu from pixmap %d x %d\n", + glamor_pixmap->bo->handle, glamor_pixmap->bo->size, pixmap->drawable.width, pixmap->drawable.height); + drm_intel_bo_unreference(glamor_pixmap->bo); + glamor_pixmap->bo = NULL; + } + + if (bo) { + ErrorF("Reference bo %d size %lu from pixmap %d x %d\n", + bo->handle, bo->size, pixmap->drawable.width, pixmap->drawable.height); + drm_intel_bo_reference(bo); + glamor_pixmap->bo = bo; + } +} + +Bool +intel_glamor_set_pixmap_bo(PixmapPtr pixmap, drm_intel_bo *bo) +{ + if (bo == NULL || glamor_egl_create_textured_pixmap(pixmap, + bo->handle, + intel_pixmap_pitch(pixmap))) + { + intel_glamor_reference_pixmap_bo(pixmap, bo); + return TRUE; + } + return FALSE; +} + +XF86VideoAdaptorPtr intel_glamor_xv_init(ScreenPtr screen, int num_ports) +{ + return glamor_xv_init(screen, num_ports); +} + +Bool +intel_glamor_create_screen_resources(ScreenPtr screen) +{ + ScrnInfoPtr scrn = xf86ScreenToScrn(screen); + intel_screen_private *intel = intel_get_screen_private(scrn); + PixmapPtr pixmap = screen->GetScreenPixmap(screen); + int old_width, old_height, old_pitch; + Bool ret; + + if (!glamor_glyphs_init(screen)) + return FALSE; + + old_width = pixmap->drawable.width; + old_height = pixmap->drawable.height; + old_pitch = pixmap->devKind; + + if (!screen->ModifyPixmapHeader(pixmap, + scrn->virtualX, + scrn->virtualY, + -1, -1, + intel->front_pitch, + NULL)) + return FALSE; + + ret = glamor_egl_create_textured_screen_ext(screen, + intel->front_buffer->handle, + intel->front_pitch, + &intel->back_pixmap); + + if (!ret) + goto fail; + + intel_glamor_reference_pixmap_bo(pixmap, intel->front_buffer); + + return TRUE; + +fail: + screen->ModifyPixmapHeader(pixmap, + old_width, old_height, -1, -1, old_pitch, NULL); + + return FALSE; +} + +Bool +intel_glamor_pre_init(ScrnInfoPtr scrn) +{ + intel_screen_private *intel = intel_get_screen_private(scrn); + pointer glamor_module; + CARD32 version; + +#if XORG_VERSION_CURRENT < XORG_VERSION_NUMERIC(1,15,0,0,0) + if (!xf86LoaderCheckSymbol("glamor_egl_init")) { + xf86DrvMsg(scrn->scrnIndex, X_ERROR, + "glamor requires Load \"glamoregl\" in " + "Section \"Module\", disabling.\n"); + return TRUE; + } +#endif + + /* Load glamor module */ + glamor_module = xf86LoadSubModule(scrn, GLAMOR_EGL_MODULE_NAME); + if (!glamor_module) { + xf86DrvMsg(scrn->scrnIndex, X_WARNING, + "glamor not available\n"); + return TRUE; + } + + version = xf86GetModuleVersion(glamor_module); + if (version < MODULE_VERSION_NUMERIC(0,3,1)) { + xf86DrvMsg(scrn->scrnIndex, X_ERROR, + "Incompatible glamor version, required >= 0.3.0.\n"); + return TRUE; + } + if (!glamor_egl_init(scrn, intel->drmSubFD)) { + xf86DrvMsg(scrn->scrnIndex, X_WARNING, + "glamor detected, failed to initialize egl.\n"); + return TRUE; + } + xf86DrvMsg(scrn->scrnIndex, X_INFO, + "glamor detected, initialising egl layer.\n"); + + return TRUE; +} + +Bool +intel_glamor_init(ScreenPtr screen) +{ + ScrnInfoPtr scrn = xf86ScreenToScrn(screen); + + if (!dixRegisterPrivateKey(&intel_glamor_pixmap_key, PRIVATE_PIXMAP, sizeof (struct intel_glamor_pixmap))) + return FALSE; + + if (!glamor_init(screen, + GLAMOR_INVERTED_Y_AXIS | + GLAMOR_USE_EGL_SCREEN | + GLAMOR_USE_SCREEN | + GLAMOR_USE_PICTURE_SCREEN)) + { + xf86DrvMsg(scrn->scrnIndex, X_ERROR, + "Failed to initialize glamor.\n"); + return FALSE; + } + + if (!glamor_egl_init_textured_pixmap(screen)) { + xf86DrvMsg(scrn->scrnIndex, X_ERROR, + "Failed to initialize textured pixmap of screen for glamor.\n"); + return FALSE; + } + + return TRUE; +} + +void +intel_glamor_flush(intel_screen_private * intel) +{ + ScreenPtr screen; + + screen = xf86ScrnToScreen(intel->scrn); + glamor_block_handler(screen); +} + +Bool +intel_glamor_close_screen(ScreenPtr screen) +{ + return TRUE; +} + +Bool +intel_glamor_copy_pixmap(PixmapPtr src, PixmapPtr dst) +{ + Bool ret = FALSE; +#if HAS_GLAMOR_COPY + int width, height; + + BoxRec box; + + width = min (src->drawable.width, dst->drawable.width); + height = min (src->drawable.height, dst->drawable.height); + box.x1 = 0; + box.y1 = 0; + box.x2 = width; + box.y2 = height; + glamor_copy(&src->drawable, + &dst->drawable, + NULL, + &box, + 1, + 0, 0, + FALSE, + FALSE, + 0, + NULL); + + ret = TRUE; +#endif + return ret; +} + +#if HAVE_DRI2 +void +intel_glamor_exchange_buffers(struct intel_screen_private *intel, + PixmapPtr src, + PixmapPtr dst) +{ + glamor_egl_exchange_buffers(src, dst); +} + +PixmapPtr +intel_glamor_create_back_pixmap(ScreenPtr screen, + PixmapPtr front_pixmap, + drm_intel_bo *back_bo) +{ + PixmapPtr back_pixmap; + + back_pixmap = screen->CreatePixmap(screen, + 0, + 0, + front_pixmap->drawable.depth, + 0); + if (back_pixmap == NULL) + return NULL; + + screen->ModifyPixmapHeader(back_pixmap, + front_pixmap->drawable.width, + front_pixmap->drawable.height, + 0, 0, + front_pixmap->devKind, + 0); + if (!intel_glamor_set_pixmap_bo(back_pixmap, back_bo)) { + ScrnInfoPtr scrn = xf86ScreenToScrn(screen); + xf86DrvMsg(scrn->scrnIndex, X_WARNING, + "Failed to create textured back pixmap.\n"); + screen->DestroyPixmap(back_pixmap); + return NULL; + } + return back_pixmap; +} +#endif diff --git a/src/uxa/intel_glamor.h b/src/uxa/intel_glamor.h new file mode 100644 index 0000000..3b05c54 --- /dev/null +++ b/src/uxa/intel_glamor.h @@ -0,0 +1,63 @@ +/* + * Copyright ? 2011 Intel Corporation. + * + * 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 (including + * the next paragraph) 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. + * + * Authors: + * Zhigang Gong + * + */ + +#ifndef INTEL_GLAMOR_H +#define INTEL_GLAMOR_H + +#include + +Bool intel_glamor_pre_init(ScrnInfoPtr scrn); +Bool intel_glamor_init(ScreenPtr screen); +Bool intel_glamor_create_screen_resources(ScreenPtr screen); +Bool intel_glamor_close_screen(ScreenPtr screen); +void intel_glamor_free_screen(int scrnIndex, int flags); + +void intel_glamor_flush(intel_screen_private * intel); + +#if HAVE_DRI2 +PixmapPtr +intel_glamor_create_back_pixmap(ScreenPtr screen, + PixmapPtr front_pixmap, + drm_intel_bo *back_bo); + +void intel_glamor_exchange_buffers(struct intel_screen_private *intel, PixmapPtr src, PixmapPtr dst); +#endif + +XF86VideoAdaptorPtr intel_glamor_xv_init(ScreenPtr screen, int num_ports); + +dri_bo * +intel_glamor_get_pixmap_bo(PixmapPtr pixmap); + +Bool +intel_glamor_set_pixmap_bo(PixmapPtr pixmap, dri_bo *bo); + +Bool +intel_glamor_copy_pixmap(PixmapPtr src, PixmapPtr dst); + +#endif /* INTEL_GLAMOR_H */ diff --git a/src/uxa/intel_uxa.c b/src/uxa/intel_uxa.c index 657c2b5..b078921 100644 --- a/src/uxa/intel_uxa.c +++ b/src/uxa/intel_uxa.c @@ -1396,3 +1396,125 @@ Bool intel_uxa_init(ScreenPtr screen) intel->flush_rendering = intel_flush_rendering; return TRUE; } + +void +intel_uxa_wait_scanline(DrawablePtr dst, GCPtr gc) +{ + ScreenPtr screen = dst->pScreen; + ScrnInfoPtr scrn = xf86ScreenToScrn(screen); + intel_screen_private *intel = intel_get_screen_private(scrn); + + /* Wait for the scanline to be outside the region to be copied */ + if (scrn->vtSema && + pixmap_is_scanout(get_drawable_pixmap(dst)) && + intel->swapbuffers_wait && INTEL_INFO(intel)->gen < 060) { + BoxPtr box; + BoxRec crtcbox; + int y1, y2; + int event, load_scan_lines_pipe; + xf86CrtcPtr crtc; + Bool full_height = FALSE; + + box = REGION_EXTENTS(unused, gc->pCompositeClip); + crtc = intel_covering_crtc(scrn, box, NULL, &crtcbox); + + /* + * Make sure the CRTC is valid and this is the real front + * buffer + */ + if (crtc != NULL && !crtc->rotatedData) { + int pipe = intel_crtc_to_pipe(crtc); + + /* + * Make sure we don't wait for a scanline that will + * never occur + */ + y1 = (crtcbox.y1 <= box->y1) ? box->y1 - crtcbox.y1 : 0; + y2 = (box->y2 <= crtcbox.y2) ? + box->y2 - crtcbox.y1 : crtcbox.y2 - crtcbox.y1; + + if (y1 == 0 && y2 == (crtcbox.y2 - crtcbox.y1)) + full_height = TRUE; + + /* + * Pre-965 doesn't have SVBLANK, so we need a bit + * of extra time for the blitter to start up and + * do its job for a full height blit + */ + if (full_height && INTEL_INFO(intel)->gen < 040) + y2 -= 2; + + if (pipe == 0) { + event = MI_WAIT_FOR_PIPEA_SCAN_LINE_WINDOW; + load_scan_lines_pipe = + MI_LOAD_SCAN_LINES_DISPLAY_PIPEA; + if (full_height && INTEL_INFO(intel)->gen >= 040) + event = MI_WAIT_FOR_PIPEA_SVBLANK; + } else { + event = MI_WAIT_FOR_PIPEB_SCAN_LINE_WINDOW; + load_scan_lines_pipe = + MI_LOAD_SCAN_LINES_DISPLAY_PIPEB; + if (full_height && INTEL_INFO(intel)->gen >= 040) + event = MI_WAIT_FOR_PIPEB_SVBLANK; + } + + if (crtc->mode.Flags & V_INTERLACE) { + /* DSL count field lines */ + y1 /= 2; + y2 /= 2; + } + + BEGIN_BATCH(5); + /* + * The documentation says that the LOAD_SCAN_LINES + * command always comes in pairs. Don't ask me why. + */ + OUT_BATCH(MI_LOAD_SCAN_LINES_INCL | + load_scan_lines_pipe); + OUT_BATCH((y1 << 16) | (y2-1)); + OUT_BATCH(MI_LOAD_SCAN_LINES_INCL | + load_scan_lines_pipe); + OUT_BATCH((y1 << 16) | (y2-1)); + OUT_BATCH(MI_WAIT_FOR_EVENT | event); + ADVANCE_BATCH(); + } + } +} + +void +intel_uxa_exchange_buffers(struct intel_screen_private *intel, + PixmapPtr front, + PixmapPtr back) +{ + struct intel_uxa_pixmap *new_front = NULL, *new_back; + + new_front = intel_uxa_get_pixmap_private(back); + new_back = intel_uxa_get_pixmap_private(front); + intel_uxa_set_pixmap_private(front, new_front); + intel_uxa_set_pixmap_private(back, new_back); + new_front->busy = 1; + new_back->busy = -1; + +} + +Bool +intel_uxa_copy_pixmap(PixmapPtr src, PixmapPtr dst) +{ + ScrnInfoPtr scrn = xf86ScreenToScrn(dst->drawable.pScreen); + intel_screen_private *intel = intel_get_screen_private(scrn); + + if (intel->force_fallback) + return FALSE; + + if (!intel->uxa_driver->prepare_copy(src, dst, + -1, -1, + GXcopy, FB_ALLONES)) + return FALSE; + + intel->uxa_driver->copy(dst, + 0, 0, + 0, 0, + dst->drawable.width, dst->drawable.height); + intel->uxa_driver->done_copy(dst); + return TRUE; +} diff --git a/src/uxa/intel_uxa.h b/src/uxa/intel_uxa.h index 3d495ba..e04e911 100644 --- a/src/uxa/intel_uxa.h +++ b/src/uxa/intel_uxa.h @@ -296,4 +296,15 @@ void Gen6DisplayVideoTextured(ScrnInfoPtr scrn, void i965_free_video(ScrnInfoPtr scrn); +void +intel_uxa_wait_scanline(DrawablePtr dst, GCPtr gc); + +void +intel_uxa_exchange_buffers(struct intel_screen_private *intel, + PixmapPtr front, + PixmapPtr back); + +Bool +intel_uxa_copy_pixmap(PixmapPtr src, PixmapPtr dst); + #endif /* _INTEL_UXA_H_ */ diff --git a/src/uxa/intel_video.c b/src/uxa/intel_video.c index ba76453..73920e6 100644 --- a/src/uxa/intel_video.c +++ b/src/uxa/intel_video.c @@ -78,7 +78,13 @@ #define _INTEL_XVMC_SERVER_ #include "intel_xvmc.h" #endif +#if USE_GLAMOR +#include "intel_glamor.h" +#endif +#if USE_UXA #include "intel_uxa.h" +#endif + #include "intel_video_overlay.h" Atom intel_xv_Brightness, intel_xv_Contrast, intel_xv_Saturation, intel_xv_ColorKey, intel_xv_Pipe; @@ -169,7 +175,7 @@ void intel_video_init(ScreenPtr screen) * adaptors. */ newAdaptors = realloc(adaptors, - (num_adaptors + 3) * sizeof(XF86VideoAdaptorPtr)); + (num_adaptors + 2) * sizeof(XF86VideoAdaptorPtr)); if (newAdaptors == NULL) { free(adaptors); @@ -183,21 +189,37 @@ void intel_video_init(ScreenPtr screen) intel_xv_Brightness = MAKE_ATOM("XV_BRIGHTNESS"); intel_xv_Contrast = MAKE_ATOM("XV_CONTRAST"); - /* Set up textured video if we can do it at this depth and we are on - * supported hardware. - */ - if (!intel->force_fallback && - scrn->bitsPerPixel >= 16 && - INTEL_INFO(intel)->gen >= 030 && - INTEL_INFO(intel)->gen < 0100) { - texturedAdaptor = intel_uxa_video_setup_image_textured(screen); - if (texturedAdaptor != NULL) { - xf86DrvMsg(scrn->scrnIndex, X_INFO, - "Set up textured video\n"); - } else { - xf86DrvMsg(scrn->scrnIndex, X_ERROR, - "Failed to set up textured video\n"); + switch (intel->accel) { +#if USE_UXA + case ACCEL_UXA: + /* Set up textured video if we can do it at this depth and we are on + * supported hardware. + */ + if (!intel->force_fallback && + scrn->bitsPerPixel >= 16 && + INTEL_INFO(intel)->gen >= 030 && + INTEL_INFO(intel)->gen < 0100) { + texturedAdaptor = intel_uxa_video_setup_image_textured(screen); + if (texturedAdaptor != NULL) { + xf86DrvMsg(scrn->scrnIndex, X_INFO, + "Set up textured video\n"); + } else { + xf86DrvMsg(scrn->scrnIndex, X_ERROR, + "Failed to set up textured video\n"); + } } + break; +#endif +#if USE_GLAMOR + case ACCEL_GLAMOR: + texturedAdaptor = intel_glamor_xv_init(screen, 16); + if (texturedAdaptor != NULL) + xf86DrvMsg(scrn->scrnIndex, X_INFO, + "Set up textured video using glamor\n"); + break; +#endif + default: + break; } overlayAdaptor = intel_video_overlay_setup_image(screen); @@ -229,9 +251,16 @@ void intel_video_init(ScreenPtr screen) intel->XvEnabled = FALSE; } - if (texturedAdaptor) - intel_xvmc_adaptor_init(screen); - +#if defined(INTEL_XVMC) && defined(USE_UXA) + switch (intel->accel) { + case ACCEL_UXA: + if (texturedAdaptor) + intel_xvmc_adaptor_init(screen); + break; + default: + break; + } +#endif free(adaptors); } -- 2.1.1 From keithp at keithp.com Fri Sep 26 20:35:35 2014 From: keithp at keithp.com (Keith Packard) Date: Fri, 26 Sep 2014 20:35:35 -0700 Subject: [PATCH 4/4] Delay mode set until fb contents copied from console In-Reply-To: <1411788935-31059-1-git-send-email-keithp@keithp.com> References: <1408256001-18414-1-git-send-email-keithp@keithp.com> <1411788935-31059-1-git-send-email-keithp@keithp.com> Message-ID: <1411788935-31059-5-git-send-email-keithp@keithp.com> Instead of doing the initial mode set in I830ScreenInit, move it to i830CreateScreenResources after the call to intel_copy_fb so that the new frame buffer we set up has the contents of the existing console, eliminating a flash of black between the mode set and the copy. Signed-off-by: Keith Packard --- src/uxa/intel_driver.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/uxa/intel_driver.c b/src/uxa/intel_driver.c index 619ac50..052e95c 100644 --- a/src/uxa/intel_driver.c +++ b/src/uxa/intel_driver.c @@ -187,7 +187,8 @@ static Bool i830CreateScreenResources(ScreenPtr screen) } intel_copy_fb(scrn); - return TRUE; + + return I830EnterVT(VT_FUNC_ARGS(0)); } void @@ -1249,7 +1250,7 @@ I830ScreenInit(SCREEN_INIT_ARGS_DECL) * later memory should be bound when allocating, e.g rotate_mem */ scrn->vtSema = TRUE; - return I830EnterVT(VT_FUNC_ARGS(0)); + return TRUE; } static void i830AdjustFrame(ADJUST_FRAME_ARGS_DECL) -- 2.1.1 From keithp at keithp.com Fri Sep 26 20:35:32 2014 From: keithp at keithp.com (Keith Packard) Date: Fri, 26 Sep 2014 20:35:32 -0700 Subject: [PATCH 1/4] Remove glamor support from driver In-Reply-To: <1411788935-31059-1-git-send-email-keithp@keithp.com> References: <1408256001-18414-1-git-send-email-keithp@keithp.com> <1411788935-31059-1-git-send-email-keithp@keithp.com> Message-ID: <1411788935-31059-2-git-send-email-keithp@keithp.com> This removes all glamor support from the driver Signed-off-by: Keith Packard --- configure.ac | 41 +----- src/intel_driver.h | 2 +- src/intel_module.c | 5 +- src/uxa/Makefile.am | 10 -- src/uxa/intel_display.c | 2 - src/uxa/intel_dri.c | 132 +------------------- src/uxa/intel_dri3.c | 9 -- src/uxa/intel_driver.c | 11 -- src/uxa/intel_glamor.c | 309 ---------------------------------------------- src/uxa/intel_glamor.h | 96 -------------- src/uxa/intel_uxa.c | 49 -------- src/uxa/intel_uxa.h | 1 - src/uxa/intel_uxa_video.c | 1 - src/uxa/intel_video.c | 12 +- src/uxa/uxa-accel.c | 230 ---------------------------------- src/uxa/uxa-glamor.h | 65 ---------- src/uxa/uxa-glyphs.c | 28 ----- src/uxa/uxa-render.c | 91 -------------- src/uxa/uxa.c | 11 -- src/uxa/uxa.h | 16 --- 20 files changed, 6 insertions(+), 1115 deletions(-) delete mode 100644 src/uxa/intel_glamor.c delete mode 100644 src/uxa/intel_glamor.h delete mode 100644 src/uxa/uxa-glamor.h diff --git a/configure.ac b/configure.ac index 0191bd5..b762da9 100644 --- a/configure.ac +++ b/configure.ac @@ -424,25 +424,6 @@ if test "x$UXA" != "xno"; then UXA=yes fi -AC_ARG_ENABLE(glamor, - AS_HELP_STRING([--enable-glamor], - [Enable glamor, a new GL-based acceleration [default=no]]), - [GLAMOR="$enableval"], - [GLAMOR="no"]) -if test "x$GLAMOR" != "xno"; then - if test "x$UXA" != "xyes"; then - AC_MSG_ERROR([Glamor acceleration requested but UXA is not enabled]) - fi - if pkg-config --exists "xorg-server >= 1.15.99.901"; then - GLAMOR="yes (using Xorg glamor module)" - else - PKG_CHECK_MODULES(LIBGLAMOR, [glamor >= 0.6.0]) - PKG_CHECK_MODULES(LIBGLAMOR_EGL, [glamor-egl]) - GLAMOR="yes (using libglamor)" - fi - AC_DEFINE(USE_GLAMOR, 1, [Enable glamor acceleration]) -fi - PKG_CHECK_MODULES(XORG, [xorg-server >= $required_xorg_server_version xproto fontsproto pixman-1 >= $required_pixman_version $REQUIRED_MODULES]) ABI_VERSION=`$PKG_CONFIG --variable=abi_videodrv xorg-server` @@ -645,10 +626,6 @@ AC_MSG_CHECKING([whether to include UXA support]) AC_MSG_RESULT([$UXA]) AM_CONDITIONAL(UXA, test "x$UXA" != "xno") -AC_MSG_CHECKING([whether to include GLAMOR support]) -AC_MSG_RESULT([$GLAMOR]) -AM_CONDITIONAL(GLAMOR, test "x$GLAMOR" != "xno") - AC_MSG_CHECKING([whether to include SNA support]) AM_CONDITIONAL(SNA, test "x$SNA" != "xno") AC_MSG_RESULT([$SNA]) @@ -669,7 +646,7 @@ fi AC_ARG_WITH(default-accel, AS_HELP_STRING([--with-default-accel], - [Select the default acceleration method out of glamor, none, sna, or uxa [default is sna if enabled, otherwise uxa]]), + [Select the default acceleration method out of none, sna, or uxa [default is sna if enabled, otherwise uxa]]), [accel="$withval"], [accel="auto"]) if test "x$accel" = "xyes"; then @@ -710,15 +687,6 @@ if test "x$accel" = "xuxa"; then fi fi -if test "x$accel" = "xglamor"; then - if test "x$GLAMOR" != "xno"; then - AC_DEFINE(DEFAULT_ACCEL_METHOD, GLAMOR, [Default acceleration method]) - have_accel="yes" - else - AC_MSG_ERROR([glamor acceleration requested as default, but is not enabled]) - fi -fi - if test "x$have_accel" = "xnone"; then if test "x$KMS" = "xyes"; then if test "x$SNA" != "xno" -o "x$UXA" != "xno"; then @@ -906,13 +874,6 @@ if test "x$UXA" != "xno"; then accel_msg="$accel_msg uxa" fi fi -if test "x$GLAMOR" != "xno"; then - if test "$accel" = "glamor"; then - accel_msg="$accel_msg *glamor" - else - accel_msg="$accel_msg glamor" - fi -fi if test "x$dri_msg" = "x"; then dri_msg=" none" diff --git a/src/intel_driver.h b/src/intel_driver.h index 13e2688..172ebc4 100644 --- a/src/intel_driver.h +++ b/src/intel_driver.h @@ -136,7 +136,7 @@ int intel_put_master(ScrnInfoPtr scrn); void intel_put_device(ScrnInfoPtr scrn); #define IS_DEFAULT_ACCEL_METHOD(x) ({ \ - enum { NOACCEL, SNA, UXA, GLAMOR } default_accel_method__ = DEFAULT_ACCEL_METHOD; \ + enum { NOACCEL, SNA, UXA } default_accel_method__ = DEFAULT_ACCEL_METHOD; \ default_accel_method__ == x; \ }) diff --git a/src/intel_module.c b/src/intel_module.c index 57ac5ef..d7b42f6 100644 --- a/src/intel_module.c +++ b/src/intel_module.c @@ -489,7 +489,7 @@ _xf86findDriver(const char *ident, XF86ConfDevicePtr p) return NULL; } -static enum accel_method { NOACCEL, SNA, UXA, GLAMOR } get_accel_method(void) +static enum accel_method { NOACCEL, SNA, UXA } get_accel_method(void) { enum accel_method accel_method = DEFAULT_ACCEL_METHOD; XF86ConfDevicePtr dev; @@ -509,8 +509,6 @@ static enum accel_method { NOACCEL, SNA, UXA, GLAMOR } get_accel_method(void) accel_method = SNA; else if (strcasecmp(s, "uxa") == 0) accel_method = UXA; - else if (strcasecmp(s, "glamor") == 0) - accel_method = GLAMOR; } } @@ -572,7 +570,6 @@ intel_scrn_create(DriverPtr driver, #if !USE_SNA case NOACCEL: #endif - case GLAMOR: case UXA: return intel_init_scrn(scrn); #endif diff --git a/src/uxa/Makefile.am b/src/uxa/Makefile.am index 23b074d..426f598 100644 --- a/src/uxa/Makefile.am +++ b/src/uxa/Makefile.am @@ -34,7 +34,6 @@ libuxa_la_SOURCES = \ intel_batchbuffer.h \ intel_display.c \ intel_driver.c \ - intel_glamor.h \ intel_memory.c \ intel_uxa.c \ intel_video.c \ @@ -58,21 +57,12 @@ libuxa_la_SOURCES = \ uxa.c \ uxa.h \ uxa-accel.c \ - uxa-glamor.h \ uxa-glyphs.c \ uxa-render.c \ uxa-priv.h \ uxa-unaccel.c $(NULL) -if GLAMOR -AM_CFLAGS += $(LIBGLAMOR_CFLAGS) -libuxa_la_LIBADD += $(LIBGLAMOR_LIBS) -libuxa_la_SOURCES += \ - intel_glamor.c \ - $(NULL) -endif - if DRI2 AM_CFLAGS += $(DRI2_CFLAGS) libuxa_la_SOURCES += \ diff --git a/src/uxa/intel_display.c b/src/uxa/intel_display.c index 8a4a340..395774a 100644 --- a/src/uxa/intel_display.c +++ b/src/uxa/intel_display.c @@ -60,8 +60,6 @@ #include "intel_uxa.h" #endif -#include "intel_glamor.h" - #define KNOWN_MODE_FLAGS ((1<<14)-1) struct intel_drm_queue { diff --git a/src/uxa/intel_dri.c b/src/uxa/intel_dri.c index dfe7a45..b302221 100644 --- a/src/uxa/intel_dri.c +++ b/src/uxa/intel_dri.c @@ -69,7 +69,6 @@ USE OR OTHER DEALINGS IN THE SOFTWARE. #if USE_UXA #include "intel_uxa.h" #endif -#include "intel_glamor.h" typedef struct { int refcnt; @@ -109,58 +108,6 @@ static PixmapPtr get_front_buffer(DrawablePtr drawable) return pixmap; } -static PixmapPtr fixup_glamor(DrawablePtr drawable, PixmapPtr pixmap) -{ - ScreenPtr screen = drawable->pScreen; - ScrnInfoPtr scrn = xf86ScreenToScrn(screen); - intel_screen_private *intel = intel_get_screen_private(scrn); - PixmapPtr old = get_drawable_pixmap(drawable); - struct intel_uxa_pixmap *priv = intel_uxa_get_pixmap_private(pixmap); - GCPtr gc; - - /* With a glamor pixmap, 2D pixmaps are created in texture - * and without a static BO attached to it. To support DRI, - * we need to create a new textured-drm pixmap and - * need to copy the original content to this new textured-drm - * pixmap, and then convert the old pixmap to a coherent - * textured-drm pixmap which has a valid BO attached to it - * and also has a valid texture, thus both glamor and DRI2 - * can access it. - * - */ - - /* Copy the current contents of the pixmap to the bo. */ - gc = GetScratchGC(drawable->depth, screen); - if (gc) { - ValidateGC(&pixmap->drawable, gc); - gc->ops->CopyArea(drawable, &pixmap->drawable, - gc, - 0, 0, - drawable->width, - drawable->height, - 0, 0); - FreeScratchGC(gc); - } - - intel_uxa_set_pixmap_private(pixmap, NULL); - - /* Exchange the underlying texture/image. */ - intel_glamor_exchange_buffers(intel, old, pixmap); - /* And redirect the pixmap to the new bo (for 3D). */ - intel_uxa_set_pixmap_private(old, priv); - old->refcnt++; - - screen->ModifyPixmapHeader(old, - drawable->width, - drawable->height, - 0, 0, - intel_pixmap_pitch(pixmap), - NULL); - screen->DestroyPixmap(pixmap); - intel_get_screen_private(xf86ScreenToScrn(screen))->needs_flush = TRUE; - return old; -} - #if DRI2INFOREC_VERSION < 2 static DRI2BufferPtr I830DRI2CreateBuffers(DrawablePtr drawable, unsigned int *attachments, @@ -172,7 +119,6 @@ I830DRI2CreateBuffers(DrawablePtr drawable, unsigned int *attachments, DRI2BufferPtr buffers; I830DRI2BufferPrivatePtr privates; PixmapPtr pixmap, pDepthPixmap; - Bool is_glamor_pixmap = FALSE; int i; buffers = calloc(count, sizeof *buffers); @@ -189,11 +135,6 @@ I830DRI2CreateBuffers(DrawablePtr drawable, unsigned int *attachments, pixmap = NULL; if (attachments[i] == DRI2BufferFrontLeft) { pixmap = get_front_buffer(drawable); - - if (pixmap == NULL) { - drawable = &(get_drawable_pixmap(drawable)->drawable); - is_glamor_pixmap = TRUE; - } } else if (attachments[i] == DRI2BufferStencil && pDepthPixmap) { pixmap = pDepthPixmap; pixmap->refcnt++; @@ -231,9 +172,6 @@ I830DRI2CreateBuffers(DrawablePtr drawable, unsigned int *attachments, screen->DestroyPixmap(pixmap); goto unwind; } - - if (is_glamor_pixmap) - pixmap = fixup_glamor(drawable, pixmap); } if (attachments[i] == DRI2BufferDepth) @@ -294,7 +232,6 @@ I830DRI2CreateBuffer(DrawablePtr drawable, unsigned int attachment, DRI2Buffer2Ptr buffer; I830DRI2BufferPrivatePtr privates; PixmapPtr pixmap; - Bool is_glamor_pixmap = FALSE; buffer = calloc(1, sizeof *buffer); if (buffer == NULL) @@ -308,11 +245,6 @@ I830DRI2CreateBuffer(DrawablePtr drawable, unsigned int attachment, pixmap = NULL; if (attachment == DRI2BufferFrontLeft) { pixmap = get_front_buffer(drawable); - - if (pixmap == NULL) { - drawable = &(get_drawable_pixmap(drawable)->drawable); - is_glamor_pixmap = TRUE; - } } if (pixmap == NULL) { @@ -385,8 +317,6 @@ I830DRI2CreateBuffer(DrawablePtr drawable, unsigned int attachment, free(buffer); return NULL; } - if (is_glamor_pixmap) - pixmap = fixup_glamor(drawable, pixmap); } buffer->attachment = attachment; @@ -764,8 +694,6 @@ intel_exchange_pixmap_buffers(struct intel_screen_private *intel, PixmapPtr fron new_front->busy = 1; new_back->busy = -1; - intel_glamor_exchange_buffers(intel, front, back); - DamageRegionProcessPending(&front->drawable); return new_front; @@ -795,38 +723,6 @@ I830DRI2ExchangeBuffers(struct intel_screen_private *intel, DRI2BufferPtr front, dri_bo_reference (intel->front_buffer); } -static PixmapPtr -intel_glamor_create_back_pixmap(ScreenPtr screen, - PixmapPtr front_pixmap, - drm_intel_bo *back_bo) -{ - PixmapPtr back_pixmap; - - back_pixmap = screen->CreatePixmap(screen, - 0, - 0, - front_pixmap->drawable.depth, - 0); - if (back_pixmap == NULL) - return NULL; - - screen->ModifyPixmapHeader(back_pixmap, - front_pixmap->drawable.width, - front_pixmap->drawable.height, - 0, 0, - front_pixmap->devKind, - 0); - intel_set_pixmap_bo(back_pixmap, back_bo); - if (!intel_glamor_create_textured_pixmap(back_pixmap)) { - ScrnInfoPtr scrn = xf86ScreenToScrn(screen); - xf86DrvMsg(scrn->scrnIndex, X_WARNING, - "Failed to create textured back pixmap.\n"); - screen->DestroyPixmap(back_pixmap); - return NULL; - } - return back_pixmap; -} - static drm_intel_bo *get_pixmap_bo(I830DRI2BufferPrivatePtr priv) { drm_intel_bo *bo = intel_get_pixmap_bo(priv->pixmap); @@ -885,10 +781,6 @@ I830DRI2ScheduleFlip(struct intel_screen_private *intel, } if (intel->back_buffer == NULL) { - I830DRI2BufferPrivatePtr drvpriv; - PixmapPtr front_pixmap, back_pixmap; - ScreenPtr screen; - new_back = drm_intel_bo_alloc(intel->bufmgr, "front buffer", intel->front_buffer->size, 0); if (new_back == NULL) @@ -905,21 +797,6 @@ I830DRI2ScheduleFlip(struct intel_screen_private *intel, drm_intel_bo_disable_reuse(new_back); dri_bo_flink(new_back, &intel->back_name); - - if ((intel->uxa_flags & UXA_USE_GLAMOR)) { - screen = draw->pScreen; - drvpriv = info->front->driverPrivate; - front_pixmap = drvpriv->pixmap; - - back_pixmap = intel_glamor_create_back_pixmap(screen, - front_pixmap, - new_back); - if (back_pixmap == NULL) { - drm_intel_bo_unreference(new_back); - return FALSE; - } - intel->back_pixmap = back_pixmap; - } } else { new_back = intel->back_buffer; intel->back_buffer = NULL; @@ -939,13 +816,8 @@ I830DRI2ScheduleFlip(struct intel_screen_private *intel, intel->back_buffer = intel->front_buffer; drm_intel_bo_reference(intel->back_buffer); - if (!(intel->uxa_flags & UXA_USE_GLAMOR)) { - intel_set_pixmap_bo(priv->pixmap, new_back); - drm_intel_bo_unreference(new_back); - } - else - intel_exchange_pixmap_buffers(intel, priv->pixmap, - intel->back_pixmap); + intel_set_pixmap_bo(priv->pixmap, new_back); + drm_intel_bo_unreference(new_back); tmp_name = info->front->name; info->front->name = intel->back_name; diff --git a/src/uxa/intel_dri3.c b/src/uxa/intel_dri3.c index fed6b18..2c44442 100644 --- a/src/uxa/intel_dri3.c +++ b/src/uxa/intel_dri3.c @@ -33,7 +33,6 @@ #include "intel_uxa.h" #endif #include "dri3.h" -#include "intel_glamor.h" static int intel_dri3_open(ScreenPtr screen, @@ -64,10 +63,6 @@ static PixmapPtr intel_dri3_pixmap_from_fd(ScreenPtr screen, PixmapPtr pixmap; dri_bo *bo; - pixmap = intel_glamor_pixmap_from_fd(screen, fd, width, height, stride, depth, bpp); - if (pixmap) - return pixmap; - if (depth < 8) return NULL; @@ -116,10 +111,6 @@ static int intel_dri3_fd_from_pixmap(ScreenPtr screen, struct intel_uxa_pixmap *priv; int fd; - fd = intel_glamor_fd_from_pixmap(screen, pixmap, stride, size); - if (fd >= 0) - return fd; - priv = intel_uxa_get_pixmap_private(pixmap); if (!priv) return -1; diff --git a/src/uxa/intel_driver.c b/src/uxa/intel_driver.c index f31f7bd..eb9dc45 100644 --- a/src/uxa/intel_driver.c +++ b/src/uxa/intel_driver.c @@ -72,7 +72,6 @@ USE OR OTHER DEALINGS IN THE SOFTWARE. #include "intel_uxa.h" #endif -#include "intel_glamor.h" #include "intel_options.h" #include "i915_drm.h" @@ -613,13 +612,6 @@ static Bool I830PreInit(ScrnInfoPtr scrn, int flags) return FALSE; } - if (!intel_glamor_pre_init(scrn)) { - PreInitCleanup(scrn); - xf86DrvMsg(scrn->scrnIndex, X_ERROR, - "Failed to pre init glamor display.\n"); - return FALSE; - } - /* Load the dri modules if requested. */ #if HAVE_DRI2 if (intel->dri2 != DRI_DISABLED && !xf86LoadSubModule(scrn, "dri2")) @@ -967,7 +959,6 @@ I830ScreenInit(SCREEN_INIT_ARGS_DECL) intel->CreateScreenResources = screen->CreateScreenResources; screen->CreateScreenResources = i830CreateScreenResources; - intel_glamor_init(screen); if (!xf86CrtcScreenInit(screen)) return FALSE; @@ -1126,8 +1117,6 @@ static Bool I830CloseScreen(CLOSE_SCREEN_ARGS_DECL) DeleteCallback(&FlushCallback, intel_flush_callback, scrn); - intel_glamor_close_screen(screen); - TimerFree(intel->cache_expire); intel->cache_expire = NULL; diff --git a/src/uxa/intel_glamor.c b/src/uxa/intel_glamor.c deleted file mode 100644 index 286f365..0000000 --- a/src/uxa/intel_glamor.c +++ /dev/null @@ -1,309 +0,0 @@ -/* - * Copyright ? 2011 Intel Corporation. - * - * 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 (including - * the next paragraph) 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. - * - * Authors: - * Zhigang Gong - * - */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include "xorg-server.h" -#include -#define GLAMOR_FOR_XORG 1 -#include - -#include "intel.h" -#include "i915_drm.h" -#include "intel_glamor.h" -#include "intel_uxa.h" -#include "intel_options.h" - -void -intel_glamor_exchange_buffers(struct intel_screen_private *intel, - PixmapPtr src, - PixmapPtr dst) -{ - if (!(intel->uxa_flags & UXA_USE_GLAMOR)) - return; - glamor_egl_exchange_buffers(src, dst); -} - -XF86VideoAdaptorPtr intel_glamor_xv_init(ScreenPtr screen, int num_ports) -{ - ScrnInfoPtr scrn = xf86ScreenToScrn(screen); - intel_screen_private *intel = intel_get_screen_private(scrn); - - if ((intel->uxa_flags & UXA_USE_GLAMOR) == 0) - return NULL; - - return glamor_xv_init(screen, num_ports); -} - -Bool -intel_glamor_create_screen_resources(ScreenPtr screen) -{ - ScrnInfoPtr scrn = xf86ScreenToScrn(screen); - intel_screen_private *intel = intel_get_screen_private(scrn); - - if (!(intel->uxa_flags & UXA_USE_GLAMOR)) - return TRUE; - - if (!glamor_glyphs_init(screen)) - return FALSE; - - if (!glamor_egl_create_textured_screen_ext(screen, - intel->front_buffer->handle, - intel->front_pitch, - &intel->back_pixmap)) - return FALSE; - - return TRUE; -} - -static Bool -intel_glamor_enabled(intel_screen_private *intel) -{ - const char *s; - - s = xf86GetOptValString(intel->Options, OPTION_ACCEL_METHOD); - if (s == NULL) - return IS_DEFAULT_ACCEL_METHOD(GLAMOR); - - return strcasecmp(s, "glamor") == 0; -} - -Bool -intel_glamor_pre_init(ScrnInfoPtr scrn) -{ - intel_screen_private *intel = intel_get_screen_private(scrn); - pointer glamor_module; - CARD32 version; - - if (!intel_glamor_enabled(intel)) - return TRUE; - -#if XORG_VERSION_CURRENT < XORG_VERSION_NUMERIC(1,15,0,0,0) - if (!xf86LoaderCheckSymbol("glamor_egl_init")) { - xf86DrvMsg(scrn->scrnIndex, X_ERROR, - "glamor requires Load \"glamoregl\" in " - "Section \"Module\", disabling.\n"); - return TRUE; - } -#endif - - /* Load glamor module */ - if ((glamor_module = xf86LoadSubModule(scrn, GLAMOR_EGL_MODULE_NAME))) { - version = xf86GetModuleVersion(glamor_module); - if (version < MODULE_VERSION_NUMERIC(0,3,1)) { - xf86DrvMsg(scrn->scrnIndex, X_ERROR, - "Incompatible glamor version, required >= 0.3.0.\n"); - } else { - if (glamor_egl_init(scrn, intel->drmSubFD)) { - xf86DrvMsg(scrn->scrnIndex, X_INFO, - "glamor detected, initialising egl layer.\n"); - intel->uxa_flags = UXA_GLAMOR_EGL_INITIALIZED; - } else - xf86DrvMsg(scrn->scrnIndex, X_WARNING, - "glamor detected, failed to initialize egl.\n"); - } - } else - xf86DrvMsg(scrn->scrnIndex, X_WARNING, - "glamor not available\n"); - - return TRUE; -} - -PixmapPtr -intel_glamor_pixmap_from_fd(ScreenPtr screen, - int fd, - CARD16 width, - CARD16 height, - CARD16 stride, - CARD8 depth, - CARD8 bpp) -{ -#if XORG_VERSION_CURRENT >= XORG_VERSION_NUMERIC(1,15,99,902,0) - ScrnInfoPtr scrn = xf86ScreenToScrn(screen); - intel_screen_private *intel = intel_get_screen_private(scrn); - - if (intel->uxa_flags & UXA_USE_GLAMOR) - return glamor_pixmap_from_fd(screen, fd, width, height, stride, depth, bpp); - else -#endif - return NULL; -} - -int -intel_glamor_fd_from_pixmap(ScreenPtr screen, - PixmapPtr pixmap, CARD16 *stride, CARD32 *size) -{ -#if XORG_VERSION_CURRENT >= XORG_VERSION_NUMERIC(1,15,99,902,0) - ScrnInfoPtr scrn = xf86ScreenToScrn(screen); - intel_screen_private *intel = intel_get_screen_private(scrn); - - if (intel->uxa_flags & UXA_USE_GLAMOR) - return glamor_fd_from_pixmap(screen, pixmap, stride, size); - else -#endif - return -1; -} - -PixmapPtr -intel_glamor_create_pixmap(ScreenPtr screen, int w, int h, - int depth, unsigned int usage) -{ - ScrnInfoPtr scrn = xf86ScreenToScrn(screen); - intel_screen_private *intel = intel_get_screen_private(scrn); - - if (intel->uxa_flags & UXA_USE_GLAMOR) - return glamor_create_pixmap(screen, w, h, depth, usage); - else - return NULL; -} - -Bool -intel_glamor_create_textured_pixmap(PixmapPtr pixmap) -{ - ScrnInfoPtr scrn = xf86ScreenToScrn(pixmap->drawable.pScreen); - intel_screen_private *intel = intel_get_screen_private(scrn); - struct intel_uxa_pixmap *priv; - - if ((intel->uxa_flags & UXA_USE_GLAMOR) == 0) - return TRUE; - - priv = intel_uxa_get_pixmap_private(pixmap); - if (glamor_egl_create_textured_pixmap(pixmap, priv->bo->handle, - intel_pixmap_pitch(pixmap))) { - drm_intel_bo_disable_reuse(priv->bo); - priv->pinned |= PIN_GLAMOR; - return TRUE; - } else - return FALSE; -} - -void -intel_glamor_destroy_pixmap(PixmapPtr pixmap) -{ - ScrnInfoPtr scrn = xf86ScreenToScrn(pixmap->drawable.pScreen); - intel_screen_private * intel; - - intel = intel_get_screen_private(scrn); - if (intel->uxa_flags & UXA_USE_GLAMOR) - glamor_egl_destroy_textured_pixmap(pixmap); -} - -static void -intel_glamor_need_flush(DrawablePtr pDrawable) -{ - ScrnInfoPtr scrn = xf86ScreenToScrn(pDrawable->pScreen); - intel_screen_private * intel; - - intel = intel_get_screen_private(scrn); - intel->needs_flush = TRUE; -} - -static void -intel_glamor_finish_access(PixmapPtr pixmap, uxa_access_t access) -{ - switch(access) { - case UXA_ACCESS_RO: - case UXA_ACCESS_RW: - case UXA_GLAMOR_ACCESS_RO: - break; - case UXA_GLAMOR_ACCESS_RW: - intel_glamor_need_flush(&pixmap->drawable); - break; - default: - ErrorF("Invalid access mode %d\n", access); - } - - return; -} - -Bool -intel_glamor_init(ScreenPtr screen) -{ - ScrnInfoPtr scrn = xf86ScreenToScrn(screen); - intel_screen_private *intel = intel_get_screen_private(scrn); - - if ((intel->uxa_flags & UXA_GLAMOR_EGL_INITIALIZED) == 0) - goto fail; - - if (!glamor_init(screen, -#if defined(GLAMOR_NO_DRI3) - /* Not doing DRI3 yet, since Present support hasn't landed. */ - GLAMOR_NO_DRI3 | -#endif - GLAMOR_INVERTED_Y_AXIS | - GLAMOR_USE_EGL_SCREEN)) { - xf86DrvMsg(scrn->scrnIndex, X_ERROR, - "Failed to initialize glamor.\n"); - goto fail; - } - - if (!glamor_egl_init_textured_pixmap(screen)) { - xf86DrvMsg(scrn->scrnIndex, X_ERROR, - "Failed to initialize textured pixmap of screen for glamor.\n"); - goto fail; - } - - intel->uxa_driver->flags |= UXA_USE_GLAMOR; - intel->uxa_flags |= intel->uxa_driver->flags; - - intel->uxa_driver->finish_access = intel_glamor_finish_access; - - xf86DrvMsg(scrn->scrnIndex, X_INFO, - "Use GLAMOR acceleration.\n"); - return TRUE; - - fail: - xf86DrvMsg(scrn->scrnIndex, X_INFO, - "Use legacy UXA acceleration.\n"); - return FALSE; -} - -void -intel_glamor_flush(intel_screen_private * intel) -{ - ScreenPtr screen; - - screen = xf86ScrnToScreen(intel->scrn); - if (intel->uxa_flags & UXA_USE_GLAMOR) - glamor_block_handler(screen); -} - -Bool -intel_glamor_close_screen(ScreenPtr screen) -{ - ScrnInfoPtr scrn = xf86ScreenToScrn(screen); - intel_screen_private *intel = intel_get_screen_private(scrn); - - if (intel->uxa_flags & UXA_USE_GLAMOR) - intel->uxa_flags &= ~UXA_USE_GLAMOR; - - return TRUE; -} diff --git a/src/uxa/intel_glamor.h b/src/uxa/intel_glamor.h deleted file mode 100644 index 94a0617..0000000 --- a/src/uxa/intel_glamor.h +++ /dev/null @@ -1,96 +0,0 @@ -/* - * Copyright ? 2011 Intel Corporation. - * - * 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 (including - * the next paragraph) 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. - * - * Authors: - * Zhigang Gong - * - */ - -#ifndef INTEL_GLAMOR_H -#define INTEL_GLAMOR_H - -#include - -#ifdef USE_GLAMOR - -Bool intel_glamor_pre_init(ScrnInfoPtr scrn); -Bool intel_glamor_init(ScreenPtr screen); -Bool intel_glamor_create_screen_resources(ScreenPtr screen); -Bool intel_glamor_close_screen(ScreenPtr screen); -void intel_glamor_free_screen(int scrnIndex, int flags); - -void intel_glamor_flush(intel_screen_private * intel); - -Bool intel_glamor_create_textured_pixmap(PixmapPtr pixmap); -void intel_glamor_destroy_pixmap(PixmapPtr pixmap); -PixmapPtr intel_glamor_create_pixmap(ScreenPtr screen, int w, int h, - int depth, unsigned int usage); -void intel_glamor_exchange_buffers(struct intel_screen_private *intel, PixmapPtr src, PixmapPtr dst); -XF86VideoAdaptorPtr intel_glamor_xv_init(ScreenPtr screen, int num_ports); - -int -intel_glamor_fd_from_pixmap(ScreenPtr screen, - PixmapPtr pixmap, CARD16 *stride, CARD32 *size); - -PixmapPtr -intel_glamor_pixmap_from_fd(ScreenPtr screen, - int fd, - CARD16 width, - CARD16 height, - CARD16 stride, - CARD8 depth, - CARD8 bpp); - -#else - -static inline Bool intel_glamor_pre_init(ScrnInfoPtr scrn) { return TRUE; } -static inline Bool intel_glamor_init(ScreenPtr screen) { return TRUE; } -static inline Bool intel_glamor_create_screen_resources(ScreenPtr screen) { return TRUE; } -static inline Bool intel_glamor_close_screen(ScreenPtr screen) { return TRUE; } -static inline void intel_glamor_free_screen(int scrnIndex, int flags) { } - -static inline void intel_glamor_flush(intel_screen_private * intel) { } - -static inline Bool intel_glamor_create_textured_pixmap(PixmapPtr pixmap) { return TRUE; } -static inline void intel_glamor_destroy_pixmap(PixmapPtr pixmap) { } - -static inline PixmapPtr intel_glamor_create_pixmap(ScreenPtr screen, int w, int h, - int depth, unsigned int usage) { return NULL; } - -static inline void intel_glamor_exchange_buffers(struct intel_screen_private *intel, PixmapPtr src, PixmapPtr dst) {} -static inline XF86VideoAdaptorPtr intel_glamor_xv_init(ScreenPtr screen, int num_ports) { return NULL; } -static inline PixmapPtr intel_glamor_pixmap_from_fd(ScreenPtr screen, - int fd, - CARD16 width, - CARD16 height, - CARD16 stride, - CARD8 depth, - CARD8 bpp) { return NULL; } - -static int -intel_glamor_fd_from_pixmap(ScreenPtr screen, - PixmapPtr pixmap, CARD16 *stride, CARD32 *size) { return -1; } -#endif - -#endif /* INTEL_GLAMOR_H */ diff --git a/src/uxa/intel_uxa.c b/src/uxa/intel_uxa.c index 1746e3d..657c2b5 100644 --- a/src/uxa/intel_uxa.c +++ b/src/uxa/intel_uxa.c @@ -41,7 +41,6 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include "intel.h" #include "intel_uxa.h" -#include "intel_glamor.h" #include "i830_reg.h" #include "i915_drm.h" @@ -657,16 +656,6 @@ static Bool intel_uxa_prepare_access(PixmapPtr pixmap, uxa_access_t access) dri_bo *bo = priv->bo; int ret; - /* Transitioning to glamor acceleration, we need to flush all pending - * usage by UXA. */ - if (access == UXA_GLAMOR_ACCESS_RW || access == UXA_GLAMOR_ACCESS_RO) { - if (!list_is_empty(&priv->batch)) - intel_batch_submit(scrn); - return TRUE; - } - - /* When falling back to swrast, flush all pending operations */ - intel_glamor_flush(intel); if (access == UXA_ACCESS_RW || priv->dirty) intel_batch_submit(scrn); @@ -692,9 +681,6 @@ static void intel_uxa_finish_access(PixmapPtr pixmap, uxa_access_t access) { struct intel_uxa_pixmap *priv; - if (access == UXA_GLAMOR_ACCESS_RW || access == UXA_GLAMOR_ACCESS_RO) - return; - priv = intel_uxa_get_pixmap_private(pixmap); if (priv == NULL) return; @@ -963,7 +949,6 @@ void intel_uxa_block_handler(intel_screen_private *intel) * and beyond rendering results may not hit the * framebuffer until significantly later. */ - intel_glamor_flush(intel); intel_flush_rendering(intel); intel_throttle(intel); } @@ -977,12 +962,6 @@ intel_uxa_create_pixmap(ScreenPtr screen, int w, int h, int depth, struct intel_uxa_pixmap *priv; PixmapPtr pixmap, new_pixmap = NULL; - if (!(usage & INTEL_CREATE_PIXMAP_DRI2)) { - pixmap = intel_glamor_create_pixmap(screen, w, h, depth, usage); - if (pixmap) - return pixmap; - } - if (w > 32767 || h > 32767) return NullPixmap; @@ -1062,34 +1041,10 @@ intel_uxa_create_pixmap(ScreenPtr screen, int w, int h, int depth, screen->ModifyPixmapHeader(pixmap, w, h, 0, 0, stride, NULL); - if (!intel_glamor_create_textured_pixmap(pixmap)) - goto fallback_glamor; } return pixmap; -fallback_glamor: - if (usage & INTEL_CREATE_PIXMAP_DRI2) { - /* XXX need further work to handle the DRI2 failure case. - * Glamor don't know how to handle a BO only pixmap. Put - * a warning indicator here. - */ - xf86DrvMsg(scrn->scrnIndex, X_WARNING, - "Failed to create textured DRI2 pixmap."); - return pixmap; - } - /* Create textured pixmap failed means glamor failed to - * create a texture from current BO for some reasons. We turn - * to create a new glamor pixmap and clean up current one. - * One thing need to be noted, this new pixmap doesn't - * has a priv and bo attached to it. It's glamor's responsbility - * to take care of it. Glamor will mark this new pixmap as a - * texture only pixmap and will never fallback to DDX layer - * afterwards. - */ - new_pixmap = intel_glamor_create_pixmap(screen, w, h, - depth, usage); - dri_bo_unreference(priv->bo); fallback_priv: free(priv); fallback_pixmap: @@ -1103,7 +1058,6 @@ fallback_pixmap: static Bool intel_uxa_destroy_pixmap(PixmapPtr pixmap) { if (pixmap->refcnt == 1) { - intel_glamor_destroy_pixmap(pixmap); intel_uxa_set_pixmap_bo(pixmap, NULL); } fbDestroyPixmap(pixmap); @@ -1141,9 +1095,6 @@ Bool intel_uxa_create_screen_resources(ScreenPtr screen) if (intel_uxa_get_pixmap_private(pixmap) == NULL) goto err; - if (!intel_glamor_create_screen_resources(screen)) - goto err; - intel_uxa_get_pixmap_private(pixmap)->pinned |= PIN_SCANOUT; scrn->displayWidth = intel->front_pitch / intel->cpp; diff --git a/src/uxa/intel_uxa.h b/src/uxa/intel_uxa.h index f449b54..3d495ba 100644 --- a/src/uxa/intel_uxa.h +++ b/src/uxa/intel_uxa.h @@ -40,7 +40,6 @@ struct intel_uxa_pixmap { #define PIN_DRI2 0x2 #define PIN_DRI3 0x4 #define PIN_PRIME 0x8 -#define PIN_GLAMOR 0x10 }; #if HAS_DEVPRIVATEKEYREC diff --git a/src/uxa/intel_uxa_video.c b/src/uxa/intel_uxa_video.c index c5a1956..8287be4 100644 --- a/src/uxa/intel_uxa_video.c +++ b/src/uxa/intel_uxa_video.c @@ -74,7 +74,6 @@ #define _INTEL_XVMC_SERVER_ #include "intel_xvmc.h" #endif -#include "intel_glamor.h" /* overlay debugging printf function */ #if 0 diff --git a/src/uxa/intel_video.c b/src/uxa/intel_video.c index 310b6c9..ba76453 100644 --- a/src/uxa/intel_video.c +++ b/src/uxa/intel_video.c @@ -78,7 +78,6 @@ #define _INTEL_XVMC_SERVER_ #include "intel_xvmc.h" #endif -#include "intel_glamor.h" #include "intel_uxa.h" #include "intel_video_overlay.h" @@ -163,7 +162,7 @@ void intel_video_init(ScreenPtr screen) ScrnInfoPtr scrn = xf86ScreenToScrn(screen); intel_screen_private *intel = intel_get_screen_private(scrn); XF86VideoAdaptorPtr *adaptors = NULL, *newAdaptors = NULL; - XF86VideoAdaptorPtr overlayAdaptor = NULL, texturedAdaptor = NULL, glamorAdaptor = NULL; + XF86VideoAdaptorPtr overlayAdaptor = NULL, texturedAdaptor = NULL; int num_adaptors = xf86XVListGenericAdaptors(scrn, &adaptors); /* Give our adaptor list enough space for the overlay and/or texture video @@ -213,21 +212,12 @@ void intel_video_init(ScreenPtr screen) } } - glamorAdaptor = intel_glamor_xv_init(screen, 16); - if (glamorAdaptor != NULL) - xf86DrvMsg(scrn->scrnIndex, X_INFO, - "Set up textured video using glamor\n"); - - if (overlayAdaptor && intel->XvPreferOverlay) adaptors[num_adaptors++] = overlayAdaptor; if (texturedAdaptor) adaptors[num_adaptors++] = texturedAdaptor; - if (glamorAdaptor) - adaptors[num_adaptors++] = glamorAdaptor; - if (overlayAdaptor && !intel->XvPreferOverlay) adaptors[num_adaptors++] = overlayAdaptor; diff --git a/src/uxa/uxa-accel.c b/src/uxa/uxa-accel.c index 757b276..b0d3c80 100644 --- a/src/uxa/uxa-accel.c +++ b/src/uxa/uxa-accel.c @@ -32,7 +32,6 @@ #include #endif #include "uxa-priv.h" -#include "uxa-glamor.h" #include #include "dixfontstr.h" #include "uxa.h" @@ -50,21 +49,6 @@ uxa_fill_spans(DrawablePtr pDrawable, GCPtr pGC, int n, int x1, x2, y; int off_x, off_y; - if (uxa_screen->info->flags & UXA_USE_GLAMOR) { - int ok = 0; - - if (uxa_prepare_access(pDrawable, UXA_GLAMOR_ACCESS_RW)) { - ok = glamor_fill_spans_nf(pDrawable, - pGC, n, ppt, pwidth, fSorted); - uxa_finish_access(pDrawable, UXA_GLAMOR_ACCESS_RW); - } - - if (!ok) - goto fallback; - - return; - } - if (uxa_screen->force_fallback) goto fallback; @@ -210,26 +194,9 @@ static void uxa_put_image(DrawablePtr pDrawable, GCPtr pGC, int depth, int x, int y, int w, int h, int leftPad, int format, char *bits) { - uxa_screen_t *uxa_screen = uxa_get_screen(pDrawable->pScreen); - - if (uxa_screen->info->flags & UXA_USE_GLAMOR) { - int ok = 0; - - if (uxa_prepare_access(pDrawable, UXA_GLAMOR_ACCESS_RW)) { - ok = glamor_put_image_nf(pDrawable, - pGC, depth, x, y, w, h, - leftPad, format, bits); - uxa_finish_access(pDrawable, UXA_GLAMOR_ACCESS_RW); - } - if (!ok) - goto fallback; - - return; - } if (!uxa_do_put_image(pDrawable, pGC, depth, x, y, w, h, format, bits, PixmapBytePad(w, pDrawable->depth))) { -fallback: uxa_check_put_image(pDrawable, pGC, depth, x, y, w, h, leftPad, format, bits); } @@ -374,26 +341,6 @@ uxa_copy_n_to_n(DrawablePtr pSrcDrawable, int dst_off_x, dst_off_y; PixmapPtr pSrcPixmap, pDstPixmap; - if (uxa_screen->info->flags & UXA_USE_GLAMOR) { - int ok = 0; - - if (uxa_prepare_access(pSrcDrawable, UXA_GLAMOR_ACCESS_RO)) { - if (uxa_prepare_access(pDstDrawable, UXA_GLAMOR_ACCESS_RW)) { - ok = glamor_copy_n_to_n_nf(pSrcDrawable, pDstDrawable, - pGC, pbox, nbox, dx, dy, - reverse, upsidedown, bitplane, - closure); - uxa_finish_access(pDstDrawable, UXA_GLAMOR_ACCESS_RW); - } - uxa_finish_access(pSrcDrawable, UXA_GLAMOR_ACCESS_RO); - } - - if (!ok) - goto fallback; - - return; - } - if (uxa_screen->force_fallback) goto fallback; @@ -560,19 +507,6 @@ uxa_poly_point(DrawablePtr pDrawable, GCPtr pGC, int mode, int npt, { int i; xRectangle *prect; - uxa_screen_t *uxa_screen = uxa_get_screen(pDrawable->pScreen); - - if (uxa_screen->info->flags & UXA_USE_GLAMOR) { - int ok = 0; - - if (uxa_prepare_access(pDrawable, UXA_GLAMOR_ACCESS_RW)) { - ok = glamor_poly_point_nf(pDrawable, pGC, mode, npt, ppt); - uxa_finish_access(pDrawable, UXA_GLAMOR_ACCESS_RW); - } - - if (ok) - return; - } /* If we can't reuse the current GC as is, don't bother accelerating the * points. @@ -611,19 +545,6 @@ uxa_poly_lines(DrawablePtr pDrawable, GCPtr pGC, int mode, int npt, xRectangle *prect; int x1, x2, y1, y2; int i; - uxa_screen_t *uxa_screen = uxa_get_screen(pDrawable->pScreen); - - if (uxa_screen->info->flags & UXA_USE_GLAMOR) { - int ok = 0; - - if (uxa_prepare_access(pDrawable, UXA_GLAMOR_ACCESS_RW)) { - ok = glamor_poly_lines_nf(pDrawable, pGC, mode, npt, ppt); - uxa_finish_access(pDrawable, UXA_GLAMOR_ACCESS_RW); - } - - if (ok) - return; - } /* Don't try to do wide lines or non-solid fill style. */ if (pGC->lineWidth != 0 || pGC->lineStyle != LineSolid || @@ -685,19 +606,6 @@ uxa_poly_segment(DrawablePtr pDrawable, GCPtr pGC, int nseg, xSegment * pSeg) { xRectangle *prect; int i; - uxa_screen_t *uxa_screen = uxa_get_screen(pDrawable->pScreen); - - if (uxa_screen->info->flags & UXA_USE_GLAMOR) { - int ok = 0; - - if (uxa_prepare_access(pDrawable, UXA_GLAMOR_ACCESS_RW)) { - ok = glamor_poly_segment_nf(pDrawable, pGC, nseg, pSeg); - uxa_finish_access(pDrawable, UXA_GLAMOR_ACCESS_RW); - } - - if (ok) - return; - } /* Don't try to do wide lines or non-solid fill style. */ if (pGC->lineWidth != 0 || pGC->lineStyle != LineSolid || @@ -762,20 +670,6 @@ uxa_poly_fill_rect(DrawablePtr pDrawable, int xorg, yorg; int n; - if (uxa_screen->info->flags & UXA_USE_GLAMOR) { - int ok = 0; - - if (uxa_prepare_access(pDrawable, UXA_GLAMOR_ACCESS_RW)) { - ok = glamor_poly_fill_rect_nf(pDrawable, pGC, nrect, prect); - uxa_finish_access(pDrawable, UXA_GLAMOR_ACCESS_RW); - } - - if (!ok) - uxa_check_poly_fill_rect(pDrawable, pGC, nrect, prect); - - return; - } - /* Compute intersection of rects and clip region */ pReg = RECTS_TO_REGION(pScreen, nrect, prect, CT_UNSORTED); REGION_TRANSLATE(pScreen, pReg, pDrawable->x, pDrawable->y); @@ -885,25 +779,6 @@ uxa_get_spans(DrawablePtr pDrawable, int wMax, DDXPointPtr ppt, int *pwidth, int nspans, char *pdstStart) { - ScreenPtr screen = pDrawable->pScreen; - uxa_screen_t *uxa_screen = uxa_get_screen(screen); - - if (uxa_screen->info->flags & UXA_USE_GLAMOR) { - int ok = 0; - - if (uxa_prepare_access(pDrawable, UXA_GLAMOR_ACCESS_RW)) { - ok = glamor_get_spans_nf(pDrawable, wMax, ppt, - pwidth, nspans, pdstStart); - uxa_finish_access(pDrawable, UXA_GLAMOR_ACCESS_RW); - } - - if (!ok) - goto fallback; - - return; - } - -fallback: uxa_check_get_spans(pDrawable, wMax, ppt, pwidth, nspans, pdstStart); } @@ -911,25 +786,6 @@ static void uxa_set_spans(DrawablePtr pDrawable, GCPtr gc, char *src, DDXPointPtr points, int *widths, int n, int sorted) { - ScreenPtr screen = pDrawable->pScreen; - uxa_screen_t *uxa_screen = uxa_get_screen(screen); - - if (uxa_screen->info->flags & UXA_USE_GLAMOR) { - int ok = 0; - - if (uxa_prepare_access(pDrawable, UXA_GLAMOR_ACCESS_RW)) { - ok = glamor_set_spans_nf(pDrawable, gc, src, - points, widths, n, sorted); - uxa_finish_access(pDrawable, UXA_GLAMOR_ACCESS_RW); - } - - if (!ok) - goto fallback; - - return; - } - -fallback: uxa_check_set_spans(pDrawable, gc, src, points, widths, n, sorted); } @@ -938,27 +794,6 @@ uxa_copy_plane(DrawablePtr pSrc, DrawablePtr pDst, GCPtr pGC, int srcx, int srcy, int w, int h, int dstx, int dsty, unsigned long bitPlane) { - ScreenPtr screen = pDst->pScreen; - uxa_screen_t *uxa_screen = uxa_get_screen(screen); - - if (uxa_screen->info->flags & UXA_USE_GLAMOR) { - RegionPtr region = NULL; - int ok = 0; - - if (uxa_prepare_access(pDst, UXA_GLAMOR_ACCESS_RW)) { - if (uxa_prepare_access(pSrc, UXA_GLAMOR_ACCESS_RO)) { - ok = glamor_copy_plane_nf(pSrc, pDst, pGC, srcx, srcy, w, h, - dstx, dsty, bitPlane, ®ion); - uxa_finish_access(pSrc, UXA_GLAMOR_ACCESS_RO); - } - uxa_finish_access(pDst, UXA_GLAMOR_ACCESS_RW); - } - if (!ok) - goto fallback; - return region; - } - -fallback: return uxa_check_copy_plane(pSrc, pDst, pGC, srcx, srcy, w, h, dstx, dsty, bitPlane); } @@ -968,22 +803,6 @@ uxa_image_glyph_blt(DrawablePtr pDrawable, GCPtr pGC, int x, int y, unsigned int nglyph, CharInfoPtr * ppci, pointer pglyphBase) { - ScreenPtr screen = pDrawable->pScreen; - uxa_screen_t *uxa_screen = uxa_get_screen(screen); - - if (uxa_screen->info->flags & UXA_USE_GLAMOR) { - int ok = 0; - - if (uxa_prepare_access(pDrawable, UXA_GLAMOR_ACCESS_RW)) { - ok = glamor_image_glyph_blt_nf(pDrawable, pGC, x, y, nglyph, ppci, pglyphBase); - uxa_finish_access(pDrawable, UXA_GLAMOR_ACCESS_RW); - } - if (!ok) - goto fallback; - return; - } - -fallback: uxa_check_image_glyph_blt(pDrawable, pGC, x, y, nglyph, ppci, pglyphBase); } @@ -992,22 +811,6 @@ uxa_poly_glyph_blt(DrawablePtr pDrawable, GCPtr pGC, int x, int y, unsigned int nglyph, CharInfoPtr * ppci, pointer pglyphBase) { - ScreenPtr screen = pDrawable->pScreen; - uxa_screen_t *uxa_screen = uxa_get_screen(screen); - - if (uxa_screen->info->flags & UXA_USE_GLAMOR) { - int ok = 0; - - if (uxa_prepare_access(pDrawable, UXA_GLAMOR_ACCESS_RW)) { - ok = glamor_poly_glyph_blt_nf(pDrawable, pGC, x, y, nglyph, ppci, pglyphBase); - uxa_finish_access(pDrawable, UXA_GLAMOR_ACCESS_RW); - } - if (!ok) - goto fallback; - return; - } - -fallback: uxa_check_poly_glyph_blt(pDrawable, pGC, x, y, nglyph, ppci, pglyphBase); } @@ -1015,25 +818,6 @@ static void uxa_push_pixels(GCPtr pGC, PixmapPtr pBitmap, DrawablePtr pDrawable, int w, int h, int x, int y) { - ScreenPtr screen = pDrawable->pScreen; - uxa_screen_t *uxa_screen = uxa_get_screen(screen); - - if (uxa_screen->info->flags & UXA_USE_GLAMOR) { - int ok = 0; - - if (uxa_prepare_access(pDrawable, UXA_GLAMOR_ACCESS_RW)) { - if (uxa_prepare_access(&pBitmap->drawable, UXA_GLAMOR_ACCESS_RO)) { - ok = glamor_push_pixels_nf(pGC, pBitmap, pDrawable, w, h, x, y); - uxa_finish_access(&pBitmap->drawable, UXA_GLAMOR_ACCESS_RO); - } - uxa_finish_access(pDrawable, UXA_GLAMOR_ACCESS_RW); - } - if (!ok) - goto fallback; - return; - } - -fallback: uxa_check_push_pixels(pGC, pBitmap, pDrawable, w, h, x, y); } @@ -1244,20 +1028,6 @@ uxa_get_image(DrawablePtr pDrawable, int x, int y, int w, int h, Box.x2 = Box.x1 + w; Box.y2 = Box.y1 + h; - if (uxa_screen->info->flags & UXA_USE_GLAMOR) { - ok = 0; - if (uxa_prepare_access(pDrawable, UXA_GLAMOR_ACCESS_RW)) { - ok = glamor_get_image_nf(pDrawable, x, y, w, h, - format, planeMask, d); - uxa_finish_access(pDrawable, UXA_GLAMOR_ACCESS_RW); - } - - if (!ok) - goto fallback; - - return; - } - if (uxa_screen->force_fallback) goto fallback; diff --git a/src/uxa/uxa-glamor.h b/src/uxa/uxa-glamor.h deleted file mode 100644 index 5ff19e0..0000000 --- a/src/uxa/uxa-glamor.h +++ /dev/null @@ -1,65 +0,0 @@ -/* - * Copyright ? 2011 Intel Corporation. - * - * 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 (including - * the next paragraph) 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. - * - * Authors: - * Zhigang Gong - * - */ - -#ifndef UXA_GLAMOR_H -#define UXA_GLAMOR_H - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#ifdef USE_GLAMOR -#include "glamor.h" -#else -#define glamor_fill_spans_nf(...) FALSE -#define glamor_poly_fill_rect_nf(...) FALSE -#define glamor_put_image_nf(...) FALSE -#define glamor_copy_n_to_n_nf(...) FALSE -#define glamor_get_spans_nf(...) FALSE -#define glamor_set_spans_nf(...) FALSE -#define glamor_get_image_nf(...) FALSE -#define glamor_glyphs_nf(...) FALSE -#define glamor_glyph_unrealize(...) do { } while(0) -#define glamor_composite_nf(...) FALSE -#define glamor_composite_rects_nf(...) FALSE -#define glamor_trapezoids_nf(...) FALSE -#define glamor_triangles_nf(...) FALSE -#define glamor_add_traps_nf(...) FALSE -#define glamor_create_gc(...) FALSE -#define glamor_validate_gc(...) do { } while(0) -#define glamor_poly_point_nf(...) FALSE -#define glamor_poly_segment_nf(...) FALSE -#define glamor_poly_lines_nf(...) FALSE -#define glamor_push_pixels_nf(...) FALSE -#define glamor_copy_plane_nf(...) FALSE -#define glamor_image_glyph_blt_nf(...) FALSE -#define glamor_poly_glyph_blt_nf(...) FALSE -#endif - -#endif /* UXA_GLAMOR_H */ diff --git a/src/uxa/uxa-glyphs.c b/src/uxa/uxa-glyphs.c index 7f35863..d24ba51 100644 --- a/src/uxa/uxa-glyphs.c +++ b/src/uxa/uxa-glyphs.c @@ -65,7 +65,6 @@ #include #include "uxa-priv.h" -#include "uxa-glamor.h" #include "common.h" /* Width of the pixmaps we use for the caches; this should be less than @@ -210,10 +209,6 @@ bail: Bool uxa_glyphs_init(ScreenPtr pScreen) { - uxa_screen_t *uxa_screen = uxa_get_screen(pScreen); - - if (uxa_screen->info->flags & UXA_USE_GLAMOR) - return TRUE; #if HAS_DIXREGISTERPRIVATEKEY if (!dixRegisterPrivateKey(&uxa_glyph_key, PRIVATE_GLYPH, 0)) return FALSE; @@ -308,12 +303,6 @@ uxa_glyph_unrealize(ScreenPtr screen, GlyphPtr glyph) { struct uxa_glyph *priv; - uxa_screen_t *uxa_screen = uxa_get_screen(screen); - - if (uxa_screen->info->flags & UXA_USE_GLAMOR) { - glamor_glyph_unrealize(screen, glyph); - return; - } /* Use Lookup in case we have not attached to this glyph. */ priv = dixLookupPrivate(&glyph->devPrivates, &uxa_glyph_key); @@ -975,23 +964,6 @@ uxa_glyphs(CARD8 op, ScreenPtr screen = pDst->pDrawable->pScreen; uxa_screen_t *uxa_screen = uxa_get_screen(screen); - if (uxa_screen->info->flags & UXA_USE_GLAMOR) { - int ok; - - uxa_picture_prepare_access(pDst, UXA_GLAMOR_ACCESS_RW); - uxa_picture_prepare_access(pSrc, UXA_GLAMOR_ACCESS_RO); - ok = glamor_glyphs_nf(op, - pSrc, pDst, maskFormat, - xSrc, ySrc, nlist, list, glyphs); - uxa_picture_finish_access(pSrc, UXA_GLAMOR_ACCESS_RO); - uxa_picture_finish_access(pDst, UXA_GLAMOR_ACCESS_RW); - - if (!ok) - goto fallback; - - return; - } - if (!uxa_screen->info->prepare_composite || uxa_screen->force_fallback || !uxa_drawable_is_offscreen(pDst->pDrawable) || diff --git a/src/uxa/uxa-render.c b/src/uxa/uxa-render.c index a138f16..0c3e856 100644 --- a/src/uxa/uxa-render.c +++ b/src/uxa/uxa-render.c @@ -29,23 +29,10 @@ #include #include "uxa-priv.h" -#include "uxa-glamor.h" #ifdef RENDER #include "mipict.h" -/* Note: when using glamor we can not fail through to the ordinary UXA - * code paths, as glamor keeps an internal texture which will become - * inconsistent with the original bo. (The texture is replaced whenever - * the format changes, e.g. switching between xRGB and ARGB, for which mesa - * will allocate its own bo.) - * - * Ergo it is unsafe to fall through to the original backend operations if - * glamor is enabled. - * - * XXX This has some serious implications for mixing Render, DRI, scanout... - */ - static void uxa_composite_fallback_pict_desc(PicturePtr pict, char *string, int n) { @@ -1357,30 +1344,6 @@ uxa_composite(CARD8 op, RegionRec region; int tx, ty; - if (uxa_screen->info->flags & UXA_USE_GLAMOR) { - int ok; - - uxa_picture_prepare_access(pDst, UXA_GLAMOR_ACCESS_RW); - uxa_picture_prepare_access(pSrc, UXA_GLAMOR_ACCESS_RO); - if (pMask) - uxa_picture_prepare_access(pMask, UXA_GLAMOR_ACCESS_RO); - - ok = glamor_composite_nf(op, - pSrc, pMask, pDst, xSrc, ySrc, - xMask, yMask, xDst, yDst, - width, height); - - if (pMask) - uxa_picture_finish_access(pMask, UXA_GLAMOR_ACCESS_RO); - uxa_picture_finish_access(pSrc, UXA_GLAMOR_ACCESS_RO); - uxa_picture_finish_access(pDst, UXA_GLAMOR_ACCESS_RW); - - if (!ok) - goto fallback; - - return; - } - if (uxa_screen->force_fallback) goto fallback; @@ -1722,25 +1685,7 @@ uxa_trapezoids(CARD8 op, PicturePtr src, PicturePtr dst, BoxRec bounds; Bool direct; - if (uxa_screen->info->flags & UXA_USE_GLAMOR) { - int ok; - - uxa_picture_prepare_access(dst, UXA_GLAMOR_ACCESS_RW); - uxa_picture_prepare_access(src, UXA_GLAMOR_ACCESS_RO); - ok = glamor_trapezoids_nf(op, - src, dst, maskFormat, xSrc, - ySrc, ntrap, traps); - uxa_picture_finish_access(src, UXA_GLAMOR_ACCESS_RO); - uxa_picture_finish_access(dst, UXA_GLAMOR_ACCESS_RW); - - if (!ok) - goto fallback; - - return; - } - if (uxa_screen->force_fallback) { -fallback: uxa_check_trapezoids(op, src, dst, maskFormat, xSrc, ySrc, ntrap, traps); return; } @@ -1951,25 +1896,7 @@ uxa_triangles(CARD8 op, PicturePtr pSrc, PicturePtr pDst, BoxRec bounds; Bool direct; - if (uxa_screen->info->flags & UXA_USE_GLAMOR) { - int ok; - - uxa_picture_prepare_access(pDst, UXA_GLAMOR_ACCESS_RW); - uxa_picture_prepare_access(pSrc, UXA_GLAMOR_ACCESS_RO); - ok = glamor_triangles_nf(op, - pSrc, pDst, maskFormat, xSrc, - ySrc, ntri, tris); - uxa_picture_finish_access(pSrc, UXA_GLAMOR_ACCESS_RO); - uxa_picture_finish_access(pDst, UXA_GLAMOR_ACCESS_RW); - - if (!ok) - goto fallback; - - return; - } - if (uxa_screen->force_fallback) { -fallback: uxa_check_triangles(op, pSrc, pDst, maskFormat, xSrc, ySrc, ntri, tris); return; @@ -2051,23 +1978,5 @@ void uxa_add_traps(PicturePtr pPicture, INT16 x_off, INT16 y_off, int ntrap, xTrap * traps) { - ScreenPtr pScreen = pPicture->pDrawable->pScreen; - uxa_screen_t *uxa_screen = uxa_get_screen(pScreen); - - if (uxa_screen->info->flags & UXA_USE_GLAMOR) { - int ok; - - uxa_picture_prepare_access(pPicture, UXA_GLAMOR_ACCESS_RW); - ok = glamor_add_traps_nf(pPicture, - x_off, y_off, ntrap, traps); - uxa_picture_finish_access(pPicture, UXA_GLAMOR_ACCESS_RW); - - if (!ok) - goto fallback; - - return; - } - -fallback: uxa_check_add_traps(pPicture, x_off, y_off, ntrap, traps); } diff --git a/src/uxa/uxa.c b/src/uxa/uxa.c index c8d7900..b682dfd 100644 --- a/src/uxa/uxa.c +++ b/src/uxa/uxa.c @@ -38,7 +38,6 @@ #include #include "dixfontstr.h" #include "uxa.h" -#include "uxa-glamor.h" #if HAS_DEVPRIVATEKEYREC DevPrivateKeyRec uxa_screen_index; @@ -184,21 +183,12 @@ void uxa_finish_access(DrawablePtr pDrawable, uxa_access_t access) static void uxa_validate_gc(GCPtr pGC, unsigned long changes, DrawablePtr pDrawable) { - uxa_screen_t *uxa_screen = uxa_get_screen(pGC->pScreen); /* fbValidateGC will do direct access to pixmaps if the tiling has * changed. * Preempt fbValidateGC by doing its work and masking the change out, so * that we can do the Prepare/finish_access. */ - /* If we are using GLAMOR, then the tile or stipple pixmap - * may be pure GLAMOR pixmap, then we should let the glamor - * to do the validation. - */ - if (uxa_screen->info->flags & UXA_USE_GLAMOR) { - glamor_validate_gc(pGC, changes, pDrawable); - goto set_ops; - } #ifdef FB_24_32BIT if ((changes & GCTile) && fbGetRotatedPixmap(pGC)) { (*pGC->pScreen->DestroyPixmap) (fbGetRotatedPixmap(pGC)); @@ -267,7 +257,6 @@ uxa_validate_gc(GCPtr pGC, unsigned long changes, DrawablePtr pDrawable) fbValidateGC(pGC, changes, pDrawable); } -set_ops: pGC->ops = (GCOps *) & uxa_ops; } diff --git a/src/uxa/uxa.h b/src/uxa/uxa.h index b8569f0..d08c601 100644 --- a/src/uxa/uxa.h +++ b/src/uxa/uxa.h @@ -46,8 +46,6 @@ typedef enum { UXA_ACCESS_RO, UXA_ACCESS_RW, - UXA_GLAMOR_ACCESS_RO, - UXA_GLAMOR_ACCESS_RW } uxa_access_t; /** @@ -545,20 +543,6 @@ typedef struct _UxaDriver { */ #define UXA_TWO_BITBLT_DIRECTIONS (1 << 2) -/** - * UXA_USE_GLAMOR indicates to use glamor acceleration to perform rendering. - * And if glamor fail to accelerate the rendering, then goto fallback to - * use CPU to do the rendering. This flag will be set only when glamor get - * initialized successfully. - * Note, in ddx close screen, this bit need to be cleared. - */ -#define UXA_USE_GLAMOR (1 << 3) - -/* UXA_GLAMOR_EGL_INITIALIZED indicates glamor egl layer get initialized - * successfully. UXA layer does not use this flag, before call to - * glamor_init, ddx need to check this flag. */ -#define UXA_GLAMOR_EGL_INITIALIZED (1 << 4) - /** @} */ /** @name UXA CreatePixmap hint flags * @{ -- 2.1.1 From chris at chris-wilson.co.uk Sat Sep 27 01:09:41 2014 From: chris at chris-wilson.co.uk (Chris Wilson) Date: Sat, 27 Sep 2014 09:09:41 +0100 Subject: [PATCH 3/4] Add "none" acceleration option In-Reply-To: <1411788935-31059-4-git-send-email-keithp@keithp.com> References: <1408256001-18414-1-git-send-email-keithp@keithp.com> <1411788935-31059-1-git-send-email-keithp@keithp.com> <1411788935-31059-4-git-send-email-keithp@keithp.com> Message-ID: <20140927080941.GG19278@nuc-i3427.alporthouse.com> On Fri, Sep 26, 2014 at 08:35:34PM -0700, Keith Packard wrote: > This uses fb directly, and supports DRI2 and DRI3. The fundamental principle of UXA is that at its lowest level it is acceleration=none. This looks to be a large invasive and unwarranteed change for a one-line bug in UXA pixmap allocation. -Chris -- Chris Wilson, Intel Open Source Technology Centre From wharms at bfs.de Sat Sep 27 02:25:41 2014 From: wharms at bfs.de (walter harms) Date: Sat, 27 Sep 2014 11:25:41 +0200 Subject: [PATCH libX11] xcb_io: Fix Xlib 32-bit request number issues In-Reply-To: <867g0pu4p4.fsf@hiro.keithp.com> References: <1411585990-6423-1-git-send-email-jnsptrsn1@gmail.com> <867g0pu4p4.fsf@hiro.keithp.com> Message-ID: <54268295.4030001@bfs.de> Am 27.09.2014 05:23, schrieb Keith Packard: > Matt Turner writes: > >> On Fri, Sep 26, 2014 at 3:40 AM, Jan Smout wrote: >>> Keith Packard doesn't seem very responsive (as in 'completely ignoring the >>> subject') >> >> Perhaps you should try Ccing him? (now Cc'd) > > The problem is that reviewing this patch is *really hard*. The last > time, I think I spent a solid couple of days thinking about this and > making sure I'd caught all of the cases. I'm still not sure it's right, > but I guess it's probably better than what we have? > > Hello Keith, i would suggest to branch the tree into a libX11-next (feel free to choose an other name). The linux kernel does this since some years and it seems working. Distribution can play with that and check if something unusual happens. Of cause at some point someone needs to transfer it into xorg tree but at least that would make sure the patches have a place the go and may encourage much needed developers come forward with more fixes. re, wh From hramrach at gmail.com Sat Sep 27 08:35:15 2014 From: hramrach at gmail.com (Michal Suchanek) Date: Sat, 27 Sep 2014 17:35:15 +0200 Subject: [PATCH 3/4] Add "none" acceleration option In-Reply-To: <20140927080941.GG19278@nuc-i3427.alporthouse.com> References: <1408256001-18414-1-git-send-email-keithp@keithp.com> <1411788935-31059-1-git-send-email-keithp@keithp.com> <1411788935-31059-4-git-send-email-keithp@keithp.com> <20140927080941.GG19278@nuc-i3427.alporthouse.com> Message-ID: On 27 September 2014 10:09, Chris Wilson wrote: > On Fri, Sep 26, 2014 at 08:35:34PM -0700, Keith Packard wrote: >> This uses fb directly, and supports DRI2 and DRI3. > > The fundamental principle of UXA is that at its lowest level it is > acceleration=none. This looks to be a large invasive and unwarranteed > change for a one-line bug in UXA pixmap allocation. > -Chris Hello, is there an option to make UXA behave as accel=none? Adding such option if none exists should provide same functionality (running the X server without possibly triggering any accel bug) with lower maintenance overhead. Surely there can be bug in implementing such UXA option but same can be said for these preprocessor and code checks. Also can UXA be built without any extra libraries beyond what is needed for accel=none? Seems there is some drm_intel dependency. Thanks Michal From chris at chris-wilson.co.uk Sat Sep 27 09:26:06 2014 From: chris at chris-wilson.co.uk (Chris Wilson) Date: Sat, 27 Sep 2014 17:26:06 +0100 Subject: [PATCH 3/4] Add "none" acceleration option In-Reply-To: References: <1408256001-18414-1-git-send-email-keithp@keithp.com> <1411788935-31059-1-git-send-email-keithp@keithp.com> <1411788935-31059-4-git-send-email-keithp@keithp.com> <20140927080941.GG19278@nuc-i3427.alporthouse.com> Message-ID: <20140927162606.GI19278@nuc-i3427.alporthouse.com> On Sat, Sep 27, 2014 at 05:35:15PM +0200, Michal Suchanek wrote: > On 27 September 2014 10:09, Chris Wilson wrote: > > On Fri, Sep 26, 2014 at 08:35:34PM -0700, Keith Packard wrote: > >> This uses fb directly, and supports DRI2 and DRI3. > > > > The fundamental principle of UXA is that at its lowest level it is > > acceleration=none. This looks to be a large invasive and unwarranteed > > change for a one-line bug in UXA pixmap allocation. > > -Chris > > Hello, > > is there an option to make UXA behave as accel=none? To do exactly as you ask, you need Option "AccelMethod" "uxa" Option "NoAccel" "true" as just selecting Option "AccelMethod" "none" selects the default backend and disables its acceleration. > Also can UXA be built without any extra libraries beyond what is > needed for accel=none? Seems there is some drm_intel dependency. No, UXA (and by extension UXA/none) requires the extra dependency of libdrm_intel. The default Option "AccelMethod" "none" itself does not. -Chris -- Chris Wilson, Intel Open Source Technology Centre From hramrach at gmail.com Sat Sep 27 10:17:26 2014 From: hramrach at gmail.com (Michal Suchanek) Date: Sat, 27 Sep 2014 19:17:26 +0200 Subject: [PATCH 3/4] Add "none" acceleration option In-Reply-To: <20140927162606.GI19278@nuc-i3427.alporthouse.com> References: <1408256001-18414-1-git-send-email-keithp@keithp.com> <1411788935-31059-1-git-send-email-keithp@keithp.com> <1411788935-31059-4-git-send-email-keithp@keithp.com> <20140927080941.GG19278@nuc-i3427.alporthouse.com> <20140927162606.GI19278@nuc-i3427.alporthouse.com> Message-ID: On 27 September 2014 18:26, Chris Wilson wrote: > On Sat, Sep 27, 2014 at 05:35:15PM +0200, Michal Suchanek wrote: >> On 27 September 2014 10:09, Chris Wilson wrote: >> > On Fri, Sep 26, 2014 at 08:35:34PM -0700, Keith Packard wrote: >> >> This uses fb directly, and supports DRI2 and DRI3. >> > >> > The fundamental principle of UXA is that at its lowest level it is >> > acceleration=none. This looks to be a large invasive and unwarranteed >> > change for a one-line bug in UXA pixmap allocation. >> > -Chris >> >> Hello, >> >> is there an option to make UXA behave as accel=none? > > To do exactly as you ask, you need > > Option "AccelMethod" "uxa" > Option "NoAccel" "true" > > as just selecting > > Option "AccelMethod" "none" > > selects the default backend and disables its acceleration. > >> Also can UXA be built without any extra libraries beyond what is >> needed for accel=none? Seems there is some drm_intel dependency. > > No, UXA (and by extension UXA/none) requires the extra dependency of > libdrm_intel. The default Option "AccelMethod" "none" itself does not. > -Chris And the difference between UXA/none and "AccelMethod" "none" and fbdev is supposed to be what? Thanks Michal From alan.coopersmith at oracle.com Sat Sep 27 10:45:41 2014 From: alan.coopersmith at oracle.com (Alan Coopersmith) Date: Sat, 27 Sep 2014 10:45:41 -0700 Subject: [PATCH libX11] xcb_io: Fix Xlib 32-bit request number issues In-Reply-To: <54268295.4030001@bfs.de> References: <1411585990-6423-1-git-send-email-jnsptrsn1@gmail.com> <867g0pu4p4.fsf@hiro.keithp.com> <54268295.4030001@bfs.de> Message-ID: <5426F7C5.1090006@oracle.com> On 09/27/14 02:25 AM, walter harms wrote: > i would suggest to branch the tree into a libX11-next (feel free to choose an > other name). The linux kernel does this since some years and it seems working. We currently barely have enough developers or maintainers to sustain one branch of libX11, much less two. Are you volunteering to run this -next branch? -- -Alan Coopersmith- alan.coopersmith at oracle.com Oracle Solaris Engineering - http://blogs.oracle.com/alanc From chris at chris-wilson.co.uk Sat Sep 27 11:58:31 2014 From: chris at chris-wilson.co.uk (Chris Wilson) Date: Sat, 27 Sep 2014 19:58:31 +0100 Subject: [PATCH 3/4] Add "none" acceleration option In-Reply-To: References: <1408256001-18414-1-git-send-email-keithp@keithp.com> <1411788935-31059-1-git-send-email-keithp@keithp.com> <1411788935-31059-4-git-send-email-keithp@keithp.com> <20140927080941.GG19278@nuc-i3427.alporthouse.com> <20140927162606.GI19278@nuc-i3427.alporthouse.com> Message-ID: <20140927185831.GK19278@nuc-i3427.alporthouse.com> On Sat, Sep 27, 2014 at 07:17:26PM +0200, Michal Suchanek wrote: > And the difference between UXA/none and "AccelMethod" "none" and fbdev > is supposed to be what? s/fbdev/modesetting/ Not much. UXA/none adds in hw DRI support (with the caveat that any DRICopyRegion is going to be very slow), Xv overlay support, rotation and is slower. (Normal none, in addition to that, is many times faster, has native hw rotation support, greater variety of hardware planes support and more flexible screen configuration, supports TearFree updates and probably many more that I missed off the top of my head.) -Chris -- Chris Wilson, Intel Open Source Technology Centre From chris at chris-wilson.co.uk Sat Sep 27 12:09:21 2014 From: chris at chris-wilson.co.uk (Chris Wilson) Date: Sat, 27 Sep 2014 20:09:21 +0100 Subject: [PATCH 3/4] Add "none" acceleration option In-Reply-To: <20140927185831.GK19278@nuc-i3427.alporthouse.com> References: <1408256001-18414-1-git-send-email-keithp@keithp.com> <1411788935-31059-1-git-send-email-keithp@keithp.com> <1411788935-31059-4-git-send-email-keithp@keithp.com> <20140927080941.GG19278@nuc-i3427.alporthouse.com> <20140927162606.GI19278@nuc-i3427.alporthouse.com> <20140927185831.GK19278@nuc-i3427.alporthouse.com> Message-ID: <20140927190921.GA31863@nuc-i3427.alporthouse.com> On Sat, Sep 27, 2014 at 07:58:31PM +0100, Chris Wilson wrote: > On Sat, Sep 27, 2014 at 07:17:26PM +0200, Michal Suchanek wrote: > > And the difference between UXA/none and "AccelMethod" "none" and fbdev > > is supposed to be what? > > s/fbdev/modesetting/ > > Not much. UXA/none adds in hw DRI support (with the caveat that any Correction: UXA/none (unlike default/none) does not currently support hw DRI, but can with a small fixup. -Chris -- Chris Wilson, Intel Open Source Technology Centre From hramrach at gmail.com Sat Sep 27 12:57:09 2014 From: hramrach at gmail.com (Michal Suchanek) Date: Sat, 27 Sep 2014 21:57:09 +0200 Subject: [PATCH 3/4] Add "none" acceleration option In-Reply-To: <20140927185831.GK19278@nuc-i3427.alporthouse.com> References: <1408256001-18414-1-git-send-email-keithp@keithp.com> <1411788935-31059-1-git-send-email-keithp@keithp.com> <1411788935-31059-4-git-send-email-keithp@keithp.com> <20140927080941.GG19278@nuc-i3427.alporthouse.com> <20140927162606.GI19278@nuc-i3427.alporthouse.com> <20140927185831.GK19278@nuc-i3427.alporthouse.com> Message-ID: On 27 September 2014 20:58, Chris Wilson wrote: > On Sat, Sep 27, 2014 at 07:17:26PM +0200, Michal Suchanek wrote: >> And the difference between UXA/none and "AccelMethod" "none" and fbdev >> is supposed to be what? > > s/fbdev/modesetting/ > > Not much. UXA/none adds in hw DRI support (with the caveat that any > DRICopyRegion is going to be very slow), Xv overlay support, rotation > and is slower. > > (Normal none, in addition to that, is many times faster, has native hw > rotation support, greater variety of hardware planes support and more > flexible screen configuration, supports TearFree updates and probably > many more that I missed off the top of my head.) > -Chris > So UXA/none is basically useless. Thanks for clarification Michal From Eric.Brunet at lps.ens.fr Sat Sep 27 13:06:36 2014 From: Eric.Brunet at lps.ens.fr (=?ISO-8859-1?Q?=C9ric?= Brunet) Date: Sat, 27 Sep 2014 22:06:36 +0200 Subject: [PATCH evdev 1/2] Don't pass superfluous arguments to EvdevPost*Events Message-ID: <2669033.TS2sDvUzAh@tardis.lps.ens.fr> The functions EvdevPostProximityEvents, EvdevPostRelativeMotionEvents, EvdevPostAbsoluteMotionEvents and EvdevPostQueuedEvents are only called by EvdevProcessSyncEvent. These functions take as arguments an array of valuators which is set by EvdevProcessSyncEvent to contain ... nothing. This patch changes the prototype of the four functions, their definitions and the way they are called to remove the useless array of valuators. Signed-off-by: ?ric Brunet --- src/evdev.c | 32 ++++++++++++-------------------- src/evdev.h | 6 ++---- 2 files changed, 14 insertions(+), 24 deletions(-) diff --git a/src/evdev.c b/src/evdev.c index a95c6be..8eb749a 100644 --- a/src/evdev.c +++ b/src/evdev.c @@ -868,8 +868,7 @@ EvdevProcessKeyEvent(InputInfoPtr pInfo, struct input_event *ev) * Post the relative motion events. */ void -EvdevPostRelativeMotionEvents(InputInfoPtr pInfo, int num_v, int first_v, - int v[MAX_VALUATORS]) +EvdevPostRelativeMotionEvents(InputInfoPtr pInfo) { EvdevPtr pEvdev = pInfo->private; @@ -882,8 +881,7 @@ EvdevPostRelativeMotionEvents(InputInfoPtr pInfo, int num_v, int first_v, * Post the absolute motion events. */ void -EvdevPostAbsoluteMotionEvents(InputInfoPtr pInfo, int num_v, int first_v, - int v[MAX_VALUATORS]) +EvdevPostAbsoluteMotionEvents(InputInfoPtr pInfo) { EvdevPtr pEvdev = pInfo->private; @@ -902,8 +900,7 @@ EvdevPostAbsoluteMotionEvents(InputInfoPtr pInfo, int num_v, int first_v, } static void -EvdevPostProximityEvents(InputInfoPtr pInfo, int which, int num_v, int first_v, - int v[MAX_VALUATORS]) +EvdevPostProximityEvents(InputInfoPtr pInfo, int which) { int i; EvdevPtr pEvdev = pInfo->private; @@ -918,8 +915,7 @@ EvdevPostProximityEvents(InputInfoPtr pInfo, int which, int num_v, int first_v, break; case EV_QUEUE_PROXIMITY: if (pEvdev->queue[i].val == which) - xf86PostProximityEventP(pInfo->dev, which, first_v, num_v, - v + first_v); + xf86PostProximityEvent(pInfo->dev, which, 0, 0); break; } } @@ -928,8 +924,7 @@ EvdevPostProximityEvents(InputInfoPtr pInfo, int which, int num_v, int first_v, /** * Post the queued key/button events. */ -static void EvdevPostQueuedEvents(InputInfoPtr pInfo, int num_v, int first_v, - int v[MAX_VALUATORS]) +static void EvdevPostQueuedEvents(InputInfoPtr pInfo) { int i; EvdevPtr pEvdev = pInfo->private; @@ -947,9 +942,8 @@ static void EvdevPostQueuedEvents(InputInfoPtr pInfo, int num_v, int first_v, break; if (pEvdev->abs_queued && pEvdev->in_proximity) { - xf86PostButtonEventP(pInfo->dev, Absolute, pEvdev->queue[i].detail.key, - pEvdev->queue[i].val, first_v, num_v, - v + first_v); + xf86PostButtonEvent(pInfo->dev, Absolute, pEvdev->queue[i].detail.key, + pEvdev->queue[i].val, 0, 0); } else xf86PostButtonEvent(pInfo->dev, Relative, pEvdev->queue[i].detail.key, @@ -976,8 +970,6 @@ static void EvdevProcessSyncEvent(InputInfoPtr pInfo, struct input_event *ev) { int i; - int num_v = 0, first_v = 0; - int v[MAX_VALUATORS] = {}; EvdevPtr pEvdev = pInfo->private; EvdevProcessProximityState(pInfo); @@ -985,11 +977,11 @@ EvdevProcessSyncEvent(InputInfoPtr pInfo, struct input_event *ev) EvdevProcessValuators(pInfo); EvdevProcessTouch(pInfo); - EvdevPostProximityEvents(pInfo, TRUE, num_v, first_v, v); - EvdevPostRelativeMotionEvents(pInfo, num_v, first_v, v); - EvdevPostAbsoluteMotionEvents(pInfo, num_v, first_v, v); - EvdevPostQueuedEvents(pInfo, num_v, first_v, v); - EvdevPostProximityEvents(pInfo, FALSE, num_v, first_v, v); + EvdevPostProximityEvents(pInfo, TRUE); + EvdevPostRelativeMotionEvents(pInfo); + EvdevPostAbsoluteMotionEvents(pInfo); + EvdevPostQueuedEvents(pInfo); + EvdevPostProximityEvents(pInfo, FALSE); memset(pEvdev->delta, 0, sizeof(pEvdev->delta)); for (i = 0; i < ArrayLength(pEvdev->queue); i++) diff --git a/src/evdev.h b/src/evdev.h index 2d6b62d..2a010e6 100644 --- a/src/evdev.h +++ b/src/evdev.h @@ -265,10 +265,8 @@ void EvdevQueueTouchEvent(InputInfoPtr pInfo, unsigned int touch, #endif void EvdevPostButtonEvent(InputInfoPtr pInfo, int button, enum ButtonAction act); void EvdevQueueButtonClicks(InputInfoPtr pInfo, int button, int count); -void EvdevPostRelativeMotionEvents(InputInfoPtr pInfo, int num_v, int first_v, - int v[MAX_VALUATORS]); -void EvdevPostAbsoluteMotionEvents(InputInfoPtr pInfo, int num_v, int first_v, - int v[MAX_VALUATORS]); +void EvdevPostRelativeMotionEvents(InputInfoPtr pInfo); +void EvdevPostAbsoluteMotionEvents(InputInfoPtr pInfo); unsigned int EvdevUtilButtonEventToButtonNumber(EvdevPtr pEvdev, int code); /* Middle Button emulation */ -- 1.9.3 From Eric.Brunet at lps.ens.fr Sat Sep 27 13:08:39 2014 From: Eric.Brunet at lps.ens.fr (=?ISO-8859-1?Q?=C9ric?= Brunet) Date: Sat, 27 Sep 2014 22:08:39 +0200 Subject: [PATCH evdev 2/2] Always report all valuators on absolute devices In-Reply-To: <2669033.TS2sDvUzAh@tardis.lps.ens.fr> References: <2669033.TS2sDvUzAh@tardis.lps.ens.fr> Message-ID: <3681857.aD0GxAgORh@tardis.lps.ens.fr> When dealing with a device identified as a tablet, both Qt and gtk seem to ignore the position as reported by the X server, but rather compute themselves the position from the raw valuator values (In order to achieve better precision, I imagine). This usually works well because most tablets use the wacom driver and wacom always report all the valuators at each event, even the unchanged ones. However, evdev reports only the valuators that have changed, and it is a source of problems for several programs when used with a tablet, see bugs https://bugs.freedesktop.org/show_bug.cgi?id=82250 and https://bugs.freedesktop.org/show_bug.cgi?id=82181 This patch makes evdev always report all the valuators for devices with absolute positionning, which fixes the problems I reported. Signed-off-by: ?ric Brunet --- src/evdev.c | 33 +++++++++++++++++++++++++++------ 1 file changed, 27 insertions(+), 6 deletions(-) diff --git a/src/evdev.c b/src/evdev.c index 8eb749a..9fa17b5 100644 --- a/src/evdev.c +++ b/src/evdev.c @@ -941,11 +941,26 @@ static void EvdevPostQueuedEvents(InputInfoPtr pInfo) pEvdev->queue[i].val)) break; - if (pEvdev->abs_queued && pEvdev->in_proximity) { - xf86PostButtonEvent(pInfo->dev, Absolute, pEvdev- >queue[i].detail.key, - pEvdev->queue[i].val, 0, 0); - - } else + /* + * We try to report all the valuators with the button events + * because both Qt ang gtk seem to expect them to be present + * for tablets and similar devices. In fact, the wacom driver + * always sends all the valuator, so evdev should do the same. + * + * However, we only do this if + * a) the device uses absolute values (because sending a + * relative valuator several time would be akin to moving the + * cursor twice) + * b) the device is in proximity (because we don't trust position + * otherwise) + */ + if ((pEvdev->flags & EVDEV_ABSOLUTE_EVENTS) && + !(pEvdev->flags & EVDEV_RELATIVE_MODE) && + pEvdev->in_proximity && pEvdev->vals) + xf86PostButtonEventM(pInfo->dev, Absolute, pEvdev- >queue[i].detail.key, + pEvdev->queue[i].val, pEvdev->vals); + else + /* Either relative or not in proximity */ xf86PostButtonEvent(pInfo->dev, Relative, pEvdev- >queue[i].detail.key, pEvdev->queue[i].val, 0, 0); break; @@ -993,7 +1008,13 @@ EvdevProcessSyncEvent(InputInfoPtr pInfo, struct input_event *ev) /* don't reset the touchMask */ } - if (pEvdev->vals) + /* + * Do not reset pEvdev->vals if the device uses absolute events. That + * way, all the valuators (even those that didn't change) are always + * reported + */ + if (pEvdev->vals && + (pEvdev->flags & (EVDEV_RELATIVE_EVENTS|EVDEV_RELATIVE_MODE)) ) valuator_mask_zero(pEvdev->vals); pEvdev->num_queue = 0; pEvdev->abs_queued = 0; -- 1.9.3 From wharms at bfs.de Sun Sep 28 07:54:58 2014 From: wharms at bfs.de (walter harms) Date: Sun, 28 Sep 2014 16:54:58 +0200 Subject: [PATCH libX11] xcb_io: Fix Xlib 32-bit request number issues In-Reply-To: <5426F7C5.1090006@oracle.com> References: <1411585990-6423-1-git-send-email-jnsptrsn1@gmail.com> <867g0pu4p4.fsf@hiro.keithp.com> <54268295.4030001@bfs.de> <5426F7C5.1090006@oracle.com> Message-ID: <54282142.1040703@bfs.de> Am 27.09.2014 19:45, schrieb Alan Coopersmith: > On 09/27/14 02:25 AM, walter harms wrote: >> i would suggest to branch the tree into a libX11-next (feel free to >> choose an >> other name). The linux kernel does this since some years and it seems >> working. > > We currently barely have enough developers or maintainers to sustain one > branch > of libX11, much less two. Are you volunteering to run this -next branch? > Give me a hint what "run" means. re, wh From peter.hutterer at who-t.net Sun Sep 28 16:48:25 2014 From: peter.hutterer at who-t.net (Peter Hutterer) Date: Mon, 29 Sep 2014 09:48:25 +1000 Subject: vmmouse kernel driver In-Reply-To: <54255F9F.5090906@redhat.com> References: <54228B12.30201@vmware.com> <20140926013634.GA30270@jelly.bne.redhat.com> <54251074.4050901@vmware.com> <54255F9F.5090906@redhat.com> Message-ID: <20140928234825.GA11555@jelly.redhat.com> On Fri, Sep 26, 2014 at 02:44:15PM +0200, Hans de Goede wrote: > Hi, > > On 09/26/2014 09:06 AM, Thomas Hellstrom wrote: > > Hi! > > > > On 09/26/2014 03:36 AM, Peter Hutterer wrote: > >> On Wed, Sep 24, 2014 at 11:12:50AM +0200, Thomas Hellstrom wrote: > >>> While looking at a vmmouse kernel driver, I wonder how the Xorg evdev > >>> driver can be configured to receive both absolute and relative events > >>> from the same device as the vmmouse sometimes sends absolute events and > >>> sometimes relative. Is the "IgnoreAbsoluteAxes" "False" option sufficient? > >> at the same time, or depending on the configuration? The > >> IgnoreAbsoluteAxes/IgnoreRelativeAxes options simply disable one of the two > >> on startup, allowing the other one to be initialized. that's for virtual > >> devices mostly used in VMs because our device autodetection fails there. > >> > >> So short answer: yes, should be sufficient provided you stay in that mode > >> for the lifetime of the device. > > > > Thanks for the answer. The problem is we don't. We could suddenly decide > > that apparently somebody applied a screen tranformation or is running a > > game and revert back to relative events. > > Otherwise the preferred choice is absolute events for minimal cursor > > latency. > > > > I know that for this reason the virtual USB mice are duplicated: one for > > absolute events and one for relative events but I haven't looked to > > closely at what level this actually happens. > > > > But whatever solution that emerges needs to work also with the new > > compositors. I guess I have to look at somehow make the mouse appear as > > two different ps2 mice from within the kernel driver... > > Actually one ps/2 device(mouse) which registers 2 input devices, that is > more or less quite normal for trackpoint / touchpad combo's which are > interfaced over a single ps/2 connection (some use ps/2 multiplexing, but > others both touchpad and trackpoint ps/2 packets are send over the same > ps/2 device). > > See drivers/input/mouse/alps.c for an example of this, search for "dev2" > to all the code dealing with the second device. This way you can simply > register both an absolute and a relative device, and send events out of > the right one depending on the mode. That is probably the best way to deal > with this. I agree with Hans here, if you have runtime mode changes it's best to break them out into multiple kernel devices that stay static for their lifetime. we could work around this in the X driver by changing the mode between relative/absolute when we detect the change (doable, but technically awkward right now) but the end result won't be nearly as useful as just having two devices in the first place. Cheers, Peter From axel.davy at ens.fr Sat Sep 27 14:17:13 2014 From: axel.davy at ens.fr (Axel Davy) Date: Sat, 27 Sep 2014 23:17:13 +0200 Subject: [PATCH] Fix present_pixmap when using present_notify_msc Message-ID: <1411852633-4457-1-git-send-email-axel.davy@ens.fr> Calling present_notify_msc could cancel a pending pixmap presentation. Signed-off-by: Axel Davy --- present/present.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/present/present.c b/present/present.c index e838da7..47566c7 100644 --- a/present/present.c +++ b/present/present.c @@ -767,7 +767,7 @@ present_pixmap(WindowPtr window, * in the same frame */ - if (!update) { + if (!update && pixmap) { xorg_list_for_each_entry_safe(vblank, tmp, &window_priv->vblank, window_list) { if (!vblank->pixmap) -- 1.9.1 From jstpierre at mecheye.net Sun Sep 28 18:47:02 2014 From: jstpierre at mecheye.net (Jasper St. Pierre) Date: Sun, 28 Sep 2014 19:47:02 -0600 Subject: Writing a new driver for nested Xorg servers based on Xephyr code In-Reply-To: References: Message-ID: I don't believe a driver is the correct thing to do. Xorg, in many places, assumes it's on raw hardware and does things like modesetting and VT switching, which obviously won't work in a nested environment. Additionally, I think the Xorg maintainers think that less drivers is better -- the modesetting driver was recently merged into the X server and is getting Glamor support for a great out-of-the-box experience that should work with anything that has EGL support. The input situation is similar, and is slimming down to just supporting xf86-input-libinput. Are you going to write an xf86-input-nested as well? What's the reason you're trying to turn Xorg into a nested server? On Fri, Sep 26, 2014 at 8:52 AM, La?rcio de Sousa < laerciosousa at sme-mogidascruzes.sp.gov.br> wrote: > Hi there! > > Some time ago, I've asked you about current situation of video drivers for > nested Xorg servers as an alternative to Xephyr. This is mentioned in > http://www.x.org/wiki/Releases/7.8/ > > Currently there's a project named xf86-video-nested, which is written > somehow independently from Xephyr, but seems no longer maintained. > > Now I've started playing with xf86-video-nested and Xephyr code, trying to > merge as much code as possible. It's still in an embrionary stage, so I > want to ask you some questions: > > * Is there an official position from X.Org development team about > deprecating Xephyr in favour of a driver based approach for nesting Xorg > server? Or at least let both approaches coexist (maybe moving common code > to a shared library, as I've asked you previously)? > > * In case I decide to proceed with Xephyr code merging into a video > driver, should I do it in current project xf86-video-nested, or fork a new > one (e.g. xf86-video-ephyr)? > > * I'm currently working on mapping Kdrive/Xephyr command line options to > xorg.conf options for the driver. Which Kdrive/Xephyr options are really > suitable for this mapping, and which ones are just reimplementations of > command line options already present in Xorg itself? > > I'm pushing my progress to https://github.com/oiteam/xf86-video-ephyr, if > you want to take a look. My main motivation with this project is providing > a suitable way for single-card multiseat configuration on systemd-logind > based systems, so I'm not so focused on implementing a "nested input > driver" at the moment. > > Thanks for your attention! > -- > *La?rcio de Sousa* > *Orientador de Inform?tica* > *Escola Municipal "Professor Eul?lio Gruppi"* > *Rua Ismael da Silva Mello, 559, Mogi Moderno* > *Mogi das Cruzes - SPCEP 08717-390* > Telefone: (11) 4726-8313 > > _______________________________________________ > xorg-devel at lists.x.org: X.Org development > Archives: http://lists.x.org/archives/xorg-devel > Info: http://lists.x.org/mailman/listinfo/xorg-devel > -- Jasper -------------- next part -------------- An HTML attachment was scrubbed... URL: From michel at daenzer.net Sun Sep 28 18:58:54 2014 From: michel at daenzer.net (=?windows-1252?Q?Michel_D=E4nzer?=) Date: Mon, 29 Sep 2014 10:58:54 +0900 Subject: [PATCH libX11] xcb_io: Fix Xlib 32-bit request number issues In-Reply-To: References: <1411585990-6423-1-git-send-email-jnsptrsn1@gmail.com> Message-ID: <5428BCDE.3080306@daenzer.net> On 27.09.2014 05:13, Matt Turner wrote: > On Fri, Sep 26, 2014 at 3:40 AM, Jan Smout wrote: >> Keith Packard doesn't seem very responsive (as in 'completely ignoring the >> subject') > > Perhaps you should try Ccing him? (now Cc'd) As you can see, your post as distributed by the xorg-devel list doesn't have him in Cc: either. I suspect this is because Keith has enabled 'Avoid duplicate copies of messages?' in his Mailman preferences for the list, or something along those lines. -- Earthling Michel D?nzer | http://www.amd.com Libre software enthusiast | Mesa and X developer From peter.hutterer at who-t.net Sun Sep 28 19:57:26 2014 From: peter.hutterer at who-t.net (Peter Hutterer) Date: Mon, 29 Sep 2014 12:57:26 +1000 Subject: [PATCH evdev 2/2] Always report all valuators on absolute devices In-Reply-To: <3681857.aD0GxAgORh@tardis.lps.ens.fr> References: <2669033.TS2sDvUzAh@tardis.lps.ens.fr> <3681857.aD0GxAgORh@tardis.lps.ens.fr> Message-ID: <20140929025726.GA12547@jelly.redhat.com> On Sat, Sep 27, 2014 at 10:08:39PM +0200, ?ric Brunet wrote: > When dealing with a device identified as a tablet, both Qt and gtk seem to > ignore the position as reported by the X server, but rather compute > themselves the position from the raw valuator values (In order to achieve > better precision, I imagine). This usually works well because most > tablets use the wacom driver and wacom always report all the valuators at > each event, even the unchanged ones. However, evdev reports only the > valuators that have changed, and it is a source of problems for several > programs when used with a tablet, see bugs > https://bugs.freedesktop.org/show_bug.cgi?id=82250 > and https://bugs.freedesktop.org/show_bug.cgi?id=82181 > > This patch makes evdev always report all the valuators for devices with > absolute positionning, which fixes the problems I reported. > > Signed-off-by: ?ric Brunet > --- > src/evdev.c | 33 +++++++++++++++++++++++++++------ > 1 file changed, 27 insertions(+), 6 deletions(-) > > diff --git a/src/evdev.c b/src/evdev.c > index 8eb749a..9fa17b5 100644 > --- a/src/evdev.c > +++ b/src/evdev.c > @@ -941,11 +941,26 @@ static void EvdevPostQueuedEvents(InputInfoPtr pInfo) > pEvdev->queue[i].val)) > break; > > - if (pEvdev->abs_queued && pEvdev->in_proximity) { > - xf86PostButtonEvent(pInfo->dev, Absolute, pEvdev- > >queue[i].detail.key, fwiw, please fix your email client, it mangled the patch as seen here. > - pEvdev->queue[i].val, 0, 0); > - > - } else > + /* > + * We try to report all the valuators with the button events > + * because both Qt ang gtk seem to expect them to be present > + * for tablets and similar devices. In fact, the wacom driver > + * always sends all the valuator, so evdev should do the same. > + * > + * However, we only do this if > + * a) the device uses absolute values (because sending a > + * relative valuator several time would be akin to moving > the > + * cursor twice) > + * b) the device is in proximity (because we don't trust > position > + * otherwise) > + */ > + if ((pEvdev->flags & EVDEV_ABSOLUTE_EVENTS) && > + !(pEvdev->flags & EVDEV_RELATIVE_MODE) && > + pEvdev->in_proximity && pEvdev->vals) > + xf86PostButtonEventM(pInfo->dev, Absolute, pEvdev- > >queue[i].detail.key, > + pEvdev->queue[i].val, pEvdev->vals); > + else > + /* Either relative or not in proximity */ > xf86PostButtonEvent(pInfo->dev, Relative, pEvdev- > >queue[i].detail.key, > pEvdev->queue[i].val, 0, 0); > break; > @@ -993,7 +1008,13 @@ EvdevProcessSyncEvent(InputInfoPtr pInfo, struct > input_event *ev) > /* don't reset the touchMask */ > } > > - if (pEvdev->vals) > + /* > + * Do not reset pEvdev->vals if the device uses absolute events. That > + * way, all the valuators (even those that didn't change) are always > + * reported > + */ > + if (pEvdev->vals && > + (pEvdev->flags & (EVDEV_RELATIVE_EVENTS|EVDEV_RELATIVE_MODE)) ) > valuator_mask_zero(pEvdev->vals); > pEvdev->num_queue = 0; > pEvdev->abs_queued = 0; ok, this patch looked good at first, so I applied it locally. Unfortunately, it breaks a couple of tests in XIT, specifically EvdevMixedDeviceTest.AbsXYAndRelScroll/*. http://cgit.freedesktop.org/xorg/test/xorg-integration-tests/tree/tests/input/evdev.cpp#n1925 These tests set up a device with absolute axes and scroll wheels, then post a scroll wheel event followed by a abs movement event. The variations are whether IgnoreAbsoluteAxes or IgnoreRelativeAxes is set, i.e. whether we expect the abs event to come through or not. It breaks in all cases absolute axes are not ignored (including the default case, so easy enough to test w/o config). Here's the problem: if smooth scrolling is enabled, the wheel events are set as relative valuators in the mask. so on the first wheel event, the mask is [0, 0, 1, ...], on the second wheel event the mask is [0, 0, -1, ..]. the device is in absolute mode, so the mask isn't reset after events (scroll wheels on their own don't set the device to relative, they are special). Now you get the abs x/y events and the mask is [70, 70, -1, ...]. The server interprets the -1 as another scroll event. long story short, if you ever get a scroll wheel event on those devices, you keep scrolling. That's a lot of fun, but arguably a regression :) So the mask reset needs to be a bit smarter but from a quick skim of the code it looks like that's a general problem anyway. if the REL_WHEEL is sent in the same EV_SYN frame as the ABS_X event, both rel_queued and abs_queued are set and the mask is submitted twice to the server (once as rel, once as abs mask) and we get duplicate events. So congratulations I guess: you found a bug and won the chance to fix that too ;) sorry about that. Cheers, Peter PS: first patch of this pair pushed, thanks From thellstrom at vmware.com Sun Sep 28 22:52:15 2014 From: thellstrom at vmware.com (Thomas Hellstrom) Date: Mon, 29 Sep 2014 07:52:15 +0200 Subject: vmmouse kernel driver In-Reply-To: <20140928234825.GA11555@jelly.redhat.com> References: <54228B12.30201@vmware.com> <20140926013634.GA30270@jelly.bne.redhat.com> <54251074.4050901@vmware.com> <54255F9F.5090906@redhat.com> <20140928234825.GA11555@jelly.redhat.com> Message-ID: <5428F38F.4050402@vmware.com> On 09/29/2014 01:48 AM, Peter Hutterer wrote: > On Fri, Sep 26, 2014 at 02:44:15PM +0200, Hans de Goede wrote: >> Hi, >> >> On 09/26/2014 09:06 AM, Thomas Hellstrom wrote: >>> Hi! >>> >>> On 09/26/2014 03:36 AM, Peter Hutterer wrote: >>>> On Wed, Sep 24, 2014 at 11:12:50AM +0200, Thomas Hellstrom wrote: >>>>> While looking at a vmmouse kernel driver, I wonder how the Xorg evdev >>>>> driver can be configured to receive both absolute and relative events >>>>> from the same device as the vmmouse sometimes sends absolute events and >>>>> sometimes relative. Is the "IgnoreAbsoluteAxes" "False" option sufficient? >>>> at the same time, or depending on the configuration? The >>>> IgnoreAbsoluteAxes/IgnoreRelativeAxes options simply disable one of the two >>>> on startup, allowing the other one to be initialized. that's for virtual >>>> devices mostly used in VMs because our device autodetection fails there. >>>> >>>> So short answer: yes, should be sufficient provided you stay in that mode >>>> for the lifetime of the device. >>> Thanks for the answer. The problem is we don't. We could suddenly decide >>> that apparently somebody applied a screen tranformation or is running a >>> game and revert back to relative events. >>> Otherwise the preferred choice is absolute events for minimal cursor >>> latency. >>> >>> I know that for this reason the virtual USB mice are duplicated: one for >>> absolute events and one for relative events but I haven't looked to >>> closely at what level this actually happens. >>> >>> But whatever solution that emerges needs to work also with the new >>> compositors. I guess I have to look at somehow make the mouse appear as >>> two different ps2 mice from within the kernel driver... >> Actually one ps/2 device(mouse) which registers 2 input devices, that is >> more or less quite normal for trackpoint / touchpad combo's which are >> interfaced over a single ps/2 connection (some use ps/2 multiplexing, but >> others both touchpad and trackpoint ps/2 packets are send over the same >> ps/2 device). >> >> See drivers/input/mouse/alps.c for an example of this, search for "dev2" >> to all the code dealing with the second device. This way you can simply >> register both an absolute and a relative device, and send events out of >> the right one depending on the mode. That is probably the best way to deal >> with this. > I agree with Hans here, if you have runtime mode changes it's best to break > them out into multiple kernel devices that stay static for their lifetime. > > we could work around this in the X driver by changing the mode between > relative/absolute when we detect the change (doable, but technically > awkward right now) but the end result won't be nearly as useful as just > having two devices in the first place. > > Cheers, > Peter OK, Thanks guys. I'll look through the code Hans suggested and see if I can come up with something. /Thomas > _______________________________________________ > xorg-devel at lists.x.org: X.Org development > Archives: https://urldefense.proofpoint.com/v1/url?u=http://lists.x.org/archives/xorg-devel&k=oIvRg1%2BdGAgOoM1BIlLLqw%3D%3D%0A&r=l5Ago9ekmVFZ3c4M6eauqrJWGwjf6fTb%2BP3CxbBFkVM%3D%0A&m=%2FgktOCbSuWF6940vclQaCQqv9nnDIo2RPD%2F1eHacVCM%3D%0A&s=d3b0638ac651985ce3aca4e838c863a48c16e552f5c21ffd779c496ad2dbbfaf > Info: https://urldefense.proofpoint.com/v1/url?u=http://lists.x.org/mailman/listinfo/xorg-devel&k=oIvRg1%2BdGAgOoM1BIlLLqw%3D%3D%0A&r=l5Ago9ekmVFZ3c4M6eauqrJWGwjf6fTb%2BP3CxbBFkVM%3D%0A&m=%2FgktOCbSuWF6940vclQaCQqv9nnDIo2RPD%2F1eHacVCM%3D%0A&s=b057595643a51c16de1a9da6f2d766c658d7970371778149eeee46ea742b4fa0 From consume.noise at gmail.com Sun Sep 28 22:58:45 2014 From: consume.noise at gmail.com (Daniel Martin) Date: Mon, 29 Sep 2014 07:58:45 +0200 Subject: [PATCH 3/3] xfree86: Delete file modinit.h In-Reply-To: <1411196861-26958-3-git-send-email-consume.noise@gmail.com> References: <1411196861-26958-1-git-send-email-consume.noise@gmail.com> <1411196861-26958-3-git-send-email-consume.noise@gmail.com> Message-ID: <20140929055845.GA25535@unplugged.fritz.box> On Sat, Sep 20, 2014 at 09:07:41AM +0200, Daniel Martin wrote: > All references to modinit.h have been remove with: > > a1d41e3 Move extension initialisation prototypes into extinit.h > > Signed-off-by: Daniel Martin > --- > I haven't compile-tested it, but grep told me that it is safe to remove. Anyone wants to give R-b here? It can be confirmed: $ git grep modinit doen't show any hit. > hw/xfree86/dixmods/extmod/modinit.h | 80 ------------------------------------- > 1 file changed, 80 deletions(-) > delete mode 100644 hw/xfree86/dixmods/extmod/modinit.h > > diff --git a/hw/xfree86/dixmods/extmod/modinit.h b/hw/xfree86/dixmods/extmod/modinit.h > deleted file mode 100644 > index 4c9b6e3..0000000 > --- a/hw/xfree86/dixmods/extmod/modinit.h > +++ /dev/null > @@ -1,80 +0,0 @@ > - > -#ifdef HAVE_DIX_CONFIG_H > -#include > -#endif > - > -#include > - > -#ifdef XTEST > -extern void XTestExtensionInit(void); > -#include > -#endif > - > -#if 1 > -extern void XTestExtension1Init(void); > -#endif > - > -#if 1 > -extern void XCMiscExtensionInit(void); > -#endif > - > -#ifdef SCREENSAVER > -extern void ScreenSaverExtensionInit(void); > -#include > -#endif > - > -#ifdef XF86VIDMODE > -extern void XFree86VidModeExtensionInit(void); > -#include > -#endif > - > -#ifdef XFreeXDGA > -extern void XFree86DGAExtensionInit(void); > -extern void XFree86DGARegister(void); > -#include > -#endif > - > -#ifdef DPMSExtension > -extern void DPMSExtensionInit(void); > -#include > -#endif > - > -#ifdef XV > -extern void XvExtensionInit(void); > -extern void XvMCExtensionInit(void); > -extern void XvRegister(void); > -#include > -#include > -#endif > - > -#ifdef RES > -extern void ResExtensionInit(void); > -#include > -#endif > - > -#ifdef SHM > -#include > -extern void ShmExtensionInit(void); > -extern void ShmRegisterFuncs(ScreenPtr pScreen, ShmFuncsPtr funcs); > -#endif > - > -#ifdef XSELINUX > -extern void SELinuxExtensionInit(void); > -#include "xselinux.h" > -#endif > - > -#ifdef XEVIE > -extern void XevieExtensionInit(void); > -#endif > - > -#if 1 > -extern void SecurityExtensionInit(void); > -#endif > - > -#if 1 > -extern void PanoramiXExtensionInit(void); > -#endif > - > -#if 1 > -extern void XkbExtensionInit(void); > -#endif > -- > 2.1.0 > From laerciosousa at sme-mogidascruzes.sp.gov.br Mon Sep 29 04:16:45 2014 From: laerciosousa at sme-mogidascruzes.sp.gov.br (=?UTF-8?Q?La=C3=A9rcio_de_Sousa?=) Date: Mon, 29 Sep 2014 08:16:45 -0300 Subject: Writing a new driver for nested Xorg servers based on Xephyr code In-Reply-To: References: Message-ID: > I don't believe a driver is the correct thing to do. Xorg, in many places, assumes it's on raw hardware and does things like modesetting and VT switching, which obviously won't work in a nested environment. Xorg 1.16 already avoids VT switching if it's a non-seat0 X server (i.e., if -seat option is launched with a non-seat0 value) or if HW_SKIP_CONSOLE flag is set in video driver in use. Current xf86-video-nested code already sets this flag, so I see no problem here. > Are you going to write an xf86-input-nested as well? It's not my priority. Nevertheless, current xf86-video-nested code has bultin input support, based on Xlib. > What's the reason you're trying to turn Xorg into a nested server? My main motivation is about single-GPU multiseat configuration, i.e., being able to set properly two seats using a single-GPU dual-head graphics card. Since there's no other way to launch a dedicated Xorg server for each video output of a dual-head graphics card (unless it's a dual-GPU one), my only possibility is a nested X server approach like that ones used in very first multiseat configurations several years ago (a bare X server spanning all available outputs, on top of which we start a nested X server for each output). Xephyr was often used for this approach, but it still lacks input hotplugging support, which is a major limitation for modern systemd-logind based multiseat. Moreover, with my experience in Xephyr-based multiseat setups, I feel that Xephyr was designed mainly for testing purposes, not for running a full desktop environment. On the other hand, Xorg 1.16 already has everything we need for systemd-logind based multiseat setups, so I think it's much easier to make it run nested to another X server than implementing the missing parts in Xephyr itself. Moreover, a pure-Xorg nested X server approach would make its configuration more transparent for display managers (for example, a Xephyr-based multiseat setup for GDM is currently impossible, since it doesn't allow X server command line customization). King regards, -- *La?rcio de Sousa* *Orientador de Inform?tica* *Escola Municipal "Professor Eul?lio Gruppi"* *Rua Ismael da Silva Mello, 559, Mogi Moderno* *Mogi das Cruzes - SPCEP 08717-390* Telefone: (11) 4726-8313 -------------- next part -------------- An HTML attachment was scrubbed... URL: From smout.jan at gmail.com Mon Sep 29 05:23:44 2014 From: smout.jan at gmail.com (Jan Smout) Date: Mon, 29 Sep 2014 14:23:44 +0200 Subject: [PATCH libX11] xcb_io: Fix Xlib 32-bit request number issues In-Reply-To: <867g0pu4p4.fsf@hiro.keithp.com> References: <1411585990-6423-1-git-send-email-jnsptrsn1@gmail.com> <867g0pu4p4.fsf@hiro.keithp.com> Message-ID: I also spent some time trying to assess all possible cases (with very limited knowledge on xlib internals), and I'm pretty sure Jonas has dedicated even more time than the both of us did, but that's not the issue here. I agree the patch is hard, and maybe a more satisfactory solution could be imagined by redesigning the 32-bit sequence numbers so that it aligns better with xcb, but at some point a decision needs to be taken. In that sense it *is* probably better to push the patch than to leave the current situation as is where the application program just simply crashes... On 27 September 2014 05:23, Keith Packard wrote: > Matt Turner writes: > > > On Fri, Sep 26, 2014 at 3:40 AM, Jan Smout wrote: > >> Keith Packard doesn't seem very responsive (as in 'completely ignoring > the > >> subject') > > > > Perhaps you should try Ccing him? (now Cc'd) > > The problem is that reviewing this patch is *really hard*. The last > time, I think I spent a solid couple of days thinking about this and > making sure I'd caught all of the cases. I'm still not sure it's right, > but I guess it's probably better than what we have? > > -- > keith.packard at intel.com > -- Life is complex, it has a real part and an imaginary part. -------------- next part -------------- An HTML attachment was scrubbed... URL: From daniel at fooishbar.org Mon Sep 29 08:54:38 2014 From: daniel at fooishbar.org (Daniel Stone) Date: Mon, 29 Sep 2014 16:54:38 +0100 Subject: [PATCH 08/19] xfree86: Remove xv clip notify driver hook In-Reply-To: <87k34rtjjt.fsf@eliezer.anholt.net> References: <1411666655-1089-1-git-send-email-ajax@redhat.com> <1411666655-1089-9-git-send-email-ajax@redhat.com> <87k34rtjjt.fsf@eliezer.anholt.net> Message-ID: I originally added this for the N8xx devices, where you could choose between a fast overlay which avoided bashing L3 on scanout but could only do a single scaled rect, or a slow internal one which hit L3 and couldn't do a full screen update in a single vblank-to-vblank period, but could do colourkeying. Since no-one else has made such hardware purchasing (and/or life, having written that DDX support): Reviewed-by: Daniel Stone -d On 25 September 2014 23:35, Eric Anholt wrote: > Adam Jackson writes: > > > Nothing's using it. > > Reviewed-by: Eric Anholt > > _______________________________________________ > xorg-devel at lists.x.org: X.Org development > Archives: http://lists.x.org/archives/xorg-devel > Info: http://lists.x.org/mailman/listinfo/xorg-devel > -------------- next part -------------- An HTML attachment was scrubbed... URL: From keithp at keithp.com Mon Sep 29 13:02:42 2014 From: keithp at keithp.com (Keith Packard) Date: Mon, 29 Sep 2014 13:02:42 -0700 Subject: [PATCH] glamor: Fix leak of converted_bits in _glamor_upload_bits_to_pixmap_texture In-Reply-To: <8738bgn4zp.fsf@eliezer.anholt.net> References: <1411544890-20372-1-git-send-email-michel@daenzer.net> <8738bgn4zp.fsf@eliezer.anholt.net> Message-ID: <86r3yuqjod.fsf@hiro.keithp.com> Eric Anholt writes: >> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=84176 >> Signed-off-by: Michel D?nzer > > Reviewed-by: Eric Anholt Merged. cc59be3..6e50bfa master -> master -- keith.packard at intel.com -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 810 bytes Desc: not available URL: From keithp at keithp.com Mon Sep 29 13:07:00 2014 From: keithp at keithp.com (Keith Packard) Date: Mon, 29 Sep 2014 13:07:00 -0700 Subject: [PULL] hw/xwin X11 <-> Windows clipboard integration refactoring In-Reply-To: <20140924141240.GA5712@tambora> References: <20140924141240.GA5712@tambora> Message-ID: <86oatyqjh7.fsf@hiro.keithp.com> Jon TURNEY writes: > Jon TURNEY (30): > hw/xwin: Remove left-over pthread_exit() in clipboard code > hw/xwin: Push winClipboardShutdown() into winclipboardinit.c > hw/xwin: Hoist clipboard thread restart up one level > hw/xwin: winProcEstablishConnection doesn't need to check if clipboard started > hw/xwin: Hoist setting of g_fClipboardStarted flag up one level > hw/xwin: Remove g_fClipboardLaunched, it's value is identical to g_fClipboardStarted > hw/xwin: Remove SetSelectionOwner wrapper, use XFixesSetSelectionOwnerNotify event instead > hw/xwin: Move winClipboardCreateMessagingWindow() to winclipboardthread.c > hw/xwin: Eliminate g_pClipboardDisplay and g_iClipboardWindow globals > hw/xwin: Hoist use of winSetAuthorization() and winGetDisplayName() up one level > hw/xwin: Add remaining clipboard globals to winglobals.h > hw/xwin: Make g_hwndClipboard static > hw/xwin: Move clipboard integration code down to a subdirectory > hw/xwin: Return a shutdown flag from winClipboardProc() if we should stop trying > hw/xwin: Separate libwinclipboard interface and internal header files > hw/xwin: Add fUseUnicode as parameter to winClipboardProc() > hw/xwin: Look up atoms in winClipboardProc() > hw/xwin: Changes in error logging to make libwinclipboard more useful as a library > hw/xwin: Add xwinclip test client > hw/xwin: Remove standard includes from internal.h and add them where needed > hw/xwin: Remove unused X includes from internal.h and add them where needed > hw/xwin: Use header for prototypes in textconv.c > hw/xwin: Move WIN_MSG_QUEUE_FNAME to where it's used > hw/xwin: Remove setjmp()/longjmp() error constants > hw/xwin: Improve comment about why we can't XCloseDisplay() > hw/xwin: Remove XOpenDisplay() retry code > hw/xwin: In clipboard function prototypes, use Window type, not int type > hw/xwin: Add a basic manpage for xwinclip > hw/xwin: Only add to XSetIOErrorHandler() handler chain once > hw/xwin: Undefine _XSERVER64 in hw/xwin/winclipboard Merged. 6e50bfa..78c27d1 master -> master -- keith.packard at intel.com -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 810 bytes Desc: not available URL: From keithp at keithp.com Mon Sep 29 13:17:33 2014 From: keithp at keithp.com (Keith Packard) Date: Mon, 29 Sep 2014 13:17:33 -0700 Subject: [PATCH] xinerama: Implement graphics exposures for window->pixmap copies (v2) In-Reply-To: <1411668700-2939-1-git-send-email-ajax@redhat.com> References: <1411595007-18884-1-git-send-email-ajax@redhat.com> <1411668700-2939-1-git-send-email-ajax@redhat.com> Message-ID: <86k34mqizm.fsf@hiro.keithp.com> Adam Jackson writes: > + if (pGC->graphicsExposures) { > + RegionRec rgn; > + int dx, dy; > + > + /* create region for source box */ > + BoxRec sourceBox = { srcx, srcy, srcx + width, srcy + height }; Would be nice to have named member initializers here... > + RegionInit(&rgn, &sourceBox, 1); > + > + dx = drawables[0]->x; > + dy = drawables[0]->y; > + if (srcIsRoot) { > + dx += screenInfo.screens[0]->x; > + dy += screenInfo.screens[0]->y; > + } Are you sure you don't need this for every window? I thought every window on each panoramiX screen was offset within the screen. > + > + /* translate from source-relative to screen */ > + RegionTranslate(&rgn, dx, dy); You could just create sourceBox with the right coordinates here. Just sayin' -- keith.packard at intel.com -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 810 bytes Desc: not available URL: From keithp at keithp.com Mon Sep 29 13:22:36 2014 From: keithp at keithp.com (Keith Packard) Date: Mon, 29 Sep 2014 13:22:36 -0700 Subject: [PATCH] glamor: Use GL_STREAM_READ also for read/write access to a PBO In-Reply-To: <87h9zvcykf.fsf@eliezer.anholt.net> References: <1411626442-14411-1-git-send-email-michel@daenzer.net> <87h9zvcykf.fsf@eliezer.anholt.net> Message-ID: <86h9zqqir7.fsf@hiro.keithp.com> Eric Anholt writes: > Michel D?nzer writes: > >> From: Michel D?nzer >> >> Otherwise the CPU may end up reading from non-cacheable memory, which is >> very slow. >> >> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=84178 >> Signed-off-by: Michel D?nzer > > Reviewed-by: Eric Anholt Merged. 78c27d1..d3d845c master -> master -- keith.packard at intel.com -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 810 bytes Desc: not available URL: From keithp at keithp.com Mon Sep 29 13:25:43 2014 From: keithp at keithp.com (Keith Packard) Date: Mon, 29 Sep 2014 13:25:43 -0700 Subject: [PATCH 01/19] damageext: dixLookupDrawable(M_WINDOW) -> dixLookupWindow In-Reply-To: <1411666655-1089-2-git-send-email-ajax@redhat.com> References: <1411666655-1089-1-git-send-email-ajax@redhat.com> <1411666655-1089-2-git-send-email-ajax@redhat.com> Message-ID: <86eguuqim0.fsf@hiro.keithp.com> Adam Jackson writes: > Signed-off-by: Adam Jackson > --- > damageext/damageext.c | 5 ++--- > 1 file changed, 2 insertions(+), 3 deletions(-) > > diff --git a/damageext/damageext.c b/damageext/damageext.c > index 886f56d..4928379 100644 > --- a/damageext/damageext.c > +++ b/damageext/damageext.c > @@ -687,9 +687,8 @@ PanoramiXDamageCreate(ClientPtr client) > rc = BadAlloc; > } else { > damage->damage[i] = pDamage; > - rc = dixLookupDrawable(&pDrawable, draw->info[i].id, client, > - M_WINDOW, > - DixGetAttrAccess | DixReadAccess); > + rc = dixLookupWindow((WindowPtr *)&pDrawable, draw->info[i].id, > + client, DixGetAttrAccess | DixReadAccess); This does change the error code from BadMatch to BadWindow, if the object isn't found. Given that this is a Drawable on the wire, we should leave this alone, even though an error here would indicate a bug in the xinerama code. -- keith.packard at intel.com -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 810 bytes Desc: not available URL: From keithp at keithp.com Mon Sep 29 13:26:12 2014 From: keithp at keithp.com (Keith Packard) Date: Mon, 29 Sep 2014 13:26:12 -0700 Subject: [PATCH 02/19] exa, kdrive: Remove redundant BitsPerPixel macros In-Reply-To: <1411666655-1089-3-git-send-email-ajax@redhat.com> References: <1411666655-1089-1-git-send-email-ajax@redhat.com> <1411666655-1089-3-git-send-email-ajax@redhat.com> Message-ID: <86bnpyqil7.fsf@hiro.keithp.com> Adam Jackson writes: > We already get this from servermd.h Reviewed-by: Keith Packard -- keith.packard at intel.com -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 810 bytes Desc: not available URL: From keithp at keithp.com Mon Sep 29 13:27:22 2014 From: keithp at keithp.com (Keith Packard) Date: Mon, 29 Sep 2014 13:27:22 -0700 Subject: [PATCH 03/19] input: Remove unused SetKeySymsMap In-Reply-To: <1411666655-1089-4-git-send-email-ajax@redhat.com> References: <1411666655-1089-1-git-send-email-ajax@redhat.com> <1411666655-1089-4-git-send-email-ajax@redhat.com> Message-ID: <868ul2qij9.fsf@hiro.keithp.com> Adam Jackson writes: > Signed-off-by: Adam Jackson What the heck was this ever used for? Reviewed-by: Keith Packard -- keith.packard at intel.com -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 810 bytes Desc: not available URL: From keithp at keithp.com Mon Sep 29 13:29:13 2014 From: keithp at keithp.com (Keith Packard) Date: Mon, 29 Sep 2014 13:29:13 -0700 Subject: [PATCH 05/19] loader: Remove some baklava code In-Reply-To: <1411666655-1089-6-git-send-email-ajax@redhat.com> References: <1411666655-1089-1-git-send-email-ajax@redhat.com> <1411666655-1089-6-git-send-email-ajax@redhat.com> Message-ID: <8661g6qig6.fsf@hiro.keithp.com> Adam Jackson writes: > Signed-off-by: Adam Jackson Reviewed-by: Keith Packard -- keith.packard at intel.com -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 810 bytes Desc: not available URL: From keithp at keithp.com Mon Sep 29 13:29:51 2014 From: keithp at keithp.com (Keith Packard) Date: Mon, 29 Sep 2014 13:29:51 -0700 Subject: [PATCH 06/19] mi: Remove Windows 8-bpp colormap compatibility In-Reply-To: <1411666655-1089-7-git-send-email-ajax@redhat.com> References: <1411666655-1089-1-git-send-email-ajax@redhat.com> <1411666655-1089-7-git-send-email-ajax@redhat.com> Message-ID: <8638baqif4.fsf@hiro.keithp.com> Adam Jackson writes: > Nice, but not something our Windows servers build, and not something > that belongs in mi anyway. Reviewed-by: Keith Packard -- keith.packard at intel.com -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 810 bytes Desc: not available URL: From keithp at keithp.com Mon Sep 29 13:31:31 2014 From: keithp at keithp.com (Keith Packard) Date: Mon, 29 Sep 2014 13:31:31 -0700 Subject: [PATCH 07/19] vfb: Don't reimplement micmap so much In-Reply-To: <1411666655-1089-8-git-send-email-ajax@redhat.com> References: <1411666655-1089-1-git-send-email-ajax@redhat.com> <1411666655-1089-8-git-send-email-ajax@redhat.com> Message-ID: <86zjdip3rw.fsf@hiro.keithp.com> Adam Jackson writes: > We know we're atop fb which is atop micmap, the only thing we need to > hook is InstallColormap to handle the xwd colormap change. > > Signed-off-by: Adam Jackson Reviewed-by: Keith Packard -- keith.packard at intel.com -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 810 bytes Desc: not available URL: From keithp at keithp.com Mon Sep 29 13:33:23 2014 From: keithp at keithp.com (Keith Packard) Date: Mon, 29 Sep 2014 13:33:23 -0700 Subject: [PATCH 09/19] xfree86: Remove some can't-happen printf from xf86CreateRootWindow In-Reply-To: <1411666655-1089-10-git-send-email-ajax@redhat.com> References: <1411666655-1089-1-git-send-email-ajax@redhat.com> <1411666655-1089-10-git-send-email-ajax@redhat.com> Message-ID: <86wq8mp3os.fsf@hiro.keithp.com> Adam Jackson writes: > Signed-off-by: Adam Jackson Reviewed-by: Keith Packard -- keith.packard at intel.com -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 810 bytes Desc: not available URL: From keithp at keithp.com Mon Sep 29 13:36:50 2014 From: keithp at keithp.com (Keith Packard) Date: Mon, 29 Sep 2014 13:36:50 -0700 Subject: [PATCH 12/19] xfree86: Remove useless back-pointer to pScrn from colormap code In-Reply-To: <1411666655-1089-13-git-send-email-ajax@redhat.com> References: <1411666655-1089-1-git-send-email-ajax@redhat.com> <1411666655-1089-13-git-send-email-ajax@redhat.com> Message-ID: <86tx3qp3j1.fsf@hiro.keithp.com> Adam Jackson writes: > Signed-off-by: Adam Jackson > --- > hw/xfree86/common/xf86cmap.c | 46 +++++++++++++++++++------------------------- > 1 file changed, 20 insertions(+), 26 deletions(-) > > diff --git a/hw/xfree86/common/xf86cmap.c b/hw/xfree86/common/xf86cmap.c > index 3f9c880..c4bae56 100644 > --- a/hw/xfree86/common/xf86cmap.c > +++ b/hw/xfree86/common/xf86cmap.c > @@ -74,7 +74,6 @@ typedef struct _CMapLink { > } CMapLink, *CMapLinkPtr; > > typedef struct { > - ScrnInfoPtr pScrn; > CloseScreenProcPtr CloseScreen; > CreateColormapProcPtr CreateColormap; > DestroyColormapProcPtr DestroyColormap; > @@ -123,7 +122,7 @@ static int CMapSetDGAMode(ScrnInfoPtr, int, DGADevicePtr); > #endif > static int CMapChangeGamma(ScrnInfoPtr, Gamma); > > -static void ComputeGamma(CMapScreenPtr); > +static void ComputeGamma(ScrnInfoPtr, CMapScreenPtr); > static Bool CMapAllocateColormapPrivate(ColormapPtr); > static void CMapRefreshColors(ColormapPtr, int, int *); > static void CMapSetOverscan(ColormapPtr, int, int *); > @@ -194,7 +193,6 @@ xf86HandleColormaps(ScreenPtr pScreen, > pScreen->InstallColormap = CMapInstallColormap; > pScreen->StoreColors = CMapStoreColors; > > - pScreenPriv->pScrn = pScrn; > pScrn->LoadPalette = loadPalette; > pScrn->SetOverscan = setOverscan; > pScreenPriv->maxColors = maxColors; > @@ -221,7 +219,7 @@ xf86HandleColormaps(ScreenPtr pScreen, > #endif > pScrn->ChangeGamma = CMapChangeGamma; > > - ComputeGamma(pScreenPriv); > + ComputeGamma(pScrn, pScreenPriv); I would have gone one further and not passed pScreenPriv here as it's referenced (indirectly) from pScrn, of course. But, that's probably just me. Reviewed-by: Keith Packard -- keith.packard at intel.com -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 810 bytes Desc: not available URL: From keithp at keithp.com Mon Sep 29 13:49:22 2014 From: keithp at keithp.com (Keith Packard) Date: Mon, 29 Sep 2014 13:49:22 -0700 Subject: [PATCH 18/19] xfree86: Remove driver entity hooks and private In-Reply-To: <201409252125.s8PLPPSe028925@glazunov.sibelius.xs4all.nl> References: <1411666655-1089-1-git-send-email-ajax@redhat.com> <1411666655-1089-19-git-send-email-ajax@redhat.com> <201409252125.s8PLPPSe028925@glazunov.sibelius.xs4all.nl> Message-ID: <86ppeep2y5.fsf@hiro.keithp.com> Mark Kettenis writes: >> From: Adam Jackson >> Date: Thu, 25 Sep 2014 13:37:34 -0400 >> >> No driver is using these, as far as I know. > > The xf86-video-mga driver uses these, but only if DISABLE_VGA_IO is > defined, and by default it isn't, and there is no configure option to > turn it on. > > I'm a bit worried about silently ignoring the arguments passed to > xf86ConfigFbEntity* and xf86ConfigPciEntity*. Perhaps throw a fatal > error if any of the function pointers is non-NULL? I'd rather just change the API to eliminate these pointers; every single driver will then have to review the change and make sure it's correct. -- keith.packard at intel.com -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 810 bytes Desc: not available URL: From keithp at keithp.com Mon Sep 29 13:52:45 2014 From: keithp at keithp.com (Keith Packard) Date: Mon, 29 Sep 2014 13:52:45 -0700 Subject: [PATCH 19/19] x86emu: Undefine _NO_INLINE In-Reply-To: <201409252133.s8PLX5T6029560@glazunov.sibelius.xs4all.nl> References: <1411666655-1089-1-git-send-email-ajax@redhat.com> <1411666655-1089-20-git-send-email-ajax@redhat.com> <201409252133.s8PLX5T6029560@glazunov.sibelius.xs4all.nl> Message-ID: <86mw9ip2si.fsf@hiro.keithp.com> Mark Kettenis writes: >> From: Adam Jackson >> Date: Thu, 25 Sep 2014 13:37:35 -0400 >> >> Never defined by the server. > > Fairly certain it was never intended to be defined by the server, but > used as a compile-time option to make debugging easier. Yeah, when people were careful about using inline and not just leaving them in the header file to be compiled static everywhere. However, at this point, I'm pretty sure the server won't compile without inline, so we shouldn't keep this pretense. Reviewed-by: Keith Packard (won't merge until everyone is satisfied with the patch though). -- keith.packard at intel.com -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 810 bytes Desc: not available URL: From Eric.Brunet at lps.ens.fr Mon Sep 29 13:57:01 2014 From: Eric.Brunet at lps.ens.fr (=?ISO-8859-1?Q?=C9ric?= Brunet) Date: Mon, 29 Sep 2014 22:57:01 +0200 Subject: [PATCH evdev 2/2] Always report all valuators on absolute devices In-Reply-To: <20140929025726.GA12547@jelly.redhat.com> References: <2669033.TS2sDvUzAh@tardis.lps.ens.fr> <3681857.aD0GxAgORh@tardis.lps.ens.fr> <20140929025726.GA12547@jelly.redhat.com> Message-ID: <1518314.CeD1i2y0rZ@tardis.lps.ens.fr> Hi! > ok, this patch looked good at first, so I applied it locally. > Unfortunately, it breaks a couple of tests in XIT, specifically > EvdevMixedDeviceTest.AbsXYAndRelScroll/*. > > [...] Ouch... I am summarizing, to be sure I understood: a) sometimes, a device marked as "Absolute" can have in its pEvdev->vals some relative information. b) that relative information must not be submitted several times. With my patch, as the valuator is not cleared, it keeps being resubmitted c) without my patch, if within the same frame ABS and REL events are both submitted, they will be posted to the Xserver twice, one has relative motion (which will make the cursor jumps a lot as absolute x/y will be interpreted as relative) and then as an Absolute motion (which will interpret in a weird way the relative information). That's new bug 84445. I found an extra problem with my patch: d) EvdevSwapAbsValuators and EvdevApplyCalibration are called when processing SYN events on the values stored in pEvdev->vals. If I keep values from the previous SYN, the transformations (invert, swap, ...) will be applied to some already transformed values ! Solving point b) is relatively easy, I think: I just need to special case the smoothwheel axes and make a special point of erasing them from the vald at the end of each SYN event. An alternative would be to always erase pEvdev->vals unless the device is a tablet (no wheel on them, I hope!) Point d) could be fixed by applying transformations (Calibration and SwapAbsValuators) when the event itself is received, rather than late in the game. It might actually make the code simpler, too, especially with Swapping. Is there any good reason to apply transformations so late in the game? On a related point, I have just noticed a problem with EVDEV_RELATIVE_MODE: in EvdevProcessValuators, abs values are converted into rel values, and then pEvdev->abs_queued is set to 0. However, it could happen that, say, a pressure information has been sent within the same frame and weird things would happen. Solving point c) seems more difficult. The way I see it would be to * split pEvdev->vals into pEvdev->abs_vals and pEvdev->rel_vals * pEvdev->abs_vals only contains the last accurate information on the device. All transformations (Swap, Invert, Calibration) have already been applied. It is never erased. In particular, it makes pEvdev->prox useless (with my patch as it is, I think pEvdev->prox is close to be useless, no?). * pEvdev->rel_vals is erased at each SYN event * when receiving an ABS value, transformation are applied at once, and if in EVDEV_RELATIVE_MODE, the delta is computed at once (and stored in rel_vals ? What do you think, is this the way to go? I might try to start working a little bit on this, but I cannot promise to carry out this till the end as it would mean understanding very well the code... All the parts about multitouch are very mysterious to me still. Cheers, ?ric From kettenis at openbsd.org Mon Sep 29 14:14:51 2014 From: kettenis at openbsd.org (Mark Kettenis) Date: Mon, 29 Sep 2014 23:14:51 +0200 Subject: [PATCH pciaccess] Use PCIOCREADMASK on OpenBSD. Message-ID: <1412025291-24540-1-git-send-email-kettenis@openbsd.org> If the machdep.allowaperture sysctl(8) variable is set to 0, writing to PCI config space is not allowed. So instead of writing 0xffffffff to the BARs in order to determine their size, use the PCIOCREADMASK ioctl(2) which returns the mask of changeable bits that was saved by the kernel when the devices was initially probed. Reviewed-by: Matthieu Herrb Signed-off-by: Mark Kettenis --- Given that Matthieu already reviewed this diff, I'll push it in a couple of days unless somebody speaks up. src/openbsd_pci.c | 31 +++++++++++++++++++++++++------ 1 file changed, 25 insertions(+), 6 deletions(-) diff --git a/src/openbsd_pci.c b/src/openbsd_pci.c index fe034f3..4d1b5cd 100644 --- a/src/openbsd_pci.c +++ b/src/openbsd_pci.c @@ -81,6 +81,29 @@ pci_write(int domain, int bus, int dev, int func, uint32_t reg, uint32_t val) return ioctl(pcifd[domain], PCIOCWRITE, &io); } +static int +pci_readmask(int domain, int bus, int dev, int func, uint32_t reg, + uint32_t *val) +{ + struct pci_io io; + int err; + + bzero(&io, sizeof(io)); + io.pi_sel.pc_bus = bus; + io.pi_sel.pc_dev = dev; + io.pi_sel.pc_func = func; + io.pi_reg = reg; + io.pi_width = 4; + + err = ioctl(pcifd[domain], PCIOCREADMASK, &io); + if (err) + return (err); + + *val = io.pi_data; + + return 0; +} + /** * Read a VGA ROM * @@ -328,11 +351,9 @@ pci_device_openbsd_probe(struct pci_device *device) return err; /* Probe the size of the region. */ - err = pci_write(domain, bus, dev, func, bar, ~0); + err = pci_readmask(domain, bus, dev, func, bar, &size); if (err) return err; - pci_read(domain, bus, dev, func, bar, &size); - pci_write(domain, bus, dev, func, bar, reg); if (PCI_MAPREG_TYPE(reg) == PCI_MAPREG_TYPE_IO) { region->is_IO = 1; @@ -360,11 +381,9 @@ pci_device_openbsd_probe(struct pci_device *device) return err; reg64 |= (uint64_t)reg << 32; - err = pci_write(domain, bus, dev, func, bar, ~0); + err = pci_readmask(domain, bus, dev, func, bar, &size); if (err) return err; - pci_read(domain, bus, dev, func, bar, &size); - pci_write(domain, bus, dev, func, bar, reg64 >> 32); size64 |= (uint64_t)size << 32; region->base_addr = PCI_MAPREG_MEM64_ADDR(reg64); -- 2.1.0 From daniel at fooishbar.org Mon Sep 29 15:55:24 2014 From: daniel at fooishbar.org (Daniel Stone) Date: Mon, 29 Sep 2014 23:55:24 +0100 Subject: [PATCH 03/19] input: Remove unused SetKeySymsMap In-Reply-To: <868ul2qij9.fsf@hiro.keithp.com> References: <1411666655-1089-1-git-send-email-ajax@redhat.com> <1411666655-1089-4-git-send-email-ajax@redhat.com> <868ul2qij9.fsf@hiro.keithp.com> Message-ID: Hi, On 29 September 2014 21:27, Keith Packard wrote: > Adam Jackson writes: > > Signed-off-by: Adam Jackson > > What the heck was this ever used for? > It was a helper function from back when we kept a copy of the core keymap _and_ the XKB keymap, and meticulously kept them both in sync. That was a terrible idea, so we no longer do that. Reviewed-by: Daniel Stone Cheers, Daniel -------------- next part -------------- An HTML attachment was scrubbed... URL: From linuxhippy at gmail.com Tue Sep 30 02:36:59 2014 From: linuxhippy at gmail.com (Clemens Eisserer) Date: Tue, 30 Sep 2014 11:36:59 +0200 Subject: [PATCH renderproto] Add floating point transforms In-Reply-To: <20140822081637.33bd0c7c@i7> References: <1408118118-28947-1-git-send-email-keithp@keithp.com> <20140822081637.33bd0c7c@i7> Message-ID: Hi Siarhei, > * Who are the expected users of this new functionality and what are > the practical advantages for them? Preferably something measurable > and easy to confirm. > > * Are you expecting the existing applications/toolkits to eventually > switch from the 16.16 fixed point format to the single precision > floating point format? Or is it only intended to be used by a few > selected tools, such as xrandr? At least I intend to use it for the Java2D xrender pipeline, therefore almost all graphical java programs will benefit from this (and I guess it won't take too long until it is exposed by Cairo too). Br, Clemens From hdegoede at redhat.com Tue Sep 30 05:10:36 2014 From: hdegoede at redhat.com (Hans de Goede) Date: Tue, 30 Sep 2014 14:10:36 +0200 Subject: [PATCH evdev 2/2] Always report all valuators on absolute devices In-Reply-To: <1518314.CeD1i2y0rZ@tardis.lps.ens.fr> References: <2669033.TS2sDvUzAh@tardis.lps.ens.fr> <3681857.aD0GxAgORh@tardis.lps.ens.fr> <20140929025726.GA12547@jelly.redhat.com> <1518314.CeD1i2y0rZ@tardis.lps.ens.fr> Message-ID: <542A9DBC.8060604@redhat.com> Hi ?ric On 09/29/2014 10:57 PM, ?ric Brunet wrote: > Hi! > >> ok, this patch looked good at first, so I applied it locally. >> Unfortunately, it breaks a couple of tests in XIT, specifically >> EvdevMixedDeviceTest.AbsXYAndRelScroll/*. >> >> [...] > > Ouch... I am summarizing, to be sure I understood: Note not sure if Peter mentioned this in his last email, but Peter is currently traveling with limited internet-access, so it may be a while before he responds to this. As for comments on your detailed analysis, I'll leave that to Peter. Regards, Hans From jon.turney at dronecode.org.uk Tue Sep 30 06:09:08 2014 From: jon.turney at dronecode.org.uk (Jon TURNEY) Date: Tue, 30 Sep 2014 14:09:08 +0100 Subject: [PATCH 0/2] configure.ac fixes for cygwin Message-ID: <1412082550-7192-1-git-send-email-jon.turney@dronecode.org.uk> A couple of configure.ac fixes for cygwin Jon TURNEY (2): configure.ac: Avoid "Your OS is unknown" warning when configuring for Cygwin configure.ac: Force --disable-libdrm on Cygwin configure.ac | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) -- 2.1.1 From jon.turney at dronecode.org.uk Tue Sep 30 06:09:09 2014 From: jon.turney at dronecode.org.uk (Jon TURNEY) Date: Tue, 30 Sep 2014 14:09:09 +0100 Subject: [PATCH 1/2] configure.ac: Avoid "Your OS is unknown" warning when configuring for Cygwin In-Reply-To: <1412082550-7192-1-git-send-email-jon.turney@dronecode.org.uk> References: <1412082550-7192-1-git-send-email-jon.turney@dronecode.org.uk> Message-ID: <1412082550-7192-2-git-send-email-jon.turney@dronecode.org.uk> Don't emit "Your OS is unknown" warning when configuring with --enable-xorg to build the XOrg DDX for Cygwin. The list of supported OSes is getting a bit unwieldy, so just remove it. Signed-off-by: Jon TURNEY --- configure.ac | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac index 30c0c5c..ee2321e 100644 --- a/configure.ac +++ b/configure.ac @@ -1991,11 +1991,13 @@ if test "x$XORG" = xyes; then gnu*) XORG_OS_SUBDIR="hurd" ;; + cygwin*) + XORG_OS_SUBDIR="stub" + ;; *) XORG_OS_SUBDIR="stub" AC_MSG_NOTICE([m4_text_wrap(m4_join([ ], - [Your OS is unknown. Xorg currently only supports Linux,], - [Free/Open/Net/DragonFlyBSD, Solaris/OpenSolaris, & GNU Hurd.], + [Your OS is unknown.], [If you are interested in porting Xorg to your platform,], [please email xorg at lists.freedesktop.org.]))]) ;; -- 2.1.1 From jon.turney at dronecode.org.uk Tue Sep 30 06:09:10 2014 From: jon.turney at dronecode.org.uk (Jon TURNEY) Date: Tue, 30 Sep 2014 14:09:10 +0100 Subject: [PATCH 2/2] configure.ac: Force --disable-libdrm on Cygwin In-Reply-To: <1412082550-7192-1-git-send-email-jon.turney@dronecode.org.uk> References: <1412082550-7192-1-git-send-email-jon.turney@dronecode.org.uk> Message-ID: <1412082550-7192-3-git-send-email-jon.turney@dronecode.org.uk> This is now needed to avoid trying to build the modesetting driver by default when building the Xorg DDX on Cygwin. http://tinderbox.x.org/builds/2014-09-18-0011/logs/xserver/#build Signed-off-by: Jon TURNEY --- configure.ac | 1 + 1 file changed, 1 insertion(+) diff --git a/configure.ac b/configure.ac index ee2321e..e9eeed3 100644 --- a/configure.ac +++ b/configure.ac @@ -696,6 +696,7 @@ case $host_os in CONFIG_UDEV=no CONFIG_UDEV_KMS=no DGA=no + DRM=no DRI2=no DRI3=no INT10MODULE=no -- 2.1.1 From ajax at redhat.com Tue Sep 30 08:53:07 2014 From: ajax at redhat.com (Adam Jackson) Date: Tue, 30 Sep 2014 11:53:07 -0400 Subject: [PATCH 18/19] xfree86: Remove driver entity hooks and private In-Reply-To: <86ppeep2y5.fsf@hiro.keithp.com> References: <1411666655-1089-1-git-send-email-ajax@redhat.com> <1411666655-1089-19-git-send-email-ajax@redhat.com> <201409252125.s8PLPPSe028925@glazunov.sibelius.xs4all.nl> <86ppeep2y5.fsf@hiro.keithp.com> Message-ID: <1412092387.2407.18.camel@dmt> On Mon, 2014-09-29 at 13:49 -0700, Keith Packard wrote: > Mark Kettenis writes: > > >> From: Adam Jackson > >> Date: Thu, 25 Sep 2014 13:37:34 -0400 > >> > >> No driver is using these, as far as I know. > > > > The xf86-video-mga driver uses these, but only if DISABLE_VGA_IO is > > defined, and by default it isn't, and there is no configure option to > > turn it on. > > > > I'm a bit worried about silently ignoring the arguments passed to > > xf86ConfigFbEntity* and xf86ConfigPciEntity*. Perhaps throw a fatal > > error if any of the function pointers is non-NULL? > > I'd rather just change the API to eliminate these pointers; every single > driver will then have to review the change and make sure it's correct. "Every single driver" here actually meaning "the guy pushing the change", but sure, I can do that. Can we consider coming up with a heuristic for the oldest server version that current git versions of drivers will continue to support? The amount of #ifdef in the drivers is getting a bit absurd, and it's a bit disingenuous to pretend our support goes back as far as we currently let build. - ajax From drinkcat at chromium.org Tue Sep 30 15:10:16 2014 From: drinkcat at chromium.org (Nicolas Boichat) Date: Tue, 30 Sep 2014 15:10:16 -0700 Subject: xorg-server-dummy: cannot add additional xrandr mode (xrandr: Configure crtc 0 failed) In-Reply-To: References: Message-ID: Hi all, I investigated a bit more with gdb, and I noticed that the error happens at randr/rrcrtc.c:519: RRCrtcSet fails at ret = (*pScrPriv->rrCrtcSet) (pScreen, crtc, mode, x, y, rotation, numOutputs, outputs); This calls xf86RandRSetConfig in hw/xfree86/common/xf86RandR.c, but the new mode is not in scrp->modes. Does the driver need to do something special to add new custom modes to scrp->modes? Any pointer would be greatly appreciated... Thanks, Nicolas On Fri, Sep 19, 2014 at 4:18 PM, Nicolas Boichat wrote: > Hi, > > I'm running a dummy X11 server (Xorg 1.15.1 on Ubuntu 14.04), using > the configuration attached. > > I am able to change resolution using xrandr, as long as I use the ones > that are setup when the server is started (either the default ones, or > the ones I add in the Monitor section). > > I'd like to be able to add new arbitrary resolutions using output from > gtf, but this fails: > # xrandr --newmode 800x632_60.00 40.24 800 832 912 1024 632 633 636 > 655 -HSync +Vsync > # xrandr --addmode default 800x632_60.00 > xrandr: Failed to get size of gamma for output default > (I guess this is harmless: the mode is added) > # xrandr --output default --mode 800x632_60.00 --verbose > xrandr: Failed to get size of gamma for output default > crtc 0: disable > screen 0: 800x632 211x167 mm 96.09dpi > crtc 0: 800x632_60.00 60.0 +0+0 "default" > xrandr: Configure crtc 0 failed > crtc 0: disable > screen 0: revert > crtc 0: revert > > A similar method works fine with intel drivers. > > Any idea if this is supposed to work, or if I am doing something > wrong? Or is this something that the dummy driver does not support? > > Thanks a lot for your help, > > Best regards, > > Nicolas From keithp at keithp.com Tue Sep 30 16:12:31 2014 From: keithp at keithp.com (Keith Packard) Date: Tue, 30 Sep 2014 16:12:31 -0700 Subject: [PATCH] Fix present_pixmap when using present_notify_msc In-Reply-To: <1411852633-4457-1-git-send-email-axel.davy@ens.fr> References: <1411852633-4457-1-git-send-email-axel.davy@ens.fr> Message-ID: <868ul0pusg.fsf@hiro.keithp.com> Axel Davy writes: > Calling present_notify_msc could cancel a pending pixmap presentation. > > Signed-off-by: Axel Davy > --- > present/present.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/present/present.c b/present/present.c > index e838da7..47566c7 100644 > --- a/present/present.c > +++ b/present/present.c > @@ -767,7 +767,7 @@ present_pixmap(WindowPtr window, > * in the same frame > */ > > - if (!update) { > + if (!update && pixmap) { > xorg_list_for_each_entry_safe(vblank, tmp, &window_priv->vblank, window_list) { > > if (!vblank->pixmap) > -- > 1.9.1 > Reviewed-by: Keith Packard (starting to think that merging notify_msc and present_pixmap in the same function was a bad idea...) -- keith.packard at intel.com -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 810 bytes Desc: not available URL: