From: Rudolf Streif Subject: Re: [PATCH] virtio_input: Initialize multi-touch slots on ABS_MT_SLOT Date: Wed, 15 Apr 2020 00:24:12 +0000 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0376603427194522209==" Return-path: In-Reply-To: Content-Language: en-US List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: virtualization-bounces@lists.linux-foundation.org Sender: "Virtualization" To: "kraxel@redhat.com" , "mst@redhat.com" , "virtualization@lists.linux-foundation.org" List-Id: virtualization@lists.linuxfoundation.org --===============0376603427194522209== Content-Language: en-US Content-Type: multipart/alternative; boundary="_000_b5ebe49b77374d53a6cda0ac98f11560blackberrycom_" --_000_b5ebe49b77374d53a6cda0ac98f11560blackberrycom_ Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="iso-8859-1" Resubmit. Thank you. ________________________________ From: Virtualization on= behalf of Rudolf Streif Sent: Thursday, January 2, 2020 11:12 AM To: kraxel@redhat.com Cc: virtualization@lists.linux-foundation.org Subject: [PATCH] virtio_input: Initialize multi-touch slots on ABS_MT_SLOT For multi-touch devices the frontend needs to initialize the correct number of slots for touch tracking. Hardware drivers do this by calling input_mt_init_slots() on initialization. For virtio_input the function must be called when the backend sends ABS_MT_SLOT. Signed-off-by: Rudolf J Streif --- drivers/virtio/virtio_input.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/virtio/virtio_input.c b/drivers/virtio/virtio_input.c index 5ae529671b3d..582ba808b955 100644 --- a/drivers/virtio/virtio_input.c +++ b/drivers/virtio/virtio_input.c @@ -3,6 +3,7 @@ #include #include #include +#include #include #include @@ -164,6 +165,9 @@ static void virtinput_cfg_abs(struct virtio_input *vi, = int abs) virtio_cread(vi->vdev, struct virtio_input_config, u.abs.flat, &fl); input_set_abs_params(vi->idev, abs, mi, ma, fu, fl); input_abs_set_res(vi->idev, abs, re); + + if (abs =3D=3D ABS_MT_SLOT) + input_mt_init_slots(vi->idev, ma + 1, INPUT_MT_DIRECT | INP= UT_MT_DROP_UNUSED); } static int virtinput_init_vqs(struct virtio_input *vi) -- 2.17.1 ________________________________ This transmission (including any attachments) may contain confidential info= rmation, privileged material (including material protected by the solicitor= -client or other applicable privileges), or constitute non-public informati= on. Any use of this information by anyone other than the intended recipient= is prohibited. If you have received this transmission in error, please imm= ediately reply to the sender and delete this information from your system. = Use, dissemination, distribution, or reproduction of this transmission by u= nintended recipients is not authorized and may be unlawful. ---------------------------------------------------------------------- This transmission (including any attachments) may contain confidential info= rmation, privileged material (including material protected by the solicitor= -client or other applicable privileges), or constitute non-public informati= on. Any use of this information by anyone other than the intended recipient= is prohibited. If you have received this transmission in error, please imm= ediately reply to the sender and delete this information from your system. = Use, dissemination, distribution, or reproduction of this transmission by u= nintended recipients is not authorized and may be unlawful. --_000_b5ebe49b77374d53a6cda0ac98f11560blackberrycom_ Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset="iso-8859-1"

Resubmit. Thank you.




From: Virtualization <= virtualization-bounces@lists.linux-foundation.org> on behalf of Rudolf S= treif <rstreif@blackberry.com>
Sent: Thursday, January 2, 2020 11:12 AM
To: kraxel@redhat.com
Cc: virtualization@lists.linux-foundation.org
Subject: [PATCH] virtio_input: Initialize multi-touch slots on ABS_M= T_SLOT
 

For multi-touch devices the frontend needs to initialize the correct number of slots for touch tracking. Hardware drivers do this by
calling input_mt_init_slots() on initialization. For virtio_input
the function must be called when the backend sends ABS_MT_SLOT.

Signed-off-by: Rudolf J Streif <rstreif@blackberry.com>
---
 drivers/virtio/virtio_input.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/virtio/virtio_input.c b/drivers/virtio/virtio_input.c<= br> index 5ae529671b3d..582ba808b955 100644
--- a/drivers/virtio/virtio_input.c
+++ b/drivers/virtio/virtio_input.c
@@ -3,6 +3,7 @@
 #include <linux/virtio.h>
 #include <linux/virtio_config.h>
 #include <linux/input.h>
+#include <linux/input/mt.h>

 #include <uapi/linux/virtio_ids.h>
 #include <uapi/linux/virtio_input.h>
@@ -164,6 +165,9 @@ static void virtinput_cfg_abs(struct virtio_input *= vi, int abs)
        virtio_cread(vi->vdev, struct= virtio_input_config, u.abs.flat, &fl);
        input_set_abs_params(vi->idev= , abs, mi, ma, fu, fl);
        input_abs_set_res(vi->idev, a= bs, re);
+
+       if (abs =3D=3D ABS_MT_SLOT)
+           &nbs= p;   input_mt_init_slots(vi->idev, ma + 1, INPUT_MT_DIRECT= | INPUT_MT_DROP_UNUSED);
 }

 static int virtinput_init_vqs(struct virtio_input *vi)
--
2.17.1



This transmission (including any attachments) may contain confidential info= rmation, privileged material (including material protected by the solicitor= -client or other applicable privileges), or constitute non-public informati= on. Any use of this information by anyone other than the intended recipient is prohibited. If you have rec= eived this transmission in error, please immediately reply to the sender an= d delete this information from your system. Use, dissemination, distributio= n, or reproduction of this transmission by unintended recipients is not authorized and may be unlawful.

This transmission (including any attachments) may contain confidential = information, privileged material (including material protected by the solic= itor-client or other applicable privileges), or constitute non-public infor= mation. Any use of this information by anyone other than the intended recip= ient is prohibited. If you have received this transmission in error, please= immediately reply to the sender and delete this information from your syst= em. Use, dissemination, distribution, or reproduction of this transmission = by unintended recipients is not authorized and may be unlawful.
--_000_b5ebe49b77374d53a6cda0ac98f11560blackberrycom_-- --===============0376603427194522209== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Virtualization mailing list Virtualization@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/virtualization --===============0376603427194522209==--