diff options
author | Thomas Hellstrom <thellstrom@vmware.com> | 2015-04-14 10:06:38 -0700 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2015-04-14 14:29:03 -0700 |
commit | 8b8be51b4fd365ac5983e117be9d28f427a07b68 (patch) | |
tree | c349b86ce689de2a208513032006a01af4e86cae /drivers/input/mouse/psmouse-base.c | |
parent | b9bced0eecd77067f4659b90d5ab2fb32485c3e2 (diff) | |
download | linux-8b8be51b4fd365ac5983e117be9d28f427a07b68.tar.bz2 |
Input: add vmmouse driver
VMMouse enables low-latency mouse-cursor-movements for VMWare and QEMU
guests. By removing the guest cursor and using the host as a guest cursor
the cursor movement appears instant although in reality there is some lag.
To be able to do this, the host's view of the cursor position must exactly
match the guest's view and an absolute pointer device is needed. Enter the
VMMouse. While the VMMouse driver has historically been an Xorg user-space
driver, implementing it as a kernel imput driver enables rootless Xorg and
new compositing display servers for VMware guests.
Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Diffstat (limited to 'drivers/input/mouse/psmouse-base.c')
-rw-r--r-- | drivers/input/mouse/psmouse-base.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/drivers/input/mouse/psmouse-base.c b/drivers/input/mouse/psmouse-base.c index 27057df7ba74..5bb1658f60c7 100644 --- a/drivers/input/mouse/psmouse-base.c +++ b/drivers/input/mouse/psmouse-base.c @@ -36,6 +36,7 @@ #include "sentelic.h" #include "cypress_ps2.h" #include "focaltech.h" +#include "vmmouse.h" #define DRIVER_DESC "PS/2 mouse driver" @@ -790,6 +791,13 @@ static int psmouse_extensions(struct psmouse *psmouse, } } + if (psmouse_do_detect(vmmouse_detect, psmouse, set_properties) == 0) { + if (max_proto > PSMOUSE_IMEX) { + if (!set_properties || vmmouse_init(psmouse) == 0) + return PSMOUSE_VMMOUSE; + } + } + /* * Try Kensington ThinkingMouse (we try first, because synaptics probe * upsets the thinkingmouse). @@ -1113,6 +1121,15 @@ static const struct psmouse_protocol psmouse_protocols[] = { .init = focaltech_init, }, #endif +#ifdef CONFIG_MOUSE_PS2_VMMOUSE + { + .type = PSMOUSE_VMMOUSE, + .name = VMMOUSE_PSNAME, + .alias = "vmmouse", + .detect = vmmouse_detect, + .init = vmmouse_init, + }, +#endif { .type = PSMOUSE_AUTO, .name = "auto", |