RFR: 8201568: zForce touchscreen input device fails when closed and immediately reopened [v2]
John Neffenger
github.com+1413266+jgneff at openjdk.java.net
Fri Dec 11 21:51:54 UTC 2020
On Tue, 29 Sep 2020 19:47:54 GMT, John Neffenger <github.com+1413266+jgneff at openjdk.org> wrote:
>> I don't have access to a Pi right now, so I can't test this (I'll be able to test in about 10 days from now though)
>
> @johanvos, would you mind approving this pull request again? It looks as if the *ready* label was removed when I merged the master branch. All of the tests I ran this week worked as expected and are described below.
>
> ### Tests
>
> I ran additional tests on the following devices after merging the master branch:
>
> * Kobo Touch Model N905C,
> * Kobo Glo HD Model N437, and
> * Raspberry Pi 2 Model B.
>
> I ran the tests:
>
> * without this fix and without the workaround,
> * with this fix but without the workaround,
> * with this fix and with the workaround (representing this pull request).
>
> The workaround is the code in `EPDInputDeviceRegistry.createDevice` that lets the current JavaFX 15 release avoid the problem even without this fix. The goal of this pull request is to be able eventually to remove the `EPDInputDeviceRegistry` subclass entirely.
>
> The test results are shown below. The system call trace was captured with the following command using the [epd-javafx][1] application.
>
> $ sudo strace -f -e trace=open,openat,close -o strace.log \
> bin/run.sh --pattern=3 --loops=1
>
> **Note:** In the messages below from the kernel ring buffer, the final two lines with `zforce_i2c_close` and `Deactivate` are printed when the program terminates. That call made by the kernel on behalf of the program is not recorded in the program's system call trace.
>
> ### Kobo Touch Model N905C
>
> This device has the "command overrun" bug.
>
> #### Without fix, without workaround
>
> The system call trace shows:
>
> 3576 open("/dev/input/event1", O_RDONLY) = 12
> 3576 close(12) = 0
> 3576 open("/dev/input/event1", O_RDONLY) = 12
>
> The error occurs, and the touchscreen is disabled:
>
> $ dmesg | grep -i zforce
> [drivers/input/touchscreen/zforce_i2c.c-425] zforce_i2c_open()
> [zForce_ir_touch_recv_data-145] command Activate (0) ...
> [zForce_ir_touch_recv_data-154] command Resolution (0) ...
> [zForce_ir_touch_recv_data-179] command Frequency (0) ...
> [drivers/input/touchscreen/zforce_i2c.c-440] zforce_i2c_close()
> [drivers/input/touchscreen/zforce_i2c.c-425] zforce_i2c_open()
> [zForce_ir_touch_recv_data-142] command Deactivate ...
> [zForce_ir_touch_recv_data-198] command overrun (8) ...
> [drivers/input/touchscreen/zforce_i2c.c-440] zforce_i2c_close()
> [zForce_ir_touch_recv_data-142] command Deactivate ...
>
> #### With fix, without workaround
>
> The system call trace shows:
>
> 3997 open("/dev/input/event1", O_RDONLY) = 12
> 3997 open("/dev/input/event1", O_RDONLY) = 13
> 3997 close(13) = 0
>
> The error does not occur, and the touchscreen works as expected:
>
> $ dmesg | grep -i zforce
> [drivers/input/touchscreen/zforce_i2c.c-425] zforce_i2c_open()
> [zForce_ir_touch_recv_data-145] command Activate (0) ...
> [zForce_ir_touch_recv_data-154] command Resolution (0) ...
> [zForce_ir_touch_recv_data-179] command Frequency (0) ...
> [drivers/input/touchscreen/zforce_i2c.c-440] zforce_i2c_close()
> [zForce_ir_touch_recv_data-142] command Deactivate ...
>
> #### With fix, with workaround
>
> The system call trace shows the additional *open* call due to the workaround:
>
> 4123 open("/dev/input/event1", O_RDONLY) = 13
> 4123 open("/dev/input/event1", O_RDONLY) = 14
> 4123 open("/dev/input/event1", O_RDONLY) = 15
> 4123 close(15) = 0
>
> The error does not occur, and the touchscreen works as expected:
>
> $ dmesg | grep -i zforce
> [drivers/input/touchscreen/zforce_i2c.c-425] zforce_i2c_open()
> [zForce_ir_touch_recv_data-145] command Activate (0) ...
> [zForce_ir_touch_recv_data-154] command Resolution (0) ...
> [zForce_ir_touch_recv_data-179] command Frequency (0) ...
> [drivers/input/touchscreen/zforce_i2c.c-440] zforce_i2c_close()
> [zForce_ir_touch_recv_data-142] command Deactivate ...
>
> ### Kobo Glo HD Model N437
>
> This device does not have the "command overrun" bug.
>
> #### Without fix, without workaround
>
> The system call trace shows:
>
> 3396 open("/dev/input/event1", O_RDONLY) = 11
> 3396 close(11) = 0
> 3396 open("/dev/input/event1", O_RDONLY) = 11
>
> The error does not occur, and the touchscreen works as expected:
>
> $ dmesg | grep -i zforce
> [drivers/input/touchscreen/zforce_i2c.c-740] zforce_i2c_open()
> [zForce_ir_touch_recv_data-233] command Activate (0) ...
> ...
> [zForce_ir_touch_recv_data-250] command Resolution (0) ...
> [zForce_ir_touch_recv_data-278] command Frequency (0) ...
> [zForce_ir_touch_recv_data-260] command Configuration ...
> [drivers/input/touchscreen/zforce_i2c.c-756] zforce_i2c_close()
> [zForce_ir_touch_recv_data-230] command Deactivate ...
>
> #### With fix, without workaround
>
> The system call trace shows:
>
> 3620 open("/dev/input/event1", O_RDONLY) = 15
> 3620 open("/dev/input/event1", O_RDONLY) = 16
> 3620 close(16) = 0
>
> The error does not occur, and the touchscreen works as expected:
>
> $ dmesg | grep -i zforce
> [drivers/input/touchscreen/zforce_i2c.c-740] zforce_i2c_open()
> [zForce_ir_touch_recv_data-233] command Activate (0) ...
> ...
> [zForce_ir_touch_recv_data-250] command Resolution (0) ...
> [zForce_ir_touch_recv_data-278] command Frequency (0) ...
> [zForce_ir_touch_recv_data-260] command Configuration ...
> [drivers/input/touchscreen/zforce_i2c.c-756] zforce_i2c_close()
> [zForce_ir_touch_recv_data-230] command Deactivate ...
>
> #### With fix, with workaround
>
> The system call trace shows the additional *open* call due to the workaround:
>
> 3913 open("/dev/input/event1", O_RDONLY) = 18
> 3913 open("/dev/input/event1", O_RDONLY) = 19
> 3913 open("/dev/input/event1", O_RDONLY) = 20
> 3913 close(20) = 0
>
> The error does not occur, and the touchscreen works as expected:
>
> $ dmesg | grep -i zforce
> [drivers/input/touchscreen/zforce_i2c.c-740] zforce_i2c_open()
> [zForce_ir_touch_recv_data-233] command Activate (0) ...
> ...
> [zForce_ir_touch_recv_data-250] command Resolution (0) ...
> [zForce_ir_touch_recv_data-278] command Frequency (0) ...
> [zForce_ir_touch_recv_data-260] command Configuration ...
> [drivers/input/touchscreen/zforce_i2c.c-756] zforce_i2c_close()
> [zForce_ir_touch_recv_data-230] command Deactivate ...
>
> ### Raspberry Pi 2 Model B
>
> This device has a normal mouse rather than a touchscreen.
>
> #### Without fix, without workaround
>
> The system call trace shows:
>
> 19407 openat(AT_FDCWD, "/dev/input/event0", O_RDONLY) = 18
>
> There is no output to the kernel ring buffer, and the mouse (event0) works as expected.
>
> #### With fix, without workaround
>
> The system call trace shows:
>
> 19548 openat(AT_FDCWD, "/dev/input/event0", O_RDONLY) = 18
>
> There is no output to the kernel ring buffer, and the mouse (event0) works as expected.
>
> #### With fix, with workaround
>
> The system call trace shows:
>
> 19802 openat(AT_FDCWD, "/dev/input/event0", O_RDONLY) = 18
>
> There is no output to the kernel ring buffer, and the mouse (event0) works as expected.
>
> [1]: https://github.com/jgneff/epd-javafx
I'm unsure of the next step for this pull request. GitHub says that it's approved, but the *openjdk* bot removed the "Ready to be integrated" label when I merged in the *master* branch back in September. Do I need to wait for its re-approval before integrating it?
-------------
PR: https://git.openjdk.java.net/jfx/pull/258
More information about the openjfx-dev
mailing list