[PATCH dri3proto 1/3] autotools: Move headers into include folders

2017-11-20 Thread Dylan Baker
This will be used by meson.

Signed-off-by: Dylan Baker 
---
 Makefile.am   | 2 +-
 dri3proto.h => include/X11/extensions/dri3proto.h | 0
 2 files changed, 1 insertion(+), 1 deletion(-)
 rename dri3proto.h => include/X11/extensions/dri3proto.h (100%)

diff --git a/Makefile.am b/Makefile.am
index 7a85bf1..5f078e0 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,5 +1,5 @@
 dri3dir = $(includedir)/X11/extensions
-dri3_HEADERS = dri3proto.h
+dri3_HEADERS = include/X11/extensions/dri3proto.h
 
 pkgconfigdir = $(libdir)/pkgconfig
 pkgconfig_DATA = dri3proto.pc
diff --git a/dri3proto.h b/include/X11/extensions/dri3proto.h
similarity index 100%
rename from dri3proto.h
rename to include/X11/extensions/dri3proto.h
-- 
2.15.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

[PATCH dri3proto 3/3] autotools: distribute meson.build in tarball

2017-11-20 Thread Dylan Baker
Signed-off-by: Dylan Baker 
---
 Makefile.am | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/Makefile.am b/Makefile.am
index 5f078e0..e4b071d 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -8,6 +8,8 @@ dist_doc_DATA = dri3proto.txt
 
 MAINTAINERCLEANFILES = ChangeLog INSTALL
 
+EXTRA_DIST = meson.build
+
 .PHONY: ChangeLog INSTALL
 
 INSTALL:
-- 
2.15.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

[PATCH dri3proto 2/3] meson: Add meson build

2017-11-20 Thread Dylan Baker
This does everything the autotools build does, except modify the git
config.

Signed-off-by: Dylan Baker 
---
 meson.build | 44 
 1 file changed, 44 insertions(+)
 create mode 100644 meson.build

diff --git a/meson.build b/meson.build
new file mode 100644
index 000..22870d5
--- /dev/null
+++ b/meson.build
@@ -0,0 +1,44 @@
+# Copyright © 2017 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 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.
+
+project('dri3proto', version : '1.0', license : 'MIT')
+
+install_data(
+  'dri3proto.txt',
+  install_dir : join_paths(get_option('datadir'), 'doc', 'dri3proto'),
+)
+
+install_headers(
+  'include/X11/extensions/dri3proto.h',
+  subdir : 'X11/extensions'
+)
+
+pkg = import('pkgconfig')
+pkg.generate(
+  name : 'DRI3Proto',
+  filebase : 'dri3proto',
+  version : meson.project_version(),
+  description : 'DRI3 extension headers',
+  variables : ['exec_prefix=${prefix}'],
+)
+
+ext_dri3proto = declare_dependency(
+  include_directories : include_directories('include'),
+)
-- 
2.15.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 dri2proto 0/3] meson build system for dri2proto

2017-11-20 Thread Dylan Baker
Quoting Dylan Baker (2017-11-06 12:37:59)
> This is basically just like the glproto patches, but with meson.build
> distrubuted in the autotools generated tarball.
> 
> Dylan Baker (3):
>   Move headers into structured include directory
>   meson: add meson support
>   autotools: Add meson.build to dist files
> 
>  Makefile.am|  3 +-
>  dri2proto.h => include/X11/extensions/dri2proto.h  |  0
>  .../X11/extensions/dri2tokens.h|  0
>  meson.build| 44 
> ++
>  4 files changed, 46 insertions(+), 1 deletion(-)
>  rename dri2proto.h => include/X11/extensions/dri2proto.h (100%)
>  rename dri2tokens.h => include/X11/extensions/dri2tokens.h (100%)
>  create mode 100644 meson.build
> 
> -- 
> 2.15.0
> 

ping


signature.asc
Description: signature
___
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[2]: [PATCH xserver] xfree86/common: Fix VT leave lockup #103782

2017-11-20 Thread Алексей Шилин
>Понедельник, 20 ноября 2017, 11:06 +03:00 от Michal Srb :
>
>If you unlock it in xf86VTLeave, you will get a double unlock in xf86VTEnter.

Argh. You're absolutely right, thanks!

I'll resend the updated version (which locks the input mutex again at the 
beginning
of xf86VTEnter) so that the incorrect one is not accidentaly picked up by 
someone.

>Few days ago I sent alternative fix for this bug:
>  Subject: [PATCH] os/inputthread: Force unlock when stopping thread.

Your fix looks better, indeed.

>  It did not get a response so far.

Looks like you forgot to add sign-off tag, which seems to be a requirement per
https://www.x.org/wiki/Development/Documentation/SubmittingPatches/


-- 
Алексей Шилин
___
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 0/3] randr valgrind cleanups

2017-11-20 Thread Adam Jackson
On Thu, 2017-11-09 at 10:21 +0100, Giuseppe Bilotta wrote:
> These three small patches replace and complement my previous “randr: properly
> cleanup on crtc and output destroy”.
> 
> The first one cleans up another bit of unitialized memory being sent over the
> wire (similar to the previous ProcRRGtOutputInfo patch) which I didn't spot 
> earlier,
> and the other two fix the leaks related to dynamic creation and destruction 
> of crtcs
> and outputs (hopefull correctly, this time ;-))
> 
> Giuseppe Bilotta (3):
>   randr: rrGetScreenResources: initialize memory
>   randr: always realloc crtcs and outputs
>   randr: free crtc->outputs on destroy
> 
>  randr/rrcrtc.c   | 10 --
>  randr/rroutput.c |  9 +++--
>  randr/rrscreen.c |  2 +-
>  3 files changed, 8 insertions(+), 13 deletions(-)

Merged, thanks:

remote: I: patch #187334 updated using rev 
fb5ee77b91a93e27801006be8ee34d27984e7fa6.
remote: I: patch #187335 updated using rev 
16381d186e7c791031392ed8afcfd33009854e9e.
remote: I: patch #187336 updated using rev 
fc7fb5bbe1c8f787e53500b9a2ca4af815f310d1.
remote: I: 3 patch(es) updated to state Accepted.
To ssh://git.freedesktop.org/git/xorg/xserver
   307c124d6b..fc7fb5bbe1  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

[PATCH xserver 6/6] os: Remove unused OsRegisterSigWrapper

2017-11-20 Thread Adam Jackson
Signed-off-by: Adam Jackson 
---
 include/os.h |  3 ---
 os/osinit.c  | 19 ---
 2 files changed, 22 deletions(-)

diff --git a/include/os.h b/include/os.h
index e141a6b02c..593c784753 100644
--- a/include/os.h
+++ b/include/os.h
@@ -297,12 +297,9 @@ _X_ATTRIBUTE_PRINTF(1, 0)
 _X_DEPRECATED;
 
 typedef void (*OsSigHandlerPtr) (int /* sig */ );
-typedef int (*OsSigWrapperPtr) (int /* sig */ );
 
 extern _X_EXPORT OsSigHandlerPtr
 OsSignal(int /* sig */ , OsSigHandlerPtr /* handler */ );
-extern _X_EXPORT OsSigWrapperPtr
-OsRegisterSigWrapper(OsSigWrapperPtr newWrap);
 
 extern _X_EXPORT int auditTrailLevel;
 
diff --git a/os/osinit.c b/os/osinit.c
index 8575319fff..bf5b4b58af 100644
--- a/os/osinit.c
+++ b/os/osinit.c
@@ -88,18 +88,6 @@ int limitNoFile = -1;
 /* The actual user defined max number of clients */
 int LimitClients = LIMITCLIENTS;
 
-static OsSigWrapperPtr OsSigWrapper = NULL;
-
-OsSigWrapperPtr
-OsRegisterSigWrapper(OsSigWrapperPtr newSigWrapper)
-{
-OsSigWrapperPtr oldSigWrapper = OsSigWrapper;
-
-OsSigWrapper = newSigWrapper;
-
-return oldSigWrapper;
-}
-
 /*
  * OsSigHandler --
  *Catch unexpected signals and exit or continue cleanly.
@@ -124,13 +112,6 @@ OsSigHandler(int signo)
 }
 #endif  /* RTLD_DI_SETSIGNAL */
 
-if (OsSigWrapper != NULL) {
-if (OsSigWrapper(signo) == 0) {
-/* ddx handled signal and wants us to continue */
-return;
-}
-}
-
 /* log, cleanup, and abort */
 xorg_backtrace();
 
-- 
2.14.3

___
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 3/6] os: Make OsSignalHandler ask for core dumps for signo != SIGQUIT

2017-11-20 Thread Adam Jackson
SIGQUIT is a normal termination request, but any other signal we handle
here wants a core. This has the effect of making FatalError's call to
AbortServer trigger the

if (CoreDump)
OsAbort();

path. This will allow us to remove some DDX code that has the same net
effect.

Signed-off-by: Adam Jackson 
---
 os/osinit.c | 6 --
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/os/osinit.c b/os/osinit.c
index cd769d181c..8575319fff 100644
--- a/os/osinit.c
+++ b/os/osinit.c
@@ -52,6 +52,7 @@ SOFTWARE.
 #include 
 #include "os.h"
 #include "osdep.h"
+#include "opaque.h"
 #include 
 #include 
 #include 
@@ -74,8 +75,6 @@ SOFTWARE.
 #define ADMPATH "/usr/adm/X%smsgs"
 #endif
 
-extern char *display;
-
 #ifdef RLIMIT_DATA
 int limitDataSpace = -1;
 #endif
@@ -151,6 +150,9 @@ OsSigHandler(int signo)
 }
 #endif
 
+if (signo != SIGQUIT)
+CoreDump = TRUE;
+
 FatalError("Caught signal %d (%s). Server aborting\n",
signo, strsignal(signo));
 }
-- 
2.14.3

___
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 0/6] Signal handling cleanups

2017-11-20 Thread Adam Jackson
I started writing a review of Olivier's patch and got sidetracked. I
can't really think of a good reason _not_ to generate a core if
possible, even for xfree86, and I think things look a lot simpler if we
do:

 hw/kdrive/src/kdrive.c | 14 
 hw/xfree86/common/xf86.h   |  4 ---
 hw/xfree86/common/xf86Events.c | 38 --
 hw/xfree86/common/xf86Globals.c|  1 -
 hw/xfree86/common/xf86Helper.c |  6 
 hw/xfree86/common/xf86Init.c   | 17 ++
 hw/xfree86/common/xf86Priv.h   |  2 --
 hw/xfree86/common/xf86Privstr.h|  1 -
 hw/xfree86/doc/ddxDesign.xml   | 10 --
 .../os-support/linux/int10/vm86/linux_vm86.c   | 13 +---
 include/os.h   |  3 --
 os/osinit.c| 25 +++---
 12 files changed, 8 insertions(+), 126 deletions(-)

- 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

[PATCH xserver 4/6] xfree86: remove xf86CaughtSignal etc.

2017-11-20 Thread Adam Jackson
This no longer does anything useful.

Signed-off-by: Adam Jackson 
---
 hw/xfree86/common/xf86.h|  2 --
 hw/xfree86/common/xf86Events.c  | 11 ---
 hw/xfree86/common/xf86Globals.c |  1 -
 hw/xfree86/common/xf86Helper.c  |  6 --
 hw/xfree86/common/xf86Init.c| 17 +++--
 hw/xfree86/common/xf86Priv.h|  2 --
 hw/xfree86/common/xf86Privstr.h |  1 -
 hw/xfree86/doc/ddxDesign.xml| 10 --
 8 files changed, 3 insertions(+), 47 deletions(-)

diff --git a/hw/xfree86/common/xf86.h b/hw/xfree86/common/xf86.h
index 43b693143e..1c25468942 100644
--- a/hw/xfree86/common/xf86.h
+++ b/hw/xfree86/common/xf86.h
@@ -296,8 +296,6 @@ xf86ServerIsResetting(void);
 extern _X_EXPORT Bool
 xf86ServerIsOnlyDetecting(void);
 extern _X_EXPORT Bool
-xf86CaughtSignal(void);
-extern _X_EXPORT Bool
 xf86GetVidModeAllowNonLocal(void);
 extern _X_EXPORT Bool
 xf86GetVidModeEnabled(void);
diff --git a/hw/xfree86/common/xf86Events.c b/hw/xfree86/common/xf86Events.c
index a27c7ff1b0..8a800bd8fd 100644
--- a/hw/xfree86/common/xf86Events.c
+++ b/hw/xfree86/common/xf86Events.c
@@ -267,17 +267,6 @@ xf86RemoveEnabledDevice(InputInfoPtr pInfo)
 InputThreadUnregisterDev(pInfo->fd);
 }
 
-/*
- * xf86SigWrapper --
- *Catch unexpected signals and exit or continue cleanly.
- */
-int
-xf86SigWrapper(int signo)
-{
-xf86Info.caughtSignal = TRUE;
-return 1;   /* abort */
-}
-
 /*
  * xf86PrintBacktrace --
  *Print a stack backtrace for debugging purposes.
diff --git a/hw/xfree86/common/xf86Globals.c b/hw/xfree86/common/xf86Globals.c
index ddf7a8696b..85efe3fc12 100644
--- a/hw/xfree86/common/xf86Globals.c
+++ b/hw/xfree86/common/xf86Globals.c
@@ -107,7 +107,6 @@ xf86InfoRec xf86Info = {
 .dontZap = FALSE,
 .dontZoom = FALSE,
 .notrapSignals = FALSE,
-.caughtSignal = FALSE,
 .currentScreen = NULL,
 #ifdef CSRG_BASED
 .consType = -1,
diff --git a/hw/xfree86/common/xf86Helper.c b/hw/xfree86/common/xf86Helper.c
index 447ed3f8fe..393a7aa881 100644
--- a/hw/xfree86/common/xf86Helper.c
+++ b/hw/xfree86/common/xf86Helper.c
@@ -1428,12 +1428,6 @@ xf86ServerIsOnlyDetecting(void)
 return xf86DoConfigure;
 }
 
-Bool
-xf86CaughtSignal(void)
-{
-return xf86Info.caughtSignal;
-}
-
 Bool
 xf86GetVidModeAllowNonLocal(void)
 {
diff --git a/hw/xfree86/common/xf86Init.c b/hw/xfree86/common/xf86Init.c
index 994b63b430..57b38d07e7 100644
--- a/hw/xfree86/common/xf86Init.c
+++ b/hw/xfree86/common/xf86Init.c
@@ -298,16 +298,9 @@ xf86PrivsElevated(void)
 }
 
 static void
-InstallSignalHandlers(void)
+TrapSignals(void)
 {
-/*
- * Install signal handler for unexpected signals
- */
-xf86Info.caughtSignal = FALSE;
-if (!xf86Info.notrapSignals) {
-OsRegisterSigWrapper(xf86SigWrapper);
-}
-else {
+if (xf86Info.notrapSignals) {
 OsSignal(SIGSEGV, SIG_DFL);
 OsSignal(SIGABRT, SIG_DFL);
 OsSignal(SIGILL, SIG_DFL);
@@ -423,7 +416,7 @@ InitOutput(ScreenInfo * pScreenInfo, int argc, char **argv)
 }
 }
 
-InstallSignalHandlers();
+TrapSignals();
 
 /* Initialise the loader */
 LoaderInit();
@@ -960,10 +953,6 @@ ddxGiveUp(enum ExitCode error)
 dbus_core_fini();
 
 xf86CloseLog(error);
-
-/* If an unexpected signal was caught, dump a core for debugging */
-if (xf86Info.caughtSignal)
-OsAbort();
 }
 
 /*
diff --git a/hw/xfree86/common/xf86Priv.h b/hw/xfree86/common/xf86Priv.h
index 22bf5ff240..4fe2b5f336 100644
--- a/hw/xfree86/common/xf86Priv.h
+++ b/hw/xfree86/common/xf86Priv.h
@@ -135,8 +135,6 @@ DoShowOptions(void)
 
 extern _X_EXPORT void
 xf86Wakeup(void *blockData, int err);
-extern _X_HIDDEN int
-xf86SigWrapper(int signo);
 extern _X_EXPORT void
 xf86HandlePMEvents(int fd, void *data);
 extern _X_EXPORT int (*xf86PMGetEventFromOs) (int fd, pmEvent * events,
diff --git a/hw/xfree86/common/xf86Privstr.h b/hw/xfree86/common/xf86Privstr.h
index e4b479f4f9..c5048a3997 100644
--- a/hw/xfree86/common/xf86Privstr.h
+++ b/hw/xfree86/common/xf86Privstr.h
@@ -64,7 +64,6 @@ typedef struct {
 Bool dontZap;
 Bool dontZoom;
 Bool notrapSignals; /* don't exit cleanly - die at fault */
-Bool caughtSignal;
 
 /* graphics part */
 ScreenPtr currentScreen;
diff --git a/hw/xfree86/doc/ddxDesign.xml b/hw/xfree86/doc/ddxDesign.xml
index 7579850267..13994f7a91 100644
--- a/hw/xfree86/doc/ddxDesign.xml
+++ b/hw/xfree86/doc/ddxDesign.xml
@@ -2053,16 +2053,6 @@ functions is as follows:
 

 
-  
- 
-Bool xf86CaughtSignal();
- 
- 
-  Returns TRUE if the server has caught a signal,
-  and FALSE otherwise.
-   
-
-   
 
 
 
-- 
2.14.3

___
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 2/6] xfree86: Remove xf86InterceptSignals

2017-11-20 Thread Adam Jackson
The only consumer of this is the Linux vm86 backend for int10 (which you
should not use), and there all it serves to do is make signals generated
by the vm86 task non-fatal. In practice this error appears never to
happen, and marching ahead with root privileges after arbitrary code has
raised a signal seems like a poor plan.

Remove the usage in the vm86 code, making this error fatal.

Signed-off-by: Adam Jackson 
---
 hw/xfree86/common/xf86.h|  1 -
 hw/xfree86/common/xf86Events.c  | 14 --
 hw/xfree86/os-support/linux/int10/vm86/linux_vm86.c | 13 +
 3 files changed, 1 insertion(+), 27 deletions(-)

diff --git a/hw/xfree86/common/xf86.h b/hw/xfree86/common/xf86.h
index db6e299b31..43b693143e 100644
--- a/hw/xfree86/common/xf86.h
+++ b/hw/xfree86/common/xf86.h
@@ -215,7 +215,6 @@ extern _X_EXPORT void xf86DisableGeneralHandler(void 
*handler);
 extern _X_EXPORT void xf86EnableGeneralHandler(void *handler);
 extern _X_EXPORT InputHandlerProc xf86SetConsoleHandler(InputHandlerProc
 handler, void *data);
-extern _X_EXPORT void xf86InterceptSignals(int *signo);
 extern _X_EXPORT void xf86ProcessActionEvent(ActionEvent action, void *arg);
 extern _X_EXPORT void xf86PrintBacktrace(void);
 extern _X_EXPORT Bool xf86VTOwner(void);
diff --git a/hw/xfree86/common/xf86Events.c b/hw/xfree86/common/xf86Events.c
index e2e6ca7691..a27c7ff1b0 100644
--- a/hw/xfree86/common/xf86Events.c
+++ b/hw/xfree86/common/xf86Events.c
@@ -267,15 +267,6 @@ xf86RemoveEnabledDevice(InputInfoPtr pInfo)
 InputThreadUnregisterDev(pInfo->fd);
 }
 
-static int *xf86SignalIntercept = NULL;
-
-void
-xf86InterceptSignals(int *signo)
-{
-if ((xf86SignalIntercept = signo))
-*signo = -1;
-}
-
 /*
  * xf86SigWrapper --
  *Catch unexpected signals and exit or continue cleanly.
@@ -283,11 +274,6 @@ xf86InterceptSignals(int *signo)
 int
 xf86SigWrapper(int signo)
 {
-if (xf86SignalIntercept && (*xf86SignalIntercept < 0)) {
-*xf86SignalIntercept = signo;
-return 0;   /* continue */
-}
-
 xf86Info.caughtSignal = TRUE;
 return 1;   /* abort */
 }
diff --git a/hw/xfree86/os-support/linux/int10/vm86/linux_vm86.c 
b/hw/xfree86/os-support/linux/int10/vm86/linux_vm86.c
index 1876983991..134809814f 100644
--- a/hw/xfree86/os-support/linux/int10/vm86/linux_vm86.c
+++ b/hw/xfree86/os-support/linux/int10/vm86/linux_vm86.c
@@ -231,20 +231,9 @@ vm86_GP_fault(xf86Int10InfoPtr pInt)
 static int
 do_vm86(xf86Int10InfoPtr pInt)
 {
-int retval, signo;
+int retval;
 
-xf86InterceptSignals();
 retval = vm86_rep(VM86S);
-xf86InterceptSignals(NULL);
-
-if (signo >= 0) {
-xf86DrvMsg(pInt->pScrn->scrnIndex, X_ERROR,
-   "vm86() syscall generated signal %d.\n", signo);
-dump_registers(pInt);
-dump_code(pInt);
-stack_trace(pInt);
-return 0;
-}
 
 switch (VM86_TYPE(retval)) {
 case VM86_UNKNOWN:
-- 
2.14.3

___
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 5/6] kdrive: remove KdSignalWrapper etc.

2017-11-20 Thread Adam Jackson
This no longer does anything useful.

Signed-off-by: Adam Jackson 
---
 hw/kdrive/src/kdrive.c | 14 --
 1 file changed, 14 deletions(-)

diff --git a/hw/kdrive/src/kdrive.c b/hw/kdrive/src/kdrive.c
index 82dcf4ae73..6dbb908565 100644
--- a/hw/kdrive/src/kdrive.c
+++ b/hw/kdrive/src/kdrive.c
@@ -86,8 +86,6 @@ const char *kdGlobalXkbLayout = NULL;
 const char *kdGlobalXkbVariant = NULL;
 const char *kdGlobalXkbOptions = NULL;
 
-static Bool kdCaughtSignal = FALSE;
-
 void
 KdDisableScreen(ScreenPtr pScreen)
 {
@@ -168,9 +166,6 @@ void
 AbortDDX(enum ExitCode error)
 {
 KdDisableScreens();
-
-if (kdCaughtSignal)
-OsAbort();
 }
 
 void
@@ -937,13 +932,6 @@ KdAddScreen(ScreenInfo * pScreenInfo,
 AddScreen(KdScreenInit, argc, argv);
 }
 
-static int
-KdSignalWrapper(int signum)
-{
-kdCaughtSignal = TRUE;
-return 1;   /* use generic OS layer cleanup & abort */
-}
-
 void
 KdInitOutput(ScreenInfo * pScreenInfo, int argc, char **argv)
 {
@@ -985,8 +973,6 @@ KdInitOutput(ScreenInfo * pScreenInfo, int argc, char 
**argv)
 for (screen = card->screenList; screen; screen = screen->next)
 KdAddScreen(pScreenInfo, screen, argc, argv);
 
-OsRegisterSigWrapper(KdSignalWrapper);
-
 #if defined(CONFIG_UDEV) || defined(CONFIG_HAL)
 if (SeatId) /* Enable input hot-plugging */
 config_pre_init();
-- 
2.14.3

___
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 1/6] xfree86: Remove xf86InterceptSigIll

2017-11-20 Thread Adam Jackson
This was added in ~2004 for the sis driver, to detect whether it could
use SSE for memcpy. Charmingly, the code to check whether that feature
exists in the server is:

#if XORG_VERSION_CURRENT >= XORG_VERSION_NUMERIC(6,8,99,13,0)
#define SISCHECKOSSSE   /* Automatic check OS for SSE; requires 
SigIll facility */
#endif

Which means it has never worked in any modular server release.

A less gross way to do this is to check for SSE support with getauxval()
or /proc/cpuinfo or similar. Since no driver is using the existing
intercept mechanism, drop it.

Signed-off-by: Adam Jackson 
---
 hw/xfree86/common/xf86.h   |  1 -
 hw/xfree86/common/xf86Events.c | 13 -
 2 files changed, 14 deletions(-)

diff --git a/hw/xfree86/common/xf86.h b/hw/xfree86/common/xf86.h
index 674e83cb1f..db6e299b31 100644
--- a/hw/xfree86/common/xf86.h
+++ b/hw/xfree86/common/xf86.h
@@ -216,7 +216,6 @@ extern _X_EXPORT void xf86EnableGeneralHandler(void 
*handler);
 extern _X_EXPORT InputHandlerProc xf86SetConsoleHandler(InputHandlerProc
 handler, void *data);
 extern _X_EXPORT void xf86InterceptSignals(int *signo);
-extern _X_EXPORT void xf86InterceptSigIll(void (*sigillhandler) (void));
 extern _X_EXPORT void xf86ProcessActionEvent(ActionEvent action, void *arg);
 extern _X_EXPORT void xf86PrintBacktrace(void);
 extern _X_EXPORT Bool xf86VTOwner(void);
diff --git a/hw/xfree86/common/xf86Events.c b/hw/xfree86/common/xf86Events.c
index 53ec74f261..e2e6ca7691 100644
--- a/hw/xfree86/common/xf86Events.c
+++ b/hw/xfree86/common/xf86Events.c
@@ -276,14 +276,6 @@ xf86InterceptSignals(int *signo)
 *signo = -1;
 }
 
-static void (*xf86SigIllHandler) (void) = NULL;
-
-void
-xf86InterceptSigIll(void (*sigillhandler) (void))
-{
-xf86SigIllHandler = sigillhandler;
-}
-
 /*
  * xf86SigWrapper --
  *Catch unexpected signals and exit or continue cleanly.
@@ -291,11 +283,6 @@ xf86InterceptSigIll(void (*sigillhandler) (void))
 int
 xf86SigWrapper(int signo)
 {
-if ((signo == SIGILL) && xf86SigIllHandler) {
-(*xf86SigIllHandler) ();
-return 0;   /* continue */
-}
-
 if (xf86SignalIntercept && (*xf86SignalIntercept < 0)) {
 *xf86SignalIntercept = signo;
 return 0;   /* continue */
-- 
2.14.3

___
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: Xstartup handle DISPLAY=(null) correctly

2017-11-20 Thread Adam Jackson
On Mon, 2017-11-20 at 13:36 +, Emil Velikov wrote:
> On 20 November 2017 at 09:22, walter harms  wrote:
> > at what circumstances can DISPLAY == '(null)' ?
> > 
> > looks more like a bug in an Xserver.
> > 
> 
> The commit message should explain where/how such string originates and
> why the current solutions is preferred.
> Say bug is in A/B/other and fixing it in FOO allows all the buggy
> instances to be handled consistently.

The patch content itself is not going to be accepted, though. If
$DISPLAY is ever "(null)" then the _caller_ has done something
incorrectly, because that's not a valid display string. Working around
that in the xdm startup script does not fix the bug.

- 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: get full HD resolution

2017-11-20 Thread j...@dodin.org

Hello again.

More close examination of my logs and googling let me think the XW in 
the B156XW004.7 screen name is for XWGA, so 1366x768.


too bad

I just discovered the --scale-from 1920x1080 that seems to very well fit 
my needs, with --panning 1920x1080


but to makes it permanent, how can I? I tried --transform but couldn't 
find the good parameters


thanks for any help

jdd

--
http://dodin.org

___
xorg@lists.x.org: X.Org support
Archives: http://lists.freedesktop.org/archives/xorg
Info: https://lists.x.org/mailman/listinfo/xorg
Your subscription address: %(user_address)s

get full HD resolution

2017-11-20 Thread j...@dodin.org

Hello,
I use openSUSE and have already asked on openSUSE forum with no result 
so far.


The problem details are here, I can copy then on the list if asked to :-):

https://forums.opensuse.org/showthread.php/528183-Get-a-HD-resolution-on-reluctant-hardware

summary is I expect my hardware LCD to be full HD 1080, because I got 
full HD working during a week or so, but an update killed the process 
and I then can't get more than 1366x768 :-(.


the computer is an ASUS N550JK, optimus, graphics:

NVIDIA® GeForce® GTX850M 4 Go DDR3
INTEL i810 HD graphics 4600

nothing in the bios to activate/deactivate any one. Bumblebee seems to 
works.


I *can* have full hd on external TV that needs tweeking with xrandr, but 
on internal I get


xrandr --newmode "1920x1080_60.00"  173.00  1920 2048 2248 2576  1080 
1083 1088 1120 -hsync +vsync
xrandr --addmode eDP1 1920x1080_60.00 

X Error of failed request:  BadMatch (invalid parameter attributes) 



  Major opcode of failed request:  140 (RANDR) 



  Minor opcode of failed request:  18 (RRAddOutputMode) 



  Serial number of failed request:  39 



  Current serial number in output stream:  40

paste of X logs:

http://susepaste.org/55359159

any hint? I tried proprietary drivers with no better luck

thanks
jdd

--
http://dodin.org
___
xorg@lists.x.org: X.Org support
Archives: http://lists.freedesktop.org/archives/xorg
Info: https://lists.x.org/mailman/listinfo/xorg
Your subscription address: %(user_address)s

Re: Xstartup handle DISPLAY=(null) correctly

2017-11-20 Thread Emil Velikov
On 20 November 2017 at 09:22, walter harms  wrote:
> at what circumstances can DISPLAY == '(null)' ?
>
> looks more like a bug in an Xserver.
>
The commit message should explain where/how such string originates and
why the current solutions is preferred.
Say bug is in A/B/other and fixing it in FOO allows all the buggy
instances to be handled consistently.

Xiaoguang Wang, please read up on the patch submission process -
proper commit message, Fixes/Bugzilla tag, git send-email etc.
https://www.x.org/wiki/Development/Documentation/SubmittingPatches/

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

[Bug 34486] Poor xterm/exa perf with ColorTiling on.

2017-11-20 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=34486

Michel Dänzer  changed:

   What|Removed |Added

 Resolution|--- |WONTFIX
   Assignee|xorg-driver-ati@lists.x.org |xorg-t...@lists.x.org
  Component|Driver/Radeon   |Server/Acceleration/EXA
 Status|REOPENED|RESOLVED

--- Comment #20 from Michel Dänzer  ---
The fundamental issue in EXA will likely never be fixed at this point. The
recommended solution is to use glamor where possible.

-- 
You are receiving this mail because:
You are the assignee for the bug.___
xorg-driver-ati mailing list
xorg-driver-ati@lists.x.org
https://lists.x.org/mailman/listinfo/xorg-driver-ati


[PATCH xserver] xwayland: Restore default signal handlers

2017-11-20 Thread Olivier Fourdan
Xwayland is a pretty standard Wayland client, we want to be able to
capture core dumps on crashes.

Yet using "-core" in the command line is not what we want, because that
causes any FatalError() to generate a core dump, meaning that we would
get a core file for all Wayland server crashes, which would generate a
lot of false positives.

Besides, for most case, the xorg_backtrace() generated is not sufficient
and rather ineffective compared to a regular debugger session.

Restore the default signal handlers for Xwayland so that the usual
signals (SIGSEGV, SIGABRT, SIGILL, etc.) will possibly generate a core
file (depending on the OS configuration of course).

See also: https://bugzilla.gnome.org/show_bug.cgi?id=790502
 and: https://bugzilla.gnome.org/show_bug.cgi?id=789086

Signed-off-by: Olivier Fourdan 
---
 hw/xwayland/xwayland.c | 19 +++
 1 file changed, 19 insertions(+)

diff --git a/hw/xwayland/xwayland.c b/hw/xwayland/xwayland.c
index 81e669cae..f327db748 100644
--- a/hw/xwayland/xwayland.c
+++ b/hw/xwayland/xwayland.c
@@ -845,6 +845,22 @@ wm_selection_callback(CallbackListPtr *p, void *data, void 
*arg)
 DeleteCallback(, wm_selection_callback, xwl_screen);
 }
 
+static void
+reset_default_signals (void)
+{
+OsSignal(SIGSEGV, SIG_DFL);
+OsSignal(SIGABRT, SIG_DFL);
+OsSignal(SIGILL, SIG_DFL);
+#ifdef SIGEMT
+OsSignal(SIGEMT, SIG_DFL);
+#endif
+OsSignal(SIGFPE, SIG_DFL);
+OsSignal(SIGBUS, SIG_DFL);
+OsSignal(SIGSYS, SIG_DFL);
+OsSignal(SIGXCPU, SIG_DFL);
+OsSignal(SIGXFSZ, SIG_DFL);
+}
+
 static Bool
 xwl_screen_init(ScreenPtr pScreen, int argc, char **argv)
 {
@@ -853,6 +869,9 @@ xwl_screen_init(ScreenPtr pScreen, int argc, char **argv)
 Pixel red_mask, blue_mask, green_mask;
 int ret, bpc, green_bpc, i;
 
+/* For Xwayland, we want to be able to capture core files on crashes */
+reset_default_signals();
+
 xwl_screen = calloc(1, sizeof *xwl_screen);
 if (xwl_screen == NULL)
 return FALSE;
-- 
2.14.3

___
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 1/7] modesetting: Check for uevents on EnterVT

2017-11-20 Thread Daniel Martin
We have to re-evaluate the outputs (their ids) before
drmmode_set_desired_modes() as it triggers drmmode_set_mode_major().
drmmode_set_mode_major() working with old ids is likely to fail and will
tear down the server.

Signed-off-by: Daniel Martin 
---
 hw/xfree86/drivers/modesetting/driver.c  |  2 +-
 hw/xfree86/drivers/modesetting/drmmode_display.c | 18 ++
 hw/xfree86/drivers/modesetting/drmmode_display.h |  1 +
 3 files changed, 20 insertions(+), 1 deletion(-)

diff --git a/hw/xfree86/drivers/modesetting/driver.c 
b/hw/xfree86/drivers/modesetting/driver.c
index 380dbbe17..286d3e070 100644
--- a/hw/xfree86/drivers/modesetting/driver.c
+++ b/hw/xfree86/drivers/modesetting/driver.c
@@ -1760,7 +1760,7 @@ EnterVT(ScrnInfoPtr pScrn)
 
 SetMaster(pScrn);
 
-if (!drmmode_set_desired_modes(pScrn, >drmmode, TRUE))
+if (!drmmode_enter_vt(pScrn, >drmmode))
 return FALSE;
 
 return TRUE;
diff --git a/hw/xfree86/drivers/modesetting/drmmode_display.c 
b/hw/xfree86/drivers/modesetting/drmmode_display.c
index 5ecf20a36..537b2b2c0 100644
--- a/hw/xfree86/drivers/modesetting/drmmode_display.c
+++ b/hw/xfree86/drivers/modesetting/drmmode_display.c
@@ -54,6 +54,8 @@ static Bool drmmode_xf86crtc_resize(ScrnInfoPtr scrn, int 
width, int height);
 static PixmapPtr drmmode_create_pixmap_header(ScreenPtr pScreen, int width, 
int height,
   int depth, int bitsPerPixel, int 
devKind,
   void *pPixData);
+static void drmmode_handle_uevents(int fd, void *closure);
+
 static Bool
 drmmode_zaphod_string_matches(ScrnInfoPtr scrn, const char *s, char 
*output_name)
 {
@@ -2008,6 +2010,22 @@ static const xf86CrtcConfigFuncsRec 
drmmode_xf86crtc_config_funcs = {
 };
 
 Bool
+drmmode_enter_vt(ScrnInfoPtr pScrn, drmmode_ptr drmmode)
+{
+#ifdef CONFIG_UDEV_KMS
+if (drmmode->uevent_monitor) {
+drmmode_handle_uevents(
+udev_monitor_get_fd(drmmode->uevent_monitor), drmmode);
+}
+#endif
+
+if (!drmmode_set_desired_modes(pScrn, drmmode, TRUE))
+return FALSE;
+
+return TRUE;
+}
+
+Bool
 drmmode_pre_init(ScrnInfoPtr pScrn, drmmode_ptr drmmode, int cpp)
 {
 modesettingEntPtr ms_ent = ms_ent_priv(pScrn);
diff --git a/hw/xfree86/drivers/modesetting/drmmode_display.h 
b/hw/xfree86/drivers/modesetting/drmmode_display.h
index c2a15adf7..b146e717a 100644
--- a/hw/xfree86/drivers/modesetting/drmmode_display.h
+++ b/hw/xfree86/drivers/modesetting/drmmode_display.h
@@ -180,6 +180,7 @@ Bool drmmode_SharedPixmapFlip(PixmapPtr frontTarget, 
xf86CrtcPtr crtc,
   drmmode_ptr drmmode);
 void drmmode_DisableSharedPixmapFlipping(xf86CrtcPtr crtc, drmmode_ptr 
drmmode);
 
+extern Bool drmmode_enter_vt(ScrnInfoPtr scrn, drmmode_ptr drmmode);
 extern Bool drmmode_pre_init(ScrnInfoPtr pScrn, drmmode_ptr drmmode, int cpp);
 void drmmode_adjust_frame(ScrnInfoPtr pScrn, drmmode_ptr drmmode, int x, int 
y);
 extern Bool drmmode_set_desired_modes(ScrnInfoPtr pScrn, drmmode_ptr drmmode, 
Bool set_hw);
-- 
2.13.6

___
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 6/7] modesetting: Check for vanished outputs after updating output ids

2017-11-20 Thread Daniel Martin
Doing this before updating the output_ids is not a good idea as we
compare the output id in the loop and the output id is unreliable.

Signed-off-by: Daniel Martin 
---
 hw/xfree86/drivers/modesetting/drmmode_display.c | 51 ++--
 1 file changed, 29 insertions(+), 22 deletions(-)

diff --git a/hw/xfree86/drivers/modesetting/drmmode_display.c 
b/hw/xfree86/drivers/modesetting/drmmode_display.c
index a6f10ca91..e0c9f0e69 100644
--- a/hw/xfree86/drivers/modesetting/drmmode_display.c
+++ b/hw/xfree86/drivers/modesetting/drmmode_display.c
@@ -2355,28 +2355,6 @@ drmmode_handle_uevents(int fd, void *closure)
 goto out_free_res;
 }
 
-/* figure out if we have gotten rid of any connectors
-   traverse old output list looking for outputs */
-for (i = 0; i < config->num_output; i++) {
-xf86OutputPtr output = config->output[i];
-drmmode_output_private_ptr drmmode_output;
-
-drmmode_output = output->driver_private;
-found = FALSE;
-for (j = 0; j < mode_res->count_connectors; j++) {
-if (mode_res->connectors[j] == drmmode_output->output_id) {
-found = TRUE;
-break;
-}
-}
-if (found)
-continue;
-
-drmmode_output->output_id = -1;
-
-changed = TRUE;
-}
-
 /* Re-evaluate the outputs, add new ones and update output ids. */
 for (i = 0; i < mode_res->count_connectors; i++) {
 drmModePropertyBlobPtr path_blob;
@@ -2416,6 +2394,35 @@ drmmode_handle_uevents(int fd, void *closure)
 drmModeFreeConnector(koutput);
 }
 
+/* Figure out if we have gotten rid of any connectors. As we updated
+ * the output_ids above, we can use them for comparision. */
+for (i = 0; i < config->num_output; i++) {
+xf86OutputPtr output = config->output[i];
+drmmode_output_private_ptr drmmode_output;
+
+drmmode_output = output->driver_private;
+found = FALSE;
+
+if (drmmode_output->output_id == -1)
+continue;
+
+for (j = 0; j < mode_res->count_connectors; j++) {
+if (mode_res->connectors[j] == drmmode_output->output_id) {
+found = TRUE;
+break;
+}
+}
+if (found)
+continue;
+
+xf86DrvMsg(scrn->scrnIndex, X_DEBUG,
+   "hotplug event: output %s vanished\n",
+   output->name);
+
+drmmode_output->output_id = -1;
+changed = TRUE;
+}
+
 if (changed) {
 RRSetChanged(xf86ScrnToScreen(scrn));
 RRTellChanged(xf86ScrnToScreen(scrn));
-- 
2.13.6

___
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 4/7] modesetting: Check mode in drmmode_set_mode_major() first

2017-11-20 Thread Daniel Martin
We don't do anything in drmmode_set_mode_major() without a mode. Check
it at the beginning and may bail out. With that, we can remove one
indention level. No functional changes.

Signed-off-by: Daniel Martin 
---
 hw/xfree86/drivers/modesetting/drmmode_display.c | 165 +++
 1 file changed, 82 insertions(+), 83 deletions(-)

diff --git a/hw/xfree86/drivers/modesetting/drmmode_display.c 
b/hw/xfree86/drivers/modesetting/drmmode_display.c
index d8dd4d75f..66cc9c06a 100644
--- a/hw/xfree86/drivers/modesetting/drmmode_display.c
+++ b/hw/xfree86/drivers/modesetting/drmmode_display.c
@@ -597,17 +597,18 @@ drmmode_set_mode_major(xf86CrtcPtr crtc, DisplayModePtr 
mode,
 uint32_t fb_id = 0;
 drmModeModeInfo kmode;
 
+if (!mode)
+return TRUE;
+
 saved_mode = crtc->mode;
 saved_x = crtc->x;
 saved_y = crtc->y;
 saved_rotation = crtc->rotation;
 
-if (mode) {
-crtc->mode = *mode;
-crtc->x = x;
-crtc->y = y;
-crtc->rotation = rotation;
-}
+crtc->mode = *mode;
+crtc->x = x;
+crtc->y = y;
+crtc->rotation = rotation;
 
 output_ids = calloc(sizeof(uint32_t), xf86_config->num_output);
 if (!output_ids) {
@@ -615,91 +616,89 @@ drmmode_set_mode_major(xf86CrtcPtr crtc, DisplayModePtr 
mode,
 goto done;
 }
 
-if (mode) {
-for (i = 0; i < xf86_config->num_output; i++) {
-xf86OutputPtr output = xf86_config->output[i];
-drmmode_output_private_ptr drmmode_output;
+for (i = 0; i < xf86_config->num_output; i++) {
+xf86OutputPtr output = xf86_config->output[i];
+drmmode_output_private_ptr drmmode_output;
 
-if (output->crtc != crtc)
-continue;
+if (output->crtc != crtc)
+continue;
 
-drmmode_output = output->driver_private;
-if (drmmode_output->output_id == -1)
-continue;
-output_ids[output_count] = drmmode_output->output_id;
-output_count++;
-}
+drmmode_output = output->driver_private;
+if (drmmode_output->output_id == -1)
+continue;
+output_ids[output_count] = drmmode_output->output_id;
+output_count++;
+}
 
-if (!xf86CrtcRotate(crtc)) {
-goto done;
-}
-crtc->funcs->gamma_set(crtc, crtc->gamma_red, crtc->gamma_green,
-   crtc->gamma_blue, crtc->gamma_size);
+if (!xf86CrtcRotate(crtc)) {
+goto done;
+}
+crtc->funcs->gamma_set(crtc, crtc->gamma_red, crtc->gamma_green,
+   crtc->gamma_blue, crtc->gamma_size);
 
-drmmode_ConvertToKMode(crtc->scrn, , mode);
+drmmode_ConvertToKMode(crtc->scrn, , mode);
 
-fb_id = drmmode->fb_id;
-if (drmmode_crtc->prime_pixmap) {
-if (!drmmode->reverse_prime_offload_mode) {
-msPixmapPrivPtr ppriv =
-msGetPixmapPriv(drmmode, drmmode_crtc->prime_pixmap);
-fb_id = ppriv->fb_id;
-x = 0;
-} else
-x = drmmode_crtc->prime_pixmap_x;
-y = 0;
-}
-else if (drmmode_crtc->rotate_fb_id) {
-fb_id = drmmode_crtc->rotate_fb_id;
-x = y = 0;
-}
-
-if (fb_id == 0) {
-ret = drmModeAddFB(drmmode->fd,
-   pScrn->virtualX, pScrn->virtualY,
-   pScrn->depth, drmmode->kbpp,
-   drmmode_bo_get_pitch(>front_bo),
-   drmmode_bo_get_handle(>front_bo),
-   >fb_id);
-if (ret < 0) {
-ErrorF("failed to add fb %d\n", ret);
-ret = FALSE;
-goto done;
-}
-fb_id = drmmode->fb_id;
-}
-
-if (drmModeSetCrtc(drmmode->fd, drmmode_crtc->mode_crtc->crtc_id,
-   fb_id, x, y, output_ids, output_count, )) {
-xf86DrvMsg(crtc->scrn->scrnIndex, X_ERROR,
-   "failed to set mode: %s\n", strerror(errno));
-ret = FALSE;
-goto done;
+fb_id = drmmode->fb_id;
+if (drmmode_crtc->prime_pixmap) {
+if (!drmmode->reverse_prime_offload_mode) {
+msPixmapPrivPtr ppriv =
+msGetPixmapPriv(drmmode, drmmode_crtc->prime_pixmap);
+fb_id = ppriv->fb_id;
+x = 0;
 } else
-ret = TRUE;
+x = drmmode_crtc->prime_pixmap_x;
+y = 0;
+}
+else if (drmmode_crtc->rotate_fb_id) {
+fb_id = drmmode_crtc->rotate_fb_id;
+x = y = 0;
+}
 
-if (crtc->scrn->pScreen)
-xf86CrtcSetScreenSubpixelOrder(crtc->scrn->pScreen);
-
-drmmode_crtc->need_modeset = FALSE;
-crtc->funcs->dpms(crtc, DPMSModeOn);
-
-if 

[PATCH xserver 5/7] modesetting: Fix server crash on failing modeset

2017-11-20 Thread Daniel Martin
This fixes a potential:
(EE) modeset(0): failed to set mode: Invalid argument
crashing the server on EnterVT.

To reproduce the bug you need a laptop (i.e. Lenovo X270), a docking
station using MST to connect the outputs (i.e. ThinkPad Ultra Dock) and
have at least one active output at the dock. Then switch to another VT,
undock the laptop and switch back to the server.

drmmode_set_mode_major() will fail on EnterVT as it tries to
re-configure a disconnected output. Skip disconnected outputs and skip
drmModeSetCrtc() if no outputs have to be configured (output_count == 0)
as this would fail too.

Additionally, log the crtc id if drmModeSetCrtc() fails anyway. That id
plus KMS debug logs may help to solve potential other problems.

Signed-off-by: Daniel Martin 
---
 hw/xfree86/drivers/modesetting/drmmode_display.c | 21 +
 1 file changed, 17 insertions(+), 4 deletions(-)

diff --git a/hw/xfree86/drivers/modesetting/drmmode_display.c 
b/hw/xfree86/drivers/modesetting/drmmode_display.c
index 66cc9c06a..a6f10ca91 100644
--- a/hw/xfree86/drivers/modesetting/drmmode_display.c
+++ b/hw/xfree86/drivers/modesetting/drmmode_display.c
@@ -592,7 +592,7 @@ drmmode_set_mode_major(xf86CrtcPtr crtc, DisplayModePtr 
mode,
 DisplayModeRec saved_mode;
 uint32_t *output_ids = NULL;
 int output_count = 0;
-Bool ret = TRUE;
+Bool ret = TRUE, rewind = FALSE;
 int i;
 uint32_t fb_id = 0;
 drmModeModeInfo kmode;
@@ -620,7 +620,8 @@ drmmode_set_mode_major(xf86CrtcPtr crtc, DisplayModePtr 
mode,
 xf86OutputPtr output = xf86_config->output[i];
 drmmode_output_private_ptr drmmode_output;
 
-if (output->crtc != crtc)
+if (output->crtc != crtc ||
+output->status != XF86OutputStatusConnected)
 continue;
 
 drmmode_output = output->driver_private;
@@ -630,6 +631,16 @@ drmmode_set_mode_major(xf86CrtcPtr crtc, DisplayModePtr 
mode,
 output_count++;
 }
 
+if (!output_count) {
+xf86DrvMsg(pScrn->scrnIndex, X_DEBUG,
+"Skip mode set of crtc[%d], no outputs\n",
+drmmode_crtc->mode_crtc->crtc_id);
+crtc->active = FALSE;
+ret = TRUE;
+rewind = TRUE;
+goto done;
+}
+
 if (!xf86CrtcRotate(crtc)) {
 goto done;
 }
@@ -672,7 +683,9 @@ drmmode_set_mode_major(xf86CrtcPtr crtc, DisplayModePtr 
mode,
 if (drmModeSetCrtc(drmmode->fd, drmmode_crtc->mode_crtc->crtc_id,
fb_id, x, y, output_ids, output_count, )) {
 xf86DrvMsg(crtc->scrn->scrnIndex, X_ERROR,
-   "failed to set mode: %s\n", strerror(errno));
+   "failed to set mode on crtc[%d]: %s\n",
+   drmmode_crtc->mode_crtc->crtc_id,
+   strerror(errno));
 ret = FALSE;
 goto done;
 } else
@@ -702,7 +715,7 @@ drmmode_set_mode_major(xf86CrtcPtr crtc, DisplayModePtr 
mode,
 }
 
  done:
-if (!ret) {
+if (!ret || rewind) {
 crtc->x = saved_x;
 crtc->y = saved_y;
 crtc->rotation = saved_rotation;
-- 
2.13.6

___
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 7/7] modesetting: Squash link-status check into output re-evaluation loop

2017-11-20 Thread Daniel Martin
By using a helper function it looks more streamlined and we don't do to
drmModeGetConnectorCurrent() in drmmode_handle_uevents() twice.

Signed-off-by: Daniel Martin 
---
 hw/xfree86/drivers/modesetting/drmmode_display.c | 99 +++-
 1 file changed, 47 insertions(+), 52 deletions(-)

diff --git a/hw/xfree86/drivers/modesetting/drmmode_display.c 
b/hw/xfree86/drivers/modesetting/drmmode_display.c
index e0c9f0e69..fdf059583 100644
--- a/hw/xfree86/drivers/modesetting/drmmode_display.c
+++ b/hw/xfree86/drivers/modesetting/drmmode_display.c
@@ -1255,6 +1255,26 @@ koutput_equals_output(int fd, xf86OutputPtr output,
 return !strcmp(koutput_path_blob->data, drmmode_output->path_blob->data);
 }
 
+/* TODO: Defines can be removed with libdrm >= v2.4.78 */
+#define DRM_MODE_LINK_STATUS_GOOD   0
+#define DRM_MODE_LINK_STATUS_BAD1
+
+static Bool
+koutput_link_status_good(int fd, drmModeConnectorPtr koutput)
+{
+int idx = koutput_get_prop_idx(fd, koutput,
+DRM_MODE_PROP_ENUM, "link-status");
+
+/* Unknown property? Treat as link-status == good. */
+if (idx == -1)
+return TRUE;
+
+return (koutput->prop_values[idx] == DRM_MODE_LINK_STATUS_GOOD);
+}
+
+#undef DRM_MODE_LINK_STATUS_BAD
+#undef DRM_MODE_LINK_STATUS_GOOD
+
 #endif
 
 static void
@@ -2279,9 +2299,6 @@ drmmode_setup_colormap(ScreenPtr pScreen, ScrnInfoPtr 
pScrn)
 
 #ifdef CONFIG_UDEV_KMS
 
-#define DRM_MODE_LINK_STATUS_GOOD   0
-#define DRM_MODE_LINK_STATUS_BAD1
-
 static void
 drmmode_handle_uevents(int fd, void *closure)
 {
@@ -2301,51 +2318,6 @@ drmmode_handle_uevents(int fd, void *closure)
 if (!found)
 return;
 
-/* Try to re-set the mode on all the connectors with a BAD link-state:
- * This may happen if a link degrades and a new modeset is necessary, using
- * different link-training parameters. If the kernel found that the current
- * mode is not achievable anymore, it should have pruned the mode before
- * sending the hotplug event. Try to re-set the currently-set mode to keep
- * the display alive, this will fail if the mode has been pruned.
- * In any case, we will send randr events for the Desktop Environment to
- * deal with it, if it wants to.
- */
-for (i = 0; i < config->num_output; i++) {
-xf86OutputPtr output = config->output[i];
-xf86CrtcPtr crtc = output->crtc;
-drmmode_output_private_ptr drmmode_output = output->driver_private;
-uint32_t con_id, idx;
-drmModeConnectorPtr koutput;
-
-if (crtc == NULL || drmmode_output->output_id == -1)
-continue;
-
-con_id = drmmode_output->output_id;
-/* Get an updated view of the properties for the current connector and
- * look for the link-status property
- */
-koutput = drmModeGetConnectorCurrent(drmmode->fd, con_id);
-if (!koutput)
-continue;
-
-idx = koutput_get_prop_idx(drmmode->fd, koutput,
-DRM_MODE_PROP_ENUM, "link-status");
-
-if ((idx > -1) &&
-(koutput->prop_values[idx] == DRM_MODE_LINK_STATUS_BAD)) {
-/* the connector got a link failure, re-set the current mode */
-drmmode_set_mode_major(crtc, >mode, crtc->rotation,
-   crtc->x, crtc->y);
-
-xf86DrvMsg(scrn->scrnIndex, X_WARNING,
-   "hotplug event: connector %u's link-state is BAD, "
-   "tried resetting the current mode. You may be left"
-   "with a black screen if this fails...\n", con_id);
-}
-
-drmModeFreeConnector(koutput);
-}
-
 mode_res = drmModeGetResources(drmmode->fd);
 if (!mode_res)
 goto out;
@@ -2359,6 +2331,7 @@ drmmode_handle_uevents(int fd, void *closure)
 for (i = 0; i < mode_res->count_connectors; i++) {
 drmModePropertyBlobPtr path_blob;
 drmModeConnectorPtr koutput;
+xf86OutputPtr output;
 
 koutput = drmModeGetConnectorCurrent(drmmode->fd,
 mode_res->connectors[i]);
@@ -2369,7 +2342,7 @@ drmmode_handle_uevents(int fd, void *closure)
 found = FALSE;
 
 for (j = 0; j < config->num_output; j++) {
-xf86OutputPtr output = config->output[j];
+output = config->output[j];
 drmmode_output_private_ptr drmmode_output;
 
 drmmode_output = output->driver_private;
@@ -2388,6 +2361,31 @@ drmmode_handle_uevents(int fd, void *closure)
 if (!found) {
 changed = TRUE;
 drmmode_output_init(scrn, drmmode, mode_res, i, TRUE, 0);
+} else
+if (output->crtc && !koutput_link_status_good(drmmode->fd, koutput)) {
+/* Try to re-set the mode on all the connectors with a BAD
+ * link-state: This may happen if a link degrades and a new
+ * modeset is necessary, using 

[PATCH xserver 3/7] modesetting: Compare connector info to identify outputs

2017-11-20 Thread Daniel Martin
The output id is unreliable for MST connectors and so is the connector
type id. Both can change during hotplugs of MST connectors. The fun part
comes if they change while we switched to another VT as one output id
may gets re-assigned to another output.

The only reliable way to identify MST connectors is their PATH. Non-MST
connectors can be identified using their type and type id.

Signed-off-by: Daniel Martin 
---
 hw/xfree86/drivers/modesetting/drmmode_display.c | 52 +---
 1 file changed, 46 insertions(+), 6 deletions(-)

diff --git a/hw/xfree86/drivers/modesetting/drmmode_display.c 
b/hw/xfree86/drivers/modesetting/drmmode_display.c
index b6835572a..d8dd4d75f 100644
--- a/hw/xfree86/drivers/modesetting/drmmode_display.c
+++ b/hw/xfree86/drivers/modesetting/drmmode_display.c
@@ -1223,6 +1223,28 @@ koutput_get_prop_blob(int fd, drmModeConnectorPtr 
koutput, const char *name)
 return blob;
 }
 
+#ifdef CONFIG_UDEV_KMS
+
+/* We have to compare the path if available, as the connector_type_id may
+ * increase on replug (i.e. add the laptop back into a docking station). */
+static Bool
+koutput_equals_output(int fd, xf86OutputPtr output,
+drmModeConnectorPtr koutput, drmModePropertyBlobPtr koutput_path_blob)
+{
+drmmode_output_private_ptr drmmode_output = output->driver_private;
+
+if (!drmmode_output->path_blob)
+return koutput->connector_type == drmmode_output->connector_type &&
+koutput->connector_type_id == drmmode_output->connector_type_id;
+
+if (!koutput_path_blob)
+return FALSE;
+
+return !strcmp(koutput_path_blob->data, drmmode_output->path_blob->data);
+}
+
+#endif
+
 static void
 drmmode_output_attach_tile(xf86OutputPtr output, drmModeConnectorPtr koutput)
 {
@@ -2343,8 +2365,17 @@ drmmode_handle_uevents(int fd, void *closure)
 changed = TRUE;
 }
 
-/* find new output ids we don't have outputs for */
+/* Re-evaluate the outputs, add new ones and update output ids. */
 for (i = 0; i < mode_res->count_connectors; i++) {
+drmModePropertyBlobPtr path_blob;
+drmModeConnectorPtr koutput;
+
+koutput = drmModeGetConnectorCurrent(drmmode->fd,
+mode_res->connectors[i]);
+if (!koutput)
+continue;
+
+path_blob = koutput_get_prop_blob(drmmode->fd, koutput, "PATH");
 found = FALSE;
 
 for (j = 0; j < config->num_output; j++) {
@@ -2352,16 +2383,25 @@ drmmode_handle_uevents(int fd, void *closure)
 drmmode_output_private_ptr drmmode_output;
 
 drmmode_output = output->driver_private;
-if (mode_res->connectors[i] == drmmode_output->output_id) {
+
+if (koutput_equals_output(drmmode->fd, output,
+koutput, path_blob)) {
 found = TRUE;
+/* The connector_id might have changed due to MST hotplugging
+ * or the output_id be -1, as the connector was disconnected
+ * once. */
+drmmode_output->output_id = koutput->connector_id;
 break;
 }
 }
-if (found)
-continue;
 
-changed = TRUE;
-drmmode_output_init(scrn, drmmode, mode_res, i, TRUE, 0);
+if (!found) {
+changed = TRUE;
+drmmode_output_init(scrn, drmmode, mode_res, i, TRUE, 0);
+}
+
+drmModeFreePropertyBlob(path_blob);
+drmModeFreeConnector(koutput);
 }
 
 if (changed) {
-- 
2.13.6

___
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 2/7] modesetting: Store info to identify a connector

2017-11-20 Thread Daniel Martin
That is the connector_type, connector_type_id and path_blob. We'll
identify a connector using this information later, as the output_id is
unreliable.

Signed-off-by: Daniel Martin 
---
 hw/xfree86/drivers/modesetting/drmmode_display.c | 10 +++---
 hw/xfree86/drivers/modesetting/drmmode_display.h |  3 +++
 2 files changed, 10 insertions(+), 3 deletions(-)

diff --git a/hw/xfree86/drivers/modesetting/drmmode_display.c 
b/hw/xfree86/drivers/modesetting/drmmode_display.c
index 537b2b2c0..b6835572a 100644
--- a/hw/xfree86/drivers/modesetting/drmmode_display.c
+++ b/hw/xfree86/drivers/modesetting/drmmode_display.c
@@ -1355,6 +1355,7 @@ drmmode_output_destroy(xf86OutputPtr output)
 int i;
 
 drmModeFreePropertyBlob(drmmode_output->edid_blob);
+drmModeFreePropertyBlob(drmmode_output->path_blob);
 drmModeFreePropertyBlob(drmmode_output->tile_blob);
 
 for (i = 0; i < drmmode_output->num_props; i++) {
@@ -1728,9 +1729,6 @@ drmmode_output_init(ScrnInfoPtr pScrn, drmmode_ptr 
drmmode, drmModeResPtr mode_r
 
 drmmode_create_name(pScrn, koutput, name, path_blob);
 
-if (path_blob)
-drmModeFreePropertyBlob(path_blob);
-
 if (path_blob && dynamic) {
 /* see if we have an output with this name already
and hook stuff up */
@@ -1742,6 +1740,8 @@ drmmode_output_init(ScrnInfoPtr pScrn, drmmode_ptr 
drmmode, drmModeResPtr mode_r
 
 drmmode_output = output->driver_private;
 drmmode_output->output_id = mode_res->connectors[num];
+
+drmModeFreePropertyBlob(path_blob);
 return 1;
 }
 }
@@ -1782,8 +1782,11 @@ drmmode_output_init(ScrnInfoPtr pScrn, drmmode_ptr 
drmmode, drmModeResPtr mode_r
 }
 
 drmmode_output->output_id = mode_res->connectors[num];
+drmmode_output->connector_type = koutput->connector_type;
+drmmode_output->connector_type_id = koutput->connector_type_id;
 drmmode_output->num_encoders = koutput->count_encoders;
 drmmode_output->mode_encoders = kencoders;
+drmmode_output->path_blob = path_blob;
 drmmode_output->drmmode = drmmode;
 output->mm_width = koutput->mmWidth;
 output->mm_height = koutput->mmHeight;
@@ -1816,6 +1819,7 @@ drmmode_output_init(ScrnInfoPtr pScrn, drmmode_ptr 
drmmode, drmModeResPtr mode_r
 free(kencoders);
 }
 drmModeFreeConnector(koutput);
+drmModeFreePropertyBlob(path_blob);
 
 return 0;
 }
diff --git a/hw/xfree86/drivers/modesetting/drmmode_display.h 
b/hw/xfree86/drivers/modesetting/drmmode_display.h
index b146e717a..9b5407709 100644
--- a/hw/xfree86/drivers/modesetting/drmmode_display.h
+++ b/hw/xfree86/drivers/modesetting/drmmode_display.h
@@ -129,9 +129,12 @@ typedef struct {
 typedef struct {
 drmmode_ptr drmmode;
 int output_id;
+int connector_type;
+int connector_type_id;
 int num_encoders;
 drmModeEncoderPtr *mode_encoders;
 drmModePropertyBlobPtr edid_blob;
+drmModePropertyBlobPtr path_blob;
 drmModePropertyBlobPtr tile_blob;
 int dpms_enum_id;
 int num_props;
-- 
2.13.6

___
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 0/7] modesetting - more stable MST hotpluging

2017-11-20 Thread Daniel Martin
This patchset handles hotpluging of MST connectors. They can be fun,
especially if we aren't active (VT switched away) and vanish + reappear.

- We have to check for uevents on EnterVT, otherwise we may work with
  outdated output_ids leading to a failing drmmode_set_mode_major() and
  tear the server down.
- We have to compare the PATH if available, as the output_id is
  unreliable.
- We have to make sure, we don't throw zero outputs to configure into
  drmModeSetCrtc() as this will fail and tear down the server.

Thanks,
Daniel

Daniel Martin (7):
  modesetting: Check for uevents on EnterVT
  modesetting: Store info to identify a connector
  modesetting: Compare connector info to identify outputs
  modesetting: Check mode in drmmode_set_mode_major() first
  modesetting: Fix server crash on failing modeset
  modesetting: Check for vanished outputs after updating output ids
  modesetting: Squash link-status check into output re-evaluation loop

 hw/xfree86/drivers/modesetting/driver.c  |   2 +-
 hw/xfree86/drivers/modesetting/drmmode_display.c | 384 ++-
 hw/xfree86/drivers/modesetting/drmmode_display.h |   4 +
 3 files changed, 235 insertions(+), 155 deletions(-)

-- 
2.13.6

___
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 4/6] modesetting: Retrieve drm connector in drmmode_output_detect()

2017-11-20 Thread Daniel Martin
So, we don't rely on the mode_output member.

Signed-off-by: Daniel Martin 
---
 hw/xfree86/drivers/modesetting/drmmode_display.c | 12 ++--
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/hw/xfree86/drivers/modesetting/drmmode_display.c 
b/hw/xfree86/drivers/modesetting/drmmode_display.c
index 4e8b7e51b..b2a563713 100644
--- a/hw/xfree86/drivers/modesetting/drmmode_display.c
+++ b/hw/xfree86/drivers/modesetting/drmmode_display.c
@@ -1142,21 +1142,19 @@ drmmode_output_detect(xf86OutputPtr output)
 /* go to the hw and retrieve a new output struct */
 drmmode_output_private_ptr drmmode_output = output->driver_private;
 drmmode_ptr drmmode = drmmode_output->drmmode;
+drmModeConnectorPtr koutput;
 xf86OutputStatus status;
 
 if (drmmode_output->output_id == -1)
 return XF86OutputStatusDisconnected;
 
-drmModeFreeConnector(drmmode_output->mode_output);
-
-drmmode_output->mode_output =
-drmModeGetConnector(drmmode->fd, drmmode_output->output_id);
-if (!drmmode_output->mode_output) {
+koutput = drmModeGetConnector(drmmode->fd, drmmode_output->output_id);
+if (!koutput) {
 drmmode_output->output_id = -1;
 return XF86OutputStatusDisconnected;
 }
 
-switch (drmmode_output->mode_output->connection) {
+switch (koutput->connection) {
 case DRM_MODE_CONNECTED:
 status = XF86OutputStatusConnected;
 break;
@@ -1168,6 +1166,8 @@ drmmode_output_detect(xf86OutputPtr output)
 status = XF86OutputStatusUnknown;
 break;
 }
+
+drmModeFreeConnector(koutput);
 return status;
 }
 
-- 
2.13.6

___
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 3/6] modesetting: Retrieve drm connector in drmmode_output_create_resources()

2017-11-20 Thread Daniel Martin
So, we don't rely on the mode_output member.

Signed-off-by: Daniel Martin 
---
 hw/xfree86/drivers/modesetting/drmmode_display.c | 21 +++--
 1 file changed, 15 insertions(+), 6 deletions(-)

diff --git a/hw/xfree86/drivers/modesetting/drmmode_display.c 
b/hw/xfree86/drivers/modesetting/drmmode_display.c
index f17598c23..4e8b7e51b 100644
--- a/hw/xfree86/drivers/modesetting/drmmode_display.c
+++ b/hw/xfree86/drivers/modesetting/drmmode_display.c
@@ -1424,25 +1424,31 @@ static void
 drmmode_output_create_resources(xf86OutputPtr output)
 {
 drmmode_output_private_ptr drmmode_output = output->driver_private;
-drmModeConnectorPtr mode_output = drmmode_output->mode_output;
 drmmode_ptr drmmode = drmmode_output->drmmode;
+drmModeConnectorPtr koutput;
 drmModePropertyPtr drmmode_prop;
 int i, j, err;
 
+/* Just need properties. drmModeGetConnectorCurrent() is sufficient. */
+koutput = drmModeGetConnectorCurrent(drmmode->fd,
+drmmode_output->output_id);
+if (!koutput)
+return;
+
 drmmode_output->props =
-calloc(mode_output->count_props, sizeof(drmmode_prop_rec));
+calloc(koutput->count_props, sizeof(drmmode_prop_rec));
 if (!drmmode_output->props)
-return;
+goto bail_out;
 
 drmmode_output->num_props = 0;
-for (i = 0, j = 0; i < mode_output->count_props; i++) {
-drmmode_prop = drmModeGetProperty(drmmode->fd, mode_output->props[i]);
+for (i = 0, j = 0; i < koutput->count_props; i++) {
+drmmode_prop = drmModeGetProperty(drmmode->fd, koutput->props[i]);
 if (drmmode_property_ignore(drmmode_prop)) {
 drmModeFreeProperty(drmmode_prop);
 continue;
 }
 drmmode_output->props[j].mode_prop = drmmode_prop;
-drmmode_output->props[j].value = mode_output->prop_values[i];
+drmmode_output->props[j].value = koutput->prop_values[i];
 drmmode_output->num_props++;
 j++;
 }
@@ -1516,6 +1522,9 @@ drmmode_output_create_resources(xf86OutputPtr output)
 }
 }
 }
+
+bail_out:
+drmModeFreeConnector(koutput);
 }
 
 static Bool
-- 
2.13.6

___
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 6/6] modesetting: Get current connector infos in drmmode_output_init()

2017-11-20 Thread Daniel Martin
No need for modes and connector status probing here.

Signed-off-by: Daniel Martin 
---
 hw/xfree86/drivers/modesetting/drmmode_display.c | 7 +--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/hw/xfree86/drivers/modesetting/drmmode_display.c 
b/hw/xfree86/drivers/modesetting/drmmode_display.c
index 829cef0b1..5ecf20a36 100644
--- a/hw/xfree86/drivers/modesetting/drmmode_display.c
+++ b/hw/xfree86/drivers/modesetting/drmmode_display.c
@@ -1714,8 +1714,11 @@ drmmode_output_init(ScrnInfoPtr pScrn, drmmode_ptr 
drmmode, drmModeResPtr mode_r
 int i;
 drmModePropertyBlobPtr path_blob = NULL;
 const char *s;
-koutput =
-drmModeGetConnector(drmmode->fd, mode_res->connectors[num]);
+
+/* We need encoders and properties, no mode list and no probing of the
+ * connector status. drmModeGetConnectorCurrent() is sufficient. */
+koutput = drmModeGetConnectorCurrent(drmmode->fd,
+mode_res->connectors[num]);
 if (!koutput)
 return 0;
 
-- 
2.13.6

___
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 5/6] modesetting: Remove mode_output member from drmmode_output

2017-11-20 Thread Daniel Martin
We failed to handle the mode_output member properly a few times. We can
retrieve it at any time, which we do at various places anyway. Remove
it.

Signed-off-by: Daniel Martin 
---
 hw/xfree86/drivers/modesetting/drmmode_display.c | 21 -
 hw/xfree86/drivers/modesetting/drmmode_display.h |  1 -
 2 files changed, 8 insertions(+), 14 deletions(-)

diff --git a/hw/xfree86/drivers/modesetting/drmmode_display.c 
b/hw/xfree86/drivers/modesetting/drmmode_display.c
index b2a563713..829cef0b1 100644
--- a/hw/xfree86/drivers/modesetting/drmmode_display.c
+++ b/hw/xfree86/drivers/modesetting/drmmode_display.c
@@ -624,8 +624,7 @@ drmmode_set_mode_major(xf86CrtcPtr crtc, DisplayModePtr 
mode,
 drmmode_output = output->driver_private;
 if (drmmode_output->output_id == -1)
 continue;
-output_ids[output_count] =
-drmmode_output->mode_output->connector_id;
+output_ids[output_count] = drmmode_output->output_id;
 output_count++;
 }
 
@@ -1353,7 +1352,6 @@ drmmode_output_destroy(xf86OutputPtr output)
 drmmode_output_private_ptr drmmode_output = output->driver_private;
 int i;
 
-drmModeFreeConnector(drmmode_output->mode_output);
 drmModeFreePropertyBlob(drmmode_output->edid_blob);
 drmModeFreePropertyBlob(drmmode_output->tile_blob);
 
@@ -1376,14 +1374,13 @@ static void
 drmmode_output_dpms(xf86OutputPtr output, int mode)
 {
 drmmode_output_private_ptr drmmode_output = output->driver_private;
-xf86CrtcPtr crtc = output->crtc;
-drmModeConnectorPtr koutput = drmmode_output->mode_output;
 drmmode_ptr drmmode = drmmode_output->drmmode;
+xf86CrtcPtr crtc = output->crtc;
 
-if (!koutput)
+if (drmmode_output->output_id == -1)
 return;
 
-drmModeConnectorSetProperty(drmmode->fd, koutput->connector_id,
+drmModeConnectorSetProperty(drmmode->fd, drmmode_output->output_id,
 drmmode_output->dpms_enum_id, mode);
 
 if (crtc) {
@@ -1740,7 +1737,6 @@ drmmode_output_init(ScrnInfoPtr pScrn, drmmode_ptr 
drmmode, drmModeResPtr mode_r
 
 drmmode_output = output->driver_private;
 drmmode_output->output_id = mode_res->connectors[num];
-drmmode_output->mode_output = koutput;
 return 1;
 }
 }
@@ -1781,7 +1777,6 @@ drmmode_output_init(ScrnInfoPtr pScrn, drmmode_ptr 
drmmode, drmModeResPtr mode_r
 }
 
 drmmode_output->output_id = mode_res->connectors[num];
-drmmode_output->mode_output = koutput;
 drmmode_output->num_encoders = koutput->count_encoders;
 drmmode_output->mode_encoders = kencoders;
 drmmode_output->drmmode = drmmode;
@@ -1805,6 +1800,8 @@ drmmode_output_init(ScrnInfoPtr pScrn, drmmode_ptr 
drmmode, drmModeResPtr mode_r
 
 if (dynamic)
 output->randr_output = RROutputCreate(xf86ScrnToScreen(pScrn), 
output->name, strlen(output->name), output);
+
+drmModeFreeConnector(koutput);
 return 1;
 
  out_free_encoders:
@@ -2261,10 +2258,10 @@ drmmode_handle_uevents(int fd, void *closure)
 uint32_t con_id, idx;
 drmModeConnectorPtr koutput;
 
-if (crtc == NULL || drmmode_output->mode_output == NULL)
+if (crtc == NULL || drmmode_output->output_id == -1)
 continue;
 
-con_id = drmmode_output->mode_output->connector_id;
+con_id = drmmode_output->output_id;
 /* Get an updated view of the properties for the current connector and
  * look for the link-status property
  */
@@ -2316,8 +2313,6 @@ drmmode_handle_uevents(int fd, void *closure)
 if (found)
 continue;
 
-drmModeFreeConnector(drmmode_output->mode_output);
-drmmode_output->mode_output = NULL;
 drmmode_output->output_id = -1;
 
 changed = TRUE;
diff --git a/hw/xfree86/drivers/modesetting/drmmode_display.h 
b/hw/xfree86/drivers/modesetting/drmmode_display.h
index 2174fe07e..c2a15adf7 100644
--- a/hw/xfree86/drivers/modesetting/drmmode_display.h
+++ b/hw/xfree86/drivers/modesetting/drmmode_display.h
@@ -129,7 +129,6 @@ typedef struct {
 typedef struct {
 drmmode_ptr drmmode;
 int output_id;
-drmModeConnectorPtr mode_output;
 int num_encoders;
 drmModeEncoderPtr *mode_encoders;
 drmModePropertyBlobPtr edid_blob;
-- 
2.13.6

___
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 1/6] modesetting: Save number of encoders in drmmode_output

2017-11-20 Thread Daniel Martin
So, we don't rely on the mode_output member.

Signed-off-by: Daniel Martin 
---
 hw/xfree86/drivers/modesetting/drmmode_display.c | 13 +++--
 hw/xfree86/drivers/modesetting/drmmode_display.h |  1 +
 2 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/hw/xfree86/drivers/modesetting/drmmode_display.c 
b/hw/xfree86/drivers/modesetting/drmmode_display.c
index a51722b58..1ce41793b 100644
--- a/hw/xfree86/drivers/modesetting/drmmode_display.c
+++ b/hw/xfree86/drivers/modesetting/drmmode_display.c
@@ -1355,6 +1355,7 @@ drmmode_output_destroy(xf86OutputPtr output)
 drmmode_output_private_ptr drmmode_output = output->driver_private;
 int i;
 
+drmModeFreeConnector(drmmode_output->mode_output);
 drmModeFreePropertyBlob(drmmode_output->edid_blob);
 drmModeFreePropertyBlob(drmmode_output->tile_blob);
 
@@ -1363,13 +1364,12 @@ drmmode_output_destroy(xf86OutputPtr output)
 free(drmmode_output->props[i].atoms);
 }
 free(drmmode_output->props);
-if (drmmode_output->mode_output) {
-for (i = 0; i < drmmode_output->mode_output->count_encoders; i++) {
-drmModeFreeEncoder(drmmode_output->mode_encoders[i]);
-}
-drmModeFreeConnector(drmmode_output->mode_output);
+
+for (i = 0; i < drmmode_output->num_encoders; i++) {
+drmModeFreeEncoder(drmmode_output->mode_encoders[i]);
 }
 free(drmmode_output->mode_encoders);
+
 free(drmmode_output);
 output->driver_private = NULL;
 }
@@ -1775,6 +1775,7 @@ drmmode_output_init(ScrnInfoPtr pScrn, drmmode_ptr 
drmmode, drmModeResPtr mode_r
 
 drmmode_output->output_id = mode_res->connectors[num];
 drmmode_output->mode_output = koutput;
+drmmode_output->num_encoders = koutput->count_encoders;
 drmmode_output->mode_encoders = kencoders;
 drmmode_output->drmmode = drmmode;
 output->mm_width = koutput->mmWidth;
@@ -1850,7 +1851,7 @@ drmmode_clones_init(ScrnInfoPtr scrn, drmmode_ptr 
drmmode, drmModeResPtr mode_re
 drmmode_output = output->driver_private;
 drmmode_output->enc_clone_mask = 0xff;
 /* and all the possible encoder clones for this output together */
-for (j = 0; j < drmmode_output->mode_output->count_encoders; j++) {
+for (j = 0; j < drmmode_output->num_encoders; j++) {
 int k;
 
 for (k = 0; k < mode_res->count_encoders; k++) {
diff --git a/hw/xfree86/drivers/modesetting/drmmode_display.h 
b/hw/xfree86/drivers/modesetting/drmmode_display.h
index 2630f9347..2174fe07e 100644
--- a/hw/xfree86/drivers/modesetting/drmmode_display.h
+++ b/hw/xfree86/drivers/modesetting/drmmode_display.h
@@ -130,6 +130,7 @@ typedef struct {
 drmmode_ptr drmmode;
 int output_id;
 drmModeConnectorPtr mode_output;
+int num_encoders;
 drmModeEncoderPtr *mode_encoders;
 drmModePropertyBlobPtr edid_blob;
 drmModePropertyBlobPtr tile_blob;
-- 
2.13.6

___
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 0/6] modesetting - remove mode_output member

2017-11-20 Thread Daniel Martin
This patchset removes the mode_output member. We failed to handle it
correctly in the past and most people won't notice if the do as it
requires MST hotpluging.

Thanks,
Daniel

Daniel Martin (6):
  modesetting: Save number of encoders in drmmode_output
  modesetting: Retrieve drm connector in drmmode_output_get_modes()
  modesetting: Retrieve drm connector in
drmmode_output_create_resources()
  modesetting: Retrieve drm connector in drmmode_output_detect()
  modesetting: Remove mode_output member from drmmode_output
  modesetting: Get current connector infos in drmmode_output_init()

 hw/xfree86/drivers/modesetting/drmmode_display.c | 100 ---
 hw/xfree86/drivers/modesetting/drmmode_display.h |   2 +-
 2 files changed, 54 insertions(+), 48 deletions(-)

-- 
2.13.6

___
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 0/6] xdmcp, xfree86, modesetting - fixes and cleanups

2017-11-20 Thread Daniel Martin
This patchset includes:

  os/xdmcp: Honour -once when session is dead
  - an old one, that wasn't merged, but got a review

  xfree86: Fix set but not used warnings in lnx_platform
  - compiler warnings, pimped commit message, got a review

  modesetting: Fix log msg if pixmap creation failed
  - "Failed" without a new-line is not a good log message

  modesetting: Reset output_id if drmModeGetConnector failed
  - mode_output strikes again

  modesetting: Remove unused define DRV_ERROR
  modesetting: Remove #if 0 CMAP_LOAD_EVEN_IF_OFFSCREEN


Thanks,
Daniel

Daniel Martin (6):
  os/xdmcp: Honour -once when session is dead
  xfree86: Fix set but not used warnings in lnx_platform
  modesetting: Fix log msg if pixmap creation failed
  modesetting: Reset output_id if drmModeGetConnector failed
  modesetting: Remove unused define DRV_ERROR
  modesetting: Remove #if 0 CMAP_LOAD_EVEN_IF_OFFSCREEN

 hw/xfree86/drivers/modesetting/driver.h  |  1 -
 hw/xfree86/drivers/modesetting/drmmode_display.c | 15 +++
 hw/xfree86/os-support/linux/lnx_platform.c   |  9 +++--
 os/xdmcp.c   |  2 +-
 4 files changed, 11 insertions(+), 16 deletions(-)

-- 
2.13.6

___
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 3/6] modesetting: Fix log msg if pixmap creation failed

2017-11-20 Thread Daniel Martin
Add a missing new-line character and make the message more verbose than
"Failed".

Signed-off-by: Daniel Martin 
---
 hw/xfree86/drivers/modesetting/drmmode_display.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hw/xfree86/drivers/modesetting/drmmode_display.c 
b/hw/xfree86/drivers/modesetting/drmmode_display.c
index f7298b1d8..404bb1dc2 100644
--- a/hw/xfree86/drivers/modesetting/drmmode_display.c
+++ b/hw/xfree86/drivers/modesetting/drmmode_display.c
@@ -1879,7 +1879,7 @@ drmmode_set_pixmap_bo(drmmode_ptr drmmode, PixmapPtr 
pixmap, drmmode_bo *bo)
 return TRUE;
 
 if (!glamor_egl_create_textured_pixmap_from_gbm_bo(pixmap, bo->gbm)) {
-xf86DrvMsg(scrn->scrnIndex, X_ERROR, "Failed");
+xf86DrvMsg(scrn->scrnIndex, X_ERROR, "Failed to create pixmap\n");
 return FALSE;
 }
 #endif
-- 
2.13.6

___
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 1/6] os/xdmcp: Honour -once when session is dead

2017-11-20 Thread Daniel Martin
Terminate a dead session when -once was passed. Don't restart it.

Signed-off-by: Daniel Martin 
Reviewed-by: Walter Harms 
---
 os/xdmcp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/os/xdmcp.c b/os/xdmcp.c
index 906c95944..7aeb393e6 100644
--- a/os/xdmcp.c
+++ b/os/xdmcp.c
@@ -797,7 +797,7 @@ XdmcpDeadSession(const char *reason)
 ErrorF("XDM: %s, declaring session dead\n", reason);
 state = XDM_INIT_STATE;
 isItTimeToYield = TRUE;
-dispatchException |= DE_RESET;
+dispatchException |= (OneSession ? DE_TERMINATE : DE_RESET);
 TimerCancel(xdmcp_timer);
 timeOutRtx = 0;
 send_packet();
-- 
2.13.6

___
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 2/6] xfree86: Fix set but not used warnings in lnx_platform

2017-11-20 Thread Daniel Martin
Those warnings are generated, when building without systemd support:

../hw/xfree86/os-support/linux/lnx_platform.c: In function ‘get_drm_info’:
../hw/xfree86/os-support/linux/lnx_platform.c:29:16: warning: variable ‘minor’ 
set but not used [-Wunused-but-set-variable]
 int major, minor, fd;
^
../hw/xfree86/os-support/linux/lnx_platform.c:29:9: warning: variable ‘major’ 
set but not used [-Wunused-but-set-variable]
 int major, minor, fd;
 ^

In this case the functions are macros, which don't use theese arguments.

v2: Add comments, why the warnings appear. Suggested by Emil Velikov

Reviewed-by: Emil Velikov 
Signed-off-by: Daniel Martin 
---
 hw/xfree86/os-support/linux/lnx_platform.c | 9 +++--
 1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/hw/xfree86/os-support/linux/lnx_platform.c 
b/hw/xfree86/os-support/linux/lnx_platform.c
index 1d145b362..11af52c46 100644
--- a/hw/xfree86/os-support/linux/lnx_platform.c
+++ b/hw/xfree86/os-support/linux/lnx_platform.c
@@ -26,19 +26,16 @@ get_drm_info(struct OdevAttributes *attribs, char *path, 
int delayed_index)
 drmSetVersion sv;
 drmVersionPtr v;
 char *buf;
-int major, minor, fd;
+int fd;
 int err = 0;
 Bool paused, server_fd = FALSE;
 
-major = attribs->major;
-minor = attribs->minor;
-
-fd = systemd_logind_take_fd(major, minor, path, );
+fd = systemd_logind_take_fd(attribs->major, attribs->minor, path, );
 if (fd != -1) {
 if (paused) {
 LogMessage(X_ERROR,
 "Error systemd-logind returned paused fd for drm node\n");
-systemd_logind_release_fd(major, minor, -1);
+systemd_logind_release_fd(attribs->major, attribs->minor, -1);
 return FALSE;
 }
 attribs->fd = fd;
-- 
2.13.6

___
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 5/6] modesetting: Remove unused define DRV_ERROR

2017-11-20 Thread Daniel Martin
Signed-off-by: Daniel Martin 
---
 hw/xfree86/drivers/modesetting/driver.h | 1 -
 1 file changed, 1 deletion(-)

diff --git a/hw/xfree86/drivers/modesetting/driver.h 
b/hw/xfree86/drivers/modesetting/driver.h
index 7ea500f5c..08dc3b58a 100644
--- a/hw/xfree86/drivers/modesetting/driver.h
+++ b/hw/xfree86/drivers/modesetting/driver.h
@@ -40,7 +40,6 @@
 #endif
 
 #include "drmmode_display.h"
-#define DRV_ERROR(msg) xf86DrvMsg(pScrn->scrnIndex, X_ERROR, msg);
 #define MS_LOGLEVEL_DEBUG 4
 
 typedef enum {
-- 
2.13.6

___
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 4/6] modesetting: Reset output_id if drmModeGetConnector failed

2017-11-20 Thread Daniel Martin
If drmModeGetConnector() fails in drmmode_output_detect(), we have to
reset the output_id to -1 too.

Yet another spot leading to a potential NULL dereference when handling
the mode_output member as output_id was != -1. Though, this case should
be very hard to hit.

Signed-off-by: Daniel Martin 
---
 hw/xfree86/drivers/modesetting/drmmode_display.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/hw/xfree86/drivers/modesetting/drmmode_display.c 
b/hw/xfree86/drivers/modesetting/drmmode_display.c
index 404bb1dc2..3b8107359 100644
--- a/hw/xfree86/drivers/modesetting/drmmode_display.c
+++ b/hw/xfree86/drivers/modesetting/drmmode_display.c
@@ -1151,8 +1151,10 @@ drmmode_output_detect(xf86OutputPtr output)
 
 drmmode_output->mode_output =
 drmModeGetConnector(drmmode->fd, drmmode_output->output_id);
-if (!drmmode_output->mode_output)
+if (!drmmode_output->mode_output) {
+drmmode_output->output_id = -1;
 return XF86OutputStatusDisconnected;
+}
 
 switch (drmmode_output->mode_output->connection) {
 case DRM_MODE_CONNECTED:
-- 
2.13.6

___
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 6/6] modesetting: Remove #if 0 CMAP_LOAD_EVEN_IF_OFFSCREEN

2017-11-20 Thread Daniel Martin
CMAP_LOAD_EVEN_IF_OFFSCREEN has been encapsulated since the import of
xf86-video-modesetting into the tree.

Signed-off-by: Daniel Martin 
---
 hw/xfree86/drivers/modesetting/drmmode_display.c | 9 +++--
 1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/hw/xfree86/drivers/modesetting/drmmode_display.c 
b/hw/xfree86/drivers/modesetting/drmmode_display.c
index 3b8107359..a51722b58 100644
--- a/hw/xfree86/drivers/modesetting/drmmode_display.c
+++ b/hw/xfree86/drivers/modesetting/drmmode_display.c
@@ -2206,12 +2206,9 @@ drmmode_setup_colormap(ScreenPtr pScreen, ScrnInfoPtr 
pScrn)
 if (!miCreateDefColormap(pScreen))
 return FALSE;
 /* all radeons support 10 bit CLUTs */
-if (!xf86HandleColormaps(pScreen, 256, 10,
- drmmode_load_palette, NULL, 
CMAP_PALETTED_TRUECOLOR
-#if 0   /* This option messes up text mode! 
(e...@suse.de) */
- | CMAP_LOAD_EVEN_IF_OFFSCREEN
-#endif
- | CMAP_RELOAD_ON_MODE_SWITCH))
+if (!xf86HandleColormaps(pScreen, 256, 10, drmmode_load_palette, NULL,
+CMAP_PALETTED_TRUECOLOR |
+CMAP_RELOAD_ON_MODE_SWITCH))
 return FALSE;
 return TRUE;
 }
-- 
2.13.6

___
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 00/11] modesetting: Fixes, cleanups and mode_output removal

2017-11-20 Thread Daniel Martin
(Sorry, for not reporting back earlier, had to do internal stuff.)

Please ignore this pathset. It's superseded by distinct patchsets I'm
going to send.

Cheers,
Daniel
___
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: Xstartup handle DISPLAY=(null) correctly

2017-11-20 Thread walter harms
at what circumstances can DISPLAY == '(null)' ?

looks more like a bug in an Xserver.

re,
 wh


Am 20.11.2017 06:40, schrieb xiaoguang wang:
> 
> 
> 
> ___
> 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

Xstartup handle DISPLAY=(null) correctly

2017-11-20 Thread xiaoguang wang


--
SUSE Linux
Room 1401, World Financial Center, West Tower
Beijing, P.R. China, 100020
>From bddc3bea3472edfad9476e952c0599f48d51f921 Mon Sep 17 00:00:00 2001
From: Xiaoguang Wang 
Date: Mon, 20 Nov 2017 12:40:20 +0800
Subject: [PATCH] xdm: Handle DISPLAY=(null) correctly #103820

X.org BUG 103820 

Signed-off-by: Xiaoguang Wang 
---
 etc/X11/xdm/Xstartup | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/etc/X11/xdm/Xstartup b/etc/X11/xdm/Xstartup
index dc0faf2..eb0651a 100755
--- a/etc/X11/xdm/Xstartup
+++ b/etc/X11/xdm/Xstartup
@@ -54,6 +54,9 @@ fi
 # 
 # Find out if this is a local or remote connection
 #
+if test $DISPLAY == '(null)' ; then
+DISPLAY=""
+fi
 LOCATION=${DISPLAY%:*}
 LINE=:${DISPLAY#*:}
 if test -z "$LOCATION" ; then
-- 
2.12.3

___
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

FOSDEM 2018: Graphics DevRoom: Call for speaker.

2017-11-20 Thread Luc Verhaegen
Hi,

At FOSDEM on saturday the 3rd of february 2018, there will be another 
graphics DevRoom. URL: https://fosdem.org/2018/

The focus of this DevRoom is of course the same as the previous 
editions, namely:
* Graphics drivers: from display to media to 3d drivers, both in kernel 
or userspace. Be it part of DRM, KMS, (direct)FB, V4L, Xorg, Mesa...
* Input drivers: kernel and userspace.
* Windowing systems: X, Wayland, Mir, directFB, ...
* Even colour management, low level toolkit stuff, and other areas which 
i might have overlooked above are accepted.

Slots will be handed out on a first come, first serve basis. The best 
slots will go to those who apply the earliest. We have the devroom from 
10:30 til 19:00, giving us 8h30, so eight 50 minute talkes and one 20 
minute talk are available.

Talk Submission:


Like the last few years, the pentabarf system will be used for talk 
submission.

https://penta.fosdem.org/submission/FOSDEM18

Remember that FOSDEM is not like XDC, it's not some 50 odd people 
meeting with a sliding schedule which only gets filled out on the last 
day. Upwards of 1 people are visiting this event, and most of them 
get a printed booklet or use the schedule on the FOSDEM website or an 
app for their phone to figure out what to watch or participate in next. 
So please put some effort in your talk submission and details.

Since this an open source community event, please refrain from turning 
in a talk that is a pure corporate or product commercial. Also, if you 
are unsure on whether you can come or not (this is FOSDEM, why are you 
not there anyway?), please wait with submitting your talk. Submitting a 
talk and then not turning up because you could not be bothered is a 
sure-fire way to get larted and then to never be allowed to talk again.

When in pentabarf, please give the abstract and description, for both 
the event and the speaker, some thought. The abstract should be a 
shortened description, and the event abstract will sometimes even be 
printed directly in the booklet. BUT, on the website the abstract is 
immediately followed by the full description. If your abstract is fully 
descriptive, while terse, you might get away with just the abstract.

All talks will be recorded, and will be streamed out live, and will 
later be made available as CC-BY after a few days.

As for deadlines, the fosdem organizers want to have a finished schedule 
by the 15th of december. Don't count on this deadline: first come first 
serve! The worst slots will be assigned to those who come last, which 
could be pretty dire given that there is the traditional FOSDEM beer 
event the night before ;)

Please try to re-use your accounts from the previous years, i hope that 
this year you can actually recycle your data. If you have forgotten your 
password, then you can reset it here: 
https://penta.fosdem.org/user/forgot_password If there are any issues, 
just poke me here or on IRC.

Necessary information:
--

Below is a list of what i need to see filled in in pentabarf when you 
apply for a devroom before i consider it a valid submission. Remember: 
first come, first serve. The best slots (which are on saturday 
afternoon) are for the earliest submissions.

On your personal page:
* General:
  * First and last name
  * Nickname
  * Image
* Contact:
  * email address
  * mobile number (this is a very hard requirement as there will be no
   other reliable form of emergency communication on the day)
* Description:
  * Abstract
  * Description

Create an event:
* On the General page:
  * Event title
  * Event subtitle.
  * Track: Graphics Devroom
  * Event type: Lecture (talk) or Meeting (BoF)
* Persons:
  * Add yourself as speaker.
* Description:
  * Abstract:
  * Full Description
* Links:
  * Add relevant links.

Everything else can be ignored or will be filled in by me or the FOSDEM 
organizers. Remember, i will only schedule your talk after the basics 
are somewhat filled in (you still can change them until december 15th).

I will be keeping a keen eye on your submissions and will come back with 
further questions or make small fixes as needed. Feel free to poke me 
with any questions or anything, both on irc (libv@freenode) and on 
email.

That's about it. Hope to see you all at FOSDEM :)

Luc Verhaegen.
___
xorg-announce mailing list
xorg-announce@lists.x.org
https://lists.x.org/mailman/listinfo/xorg-announce


Re: [PATCH xserver] xfree86/common: Fix VT leave lockup #103782

2017-11-20 Thread Michal Srb
On čtvrtek 16. listopadu 2017 21:28:05 CET Алексей Шилин  wrote:
> When xf86VTSwitchAway() returns true to xf86VTLeave(), the input
> mutex does not get unlocked. As the result, any other thread which
> later tries to execute input_lock() freezes forever, which in turn
> may lead to X server lockup.

I think that the input mutex is kept locked for a reason (although I do not 
know the reason), because it is then again unlocked at the end of xf86VTEnter. 
If you unlock it in xf86VTLeave, you will get a double unlock in xf86VTEnter.

Few days ago I sent alternative fix for this bug:
  Subject: [PATCH] os/inputthread: Force unlock when stopping thread.

  It did not get a response so far.

Michal Srb
___
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