From nobody Sat Aug 07 10:56:16 2021 X-Original-To: usb@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 0A0FE11FFA35 for ; Sat, 7 Aug 2021 10:57:30 +0000 (UTC) (envelope-from wulf@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GhfST6ZLlz3GNG; Sat, 7 Aug 2021 10:57:29 +0000 (UTC) (envelope-from wulf@FreeBSD.org) Received: from [192.168.0.30] (unknown [176.120.225.84]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: wulf) by smtp.freebsd.org (Postfix) with ESMTPSA id 506DE27437; Sat, 7 Aug 2021 10:57:29 +0000 (UTC) (envelope-from wulf@FreeBSD.org) Subject: Re: eGalax USB touchscreen issues To: Mark Kane Cc: usb@freebsd.org, hps@selasky.org References: <324d49ca-1c0e-659d-194d-ece4d5f7f5e2@FreeBSD.org> <0ae3fec48e2c351d2c006f4ba4932cd7@kane.mn> <166dd4d4-24cd-c24b-d75e-9a34fa734358@FreeBSD.org> <36983ce5-8358-5a04-2377-46067d3c3c79@FreeBSD.org> <59ba07a0ecbdac36746fe18ea5f0559f@kane.mn> <92c855bf-a73a-bae5-fcdc-c5a88008739b@FreeBSD.org> <5e8cd8d75deff98e8db3352001ce8432@kane.mn> <858ac67e-14e2-730c-4a16-ca218e2c0bee@FreeBSD.org> From: Vladimir Kondratyev Message-ID: <168b368c-3258-6416-42c5-a722e45bf14b@FreeBSD.org> Date: Sat, 7 Aug 2021 13:56:16 +0300 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:78.0) Gecko/20100101 Thunderbird/78.12.0 List-Id: FreeBSD List-Archive: https://lists.freebsd.org/archives/freebsd-usb List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-usb@freebsd.org X-BeenThere: freebsd-usb@freebsd.org MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/mixed; boundary="------------5C3ED74F4136709EF00D434A" Content-Language: en-US X-ThisMailContainsUnwantedMimeParts: N 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--