Commit ce63b2c8 authored by Oleksandr Andrushchenko's avatar Oleksandr Andrushchenko Committed by Dmitry Torokhov

xen: Sync up with the canonical protocol definitions in Xen

This is the sync up with the canonical definitions of the input,
sound and display protocols in Xen.

Changes to kbdif:
1. Add missing string constants for {feature|request}-raw-pointer
   to align with the rest of the interface file.

2. Add new XenStore feature fields, so it is possible to individually
   control set of exposed virtual devices for each guest OS:
     - set feature-disable-keyboard to 1 if no keyboard device needs
       to be created
     - set feature-disable-pointer to 1 if no pointer device needs
       to be created

3. Move multi-touch device parameters to backend nodes: these are
    described as a part of frontend's XenBus configuration nodes
    while they belong to backend's configuration. Fix this by moving
    the parameters to the proper section.

Unique-id field:
1. Add unique-id XenBus entry for virtual input and display.

2. Change type of unique-id field to string for sndif to align with
display and input protocols.
Signed-off-by: default avatarOleksandr Andrushchenko <oleksandr_andrushchenko@epam.com>
Reviewed-by: default avatarJuergen Gross <jgross@suse.com>
Signed-off-by: default avatarDmitry Torokhov <dmitry.torokhov@gmail.com>
parent 29dcea88
...@@ -189,6 +189,13 @@ ...@@ -189,6 +189,13 @@
* *
*----------------------------- Connector settings ---------------------------- *----------------------------- Connector settings ----------------------------
* *
* unique-id
* Values: <string>
*
* After device instance initialization each connector is assigned a
* unique ID, so it can be identified by the backend by this ID.
* This can be UUID or such.
*
* resolution * resolution
* Values: <width, uint32_t>x<height, uint32_t> * Values: <width, uint32_t>x<height, uint32_t>
* *
...@@ -368,6 +375,7 @@ ...@@ -368,6 +375,7 @@
#define XENDISPL_FIELD_EVT_CHANNEL "evt-event-channel" #define XENDISPL_FIELD_EVT_CHANNEL "evt-event-channel"
#define XENDISPL_FIELD_RESOLUTION "resolution" #define XENDISPL_FIELD_RESOLUTION "resolution"
#define XENDISPL_FIELD_BE_ALLOC "be-alloc" #define XENDISPL_FIELD_BE_ALLOC "be-alloc"
#define XENDISPL_FIELD_UNIQUE_ID "unique-id"
/* /*
****************************************************************************** ******************************************************************************
......
...@@ -51,6 +51,18 @@ ...@@ -51,6 +51,18 @@
* corresponding entries in XenStore and puts 1 as the value of the entry. * corresponding entries in XenStore and puts 1 as the value of the entry.
* If a feature is not supported then 0 must be set or feature entry omitted. * If a feature is not supported then 0 must be set or feature entry omitted.
* *
* feature-disable-keyboard
* Values: <uint>
*
* If there is no need to expose a virtual keyboard device by the
* frontend then this must be set to 1.
*
* feature-disable-pointer
* Values: <uint>
*
* If there is no need to expose a virtual pointer device by the
* frontend then this must be set to 1.
*
* feature-abs-pointer * feature-abs-pointer
* Values: <uint> * Values: <uint>
* *
...@@ -63,6 +75,22 @@ ...@@ -63,6 +75,22 @@
* Backends, which support reporting of multi-touch events * Backends, which support reporting of multi-touch events
* should set this to 1. * should set this to 1.
* *
* feature-raw-pointer
* Values: <uint>
*
* Backends, which support reporting raw (unscaled) absolute coordinates
* for pointer devices should set this to 1. Raw (unscaled) values have
* a range of [0, 0x7fff].
*
*----------------------- Device Instance Parameters ------------------------
*
* unique-id
* Values: <string>
*
* After device instance initialization it is assigned a unique ID,
* so every instance of the frontend can be identified by the backend
* by this ID. This can be UUID or such.
*
*------------------------- Pointer Device Parameters ------------------------ *------------------------- Pointer Device Parameters ------------------------
* *
* width * width
...@@ -77,6 +105,25 @@ ...@@ -77,6 +105,25 @@
* Maximum Y coordinate (height) to be used by the frontend * Maximum Y coordinate (height) to be used by the frontend
* while reporting input events, pixels, [0; UINT32_MAX]. * while reporting input events, pixels, [0; UINT32_MAX].
* *
*----------------------- Multi-touch Device Parameters ----------------------
*
* multi-touch-num-contacts
* Values: <uint>
*
* Number of simultaneous touches reported.
*
* multi-touch-width
* Values: <uint>
*
* Width of the touch area to be used by the frontend
* while reporting input events, pixels, [0; UINT32_MAX].
*
* multi-touch-height
* Values: <uint>
*
* Height of the touch area to be used by the frontend
* while reporting input events, pixels, [0; UINT32_MAX].
*
***************************************************************************** *****************************************************************************
* Frontend XenBus Nodes * Frontend XenBus Nodes
***************************************************************************** *****************************************************************************
...@@ -98,6 +145,13 @@ ...@@ -98,6 +145,13 @@
* *
* Request backend to report multi-touch events. * Request backend to report multi-touch events.
* *
* request-raw-pointer
* Values: <uint>
*
* Request backend to report raw unscaled absolute pointer coordinates.
* This option is only valid if request-abs-pointer is also set.
* Raw unscaled coordinates have the range [0, 0x7fff]
*
*----------------------- Request Transport Parameters ----------------------- *----------------------- Request Transport Parameters -----------------------
* *
* event-channel * event-channel
...@@ -117,25 +171,6 @@ ...@@ -117,25 +171,6 @@
* *
* OBSOLETE, not recommended for use. * OBSOLETE, not recommended for use.
* PFN of the shared page. * PFN of the shared page.
*
*----------------------- Multi-touch Device Parameters -----------------------
*
* multi-touch-num-contacts
* Values: <uint>
*
* Number of simultaneous touches reported.
*
* multi-touch-width
* Values: <uint>
*
* Width of the touch area to be used by the frontend
* while reporting input events, pixels, [0; UINT32_MAX].
*
* multi-touch-height
* Values: <uint>
*
* Height of the touch area to be used by the frontend
* while reporting input events, pixels, [0; UINT32_MAX].
*/ */
/* /*
...@@ -163,9 +198,13 @@ ...@@ -163,9 +198,13 @@
#define XENKBD_DRIVER_NAME "vkbd" #define XENKBD_DRIVER_NAME "vkbd"
#define XENKBD_FIELD_FEAT_DSBL_KEYBRD "feature-disable-keyboard"
#define XENKBD_FIELD_FEAT_DSBL_POINTER "feature-disable-pointer"
#define XENKBD_FIELD_FEAT_ABS_POINTER "feature-abs-pointer" #define XENKBD_FIELD_FEAT_ABS_POINTER "feature-abs-pointer"
#define XENKBD_FIELD_FEAT_RAW_POINTER "feature-raw-pointer"
#define XENKBD_FIELD_FEAT_MTOUCH "feature-multi-touch" #define XENKBD_FIELD_FEAT_MTOUCH "feature-multi-touch"
#define XENKBD_FIELD_REQ_ABS_POINTER "request-abs-pointer" #define XENKBD_FIELD_REQ_ABS_POINTER "request-abs-pointer"
#define XENKBD_FIELD_REQ_RAW_POINTER "request-raw-pointer"
#define XENKBD_FIELD_REQ_MTOUCH "request-multi-touch" #define XENKBD_FIELD_REQ_MTOUCH "request-multi-touch"
#define XENKBD_FIELD_RING_GREF "page-gref" #define XENKBD_FIELD_RING_GREF "page-gref"
#define XENKBD_FIELD_EVT_CHANNEL "event-channel" #define XENKBD_FIELD_EVT_CHANNEL "event-channel"
...@@ -174,6 +213,7 @@ ...@@ -174,6 +213,7 @@
#define XENKBD_FIELD_MT_WIDTH "multi-touch-width" #define XENKBD_FIELD_MT_WIDTH "multi-touch-width"
#define XENKBD_FIELD_MT_HEIGHT "multi-touch-height" #define XENKBD_FIELD_MT_HEIGHT "multi-touch-height"
#define XENKBD_FIELD_MT_NUM_CONTACTS "multi-touch-num-contacts" #define XENKBD_FIELD_MT_NUM_CONTACTS "multi-touch-num-contacts"
#define XENKBD_FIELD_UNIQUE_ID "unique-id"
/* OBSOLETE, not recommended for use */ /* OBSOLETE, not recommended for use */
#define XENKBD_FIELD_RING_REF "page-ref" #define XENKBD_FIELD_RING_REF "page-ref"
......
...@@ -278,13 +278,11 @@ ...@@ -278,13 +278,11 @@
* defined under the same device. * defined under the same device.
* *
* unique-id * unique-id
* Values: <uint32_t> * Values: <string>
* *
* After stream initialization it is assigned a unique ID (within the front * After stream initialization it is assigned a unique ID, so every
* driver), so every stream of the frontend can be identified by the * stream of the frontend can be identified by the backend by this ID.
* backend by this ID. This is not equal to stream-idx as the later is * This can be UUID or such.
* zero based within the device, but this index is contigous within the
* driver.
* *
*-------------------- Stream Request Transport Parameters -------------------- *-------------------- Stream Request Transport Parameters --------------------
* *
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment