* [PATCH RESEND v3] virtio-input: add multi-touch support
@ 2021-01-15 0:26 Vasyl Vavrychuk
2021-01-29 12:06 ` Vasyl Vavrychuk
2021-02-03 14:22 ` Gerd Hoffmann
0 siblings, 2 replies; 5+ messages in thread
From: Vasyl Vavrychuk @ 2021-01-15 0:26 UTC (permalink / raw)
To: virtualization, linux-kernel, linux-input
Cc: Vasyl Vavrychuk, Michael S. Tsirkin, Henrik Rydberg, Mathias Crombez
From: Mathias Crombez <mathias.crombez@faurecia.com>
Without multi-touch slots allocated, ABS_MT_SLOT events will be lost by
input_handle_abs_event.
Implementation is based on uinput_create_device.
Signed-off-by: Mathias Crombez <mathias.crombez@faurecia.com>
Co-developed-by: Vasyl Vavrychuk <vasyl.vavrychuk@opensynergy.com>
Signed-off-by: Vasyl Vavrychuk <vasyl.vavrychuk@opensynergy.com>
---
v2: fix patch corrupted by corporate email server
v3: use number of slots from the host
Resend since to feedback.
drivers/virtio/virtio_input.c | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/drivers/virtio/virtio_input.c b/drivers/virtio/virtio_input.c
index f1f6208edcf5..f643536807dd 100644
--- a/drivers/virtio/virtio_input.c
+++ b/drivers/virtio/virtio_input.c
@@ -7,6 +7,7 @@
#include <uapi/linux/virtio_ids.h>
#include <uapi/linux/virtio_input.h>
+#include <linux/input/mt.h>
struct virtio_input {
struct virtio_device *vdev;
@@ -204,7 +205,7 @@ static int virtinput_probe(struct virtio_device *vdev)
struct virtio_input *vi;
unsigned long flags;
size_t size;
- int abs, err;
+ int abs, err, nslots;
if (!virtio_has_feature(vdev, VIRTIO_F_VERSION_1))
return -ENODEV;
@@ -289,6 +290,13 @@ static int virtinput_probe(struct virtio_device *vdev)
continue;
virtinput_cfg_abs(vi, abs);
}
+
+ if (test_bit(ABS_MT_SLOT, vi->idev->absbit)) {
+ nslots = input_abs_get_max(vi->idev, ABS_MT_SLOT) + 1;
+ err = input_mt_init_slots(vi->idev, nslots, 0);
+ if (err)
+ goto err_mt_init_slots;
+ }
}
virtio_device_ready(vdev);
@@ -304,6 +312,7 @@ static int virtinput_probe(struct virtio_device *vdev)
spin_lock_irqsave(&vi->lock, flags);
vi->ready = false;
spin_unlock_irqrestore(&vi->lock, flags);
+err_mt_init_slots:
input_free_device(vi->idev);
err_input_alloc:
vdev->config->del_vqs(vdev);
--
2.20.1
_______________________________________________
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH RESEND v3] virtio-input: add multi-touch support
2021-01-15 0:26 [PATCH RESEND v3] virtio-input: add multi-touch support Vasyl Vavrychuk
@ 2021-01-29 12:06 ` Vasyl Vavrychuk
2021-01-29 15:26 ` Michael S. Tsirkin
2021-02-03 14:22 ` Gerd Hoffmann
1 sibling, 1 reply; 5+ messages in thread
From: Vasyl Vavrychuk @ 2021-01-29 12:06 UTC (permalink / raw)
To: vasyl.vavrychuk
Cc: mst, rydberg, linux-kernel, virtualization, mathias.crombez, linux-input
Hi, All,
There has been no reply to this patch.
Is there anything I can do?
Thanks,
Vasyl
_______________________________________________
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH RESEND v3] virtio-input: add multi-touch support
2021-01-29 12:06 ` Vasyl Vavrychuk
@ 2021-01-29 15:26 ` Michael S. Tsirkin
2021-02-02 0:17 ` Colin Xu
0 siblings, 1 reply; 5+ messages in thread
From: Michael S. Tsirkin @ 2021-01-29 15:26 UTC (permalink / raw)
To: Vasyl Vavrychuk
Cc: rydberg, mathias.crombez, linux-kernel, virtualization, linux-input
On Fri, Jan 29, 2021 at 02:06:54PM +0200, Vasyl Vavrychuk wrote:
> Hi, All,
>
> There has been no reply to this patch.
>
> Is there anything I can do?
>
> Thanks,
> Vasyl
Gerd any input on this?
_______________________________________________
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH RESEND v3] virtio-input: add multi-touch support
2021-01-29 15:26 ` Michael S. Tsirkin
@ 2021-02-02 0:17 ` Colin Xu
0 siblings, 0 replies; 5+ messages in thread
From: Colin Xu @ 2021-02-02 0:17 UTC (permalink / raw)
To: Michael S. Tsirkin
Cc: Vasyl Vavrychuk, rydberg, linux-kernel, virtualization,
mathias.crombez, linux-input
I second the support of MT with this one or other alternative.
This patch has been tested work in one of our POC project.
--
Best Regards,
Colin Xu
On Fri, 29 Jan 2021, Michael S. Tsirkin wrote:
> On Fri, Jan 29, 2021 at 02:06:54PM +0200, Vasyl Vavrychuk wrote:
>> Hi, All,
>>
>> There has been no reply to this patch.
>>
>> Is there anything I can do?
>>
>> Thanks,
>> Vasyl
>
> Gerd any input on this?
>
> _______________________________________________
> Virtualization mailing list
> Virtualization@lists.linux-foundation.org
> https://lists.linuxfoundation.org/mailman/listinfo/virtualization
>
_______________________________________________
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH RESEND v3] virtio-input: add multi-touch support
2021-01-15 0:26 [PATCH RESEND v3] virtio-input: add multi-touch support Vasyl Vavrychuk
2021-01-29 12:06 ` Vasyl Vavrychuk
@ 2021-02-03 14:22 ` Gerd Hoffmann
1 sibling, 0 replies; 5+ messages in thread
From: Gerd Hoffmann @ 2021-02-03 14:22 UTC (permalink / raw)
To: Vasyl Vavrychuk
Cc: Michael S. Tsirkin, Henrik Rydberg, linux-kernel, virtualization,
Mathias Crombez, linux-input
On Fri, Jan 15, 2021 at 02:26:23AM +0200, Vasyl Vavrychuk wrote:
> From: Mathias Crombez <mathias.crombez@faurecia.com>
>
> Without multi-touch slots allocated, ABS_MT_SLOT events will be lost by
> input_handle_abs_event.
>
> Implementation is based on uinput_create_device.
>
> Signed-off-by: Mathias Crombez <mathias.crombez@faurecia.com>
> Co-developed-by: Vasyl Vavrychuk <vasyl.vavrychuk@opensynergy.com>
> Signed-off-by: Vasyl Vavrychuk <vasyl.vavrychuk@opensynergy.com>
> ---
> v2: fix patch corrupted by corporate email server
> v3: use number of slots from the host
>
> Resend since to feedback.
>
> drivers/virtio/virtio_input.c | 11 ++++++++++-
> 1 file changed, 10 insertions(+), 1 deletion(-)
Have no test hardware, the logic looks sane though.
Reviewed-by: Gerd Hoffmann <kraxel@redhat.com>
take care,
Gerd
_______________________________________________
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2021-02-03 14:22 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-15 0:26 [PATCH RESEND v3] virtio-input: add multi-touch support Vasyl Vavrychuk
2021-01-29 12:06 ` Vasyl Vavrychuk
2021-01-29 15:26 ` Michael S. Tsirkin
2021-02-02 0:17 ` Colin Xu
2021-02-03 14:22 ` Gerd Hoffmann
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).