Date: Sat, 7 Aug 2021 13:56:16 +0300 From: Vladimir Kondratyev <wulf@FreeBSD.org> To: Mark Kane <mark@kane.mn> Cc: usb@freebsd.org, hps@selasky.org Subject: Re: eGalax USB touchscreen issues Message-ID: <168b368c-3258-6416-42c5-a722e45bf14b@FreeBSD.org> In-Reply-To: <ee3c43f89df5dffd0b0dab7393f0c5b5@kane.mn> References: <324d49ca-1c0e-659d-194d-ece4d5f7f5e2@FreeBSD.org> <0ae3fec48e2c351d2c006f4ba4932cd7@kane.mn> <166dd4d4-24cd-c24b-d75e-9a34fa734358@FreeBSD.org> <eccaff2a99153fb44ffa8df3c93d7eb6@kane.mn> <36983ce5-8358-5a04-2377-46067d3c3c79@FreeBSD.org> <c9e68dbb-5382-976d-7302-d816d8636153@FreeBSD.org> <59ba07a0ecbdac36746fe18ea5f0559f@kane.mn> <92c855bf-a73a-bae5-fcdc-c5a88008739b@FreeBSD.org> <5e8cd8d75deff98e8db3352001ce8432@kane.mn> <858ac67e-14e2-730c-4a16-ca218e2c0bee@FreeBSD.org> <ee3c43f89df5dffd0b0dab7393f0c5b5@kane.mn>
next in thread | previous in thread | raw e-mail | index | archive | help
This is a multi-part message in MIME format. --------------5C3ED74F4136709EF00D434A Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit On 07.08.2021 07:25, Mark Kane wrote: > 'cont_count_max' in 'struct hmt_softc'; did you mean 'cont_count_loc'? > sc->cont_count_max = cont_count_max; > ^~~~~~~~~~~~~~ > cont_count_loc > /usr/src/sys/dev/hid/hmt.c:190:22: note: 'cont_count_loc' declared here > struct hid_location cont_count_loc; > ^ > /usr/src/sys/dev/hid/hmt.c:874:21: error: assigning to 'struct > hid_location' from incompatible type 'int32_t' (aka 'int') > sc->cont_count_max = cont_count_max; > > ------------------------- > > I then removed this line: "sc->cont_count_max = cont_count_max;" which > got a successful build and hmt0/hconf0 attached. X now adds it as an > input device: Some my local changes leaked into diff context. > [ 155.758] (II) config/udev: Adding input device eGalax Inc. USB > TouchController TouchScreen (/dev/input/event4) > [ 155.758] (**) eGalax Inc. USB TouchController TouchScreen: Applying > InputClass "evdev pointer catchall" > [ 155.758] (**) eGalax Inc. USB TouchController TouchScreen: Applying > InputClass "libinput pointer catchall" > [ 155.758] (II) Using input driver 'libinput' for 'eGalax Inc. USB > TouchController TouchScreen' > [ 155.759] (**) eGalax Inc. USB TouchController TouchScreen: always > reports core events > [ 155.759] (**) Option "Device" "/dev/input/event4" > [ 155.759] (**) Option "_source" "server/udev" > [ 155.762] (II) event4 - eGalax Inc. USB TouchController TouchScreen: > is tagged by udev as: Mouse > [ 155.763] (II) event4 - eGalax Inc. USB TouchController TouchScreen: > device is a pointer > [ 155.764] (II) event4 - eGalax Inc. USB TouchController TouchScreen: > device removed > [ 155.774] (**) Option "config_info" "udev:/dev/input/event4" > [ 155.774] (II) XINPUT: Adding extended input device "eGalax Inc. USB > TouchController TouchScreen" (type: MOUSE, id 10) > [ 155.774] (**) Option "AccelerationScheme" "none" > [ 155.775] (**) eGalax Inc. USB TouchController TouchScreen: (accel) > selected scheme none/0 > [ 155.775] (**) eGalax Inc. USB TouchController TouchScreen: (accel) > acceleration factor: 2.000 > [ 155.775] (**) eGalax Inc. USB TouchController TouchScreen: (accel) > acceleration threshold: 4 > [ 155.778] (II) event4 - eGalax Inc. USB TouchController TouchScreen: > is tagged by udev as: Mouse > [ 155.779] (II) event4 - eGalax Inc. USB TouchController TouchScreen: > device is a pointer > > Now when touching the touchscreen we get an immediate kernel panic. Not > sure if this is my mistake in merging the patch or something else. > Try attached patch (on top of previous one) -- WBR Vladimir Kondratyev --------------5C3ED74F4136709EF00D434A Content-Type: text/x-patch; charset=UTF-8; name="evdev.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="evdev.patch" diff --git a/sys/dev/evdev/evdev.c b/sys/dev/evdev/evdev.c index 086ee36333d..bc28ae0734f 100644 --- a/sys/dev/evdev/evdev.c +++ b/sys/dev/evdev/evdev.c @@ -316,8 +316,7 @@ evdev_register_common(struct evdev_dev *evdev) } /* Initialize multitouch protocol type B states */ - if (bit_test(evdev->ev_abs_flags, ABS_MT_SLOT) && - evdev->ev_absinfo != NULL && MAXIMAL_MT_SLOT(evdev) > 0) + if (bit_test(evdev->ev_abs_flags, ABS_MT_SLOT)) evdev_mt_init(evdev); /* Estimate maximum report size */ --------------5C3ED74F4136709EF00D434A--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?168b368c-3258-6416-42c5-a722e45bf14b>