Re: [PATCH] Fix xf86DeleteDriver and various places that use it
Op 22-07-13 05:44, christopher.halse.rog...@canonical.com schreef: From: Maarten Lankhorst maarten.lankho...@canonical.com Signed-off-by: Christopher James Halse Rogers christopher.halse.rog...@canonical.com Signed-off-by: Maarten Lankhorst maarten.lankho...@canonical.com ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
Lenovo IdeaPad slidebar driver
Some Lenovo's Ideapad notebooks, my Y550P in particular, have a 1-D touch panel. Here's how it looks like: http://i.stack.imgur.com/dFAtu.jpg I basically figured out how it works and I want to write a driver for it. The driver doesn't need kernel support, as I can do everything from userspace (in detail, specific keyboard scancode as touch notification + x86 IO calls to get the coordinate). I think that might be an Xorg input driver. In Windows, when panel is touched, a vendor-made app selection window appears, the user selects the app and releases the panel. The panel _is not_ to act as a mouse or a keyboard or a scroll wheel, in general. It should produce some custom events for apps that are aware of the panel. Moreover, the panel has 4 LED blinking modes, which I should be able to switch at runtime, or at least to configure by some conf file. Should I delve deeper into Xorg docs to write the driver, or I'd better provide a different way for applications to interact with the panel, not via Xorg? ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
Re: [RFC PATCH] Add XMir Xorg-nested-in-Mir helper extension
Op 22-07-13 07:08, christopher.halse.rog...@canonical.com schreef: From: Christopher James Halse Rogers r...@ubuntu.com This is missing too much functionality to be usefully appiled, but the skeleton is here and the APIs it relies on are sufficiently stable. Sending to the list for extra visibility and for preliminary comments. We're sufficiently different to Wayland to make sharing code difficult, but I think there's probably some scope for common code in output handling, and possibly in GLX's interaction with the underlying compositor. Signed-off-by: Christopher James Halse Rogers christopher.halse.rog...@canonical.com --- configure.ac| 11 ++ hw/xfree86/Makefile.am | 9 +- hw/xfree86/common/xf86Config.c | 12 ++ hw/xfree86/common/xf86Globals.c | 3 + hw/xfree86/common/xf86Init.c| 20 +++ hw/xfree86/common/xf86Priv.h| 3 + hw/xfree86/xmir/Makefile.am | 26 hw/xfree86/xmir/xmir-output.c | 225 ++ hw/xfree86/xmir/xmir-private.h | 84 +++ hw/xfree86/xmir/xmir-thread-proxy.c | 115 +++ hw/xfree86/xmir/xmir-window.c | 271 hw/xfree86/xmir/xmir.c | 217 + hw/xfree86/xmir/xmir.h | 92 include/xorg-server.h.in| 3 + test/Makefile.am| 9 +- test/xmir-thread-proxy.c| 154 16 files changed, 1251 insertions(+), 3 deletions(-) create mode 100644 hw/xfree86/xmir/Makefile.am create mode 100644 hw/xfree86/xmir/xmir-output.c create mode 100644 hw/xfree86/xmir/xmir-private.h create mode 100644 hw/xfree86/xmir/xmir-thread-proxy.c create mode 100644 hw/xfree86/xmir/xmir-window.c create mode 100644 hw/xfree86/xmir/xmir.c create mode 100644 hw/xfree86/xmir/xmir.h create mode 100644 test/xmir-thread-proxy.c A few quick notes.. - Please use the prime import calls in the drivers instead of duplicating the functionality. - Instead of overriding AuthMagic2 in every driver, this should be done in xmir. - The RFC patch for nouveau mir compositor support should be sent to xorg-devel too. - You added a NVHasMirSupport function, but the xserver should already know whether it has a drm fd for the pci-id before calling the probe function, so that check should not be in the ddx. - Any chance of getting rid of the separate mir thread and using xorg's polling mechanism? ~Maarten ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
Re: [PATCH] Fix xf86DeleteDriver and various places that use it
From: christopher.halse.rog...@canonical.com Date: Mon, 22 Jul 2013 13:44:46 +1000 From: Maarten Lankhorst maarten.lankho...@canonical.com Signed-off-by: Christopher James Halse Rogers christopher.halse.rog...@canonical.com Care to elaborate what's actually broken? To me this just looks like a somewhat arbitrary change that turns xf86DriverList from a sparse array into a non-sparse array at the expense of making the implementation more complex. --- hw/xfree86/common/xf86Helper.c | 9 - hw/xfree86/common/xf86Init.c | 8 ++-- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/hw/xfree86/common/xf86Helper.c b/hw/xfree86/common/xf86Helper.c index 721159d..d319e0c 100644 --- a/hw/xfree86/common/xf86Helper.c +++ b/hw/xfree86/common/xf86Helper.c @@ -100,7 +100,14 @@ xf86DeleteDriver(int drvIndex) if (xf86DriverList[drvIndex]-module) UnloadModule(xf86DriverList[drvIndex]-module); free(xf86DriverList[drvIndex]); -xf86DriverList[drvIndex] = NULL; + +/* Compact xf86DriverList array, update xf86NumDrivers */ +xf86NumDrivers--; +if(drvIndex != xf86NumDrivers) +memmove(xf86DriverList + drvIndex, +xf86DriverList + drvIndex + 1, +sizeof(DriverPtr) * (xf86NumDrivers - drvIndex)); +xf86DriverList = realloc(xf86DriverList, xf86NumDrivers * sizeof(DriverPtr)); } } diff --git a/hw/xfree86/common/xf86Init.c b/hw/xfree86/common/xf86Init.c index 91ec4c8..746168a 100644 --- a/hw/xfree86/common/xf86Init.c +++ b/hw/xfree86/common/xf86Init.c @@ -530,7 +530,7 @@ InitOutput(ScreenInfo * pScreenInfo, int argc, char **argv) * needed at this early stage. */ -for (i = 0; i xf86NumDrivers; i++) { +for (i = 0; i xf86NumDrivers; ) { xorgHWFlags flags = HW_IO; if (xf86DriverList[i]-Identify != NULL) @@ -546,6 +546,8 @@ InitOutput(ScreenInfo * pScreenInfo, int argc, char **argv) if (!(flags HW_SKIP_CONSOLE)) xorgHWOpenConsole = TRUE; + +i++; } if (xorgHWOpenConsole) @@ -631,9 +633,11 @@ InitOutput(ScreenInfo * pScreenInfo, int argc, char **argv) } /* Remove (unload) drivers that are not required */ -for (i = 0; i xf86NumDrivers; i++) +for (i = 0; i xf86NumDrivers; ) if (xf86DriverList[i] xf86DriverList[i]-refCount = 0) xf86DeleteDriver(i); +else +i++; /* * At this stage we know how many screens there are. -- 1.8.3.2 ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
Re: [PATCH:xrdb 2/2] Add -version flag to print package version string from autoconf
Reviewed-By: Matt Dew mar...@osource.org On 07/19/2013 08:52 PM, Alan Coopersmith wrote: Also adds missing entry for -help flag to usage message. Signed-off-by: Alan Coopersmith alan.coopersm...@oracle.com --- man/xrdb.man |4 xrdb.c |5 + 2 files changed, 9 insertions(+) diff --git a/man/xrdb.man b/man/xrdb.man index 7f0ccf1..211c0a2 100644 --- a/man/xrdb.man +++ b/man/xrdb.man @@ -168,6 +168,10 @@ program accepts the following options: This option (or any unsupported option) will cause a brief description of the allowable options and parameters to be printed. .TP 8 +.B \-version +This option will cause the xrdb version to be printed and the program to exit +without performing any other operations. +.TP 8 .B \-display \fIdisplay\fP This option specifies the X server to be used; see \fIX(__miscmansuffix__)\fP. It also specifies the screen to use for the \fI-screen\fP option, diff --git a/xrdb.c b/xrdb.c index 58dd049..24a6aa5 100644 --- a/xrdb.c +++ b/xrdb.c @@ -738,6 +738,8 @@ Syntax (void) fprintf (stderr, usage: %s [-options ...] [filename]\n\n where options include:\n + -help print this help message\n + -versionprint the program version\n -display host:dpy display to use\n -alldo all resources [default]\n -global do screen-independent resources\n @@ -898,6 +900,9 @@ main(int argc, char *argv[]) } else if (isabbreviation (-help, arg, 2)) { Syntax (); /* doesn't return */ +} else if (isabbreviation (-version, arg, 2)) { + printf(%s\n, PACKAGE_STRING); + exit(0); } else if (isabbreviation (-display, arg, 2)) { if (++i = argc) Syntax (); displayname = argv[i]; ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
Re: [PATCH] Fix xf86DeleteDriver and various places that use it
On Mon, Jul 22, 2013 at 01:44:46PM +1000, christopher.halse.rog...@canonical.com wrote: From: Maarten Lankhorst maarten.lankho...@canonical.com Signed-off-by: Christopher James Halse Rogers christopher.halse.rog...@canonical.com --- hw/xfree86/common/xf86Helper.c | 9 - hw/xfree86/common/xf86Init.c | 8 ++-- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/hw/xfree86/common/xf86Helper.c b/hw/xfree86/common/xf86Helper.c index 721159d..d319e0c 100644 --- a/hw/xfree86/common/xf86Helper.c +++ b/hw/xfree86/common/xf86Helper.c @@ -100,7 +100,14 @@ xf86DeleteDriver(int drvIndex) if (xf86DriverList[drvIndex]-module) UnloadModule(xf86DriverList[drvIndex]-module); free(xf86DriverList[drvIndex]); -xf86DriverList[drvIndex] = NULL; + +/* Compact xf86DriverList array, update xf86NumDrivers */ +xf86NumDrivers--; +if(drvIndex != xf86NumDrivers) +memmove(xf86DriverList + drvIndex, +xf86DriverList + drvIndex + 1, +sizeof(DriverPtr) * (xf86NumDrivers - drvIndex)); +xf86DriverList = realloc(xf86DriverList, xf86NumDrivers * sizeof(DriverPtr)); } } diff --git a/hw/xfree86/common/xf86Init.c b/hw/xfree86/common/xf86Init.c index 91ec4c8..746168a 100644 --- a/hw/xfree86/common/xf86Init.c +++ b/hw/xfree86/common/xf86Init.c @@ -530,7 +530,7 @@ InitOutput(ScreenInfo * pScreenInfo, int argc, char **argv) * needed at this early stage. */ -for (i = 0; i xf86NumDrivers; i++) { +for (i = 0; i xf86NumDrivers; ) { no. please use a while loop for this. for loops without an increment condition are just plain ugly. also, as Mark pointed out it's not sure why this change is needed. Cheers, Peter xorgHWFlags flags = HW_IO; if (xf86DriverList[i]-Identify != NULL) @@ -546,6 +546,8 @@ InitOutput(ScreenInfo * pScreenInfo, int argc, char **argv) if (!(flags HW_SKIP_CONSOLE)) xorgHWOpenConsole = TRUE; + +i++; } if (xorgHWOpenConsole) @@ -631,9 +633,11 @@ InitOutput(ScreenInfo * pScreenInfo, int argc, char **argv) } /* Remove (unload) drivers that are not required */ -for (i = 0; i xf86NumDrivers; i++) +for (i = 0; i xf86NumDrivers; ) if (xf86DriverList[i] xf86DriverList[i]-refCount = 0) xf86DeleteDriver(i); +else +i++; /* * At this stage we know how many screens there are. -- 1.8.3.2 ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
Re: [PULL] input scaling patch
Peter Hutterer peter.hutte...@who-t.net writes: dix: scale y back instead of x up when pre-scaling coordinates (2013-07-22 14:18:30 +1000) Merged. 7446989..21ea7eb master - master -- keith.pack...@intel.com pgpDmDpLgNs7A.pgp Description: PGP signature ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
Re: [git pull] 1.14 gpu fixes backport
On Thu, Jul 18, 2013 at 02:24:30AM +0100, Sérgio Basto wrote: On Ter, 2013-07-16 at 11:56 -0600, Matt Dew wrote: On 07/13/2013 05:10 AM, Sérgio Basto wrote: On Sex, 2013-07-12 at 11:36 +1000, Dave Airlie wrote: Hi Matt, all backports from master, all shipped in Fedora, all making Peter angry because he had to rebase them. Hi, with Fedora 19, we have a mass test of 1.14, so some bugs was found we have other 2 patches floating around . https://bugzilla.redhat.com/show_bug.cgi?id=976995 with patch https://bugzilla.redhat.com/attachment.cgi?id=772539 https://bugs.freedesktop.org/show_bug.cgi?id=66851 with patch https://bugs.freedesktop.org/attachment.cgi?id=82364 both seems easy patches , Does anyone have these in a branch I can either pull or cherry-pick? Hi, trying to help here , I follow the bugs of xorg-x11-server on F19 https://bugzilla.redhat.com/buglist.cgi?component=xorg-x11-serverlist_id=1540048product=Fedora and what is upstream source: http://cgit.freedesktop.org/xorg/xserver/?h=server-1.14-branch I'm following this, since release 3 with VirtualBox fix (upstreamed): https://admin.fedoraproject.org/updates/FEDORA-2013-12681/xorg-x11-server-1.14.2-3.fc19 waiting in a pull request, will be upstream soon. next on release 4, Dave patch (upstreamed) https://admin.fedoraproject.org/updates/FEDORA-2013-12886/xorg-x11-server-1.14.2-4.fc19 punted to dave. and now release 5, other fixes https://admin.fedoraproject.org/updates/FEDORA-2013-12995/xorg-x11-server-1.14.2-5.fc19 these will be merged to 1.14 asap Now it seems that almost all bugs are fixed, but still left this 2 patches, one in https://bugzilla.redhat.com/show_bug.cgi?id=976995 first half is I think the same as -4 above, punted to dave. Xephyr flag which is 1.15. reporter says that still need it, easy to see that don't harm , so I think that Dave could decide and upstream it (or not). Same for other patch which is in https://bugs.freedesktop.org/show_bug.cgi?id=66851 punting... Cheers, Peter this patch is more complicated, to me, knowing if it is correct or not, but seems logic. Best regards, -- Sérgio M. B. ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
Re: [git pull] 1.14 gpu fixes backport
On Tue, Jul 23, 2013 at 9:56 AM, Peter Hutterer peter.hutte...@who-t.net wrote: On Thu, Jul 18, 2013 at 02:24:30AM +0100, Sérgio Basto wrote: On Ter, 2013-07-16 at 11:56 -0600, Matt Dew wrote: On 07/13/2013 05:10 AM, Sérgio Basto wrote: On Sex, 2013-07-12 at 11:36 +1000, Dave Airlie wrote: Hi Matt, all backports from master, all shipped in Fedora, all making Peter angry because he had to rebase them. Hi, with Fedora 19, we have a mass test of 1.14, so some bugs was found we have other 2 patches floating around . https://bugzilla.redhat.com/show_bug.cgi?id=976995 with patch https://bugzilla.redhat.com/attachment.cgi?id=772539 https://bugs.freedesktop.org/show_bug.cgi?id=66851 with patch https://bugs.freedesktop.org/attachment.cgi?id=82364 both seems easy patches , Does anyone have these in a branch I can either pull or cherry-pick? Hi, trying to help here , I follow the bugs of xorg-x11-server on F19 https://bugzilla.redhat.com/buglist.cgi?component=xorg-x11-serverlist_id=1540048product=Fedora and what is upstream source: http://cgit.freedesktop.org/xorg/xserver/?h=server-1.14-branch I'm following this, since release 3 with VirtualBox fix (upstreamed): https://admin.fedoraproject.org/updates/FEDORA-2013-12681/xorg-x11-server-1.14.2-3.fc19 waiting in a pull request, will be upstream soon. next on release 4, Dave patch (upstreamed) https://admin.fedoraproject.org/updates/FEDORA-2013-12886/xorg-x11-server-1.14.2-4.fc19 punted to dave. and now release 5, other fixes https://admin.fedoraproject.org/updates/FEDORA-2013-12995/xorg-x11-server-1.14.2-5.fc19 these will be merged to 1.14 asap Now it seems that almost all bugs are fixed, but still left this 2 patches, one in https://bugzilla.redhat.com/show_bug.cgi?id=976995 first half is I think the same as -4 above, punted to dave. Xephyr flag which is 1.15. reporter says that still need it, easy to see that don't harm , so I think that Dave could decide and upstream it (or not). Same for other patch which is in https://bugs.freedesktop.org/show_bug.cgi?id=66851 I don't think that'll ever be 1.14 material, I've no way to know what regressions it'll cause at this point, Validating changes like that that seem simple is really messy to get done, so I tend to bail on the side of assuming they'll break everything. Is that patch posted to the list for master? I'm not really in a position to work on the server at the moment. Dave. ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
Re: [git pull] 1.14 gpu fixes backport
On Ter, 2013-07-23 at 10:00 +1000, Dave Airlie wrote: On Tue, Jul 23, 2013 at 9:56 AM, Peter Hutterer peter.hutte...@who-t.net wrote: On Thu, Jul 18, 2013 at 02:24:30AM +0100, Sérgio Basto wrote: On Ter, 2013-07-16 at 11:56 -0600, Matt Dew wrote: On 07/13/2013 05:10 AM, Sérgio Basto wrote: On Sex, 2013-07-12 at 11:36 +1000, Dave Airlie wrote: Hi Matt, all backports from master, all shipped in Fedora, all making Peter angry because he had to rebase them. Hi, with Fedora 19, we have a mass test of 1.14, so some bugs was found we have other 2 patches floating around . https://bugzilla.redhat.com/show_bug.cgi?id=976995 with patch https://bugzilla.redhat.com/attachment.cgi?id=772539 https://bugs.freedesktop.org/show_bug.cgi?id=66851 with patch https://bugs.freedesktop.org/attachment.cgi?id=82364 both seems easy patches , Does anyone have these in a branch I can either pull or cherry-pick? Hi, trying to help here , I follow the bugs of xorg-x11-server on F19 https://bugzilla.redhat.com/buglist.cgi?component=xorg-x11-serverlist_id=1540048product=Fedora and what is upstream source: http://cgit.freedesktop.org/xorg/xserver/?h=server-1.14-branch I'm following this, since release 3 with VirtualBox fix (upstreamed): https://admin.fedoraproject.org/updates/FEDORA-2013-12681/xorg-x11-server-1.14.2-3.fc19 waiting in a pull request, will be upstream soon. next on release 4, Dave patch (upstreamed) https://admin.fedoraproject.org/updates/FEDORA-2013-12886/xorg-x11-server-1.14.2-4.fc19 punted to dave. and now release 5, other fixes https://admin.fedoraproject.org/updates/FEDORA-2013-12995/xorg-x11-server-1.14.2-5.fc19 these will be merged to 1.14 asap Now it seems that almost all bugs are fixed, but still left this 2 patches, one in https://bugzilla.redhat.com/show_bug.cgi?id=976995 first half is I think the same as -4 above, punted to dave. Xephyr flag which is 1.15. reporter says that still need it, easy to see that don't harm , so I think that Dave could decide and upstream it (or not). Same for other patch which is in https://bugs.freedesktop.org/show_bug.cgi?id=66851 I don't think that'll ever be 1.14 material, I've no way to know what regressions it'll cause at this point, Validating changes like that that seem simple is really messy to get done, so I tend to bail on the side of assuming they'll break everything. Is that patch posted to the list for master? Good question, I don't know. I'm not really in a position to work on the server at the moment. Hi, just to clarify, my email is about 2 mini patches: Patch 1 - https://bugzilla.redhat.com/attachment.cgi?id=772539 - formats[i].visual_class = visual_info-class; -XFree(visual_info); + if (visual_info) { +formats[i].visual_class = visual_info-class; +XFree(visual_info); +} On RedHat bugzilla [1], Alphonse Steiner wrote: This problem is related to Xephyr. The function 'XGetVisualInfo' returns a NULL pointer, leading to the segfault Patch 2 - https://bugs.freedesktop.org/attachment.cgi?id=82364 - if (ServerIsNotSeat0()) +if (ServerIsNotSeat0() foundScreen) and -if (ServerIsNotSeat0()) +if (ServerIsNotSeat0() xf86_num_platform_devices 0) Everything else is going well. [1] https://bugzilla.redhat.com/show_bug.cgi?id=976995#c22 ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
Re: [PULL: xserver master] prevent overflows in client code in DMX Xephyr, fix typo in Xnest header guard
Alan Coopersmith alan.coopersm...@oracle.com writes: Alan Coopersmith (8): Xdmx: integer overflow in GetGLXVisualConfigs() Xdmx: integer overflow in GetGLXFBConfigs() Xephyr: integer overflow in ephyrHostGLXGetStringFromServer() Xephyr: integer overflow in XF86DRIOpenConnection() Xephyr: integer overflow in XF86DRIGetClientDriverName() glxproxy: Use _XReadPad instead of _XEatData to clean up the slop glxproxy: Use _XEatDataWords (from Xlib 1.6) instead of _XEatData Xephyr: Use _XEatDataWords (from Xlib 1.6) instead of _XEatData Thomas Klausner (1): Fix typo in header guard. Merged. 21ea7eb..d5ebe20 master - master -- keith.pack...@intel.com pgpfmFvm1hEef.pgp Description: PGP signature ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel