Re: [PATCH xserver] dri3: cap the version returned to the client
On Mon, 2018-03-19 at 21:11 +, Emil Velikov wrote: > On 19 March 2018 at 19:59, Adam Jackson wrote: > > Merged: > > > > remote: I: patch #210343 updated using rev > > ae5c0dd199a5fbfbdf7a2d6b8c1b28c410289106. > > remote: I: 1 patch(es) updated to state Accepted. > > To ssh://git.freedesktop.org/git/xorg/xserver > >6a5d51e082..ae5c0dd199 master -> master > > > > Though I think both this and the corresponding present patch are broken > > if the client sends a version number of 0.42... > > True. We could bail out if the client sends a too old (garbage) version - > WDYT? We probably should. In practice it's not going to matter as no client is that broken (and supporting two major versions of an extension is nearly impossible in most cases), but technically correct is the best kind of correct. - ajax ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: https://lists.x.org/mailman/listinfo/xorg-devel
Re: [PATCH xserver] dri3: cap the version returned to the client
On 19 March 2018 at 19:59, Adam Jackson wrote: > On Mon, 2018-03-19 at 12:04 +, Emil Velikov wrote: >> On 13 March 2018 at 18:38, Emil Velikov wrote: >> > From: Emil Velikov >> > >> > As per the protocol, the server should not return version greater than >> > the one supported by the client. >> > >> > Add a spec quote and tweak the numbers accordingly. >> > >> > Fixes: 563138298868 ("dri3: Add DRI3 extension") >> > Cc: Daniel Stone >> > Cc: Keith Packard >> > Signed-off-by: Emil Velikov > > Merged: > > remote: I: patch #210343 updated using rev > ae5c0dd199a5fbfbdf7a2d6b8c1b28c410289106. > remote: I: 1 patch(es) updated to state Accepted. > To ssh://git.freedesktop.org/git/xorg/xserver >6a5d51e082..ae5c0dd199 master -> master > > Though I think both this and the corresponding present patch are broken > if the client sends a version number of 0.42... > True. We could bail out if the client sends a too old (garbage) version - WDYT? In general handling of server_major != client_major could also be improved, yet major won't be bumped in the foreseeable future. Thanks -Emil ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: https://lists.x.org/mailman/listinfo/xorg-devel
Re: [PATCH xserver] dri3: cap the version returned to the client
On Mon, 2018-03-19 at 12:04 +, Emil Velikov wrote: > On 13 March 2018 at 18:38, Emil Velikov wrote: > > From: Emil Velikov > > > > As per the protocol, the server should not return version greater than > > the one supported by the client. > > > > Add a spec quote and tweak the numbers accordingly. > > > > Fixes: 563138298868 ("dri3: Add DRI3 extension") > > Cc: Daniel Stone > > Cc: Keith Packard > > Signed-off-by: Emil Velikov Merged: remote: I: patch #210343 updated using rev ae5c0dd199a5fbfbdf7a2d6b8c1b28c410289106. remote: I: 1 patch(es) updated to state Accepted. To ssh://git.freedesktop.org/git/xorg/xserver 6a5d51e082..ae5c0dd199 master -> master Though I think both this and the corresponding present patch are broken if the client sends a version number of 0.42... - ajax ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: https://lists.x.org/mailman/listinfo/xorg-devel
Re: [PATCH xserver] present: cap the version returned to the client
On Mon, 2018-03-19 at 16:04 +, Emil Velikov wrote: > From: Emil Velikov > > As per the protocol, the server should not return version greater than > the one supported by the client. > > Add a spec quote and tweak the numbers accordingly. > > Fixes: 5c5c1b77982 ("present: Add Present extension") > Cc: Thierry Reding > Cc: Daniel Stone > Cc: Keith Packard > Signed-off-by: Emil Velikov remote: I: patch #211296 updated using rev 6a5d51e0823b43280e3646b7a0c919a3b76146ea. remote: I: 1 patch(es) updated to state Accepted. To ssh://git.freedesktop.org/git/xorg/xserver abb9b58d1a..6a5d51e082 master -> master - ajax ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: https://lists.x.org/mailman/listinfo/xorg-devel
Re: [PATCH xf86-input-libinput] man: note that we don't do /dev/input/by-id or /dev/input/by-path
On Mon, 2018-03-19 at 10:04 +1000, Peter Hutterer wrote: > For logind-setups we need to match the path libinput wants to open with the > Option Device path that the device has so we know when to return the > server-fd. This doesn't work for by-id or by-path because libinput resolves > those (through udev) to the actual eventX node so our paths look different > when they are the same device. > > This could be fixed but since this is easy enough to work around with a > InputClass section and rather a niche case, it's not really worth the effort. > > https://bugs.freedesktop.org/show_bug.cgi?id=105562 > > Signed-off-by: Peter Hutterer Reviewed-by: Adam Jackson - ajax ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: https://lists.x.org/mailman/listinfo/xorg-devel
Re: [PATCH] present: Advertise protocol version 1.2
On Mon, 2018-03-19 at 16:18 +, Emil Velikov wrote: > On 16 March 2018 at 13:24, Thierry Reding wrote: > > From: Thierry Reding > > > > Everything is implemented to support protocol version 1.2. Make it > > official. > > > > Reviewed-by: Daniel Stone > > Signed-off-by: Thierry Reding > > Yes, please. > Reviewed-by: Emil Velikov remote: I: patch #211045 updated using rev abb9b58d1af9a0286162e52ef9db390d0c950fc1. remote: I: 1 patch(es) updated to state Accepted. To ssh://git.freedesktop.org/git/xorg/xserver 7fc89251ef..abb9b58d1a master -> master - ajax ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: https://lists.x.org/mailman/listinfo/xorg-devel
Re: [PATCH xserver] present: cap the version returned to the client
> Emil Velikov hat am 19. März 2018 um 17:04 > geschrieben: > > > From: Emil Velikov > > As per the protocol, the server should not return version greater than > the one supported by the client. > > Add a spec quote and tweak the numbers accordingly. > > Fixes: 5c5c1b77982 ("present: Add Present extension") > Cc: Thierry Reding > Cc: Daniel Stone > Cc: Keith Packard > Signed-off-by: Emil Velikov > --- > Analogous to the DRI3 patch here > https://patchwork.freedesktop.org/patch/210343/ > --- > present/present_request.c | 14 +- > 1 file changed, 13 insertions(+), 1 deletion(-) > > diff --git a/present/present_request.c b/present/present_request.c > index c6afe5fa7..f52efa52b 100644 > --- a/present/present_request.c > +++ b/present/present_request.c > @@ -41,7 +41,19 @@ proc_present_query_version(ClientPtr client) > }; > > REQUEST_SIZE_MATCH(xPresentQueryVersionReq); > -(void) stuff; > +/* From presentproto: > + * > + * The client sends the highest supported version to the server > + * and the server sends the highest version it supports, but no > + * higher than the requested version. > + */ Alternativ wording: /* * The client sends the highest supported version to the server * and the server replies with less or equal the requested version * what ever is supported. */ I would suggest to avoid "no" as people tend to skip these tiny word. Simply saying "less or equal the requested version" make thinks clear. Maybe some native has a better wording (if that is good it should go to presentproto also). re, wh > + > +if (rep.majorVersion > stuff->majorVersion || > +rep.minorVersion > stuff->minorVersion) { > +rep.majorVersion = stuff->majorVersion; > +rep.minorVersion = stuff->minorVersion; > +} > + > if (client->swapped) { > swaps(&rep.sequenceNumber); > swapl(&rep.length); > -- > 2.16.0 > > ___ > xorg-devel@lists.x.org: X.Org development > Archives: http://lists.x.org/archives/xorg-devel > Info: https://lists.x.org/mailman/listinfo/xorg-devel ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: https://lists.x.org/mailman/listinfo/xorg-devel
Re: [PATCH xserver 2/3] modesetting: Remove #ifdefs XF86_PDEV_SERVER_FD
On Mon, 2018-03-19 at 16:01 +, Emil Velikov wrote: > Indeed the current varying API (and ABI) based on the configure > selected, is rather 'lovely'. > Guess, I could pull-up my sleeves and untangle some of that if we have > reviewers ;-) I do try to keep that kind of problem minimized, but more hands are always welcome. - ajax ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: https://lists.x.org/mailman/listinfo/xorg-devel
Re: [PATCH] present: Advertise protocol version 1.2
On 16 March 2018 at 13:24, Thierry Reding wrote: > From: Thierry Reding > > Everything is implemented to support protocol version 1.2. Make it > official. > > Reviewed-by: Daniel Stone > Signed-off-by: Thierry Reding Yes, please. Reviewed-by: Emil Velikov -Emil ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: https://lists.x.org/mailman/listinfo/xorg-devel
[PATCH xserver] present: cap the version returned to the client
From: Emil Velikov As per the protocol, the server should not return version greater than the one supported by the client. Add a spec quote and tweak the numbers accordingly. Fixes: 5c5c1b77982 ("present: Add Present extension") Cc: Thierry Reding Cc: Daniel Stone Cc: Keith Packard Signed-off-by: Emil Velikov --- Analogous to the DRI3 patch here https://patchwork.freedesktop.org/patch/210343/ --- present/present_request.c | 14 +- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/present/present_request.c b/present/present_request.c index c6afe5fa7..f52efa52b 100644 --- a/present/present_request.c +++ b/present/present_request.c @@ -41,7 +41,19 @@ proc_present_query_version(ClientPtr client) }; REQUEST_SIZE_MATCH(xPresentQueryVersionReq); -(void) stuff; +/* From presentproto: + * + * The client sends the highest supported version to the server + * and the server sends the highest version it supports, but no + * higher than the requested version. + */ + +if (rep.majorVersion > stuff->majorVersion || +rep.minorVersion > stuff->minorVersion) { +rep.majorVersion = stuff->majorVersion; +rep.minorVersion = stuff->minorVersion; +} + if (client->swapped) { swaps(&rep.sequenceNumber); swapl(&rep.length); -- 2.16.0 ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: https://lists.x.org/mailman/listinfo/xorg-devel
Re: [PATCH xserver 2/3] modesetting: Remove #ifdefs XF86_PDEV_SERVER_FD
On 19 March 2018 at 15:43, Alan Coopersmith wrote: > On 03/19/18 06:33 AM, Emil Velikov wrote: >> On 15 March 2018 at 18:33, Adam Jackson wrote: >>> On Wed, 2018-03-14 at 21:48 +0100, Thomas Klausner wrote: On Wed, Mar 14, 2018 at 01:33:28PM -0700, Alan Coopersmith wrote: > On 03/14/18 01:01 PM, Thomas Klausner wrote: >> I see a build failure in xorg-server-1.19.99.901 on NetBSD. > > Looks like the same failure I saw on Solaris and sent in a patch > for to revert the removal of that #ifdef. > > https://patchwork.freedesktop.org/patch/207937/ This patch works for me, thank you. >>> >>> Sorry for letting this one fall through the cracks. Merged, thanks: >>> >>> remote: I: patch #207937 updated using rev >>> 7fc89251ef5e7363dfbf6d831ed448bbcd8519b8. >>> remote: I: 1 patch(es) updated to state Accepted. >>> To ssh://git.freedesktop.org/git/xorg/xserver >>>edf08bd654..7fc89251ef master -> master >>> >> Another solution is to unconditionally include xf86platformBus.h in >> the modesetting driver. > > Nope, as I mentioned in the thread around the patch I sent, that's not > enough as just including the header without restoring the #ifdefs > results in: > > driver.c: In function ‘probe_hw’: > driver.c:246:14: error: implicit declaration of function > ‘xf86_platform_device_odev_attributes’; did you mean > ‘xf86platformAddGPUDevices’? [-Werror=implicit-function-declaration] > fd = xf86_platform_device_odev_attributes(platform_dev)->fd; > ^~~~ > xf86platformAddGPUDevices > driver.c:246:14: warning: nested extern declaration of > ‘xf86_platform_device_odev_attributes’ [-Wnested-externs] > driver.c:246:64: error: invalid type argument of ‘->’ (have ‘int’) > fd = xf86_platform_device_odev_attributes(platform_dev)->fd; > ^~ > > It looks like you'd need to replace the #ifdef XF86_PDEV_SERVER_FD with > #ifdef XSERVER_PLATFORM_BUS in probe_hw() as well. > Indeed the current varying API (and ABI) based on the configure selected, is rather 'lovely'. Guess, I could pull-up my sleeves and untangle some of that if we have reviewers ;-) Pardon for the noise. -Emil ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: https://lists.x.org/mailman/listinfo/xorg-devel
Re: [PATCH xserver 2/3] modesetting: Remove #ifdefs XF86_PDEV_SERVER_FD
On 03/19/18 06:33 AM, Emil Velikov wrote: > On 15 March 2018 at 18:33, Adam Jackson wrote: >> On Wed, 2018-03-14 at 21:48 +0100, Thomas Klausner wrote: >>> On Wed, Mar 14, 2018 at 01:33:28PM -0700, Alan Coopersmith wrote: On 03/14/18 01:01 PM, Thomas Klausner wrote: > I see a build failure in xorg-server-1.19.99.901 on NetBSD. Looks like the same failure I saw on Solaris and sent in a patch for to revert the removal of that #ifdef. https://patchwork.freedesktop.org/patch/207937/ >>> >>> This patch works for me, thank you. >> >> Sorry for letting this one fall through the cracks. Merged, thanks: >> >> remote: I: patch #207937 updated using rev >> 7fc89251ef5e7363dfbf6d831ed448bbcd8519b8. >> remote: I: 1 patch(es) updated to state Accepted. >> To ssh://git.freedesktop.org/git/xorg/xserver >>edf08bd654..7fc89251ef master -> master >> > Another solution is to unconditionally include xf86platformBus.h in > the modesetting driver. Nope, as I mentioned in the thread around the patch I sent, that's not enough as just including the header without restoring the #ifdefs results in: driver.c: In function ‘probe_hw’: driver.c:246:14: error: implicit declaration of function ‘xf86_platform_device_odev_attributes’; did you mean ‘xf86platformAddGPUDevices’? [-Werror=implicit-function-declaration] fd = xf86_platform_device_odev_attributes(platform_dev)->fd; ^~~~ xf86platformAddGPUDevices driver.c:246:14: warning: nested extern declaration of ‘xf86_platform_device_odev_attributes’ [-Wnested-externs] driver.c:246:64: error: invalid type argument of ‘->’ (have ‘int’) fd = xf86_platform_device_odev_attributes(platform_dev)->fd; ^~ It looks like you'd need to replace the #ifdef XF86_PDEV_SERVER_FD with #ifdef XSERVER_PLATFORM_BUS in probe_hw() as well. -- -Alan Coopersmith- alan.coopersm...@oracle.com Oracle Solaris Engineering - https://blogs.oracle.com/alanc ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: https://lists.x.org/mailman/listinfo/xorg-devel
Re: [PATCH xserver 2/3] modesetting: Remove #ifdefs XF86_PDEV_SERVER_FD
On 15 March 2018 at 18:33, Adam Jackson wrote: > On Wed, 2018-03-14 at 21:48 +0100, Thomas Klausner wrote: >> On Wed, Mar 14, 2018 at 01:33:28PM -0700, Alan Coopersmith wrote: >> > On 03/14/18 01:01 PM, Thomas Klausner wrote: >> > > I see a build failure in xorg-server-1.19.99.901 on NetBSD. >> > >> > Looks like the same failure I saw on Solaris and sent in a patch >> > for to revert the removal of that #ifdef. >> > >> > https://patchwork.freedesktop.org/patch/207937/ >> >> This patch works for me, thank you. > > Sorry for letting this one fall through the cracks. Merged, thanks: > > remote: I: patch #207937 updated using rev > 7fc89251ef5e7363dfbf6d831ed448bbcd8519b8. > remote: I: 1 patch(es) updated to state Accepted. > To ssh://git.freedesktop.org/git/xorg/xserver >edf08bd654..7fc89251ef master -> master > Another solution is to unconditionally include xf86platformBus.h in the modesetting driver. Just like every other #include xf86platformBus.h instance in the xserver codebase. HTH Emil ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: https://lists.x.org/mailman/listinfo/xorg-devel
Re: [PATCH xserver] dri3: cap the version returned to the client
On 13 March 2018 at 18:38, Emil Velikov wrote: > From: Emil Velikov > > As per the protocol, the server should not return version greater than > the one supported by the client. > > Add a spec quote and tweak the numbers accordingly. > > Fixes: 563138298868 ("dri3: Add DRI3 extension") > Cc: Daniel Stone > Cc: Keith Packard > Signed-off-by: Emil Velikov > --- > Note: we might want this in the stable releases? > > Related: The DRI2 implementation has identical bug. > Although fixing that (unlike DRI3) might cause some ill written apps to > rightfully fall on their face. > > Should we bother - yay, nay are appreciated. > --- > dri3/dri3_request.c | 14 +- > 1 file changed, 13 insertions(+), 1 deletion(-) > > diff --git a/dri3/dri3_request.c b/dri3/dri3_request.c > index 7f3f0d08c..fc258711b 100644 > --- a/dri3/dri3_request.c > +++ b/dri3/dri3_request.c > @@ -45,7 +45,19 @@ proc_dri3_query_version(ClientPtr client) > }; > > REQUEST_SIZE_MATCH(xDRI3QueryVersionReq); > -(void) stuff; > +/* From DRI3 proto: > + * > + * The client sends the highest supported version to the server > + * and the server sends the highest version it supports, but no > + * higher than the requested version. > + */ > + > +if (rep.majorVersion > stuff->majorVersion || > +rep.minorVersion > stuff->minorVersion) { > +rep.majorVersion = stuff->majorVersion; > +rep.minorVersion = stuff->minorVersion; > +} > + > if (client->swapped) { > swaps(&rep.sequenceNumber); > swapl(&rep.length); > -- Humble ping anyone? -Emil ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: https://lists.x.org/mailman/listinfo/xorg-devel