Skip to contentSkip to conversation

kbdif: Define "feature-raw-pointer" and "request-raw-pointer"

PATCH In review Owen Smith 5 participants 6 messages Jul 3, 2017 – Jul 19, 2017

lore
Share & tools
lore

Owen Smith

author
#0 lore raw

PATCH 1/1 kbdif: Define "feature-raw-pointer" and "request-raw-pointer"

Backends set "feature-raw-pointer" if its capable of reporting absolute positions without scaling the coordinates to screen size. This should be set during the backend init. Frontends set "request-raw-pointer" to request that backends do not rescale absolute coordinates to screen size, and the coordinates remain in the range [0, 0x7fff]. This request is only applicable if "request-abs-pointer" is also set. Frontends should set this value before setting Connected.

---
Adding this feature will help determine the difference between older backends and newer backends. In the case I'm interested in, the difference between old QEMU vkbd backend which blocks waiting for the vfb device, which is not present on HVM guests, and a newer QEMU backend that does not rely on display information to rescale axis values.

 xen/include/public/io/kbdif.h | 14 ++++++++++++++
 1 file changed, 14 insertions(+)
xen/include/public/io/kbdif.h +14 -0
index dcbd71a..3ce54e9 100644
@@ -63,6 +63,13 @@
  *      Backends, which support reporting of multi-touch events
  *      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].
+ *
  *------------------------- Pointer Device Parameters ------------------------
  *
  * width
@@ -98,6 +105,13 @@
  *
  *      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 -----------------------
  *
  * event-channel
Signature · 7 lines
2.1.4


_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
Reviewed-by on v1 1/1
#1 lore raw
Quoted 19 lines

-----Original Message-----
From: Xen-devel [mailto:[email protected]] On Behalf Of Owen Smith
Sent: 03 July 2017 13:58
To: [email protected]
Cc: [email protected]; [email protected]; Owen Smith <[email protected]>
Subject: [Xen-devel] [PATCH] kbdif: Define "feature-raw-pointer" and "request-raw-pointer"

Backends set "feature-raw-pointer" if its capable of reporting absolute positions without scaling the coordinates to screen size. This should be set during the backend init. Frontends set "request-raw-pointer" to request that backends do not rescale absolute coordinates to screen size, and the coordinates remain in the range [0, 0x7fff]. This request is only applicable if "request-abs-pointer" is also set. Frontends should set this value before setting Connected.

Quoted 1 line

This seems like an eminently sensible idea to me. The fact that it is not the default behaviour is shame, but that ship sailed long ago.

Quoted 49 lines

---
Adding this feature will help determine the difference between older backends and newer backends. In the case I'm interested in, the difference between old QEMU vkbd backend which blocks waiting for the vfb device, which
is not present on HVM guests, and a newer QEMU backend that does not rely
on display information to rescale axis values.

 xen/include/public/io/kbdif.h | 14 ++++++++++++++
 1 file changed, 14 insertions(+)
xen/include/public/io/kbdif.h +4 -0
index dcbd71a..3ce54e9 100644
@@ -63,6 +63,13 @@
  *      Backends, which support reporting of multi-touch events
  *      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].
+ *
*------------------------- Pointer Device Parameters ------------------------ *
* width

xen/include/public/io/kbdif.h +7 -1
@@ -98,6 +105,13 @@
  *
  *      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 -----------------------
  *
  * event-channel
--

2.1.4

Quoted 4 lines

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel

Reviewed-by on v1 1/1
#2 lore raw
In reply to Owen Smith
Quoted 10 lines · Owen Smith

Backends set "feature-raw-pointer" if its capable of reporting absolute positions without scaling the coordinates to screen size. This should be set during the backend init. Frontends set "request-raw-pointer" to request that backends do not rescale absolute coordinates to screen size, and the coordinates remain in the range [0, 0x7fff]. This request is only applicable if "request-abs-pointer" is also set. Frontends should set this value before setting Connected.

Quoted 45 lines

---
Adding this feature will help determine the difference between older backends and newer backends. In the case I'm interested in, the difference between old QEMU vkbd backend which blocks waiting for the vfb device, which is not present on HVM guests, and a newer QEMU backend that does not rely on display information to rescale axis values.

 xen/include/public/io/kbdif.h | 14 ++++++++++++++
 1 file changed, 14 insertions(+)
xen/include/public/io/kbdif.h +14 -0
index dcbd71a..3ce54e9 100644
@@ -63,6 +63,13 @@
  *      Backends, which support reporting of multi-touch events
  *      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].
+ *
  *------------------------- Pointer Device Parameters ------------------------
  *
  * width
@@ -98,6 +105,13 @@
  *
  *      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 -----------------------
  *
  * event-channel
Signature · 1 line
2.1.4

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel

#5 lore raw
In reply to Owen Smith

Hi, Owen!

Quoted 4 lines · Owen Smith

determine the difference between older
backends and newer backends. In the case I'm interested in, the difference between old QEMU vkbd backend which blocks waiting for the vfb device, which is not present on HVM guests, and a newer QEMU backend

For how long will it remain "new" and what will be the next patch for yet another new backend?
So, in addition to your patch I would suggest we add backend type and its version to get the information you need and rely on that deterministically, not making indirect decisions on if the pointer is raw for new backend only.
Please see [1] where backend "type" entry was discussed.

BTW, we are working on decoupling QEMU's vkbd from vfb as it is required for vkbd to work with vdispl, not vfb, so from having type and version we will also benefit.

Thank you,
Oleksandr

[1] https://patchwork.kernel.org/patch/9674807/

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel

#3 lore raw
In reply to Stefano Stabellini
Quoted 10 lines · Stefano Stabellini
Quoted 9 lines · Owen Smith

Backends set "feature-raw-pointer" if its capable of reporting absolute positions without scaling the coordinates to screen size. This should be set during the backend init. Frontends set "request-raw-pointer" to request that backends do not rescale absolute coordinates to screen size, and the coordinates remain in the range [0, 0x7fff]. This request is only applicable if "request-abs-pointer" is also set. Frontends should set this value before setting Connected.

Quoted 3 lines
Quoted 1 line

Konrad, are you OK with this? Can I go ahead and commit it?

Quoted 38 lines
Quoted 38 lines

---
Adding this feature will help determine the difference between older backends and newer backends. In the case I'm interested in, the difference between old QEMU vkbd backend which blocks waiting for the vfb device, which is not present on HVM guests, and a newer QEMU backend that does not rely on display information to rescale axis values.

 xen/include/public/io/kbdif.h | 14 ++++++++++++++
 1 file changed, 14 insertions(+)
xen/include/public/io/kbdif.h +12 -0
index dcbd71a..3ce54e9 100644
@@ -63,6 +63,13 @@
  *      Backends, which support reporting of multi-touch events
  *      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].
+ *
  *------------------------- Pointer Device Parameters ------------------------
  *
  * width
@@ -98,6 +105,13 @@
  *
  *      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.
Quoted 9 lines
Quoted 8 lines
xen/include/public/io/kbdif.h +2 -0
+ *      Raw unscaled coordinates have the range [0, 0x7fff]
+ *
  *----------------------- Request Transport Parameters -----------------------
  *
  * event-channel
Signature · 1 line
2.1.4

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel

#4 lore raw
Quoted 11 lines · Stefano Stabellini
Quoted 10 lines · Stefano Stabellini
Quoted 9 lines · Owen Smith

Backends set "feature-raw-pointer" if its capable of reporting absolute positions without scaling the coordinates to screen size. This should be set during the backend init. Frontends set "request-raw-pointer" to request that backends do not rescale absolute coordinates to screen size, and the coordinates remain in the range [0, 0x7fff]. This request is only applicable if "request-abs-pointer" is also set. Frontends should set this value before setting Connected.

Quoted 5 lines
Quoted 3 lines
Quoted 1 line

Konrad, are you OK with this? Can I go ahead and commit it?

Quoted 41 lines
Quoted 41 lines
Quoted 41 lines

---
Adding this feature will help determine the difference between older backends and newer backends. In the case I'm interested in, the difference between old QEMU vkbd backend which blocks waiting for the vfb device, which is not present on HVM guests, and a newer QEMU backend that does not rely on display information to rescale axis values.

 xen/include/public/io/kbdif.h | 14 ++++++++++++++
 1 file changed, 14 insertions(+)
xen/include/public/io/kbdif.h +13 -0
index dcbd71a..3ce54e9 100644
@@ -63,6 +63,13 @@
  *      Backends, which support reporting of multi-touch events
  *      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].
+ *
  *------------------------- Pointer Device Parameters ------------------------
  *
  * width
@@ -98,6 +105,13 @@
  *
  *      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]
Quoted 8 lines
Quoted 8 lines
Quoted 7 lines
xen/include/public/io/kbdif.h +1 -0
+ *
  *----------------------- Request Transport Parameters -----------------------
  *
  * event-channel
Signature · 1 line
2.1.4

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel