mirror of
https://github.com/torvalds/linux.git
synced 2026-06-07 22:14:04 +02:00
ANDROID: virtio: virtio_input: pass _DIRECT only if the device
advertises _DIRECT INPUT_MT_DIRECT should be used only if the device advertises INPUT_PROP_DIRECT. Bug: 147493341 Bug: 149250379 Test: boot emulator with 5.4 kernel, check if touchscreen works Signed-off-by: Roman Kiryanov <rkir@google.com> Change-Id: Ic06ae2b9d0ab7c77cb8829e5392fd048139500a2
This commit is contained in:
parent
6a22cd7948
commit
99f4553ab4
|
|
@ -165,12 +165,15 @@ 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)
|
||||
if (abs == ABS_MT_TRACKING_ID) {
|
||||
unsigned int slot_flags =
|
||||
test_bit(INPUT_PROP_DIRECT, vi->idev->propbit) ?
|
||||
INPUT_MT_DIRECT : 0;
|
||||
|
||||
input_mt_init_slots(vi->idev,
|
||||
ma, /* input max finger */
|
||||
INPUT_MT_DIRECT
|
||||
| INPUT_MT_DROP_UNUSED
|
||||
| INPUT_MT_TRACK);
|
||||
slot_flags);
|
||||
}
|
||||
}
|
||||
|
||||
static int virtinput_init_vqs(struct virtio_input *vi)
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user