[PATCH xserver 5/5] dix: Update some comments to reflect the new non-SIGIO input model

Adam Jackson ajax at redhat.com
Tue Jun 7 19:52:15 UTC 2016


Signed-off-by: Adam Jackson <ajax at redhat.com>
---
 hw/dmx/doc/dmx.xml              | 11 +++--------
 hw/dmx/input/dmxevents.c        |  4 ++--
 hw/dmx/input/lnx-keyboard.c     |  2 +-
 hw/dmx/input/lnx-ms.c           |  2 +-
 hw/dmx/input/lnx-ps2.c          |  2 +-
 hw/dmx/input/usb-common.c       |  2 +-
 hw/dmx/input/usb-keyboard.c     |  2 +-
 hw/xfree86/common/xf86Privstr.h |  3 +--
 hw/xfree86/common/xf86str.h     |  2 +-
 mi/mieq.c                       |  3 +--
 mi/mipointer.c                  |  5 +++--
 mi/mipointrst.h                 |  2 +-
 12 files changed, 17 insertions(+), 23 deletions(-)

diff --git a/hw/dmx/doc/dmx.xml b/hw/dmx/doc/dmx.xml
index 40b9e42..f10cf79 100644
--- a/hw/dmx/doc/dmx.xml
+++ b/hw/dmx/doc/dmx.xml
@@ -944,14 +944,9 @@ are missing.
 <title>devReadInput()</title>
 
 <para>Each device will have some function that gets called to read its
-physical input.  These may be called in a number of different ways.  In
-the case of synchronous I/O, they will be called from a DDX
-wakeup-handler that gets called after the server detects that new input is
-available.  In the case of asynchronous I/O, they will be called from a
-(SIGIO) signal handler triggered when new input is available.  This
-function should do at least two things: make sure that input events get
-enqueued, and make sure that the cursor gets moved for motion events
-(except if these are handled later by the driver's own event queue
+physical input. This function should do at least two things: make sure that
+input events get enqueued, and make sure that the cursor gets moved for motion
+events (except if these are handled later by the driver's own event queue
 processing function, which cannot be done when using the MI event queue
 handling).
 </para>
diff --git a/hw/dmx/input/dmxevents.c b/hw/dmx/input/dmxevents.c
index 235ba21..fb0c00f 100644
--- a/hw/dmx/input/dmxevents.c
+++ b/hw/dmx/input/dmxevents.c
@@ -585,7 +585,7 @@ dmxInvalidateGlobalPosition(void)
  * \a DMX_ABSOLUTE_CONFINED (in the latter case, the pointer will not be
  * allowed to move outside the global boundaires).
  *
- * If \a block is set to \a DMX_BLOCK, then the SIGIO handler will be
+ * If \a block is set to \a DMX_BLOCK, then the input thread will be
  * blocked around calls to \a enqueueMotion(). */
 void
 dmxMotion(DevicePtr pDev, int *v, int firstAxes, int axesCount,
@@ -689,7 +689,7 @@ dmxFixup(DevicePtr pDev, int detail, KeySym keySym)
  * KeyRelease event, then the \a keySym is also specified.
  *
  * FIXME: make the code do what the comment says, or remove this comment.
- * If \a block is set to \a DMX_BLOCK, then the SIGIO handler will be
+ * If \a block is set to \a DMX_BLOCK, then the input thread will be
  * blocked around calls to dmxeqEnqueue(). */
 
 void
diff --git a/hw/dmx/input/lnx-keyboard.c b/hw/dmx/input/lnx-keyboard.c
index 2a5ce79..a273f6b 100644
--- a/hw/dmx/input/lnx-keyboard.c
+++ b/hw/dmx/input/lnx-keyboard.c
@@ -820,7 +820,7 @@ kbdLinuxConvert(DevicePtr pDev,
  * event, enqueue it with the \a motion function.  Otherwise, check for
  * special keys with the \a checkspecial function and enqueue the event
  * with the \a enqueue function.  The \a block type is passed to the
- * functions so that they may block SIGIO handling as appropriate to the
+ * functions so that they may block the input thread as appropriate to the
  * caller of this function. */
 void
 kbdLinuxRead(DevicePtr pDev,
diff --git a/hw/dmx/input/lnx-ms.c b/hw/dmx/input/lnx-ms.c
index 621f0fe..cb3b25f 100644
--- a/hw/dmx/input/lnx-ms.c
+++ b/hw/dmx/input/lnx-ms.c
@@ -191,7 +191,7 @@ msLinuxButton(DevicePtr pDev, ENQUEUEPROC enqueue, int buttons, BLOCK block)
  * event, enqueue it with the \a motion function.  Otherwise, check for
  * special keys with the \a checkspecial function and enqueue the event
  * with the \a enqueue function.  The \a block type is passed to the
- * functions so that they may block SIGIO handling as appropriate to the
+ * functions so that they may block the input thread as appropriate to the
  * caller of this function. */
 void
 msLinuxRead(DevicePtr pDev,
diff --git a/hw/dmx/input/lnx-ps2.c b/hw/dmx/input/lnx-ps2.c
index dd70cb8..9041974 100644
--- a/hw/dmx/input/lnx-ps2.c
+++ b/hw/dmx/input/lnx-ps2.c
@@ -187,7 +187,7 @@ ps2LinuxButton(DevicePtr pDev, ENQUEUEPROC enqueue, int buttons, BLOCK block)
  * event, enqueue it with the \a motion function.  Otherwise, check for
  * special keys with the \a checkspecial function and enqueue the event
  * with the \a enqueue function.  The \a block type is passed to the
- * functions so that they may block SIGIO handling as appropriate to the
+ * functions so that they may block the input thread as appropriate to the
  * caller of this function. */
 void
 ps2LinuxRead(DevicePtr pDev, MOTIONPROC motion,
diff --git a/hw/dmx/input/usb-common.c b/hw/dmx/input/usb-common.c
index 67aa07e..8c62aba 100644
--- a/hw/dmx/input/usb-common.c
+++ b/hw/dmx/input/usb-common.c
@@ -77,7 +77,7 @@
 /** Read an event from the \a pDev device.  If the event is a motion
  * event, enqueue it with the \a motion function.  Otherwise, enqueue
  * the event with the \a enqueue function.  The \a block type is passed
- * to the functions so that they may block SIGIO handling as appropriate
+ * to the functions so that they may block the input thread as appropriate
  * to the caller of this function.
  *
  * Since USB devices return EV_KEY events for buttons and keys, \a
diff --git a/hw/dmx/input/usb-keyboard.c b/hw/dmx/input/usb-keyboard.c
index 65bfcd0..e41ad40 100644
--- a/hw/dmx/input/usb-keyboard.c
+++ b/hw/dmx/input/usb-keyboard.c
@@ -379,7 +379,7 @@ kbdUSBConvert(DevicePtr pDev,
  * event, enqueue it with the \a motion function.  Otherwise, check for
  * special keys with the \a checkspecial function and enqueue the event
  * with the \a enqueue function.  The \a block type is passed to the
- * functions so that they may block SIGIO handling as appropriate to the
+ * functions so that they may block the input thread as appropriate to the
  * caller of this function. */
 void
 kbdUSBRead(DevicePtr pDev,
diff --git a/hw/xfree86/common/xf86Privstr.h b/hw/xfree86/common/xf86Privstr.h
index 2951983..9e327b9 100644
--- a/hw/xfree86/common/xf86Privstr.h
+++ b/hw/xfree86/common/xf86Privstr.h
@@ -80,8 +80,7 @@ typedef struct {
     Bool miscModInDevEnabled;   /* Allow input devices to be
                                  * changed */
     Bool miscModInDevAllowNonLocal;
-    Bool useSIGIO;              /* Use SIGIO for handling
-                                   input device events */
+    Bool useSIGIO;              /* Use SIGIO for handling DRI1 swaps */
     Pix24Flags pixmap24;
     MessageType pix24From;
     Bool pmFlag;
diff --git a/hw/xfree86/common/xf86str.h b/hw/xfree86/common/xf86str.h
index 5e6e977..bfcb75e 100644
--- a/hw/xfree86/common/xf86str.h
+++ b/hw/xfree86/common/xf86str.h
@@ -678,7 +678,7 @@ typedef struct _ScrnInfoRec {
     /* Allow screens to be enabled/disabled individually */
     Bool vtSema;
 
-    /* hw cursor moves at SIGIO time */
+    /* hw cursor moves from input thread */
     Bool silkenMouse;
 
     /* Storage for clockRanges and adjustFlags for use with the VidMode ext */
diff --git a/mi/mieq.c b/mi/mieq.c
index f2db5a6..05447d6 100644
--- a/mi/mieq.c
+++ b/mi/mieq.c
@@ -239,8 +239,7 @@ mieqEnqueue(DeviceIntPtr pDev, InternalEvent *e)
     else if (n_enqueued + 1 == miEventQueue.nevents) {
         if (!mieqGrowQueue(&miEventQueue, miEventQueue.nevents << 1)) {
             /* Toss events which come in late.  Usually this means your server's
-             * stuck in an infinite loop somewhere, but SIGIO is still getting
-             * handled.
+             * stuck in an infinite loop in the main thread.
              */
             miEventQueue.dropped++;
             if (miEventQueue.dropped == 1) {
diff --git a/mi/mipointer.c b/mi/mipointer.c
index 3f6252d..01f3bd2 100644
--- a/mi/mipointer.c
+++ b/mi/mipointer.c
@@ -555,8 +555,9 @@ miPointerMoveNoEvent(DeviceIntPtr pDev, ScreenPtr pScreen, int x, int y)
     pPointer = MIPOINTER(pDev);
 
     /* Hack: We mustn't call into ->MoveCursor for anything but the
-     * VCP, as this may cause a non-HW rendered cursor to be rendered during
-     * SIGIO. This again leads to allocs during SIGIO which leads to SIGABRT.
+     * VCP, as this may cause a non-HW rendered cursor to be rendered while
+     * not holding the input lock. This would race with building the command
+     * buffer for other rendering.
      */
     if (GetMaster(pDev, MASTER_POINTER) == inputInfo.pointer
         &&!pScreenPriv->waitForUpdate && pScreen == pPointer->pSpriteScreen) {
diff --git a/mi/mipointrst.h b/mi/mipointrst.h
index 4319b12..7419ac1 100644
--- a/mi/mipointrst.h
+++ b/mi/mipointrst.h
@@ -38,7 +38,7 @@ typedef struct {
     miPointerSpriteFuncPtr spriteFuncs; /* sprite-specific methods */
     miPointerScreenFuncPtr screenFuncs; /* screen-specific methods */
     CloseScreenProcPtr CloseScreen;
-    Bool waitForUpdate;         /* don't move cursor in SIGIO */
+    Bool waitForUpdate;         /* don't move cursor from input thread */
     Bool showTransparent;       /* show empty cursors */
 } miPointerScreenRec, *miPointerScreenPtr;
 #endif                          /* MIPOINTRST_H */
-- 
2.7.4



More information about the xorg-devel mailing list