Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit af5cf146 authored by Roman Kiryanov's avatar Roman Kiryanov Committed by Alistair Delva
Browse files

ANDROID: virtio: virtio_input: Set the amount of multitouch slots in virtio input



Virtio input was missing the the amount of multitouch
slots and kernel was filtering out ABS_MT_SLOT events
for a screen is touched in more than one place.

Bug: 143488374
Signed-off-by: default avatarRoman Kiryanov <rkir@google.com>
Change-Id: I617099435af311e6b0ee127b76eafe13834ea8f8
parent 3a6402a0
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -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,12 @@ 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 == ABS_MT_TRACKING_ID)
		input_mt_init_slots(vi->idev,
				    ma, /* input max finger */
				    INPUT_MT_DIRECT
					| INPUT_MT_DROP_UNUSED
					| INPUT_MT_TRACK);
}

static int virtinput_init_vqs(struct virtio_input *vi)