* Re: [PATCH v6 0/2] Add ili9882t bindings and timing
From: Benjamin Tissoires @ 2023-08-21 16:55 UTC (permalink / raw)
To: robh+dt, krzysztof.kozlowski+dt, conor+dt, dmitry.torokhov,
dianders, jikos, benjamin.tissoires, hsinyi, Cong Yang
Cc: linux-input, devicetree, linux-kernel
In-Reply-To: <20230802071947.1683318-1-yangcong5@huaqin.corp-partner.google.com>
On Wed, 02 Aug 2023 15:19:45 +0800, Cong Yang wrote:
> Add bindings for Ilitek. The ili9882t touch screen chip same as
> Elan eKTH6915 controller has a reset gpio. The difference is that
> ilitek9882 needs to use vccio-supply instead of vcc33-supply.
> From Dmitry suggestion, it would make more sense to distinguish the
> binging of ili9882 and eKTH6915.
>
> From The datasheet specifies there should be 60ms between touch SDA
> sleep and panel RESX. so we can add the 65 ms delay in i2c_hid_core_suspend.
>
> [...]
Applied to https://git.kernel.org/pub/scm/linux/kernel/git/hid/hid.git (for-6.6/elan), thanks!
[1/2] dt-bindings: input: i2c-hid: Introduce Ilitek ili9882t
https://git.kernel.org/hid/hid/c/7d3b0d9ebddd
[2/2] HID: i2c-hid: elan: Add ili9882t timing
https://git.kernel.org/hid/hid/c/f2f43bf15d7a
Cheers,
--
Benjamin Tissoires <bentiss@kernel.org>
^ permalink raw reply
* [syzbot] [input?] KASAN: slab-use-after-free Read in input_dev_uevent
From: syzbot @ 2023-08-21 16:48 UTC (permalink / raw)
To: davidgow, dmitry.torokhov, gregkh, linux-input, linux-kernel,
mripard, rydberg, syzkaller-bugs
Hello,
syzbot found the following issue on:
HEAD commit: 7271b2a53042 Add linux-next specific files for 20230818
git tree: linux-next
console+strace: https://syzkaller.appspot.com/x/log.txt?x=11edc0d3a80000
kernel config: https://syzkaller.appspot.com/x/.config?x=1936af09cdef7dd6
dashboard link: https://syzkaller.appspot.com/bug?extid=3a0ebe8a52b89c63739d
compiler: gcc (Debian 12.2.0-14) 12.2.0, GNU ld (GNU Binutils for Debian) 2.40
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=17998f03a80000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=17b81223a80000
Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/d81109bc02c1/disk-7271b2a5.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/4b3bf8e2a4f7/vmlinux-7271b2a5.xz
kernel image: https://storage.googleapis.com/syzbot-assets/6404cd473c1e/bzImage-7271b2a5.xz
The issue was bisected to:
commit 699fb50d99039a50e7494de644f96c889279aca3
Author: David Gow <davidgow@google.com>
Date: Thu Jul 20 12:45:09 2023 +0000
drivers: base: Free devm resources when unregistering a device
bisection log: https://syzkaller.appspot.com/x/bisect.txt?x=13140083a80000
final oops: https://syzkaller.appspot.com/x/report.txt?x=10940083a80000
console output: https://syzkaller.appspot.com/x/log.txt?x=17140083a80000
IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+3a0ebe8a52b89c63739d@syzkaller.appspotmail.com
Fixes: 699fb50d9903 ("drivers: base: Free devm resources when unregistering a device")
usb 1-1: USB disconnect, device number 2
==================================================================
BUG: KASAN: slab-use-after-free in string_nocheck lib/vsprintf.c:645 [inline]
BUG: KASAN: slab-use-after-free in string+0x394/0x3d0 lib/vsprintf.c:727
Read of size 1 at addr ffff88801c8c6ca8 by task kworker/1:3/4508
CPU: 1 PID: 4508 Comm: kworker/1:3 Not tainted 6.5.0-rc6-next-20230818-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/26/2023
Workqueue: usb_hub_wq hub_event
Call Trace:
<TASK>
__dump_stack lib/dump_stack.c:88 [inline]
dump_stack_lvl+0xd9/0x1b0 lib/dump_stack.c:106
print_address_description mm/kasan/report.c:364 [inline]
print_report+0xc4/0x620 mm/kasan/report.c:475
kasan_report+0xda/0x110 mm/kasan/report.c:588
string_nocheck lib/vsprintf.c:645 [inline]
string+0x394/0x3d0 lib/vsprintf.c:727
vsnprintf+0xc5f/0x1870 lib/vsprintf.c:2818
add_uevent_var+0x17c/0x390 lib/kobject_uevent.c:665
input_dev_uevent+0x162/0x8f0 drivers/input/input.c:1691
dev_uevent+0x305/0x760 drivers/base/core.c:2599
kobject_uevent_env+0x623/0x1800 lib/kobject_uevent.c:557
device_del+0x642/0xa50 drivers/base/core.c:3830
input_unregister_device+0xb9/0x100 drivers/input/input.c:2440
hidinput_disconnect+0x160/0x3e0 drivers/hid/hid-input.c:2386
hid_disconnect+0x143/0x1b0 drivers/hid/hid-core.c:2273
hid_hw_stop+0x16/0x70 drivers/hid/hid-core.c:2322
uclogic_remove+0x47/0x90 drivers/hid/hid-uclogic-core.c:485
hid_device_remove+0xce/0x250 drivers/hid/hid-core.c:2682
device_remove+0xc8/0x170 drivers/base/dd.c:567
__device_release_driver drivers/base/dd.c:1272 [inline]
device_release_driver_internal+0x44a/0x610 drivers/base/dd.c:1295
bus_remove_device+0x22c/0x420 drivers/base/bus.c:574
device_del+0x39a/0xa50 drivers/base/core.c:3812
hid_remove_device drivers/hid/hid-core.c:2859 [inline]
hid_destroy_device+0xe5/0x150 drivers/hid/hid-core.c:2879
usbhid_disconnect+0xa0/0xe0 drivers/hid/usbhid/hid-core.c:1456
usb_unbind_interface+0x1dd/0x8d0 drivers/usb/core/driver.c:458
device_remove drivers/base/dd.c:569 [inline]
device_remove+0x11f/0x170 drivers/base/dd.c:561
__device_release_driver drivers/base/dd.c:1272 [inline]
device_release_driver_internal+0x44a/0x610 drivers/base/dd.c:1295
bus_remove_device+0x22c/0x420 drivers/base/bus.c:574
device_del+0x39a/0xa50 drivers/base/core.c:3812
usb_disable_device+0x36c/0x7f0 drivers/usb/core/message.c:1416
usb_disconnect+0x2e1/0x890 drivers/usb/core/hub.c:2252
hub_port_connect drivers/usb/core/hub.c:5280 [inline]
hub_port_connect_change drivers/usb/core/hub.c:5580 [inline]
port_event drivers/usb/core/hub.c:5740 [inline]
hub_event+0x1db7/0x4e00 drivers/usb/core/hub.c:5822
process_one_work+0x887/0x15d0 kernel/workqueue.c:2630
process_scheduled_works kernel/workqueue.c:2703 [inline]
worker_thread+0x8bb/0x1290 kernel/workqueue.c:2784
kthread+0x33a/0x430 kernel/kthread.c:388
ret_from_fork+0x45/0x80 arch/x86/kernel/process.c:147
ret_from_fork_asm+0x11/0x20 arch/x86/entry/entry_64.S:304
</TASK>
Allocated by task 782:
kasan_save_stack+0x33/0x50 mm/kasan/common.c:45
kasan_set_track+0x25/0x30 mm/kasan/common.c:52
____kasan_kmalloc mm/kasan/common.c:374 [inline]
__kasan_kmalloc+0xa2/0xb0 mm/kasan/common.c:383
kasan_kmalloc include/linux/kasan.h:198 [inline]
__do_kmalloc_node mm/slab_common.c:1004 [inline]
__kmalloc_node_track_caller+0x61/0x100 mm/slab_common.c:1024
alloc_dr drivers/base/devres.c:119 [inline]
devm_kmalloc+0xa5/0x230 drivers/base/devres.c:829
devm_kzalloc include/linux/device.h:314 [inline]
uclogic_input_configured+0x251/0x610 drivers/hid/hid-uclogic-core.c:151
hidinput_connect+0x1bf4/0x2b60 drivers/hid/hid-input.c:2344
hid_connect+0x139e/0x18a0 drivers/hid/hid-core.c:2187
hid_hw_start drivers/hid/hid-core.c:2302 [inline]
hid_hw_start+0xa0/0x130 drivers/hid/hid-core.c:2293
uclogic_probe+0x235/0x380 drivers/hid/hid-uclogic-core.c:221
__hid_device_probe drivers/hid/hid-core.c:2626 [inline]
hid_device_probe+0x2e4/0x480 drivers/hid/hid-core.c:2663
call_driver_probe drivers/base/dd.c:579 [inline]
really_probe+0x234/0xc90 drivers/base/dd.c:658
__driver_probe_device+0x1de/0x4b0 drivers/base/dd.c:800
driver_probe_device+0x4c/0x1a0 drivers/base/dd.c:830
__device_attach_driver+0x1d4/0x300 drivers/base/dd.c:958
bus_for_each_drv+0x157/0x1d0 drivers/base/bus.c:457
__device_attach+0x1e8/0x4b0 drivers/base/dd.c:1030
bus_probe_device+0x17c/0x1c0 drivers/base/bus.c:532
device_add+0x11f1/0x1b40 drivers/base/core.c:3623
hid_add_device+0x371/0xa60 drivers/hid/hid-core.c:2809
usbhid_probe+0xd0a/0x1360 drivers/hid/usbhid/hid-core.c:1429
usb_probe_interface+0x307/0x930 drivers/usb/core/driver.c:396
call_driver_probe drivers/base/dd.c:579 [inline]
really_probe+0x234/0xc90 drivers/base/dd.c:658
__driver_probe_device+0x1de/0x4b0 drivers/base/dd.c:800
driver_probe_device+0x4c/0x1a0 drivers/base/dd.c:830
__device_attach_driver+0x1d4/0x300 drivers/base/dd.c:958
bus_for_each_drv+0x157/0x1d0 drivers/base/bus.c:457
__device_attach+0x1e8/0x4b0 drivers/base/dd.c:1030
bus_probe_device+0x17c/0x1c0 drivers/base/bus.c:532
device_add+0x11f1/0x1b40 drivers/base/core.c:3623
usb_set_configuration+0x10cb/0x1c40 drivers/usb/core/message.c:2207
usb_generic_driver_probe+0xca/0x130 drivers/usb/core/generic.c:238
usb_probe_device+0xda/0x2c0 drivers/usb/core/driver.c:293
call_driver_probe drivers/base/dd.c:579 [inline]
really_probe+0x234/0xc90 drivers/base/dd.c:658
__driver_probe_device+0x1de/0x4b0 drivers/base/dd.c:800
driver_probe_device+0x4c/0x1a0 drivers/base/dd.c:830
__device_attach_driver+0x1d4/0x300 drivers/base/dd.c:958
bus_for_each_drv+0x157/0x1d0 drivers/base/bus.c:457
__device_attach+0x1e8/0x4b0 drivers/base/dd.c:1030
bus_probe_device+0x17c/0x1c0 drivers/base/bus.c:532
device_add+0x11f1/0x1b40 drivers/base/core.c:3623
usb_new_device+0xd80/0x1960 drivers/usb/core/hub.c:2589
hub_port_connect drivers/usb/core/hub.c:5440 [inline]
hub_port_connect_change drivers/usb/core/hub.c:5580 [inline]
port_event drivers/usb/core/hub.c:5740 [inline]
hub_event+0x2daf/0x4e00 drivers/usb/core/hub.c:5822
process_one_work+0x887/0x15d0 kernel/workqueue.c:2630
process_scheduled_works kernel/workqueue.c:2703 [inline]
worker_thread+0x8bb/0x1290 kernel/workqueue.c:2784
kthread+0x33a/0x430 kernel/kthread.c:388
ret_from_fork+0x45/0x80 arch/x86/kernel/process.c:147
ret_from_fork_asm+0x11/0x20 arch/x86/entry/entry_64.S:304
Freed by task 4508:
kasan_save_stack+0x33/0x50 mm/kasan/common.c:45
kasan_set_track+0x25/0x30 mm/kasan/common.c:52
kasan_save_free_info+0x2b/0x40 mm/kasan/generic.c:522
____kasan_slab_free mm/kasan/common.c:236 [inline]
____kasan_slab_free+0x15b/0x1b0 mm/kasan/common.c:200
kasan_slab_free include/linux/kasan.h:164 [inline]
slab_free_hook mm/slub.c:1800 [inline]
slab_free_freelist_hook+0x114/0x1e0 mm/slub.c:1826
slab_free mm/slub.c:3809 [inline]
__kmem_cache_free+0xb8/0x2f0 mm/slub.c:3822
release_nodes drivers/base/devres.c:506 [inline]
devres_release_all+0x192/0x240 drivers/base/devres.c:535
device_del+0x628/0xa50 drivers/base/core.c:3827
input_unregister_device+0xb9/0x100 drivers/input/input.c:2440
hidinput_disconnect+0x160/0x3e0 drivers/hid/hid-input.c:2386
hid_disconnect+0x143/0x1b0 drivers/hid/hid-core.c:2273
hid_hw_stop+0x16/0x70 drivers/hid/hid-core.c:2322
uclogic_remove+0x47/0x90 drivers/hid/hid-uclogic-core.c:485
hid_device_remove+0xce/0x250 drivers/hid/hid-core.c:2682
device_remove+0xc8/0x170 drivers/base/dd.c:567
__device_release_driver drivers/base/dd.c:1272 [inline]
device_release_driver_internal+0x44a/0x610 drivers/base/dd.c:1295
bus_remove_device+0x22c/0x420 drivers/base/bus.c:574
device_del+0x39a/0xa50 drivers/base/core.c:3812
hid_remove_device drivers/hid/hid-core.c:2859 [inline]
hid_destroy_device+0xe5/0x150 drivers/hid/hid-core.c:2879
usbhid_disconnect+0xa0/0xe0 drivers/hid/usbhid/hid-core.c:1456
usb_unbind_interface+0x1dd/0x8d0 drivers/usb/core/driver.c:458
device_remove drivers/base/dd.c:569 [inline]
device_remove+0x11f/0x170 drivers/base/dd.c:561
__device_release_driver drivers/base/dd.c:1272 [inline]
device_release_driver_internal+0x44a/0x610 drivers/base/dd.c:1295
bus_remove_device+0x22c/0x420 drivers/base/bus.c:574
device_del+0x39a/0xa50 drivers/base/core.c:3812
usb_disable_device+0x36c/0x7f0 drivers/usb/core/message.c:1416
usb_disconnect+0x2e1/0x890 drivers/usb/core/hub.c:2252
hub_port_connect drivers/usb/core/hub.c:5280 [inline]
hub_port_connect_change drivers/usb/core/hub.c:5580 [inline]
port_event drivers/usb/core/hub.c:5740 [inline]
hub_event+0x1db7/0x4e00 drivers/usb/core/hub.c:5822
process_one_work+0x887/0x15d0 kernel/workqueue.c:2630
process_scheduled_works kernel/workqueue.c:2703 [inline]
worker_thread+0x8bb/0x1290 kernel/workqueue.c:2784
kthread+0x33a/0x430 kernel/kthread.c:388
ret_from_fork+0x45/0x80 arch/x86/kernel/process.c:147
ret_from_fork_asm+0x11/0x20 arch/x86/entry/entry_64.S:304
The buggy address belongs to the object at ffff88801c8c6c80
which belongs to the cache kmalloc-64 of size 64
The buggy address is located 40 bytes inside of
freed 64-byte region [ffff88801c8c6c80, ffff88801c8c6cc0)
The buggy address belongs to the physical page:
page:ffffea0000723180 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1c8c6
anon flags: 0xfff00000000800(slab|node=0|zone=1|lastcpupid=0x7ff)
page_type: 0xffffffff()
raw: 00fff00000000800 ffff888012c41640 0000000000000000 dead000000000001
raw: 0000000000000000 0000000000200020 00000001ffffffff 0000000000000000
page dumped because: kasan: bad access detected
page_owner tracks the page as allocated
page last allocated via order 0, migratetype Unmovable, gfp_mask 0x12cc0(GFP_KERNEL|__GFP_NOWARN|__GFP_NORETRY), pid 49, tgid 49 (kworker/u4:4), ts 8866051578, free_ts 0
set_page_owner include/linux/page_owner.h:31 [inline]
post_alloc_hook+0x2cf/0x340 mm/page_alloc.c:1536
prep_new_page mm/page_alloc.c:1543 [inline]
get_page_from_freelist+0x10d7/0x31b0 mm/page_alloc.c:3219
__alloc_pages+0x1d0/0x4a0 mm/page_alloc.c:4475
alloc_pages+0x1a9/0x270 mm/mempolicy.c:2298
alloc_slab_page mm/slub.c:1870 [inline]
allocate_slab+0x251/0x380 mm/slub.c:2017
new_slab mm/slub.c:2070 [inline]
___slab_alloc+0x8be/0x1570 mm/slub.c:3223
__slab_alloc.constprop.0+0x56/0xa0 mm/slub.c:3322
__slab_alloc_node mm/slub.c:3375 [inline]
slab_alloc_node mm/slub.c:3468 [inline]
__kmem_cache_alloc_node+0x137/0x350 mm/slub.c:3517
__do_kmalloc_node mm/slab_common.c:1003 [inline]
__kmalloc+0x4f/0x100 mm/slab_common.c:1017
kmalloc include/linux/slab.h:604 [inline]
kzalloc include/linux/slab.h:721 [inline]
lsm_task_alloc security/security.c:654 [inline]
security_task_alloc+0x1d4/0x270 security/security.c:2869
copy_process+0x24d7/0x7400 kernel/fork.c:2490
kernel_clone+0xfd/0x930 kernel/fork.c:2916
user_mode_thread+0xb4/0xf0 kernel/fork.c:2994
call_usermodehelper_exec_work kernel/umh.c:172 [inline]
call_usermodehelper_exec_work+0xcb/0x170 kernel/umh.c:158
process_one_work+0x887/0x15d0 kernel/workqueue.c:2630
process_scheduled_works kernel/workqueue.c:2703 [inline]
worker_thread+0x8bb/0x1290 kernel/workqueue.c:2784
page_owner free stack trace missing
Memory state around the buggy address:
ffff88801c8c6b80: 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc fc
ffff88801c8c6c00: 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc fc
>ffff88801c8c6c80: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc
^
ffff88801c8c6d00: 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc fc
ffff88801c8c6d80: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc
==================================================================
---
This report is generated by a bot. It may contain errors.
See https://goo.gl/tpsmEJ for more information about syzbot.
syzbot engineers can be reached at syzkaller@googlegroups.com.
syzbot will keep track of this issue. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.
For information about bisection process see: https://goo.gl/tpsmEJ#bisection
If the bug is already fixed, let syzbot know by replying with:
#syz fix: exact-commit-title
If you want syzbot to run the reproducer, reply with:
#syz test: git://repo/address.git branch-or-commit-hash
If you attach or paste a git patch, syzbot will apply it before testing.
If you want to overwrite bug's subsystems, reply with:
#syz set subsystems: new-subsystem
(See the list of subsystem names on the web dashboard)
If the bug is a duplicate of another bug, reply with:
#syz dup: exact-subject-of-another-report
If you want to undo deduplication, reply with:
#syz undup
^ permalink raw reply
* Re: [PATCH v3 1/1] backlight: hid_bl: Add VESA VCP HID backlight driver
From: Daniel Thompson @ 2023-08-21 16:36 UTC (permalink / raw)
To: Julius Zint
Cc: Lee Jones, Jingoo Han, Jiri Kosina, Benjamin Tissoires,
Helge Deller, Thomas Weißschuh, linux-kernel, dri-devel,
linux-input, linux-fbdev
In-Reply-To: <20230820094118.20521-2-julius@zint.sh>
On Sun, Aug 20, 2023 at 11:41:18AM +0200, Julius Zint wrote:
> The HID spec defines the following Usage IDs (p. 345 ff):
>
> - Monitor Page (0x80) -> Monitor Control (0x01)
> - VESA Virtual Controls Page (0x82) -> Brightness (0x10)
>
> Apple made use of them in their Apple Studio Display and most likely on
> other external displays (LG UltraFine 5k, Pro Display XDR).
>
> The driver will work for any HID device with a report, where the
> application matches the Monitor Control Usage ID and:
>
> 1. An Input field in this report with the Brightness Usage ID (to get
> the current brightness)
> 2. A Feature field in this report with the Brightness Usage ID (to
> set the current brightness)
>
> This driver has been developed and tested with the Apple Studio Display.
> Here is a small excerpt from the decoded HID descriptor showing the
> feature field for setting the brightness:
>
> Usage Page (Monitor VESA VCP), ; Monitor VESA VPC (82h, monitor page)
> Usage (10h, Brightness),
> Logical Minimum (400),
> Logical Maximum (60000),
> Unit (Centimeter^-2 * Candela),
> Unit Exponent (14),
> Report Size (32),
> Report Count (1),
> Feature (Variable, Null State),
>
> The full HID descriptor dump is available as a comment in the source
> code.
>
> Signed-off-by: Julius Zint <julius@zint.sh>
I saw Christophe's review (thanks) and won't repeat anything from
there...
> @@ -472,6 +472,14 @@ config BACKLIGHT_LED
> If you have a LCD backlight adjustable by LED class driver, say Y
> to enable this driver.
>
> +config BACKLIGHT_HID
> + tristate "VESA VCP HID Backlight Driver"
> + depends on HID
> + help
> + If you have an external display with VESA compliant HID brightness
> + controls then say Y to enable this backlight driver. Currently the
> + only supported device is the Apple Studio Display.
This contradicts the description which says you write the driver to the
standard but only tested on Apple Studio Display. There is no need to
spell what has been tested in the Kconfig text. Remove the final
sentence!
> diff --git a/drivers/video/backlight/hid_bl.c b/drivers/video/backlight/hid_bl.c
> new file mode 100644
> index 000000000000..b40f8f412ee2
> --- /dev/null
> +++ b/drivers/video/backlight/hid_bl.c
> <snip>
> +static void hid_bl_remove(struct hid_device *hdev)
> +{
> + struct backlight_device *bl;
> + struct hid_bl_data *data;
> +
> + hid_dbg(hdev, "remove\n");
This message probably should be removed (if you want to know if a function was
executed use ftrace).
> + bl = hid_get_drvdata(hdev);
> + data = bl_get_data(bl);
> +
> + devm_backlight_device_unregister(&hdev->dev, bl);
> + hid_hw_close(hdev);
> + hid_hw_stop(hdev);
> + hid_set_drvdata(hdev, NULL);
> + devm_kfree(&hdev->dev, data);
> +}
> +
> +static int hid_bl_get_brightness_raw(struct hid_bl_data *data)
> +{
> + struct hid_field *field;
> + int result;
> +
> + field = data->input_field;
> + hid_hw_request(data->hdev, field->report, HID_REQ_GET_REPORT);
> + hid_hw_wait(data->hdev);
> + result = *field->new_value;
> + hid_dbg(data->hdev, "get brightness: %d\n", result);
To be honest I'm a little dubious about *all* the hid_dbg() calls. They
add very little value (e.g. they are useful to get the driver working
but not that important to keeping it working). As such I don't think
they are worth the clutter in a CONFIG_DYNAMIC_DEBUG kernel.
Note this is strictly for the hid_dbg() stuff... the hid_err() stuff in
the probe error paths are much more useful!
Daniel.
^ permalink raw reply
* Re: [PATCH v6 2/2] HID: i2c-hid: elan: Add ili9882t timing
From: Doug Anderson @ 2023-08-21 14:48 UTC (permalink / raw)
To: Benjamin Tissoires
Cc: Cong Yang, benjamin.tissoires, robh+dt, krzysztof.kozlowski+dt,
conor+dt, dmitry.torokhov, jikos, hsinyi, linux-input, devicetree,
linux-kernel
In-Reply-To: <dqom52gdxgsglhkfrl43peoh2lw2npmx6libdeulmyi67nszat@vqlvijq5mld7>
Hi,
On Mon, Aug 21, 2023 at 7:14 AM Benjamin Tissoires <bentiss@kernel.org> wrote:
>
> On Aug 21 2023, Doug Anderson wrote:
> > Hi,
> >
> > On Mon, Aug 21, 2023 at 2:01 AM Benjamin Tissoires <bentiss@kernel.org> wrote:
> > >
> > > On Aug 02 2023, Doug Anderson wrote:
> > > > Benjamin,
> > > >
> > > > On Wed, Aug 2, 2023 at 12:20 AM Cong Yang
> > > > <yangcong5@huaqin.corp-partner.google.com> wrote:
> > > > >
> > > > > The ili9882t is a TDDI IC (Touch with Display Driver). The
> > > > > datasheet specifies there should be 60ms between touch SDA
> > > > > sleep and panel RESX. Doug's series[1] allows panels and
> > > > > touchscreens to power on/off together, so we can add the 65 ms
> > > > > delay in i2c_hid_core_suspend before panel_unprepare.
> > > > >
> > > > > Because ili9882t touchscrgeen is a panel follower, and
> > > > > needs to use vccio-supply instead of vcc33-supply, so set
> > > > > it NULL to ili9882t_chip_data, then not use vcc33 regulator.
> > > > >
> > > > > [1]: https://lore.kernel.org/all/20230727171750.633410-1-dianders@chromium.org
> > > > >
> > > > > Reviewed-by: Douglas Anderson <dianders@chromium.org>
> > > > > Signed-off-by: Cong Yang <yangcong5@huaqin.corp-partner.google.com>
> > > > > ---
> > > > > drivers/hid/i2c-hid/i2c-hid-of-elan.c | 50 ++++++++++++++++++++-------
> > > > > 1 file changed, 38 insertions(+), 12 deletions(-)
> > > >
> > > >
> > > > >
> > > > > diff --git a/drivers/hid/i2c-hid/i2c-hid-of-elan.c b/drivers/hid/i2c-hid/i2c-hid-of-elan.c
> > > > > index 029045d9661c..31abab57ad44 100644
> > > > > --- a/drivers/hid/i2c-hid/i2c-hid-of-elan.c
> > > > > +++ b/drivers/hid/i2c-hid/i2c-hid-of-elan.c
> > > > > @@ -18,9 +18,11 @@
> > > > > #include "i2c-hid.h"
> > > > >
> > > > > struct elan_i2c_hid_chip_data {
> > > > > - unsigned int post_gpio_reset_delay_ms;
> > > > > + unsigned int post_gpio_reset_on_delay_ms;
> > > > > + unsigned int post_gpio_reset_off_delay_ms;
> > > > > unsigned int post_power_delay_ms;
> > > > > u16 hid_descriptor_address;
> > > > > + const char *main_supply_name;
> > > > > };
> > > > >
> > > > > struct i2c_hid_of_elan {
> > > > > @@ -38,9 +40,11 @@ static int elan_i2c_hid_power_up(struct i2chid_ops *ops)
> > > > > container_of(ops, struct i2c_hid_of_elan, ops);
> > > > > int ret;
> > > > >
> > > > > - ret = regulator_enable(ihid_elan->vcc33);
> > > > > - if (ret)
> > > > > - return ret;
> > > > > + if (ihid_elan->vcc33) {
> > > > > + ret = regulator_enable(ihid_elan->vcc33);
> > > > > + if (ret)
> > > > > + return ret;
> > > > > + }
> > > > >
> > > > > ret = regulator_enable(ihid_elan->vccio);
> > > > > if (ret) {
> > > > > @@ -52,8 +56,8 @@ static int elan_i2c_hid_power_up(struct i2chid_ops *ops)
> > > > > msleep(ihid_elan->chip_data->post_power_delay_ms);
> > > > >
> > > > > gpiod_set_value_cansleep(ihid_elan->reset_gpio, 0);
> > > > > - if (ihid_elan->chip_data->post_gpio_reset_delay_ms)
> > > > > - msleep(ihid_elan->chip_data->post_gpio_reset_delay_ms);
> > > > > + if (ihid_elan->chip_data->post_gpio_reset_on_delay_ms)
> > > > > + msleep(ihid_elan->chip_data->post_gpio_reset_on_delay_ms);
> > > > >
> > > > > return 0;
> > > > > }
> > > > > @@ -64,8 +68,12 @@ static void elan_i2c_hid_power_down(struct i2chid_ops *ops)
> > > > > container_of(ops, struct i2c_hid_of_elan, ops);
> > > > >
> > > > > gpiod_set_value_cansleep(ihid_elan->reset_gpio, 1);
> > > > > + if (ihid_elan->chip_data->post_gpio_reset_off_delay_ms)
> > > > > + msleep(ihid_elan->chip_data->post_gpio_reset_off_delay_ms);
> > > > > +
> > > > > regulator_disable(ihid_elan->vccio);
> > > > > - regulator_disable(ihid_elan->vcc33);
> > > > > + if (ihid_elan->vcc33)
> > > > > + regulator_disable(ihid_elan->vcc33);
> > > > > }
> > > > >
> > > > > static int i2c_hid_of_elan_probe(struct i2c_client *client)
> > > > > @@ -89,24 +97,42 @@ static int i2c_hid_of_elan_probe(struct i2c_client *client)
> > > > > if (IS_ERR(ihid_elan->vccio))
> > > > > return PTR_ERR(ihid_elan->vccio);
> > > > >
> > > > > - ihid_elan->vcc33 = devm_regulator_get(&client->dev, "vcc33");
> > > > > - if (IS_ERR(ihid_elan->vcc33))
> > > > > - return PTR_ERR(ihid_elan->vcc33);
> > > > > -
> > > > > ihid_elan->chip_data = device_get_match_data(&client->dev);
> > > > >
> > > > > + if (ihid_elan->chip_data->main_supply_name) {
> > > > > + ihid_elan->vcc33 = devm_regulator_get(&client->dev,
> > > > > + ihid_elan->chip_data->main_supply_name);
> > > > > + if (IS_ERR(ihid_elan->vcc33))
> > > > > + return PTR_ERR(ihid_elan->vcc33);
> > > > > + }
> > > > > +
> > > > > return i2c_hid_core_probe(client, &ihid_elan->ops,
> > > > > ihid_elan->chip_data->hid_descriptor_address, 0);
> > > > > }
> > > > >
> > > > > static const struct elan_i2c_hid_chip_data elan_ekth6915_chip_data = {
> > > > > .post_power_delay_ms = 1,
> > > > > - .post_gpio_reset_delay_ms = 300,
> > > > > + .post_gpio_reset_on_delay_ms = 300,
> > > > > + .hid_descriptor_address = 0x0001,
> > > > > + .main_supply_name = "vcc33",
> > > > > +};
> > > > > +
> > > > > +static const struct elan_i2c_hid_chip_data ilitek_ili9882t_chip_data = {
> > > > > + .post_power_delay_ms = 1,
> > > > > + .post_gpio_reset_on_delay_ms = 200,
> > > > > + .post_gpio_reset_off_delay_ms = 65,
> > > > > .hid_descriptor_address = 0x0001,
> > > > > + /*
> > > > > + * this touchscreen is tightly integrated with the panel and assumes
> > > > > + * that the relevant power rails (other than the IO rail) have already
> > > > > + * been turned on by the panel driver because we're a panel follower.
> > > > > + */
> > > > > + .main_supply_name = NULL,
> > > > > };
> > > > >
> > > > > static const struct of_device_id elan_i2c_hid_of_match[] = {
> > > > > { .compatible = "elan,ekth6915", .data = &elan_ekth6915_chip_data },
> > > > > + { .compatible = "ilitek,ili9882t", .data = &ilitek_ili9882t_chip_data },
> > > >
> > > > Logically, this patch depends on the panel-follower series that's now
> > > > landed in drm-misc-next. With your Ack, I'm willing to land these two
> > > > patches into drm-misc-next too. Other options:
> > >
> > > If you are fine with the code, I think it could go with the drm tree
> > > given that it depends on the panel-follower.
> > >
> > > Unless it's too late for you to take 6.6 material (sorry I was off in
> > > August and just came back).
> > >
> > > Acked-By: Benjamin Tissoires <bentiss@kernel.org>
> >
> > Thanks for the Ack, but yeah, it's probably too late for drm-misc.
> > Hopefully this can go through the normal tree after the next -rc1
> > then. Thanks!
>
> We don't have those strict rules in hid.git. And given that I was in
> PTO, I think it's fine if we take the patch now if it's compiling fine
> on its own and doesn't break on existing hardware. What are the
> consequences of using this patch without the panel-follower series?
I think it should be fine.
I actually tried running `make dt_binding_check
DT_SCHEMA_FILES=ilitek,ili9882t.yaml` with just this bindings file and
I actually _didn't_ get an error, so that's good. I guess it still
verifies OK even without commit 2ca376ef18f6 ("dt-bindings: HID:
i2c-hid: Add "panel" property to i2c-hid backed touchscreens"). I
guess the "panel: true" is enough for it to at least not complain...
;-)
So I think there's no downside to landing this in the i2c-hid tree. As
I mentioned before, this panel won't actually be functional without
the panel follower code, but once the two meetup in linuxnext we'll
end up with something that works. :-)
> Also, does it has enough reviews from the DT folks?
The bindings have Krzysztof's review and that's the important one. I
believe Krzysztof was unhappy that Cong Yang hasn't been including
version history in each individual patch, but he did provide a
reviewed by on v5 [1]
[1] https://lore.kernel.org/all/949a2d21-eb14-3ef8-a7be-9c12152cd15a@linaro.org/
^ permalink raw reply
* Re: [PATCH v6 2/2] HID: i2c-hid: elan: Add ili9882t timing
From: Benjamin Tissoires @ 2023-08-21 14:13 UTC (permalink / raw)
To: Doug Anderson
Cc: Cong Yang, benjamin.tissoires, robh+dt, krzysztof.kozlowski+dt,
conor+dt, dmitry.torokhov, jikos, hsinyi, linux-input, devicetree,
linux-kernel
In-Reply-To: <CAD=FV=UFM-5XFsTRt7LPXsN9Fjff33khYGQM+XqcLF1YdsRY4Q@mail.gmail.com>
On Aug 21 2023, Doug Anderson wrote:
> Hi,
>
> On Mon, Aug 21, 2023 at 2:01 AM Benjamin Tissoires <bentiss@kernel.org> wrote:
> >
> > On Aug 02 2023, Doug Anderson wrote:
> > > Benjamin,
> > >
> > > On Wed, Aug 2, 2023 at 12:20 AM Cong Yang
> > > <yangcong5@huaqin.corp-partner.google.com> wrote:
> > > >
> > > > The ili9882t is a TDDI IC (Touch with Display Driver). The
> > > > datasheet specifies there should be 60ms between touch SDA
> > > > sleep and panel RESX. Doug's series[1] allows panels and
> > > > touchscreens to power on/off together, so we can add the 65 ms
> > > > delay in i2c_hid_core_suspend before panel_unprepare.
> > > >
> > > > Because ili9882t touchscrgeen is a panel follower, and
> > > > needs to use vccio-supply instead of vcc33-supply, so set
> > > > it NULL to ili9882t_chip_data, then not use vcc33 regulator.
> > > >
> > > > [1]: https://lore.kernel.org/all/20230727171750.633410-1-dianders@chromium.org
> > > >
> > > > Reviewed-by: Douglas Anderson <dianders@chromium.org>
> > > > Signed-off-by: Cong Yang <yangcong5@huaqin.corp-partner.google.com>
> > > > ---
> > > > drivers/hid/i2c-hid/i2c-hid-of-elan.c | 50 ++++++++++++++++++++-------
> > > > 1 file changed, 38 insertions(+), 12 deletions(-)
> > >
> > >
> > > >
> > > > diff --git a/drivers/hid/i2c-hid/i2c-hid-of-elan.c b/drivers/hid/i2c-hid/i2c-hid-of-elan.c
> > > > index 029045d9661c..31abab57ad44 100644
> > > > --- a/drivers/hid/i2c-hid/i2c-hid-of-elan.c
> > > > +++ b/drivers/hid/i2c-hid/i2c-hid-of-elan.c
> > > > @@ -18,9 +18,11 @@
> > > > #include "i2c-hid.h"
> > > >
> > > > struct elan_i2c_hid_chip_data {
> > > > - unsigned int post_gpio_reset_delay_ms;
> > > > + unsigned int post_gpio_reset_on_delay_ms;
> > > > + unsigned int post_gpio_reset_off_delay_ms;
> > > > unsigned int post_power_delay_ms;
> > > > u16 hid_descriptor_address;
> > > > + const char *main_supply_name;
> > > > };
> > > >
> > > > struct i2c_hid_of_elan {
> > > > @@ -38,9 +40,11 @@ static int elan_i2c_hid_power_up(struct i2chid_ops *ops)
> > > > container_of(ops, struct i2c_hid_of_elan, ops);
> > > > int ret;
> > > >
> > > > - ret = regulator_enable(ihid_elan->vcc33);
> > > > - if (ret)
> > > > - return ret;
> > > > + if (ihid_elan->vcc33) {
> > > > + ret = regulator_enable(ihid_elan->vcc33);
> > > > + if (ret)
> > > > + return ret;
> > > > + }
> > > >
> > > > ret = regulator_enable(ihid_elan->vccio);
> > > > if (ret) {
> > > > @@ -52,8 +56,8 @@ static int elan_i2c_hid_power_up(struct i2chid_ops *ops)
> > > > msleep(ihid_elan->chip_data->post_power_delay_ms);
> > > >
> > > > gpiod_set_value_cansleep(ihid_elan->reset_gpio, 0);
> > > > - if (ihid_elan->chip_data->post_gpio_reset_delay_ms)
> > > > - msleep(ihid_elan->chip_data->post_gpio_reset_delay_ms);
> > > > + if (ihid_elan->chip_data->post_gpio_reset_on_delay_ms)
> > > > + msleep(ihid_elan->chip_data->post_gpio_reset_on_delay_ms);
> > > >
> > > > return 0;
> > > > }
> > > > @@ -64,8 +68,12 @@ static void elan_i2c_hid_power_down(struct i2chid_ops *ops)
> > > > container_of(ops, struct i2c_hid_of_elan, ops);
> > > >
> > > > gpiod_set_value_cansleep(ihid_elan->reset_gpio, 1);
> > > > + if (ihid_elan->chip_data->post_gpio_reset_off_delay_ms)
> > > > + msleep(ihid_elan->chip_data->post_gpio_reset_off_delay_ms);
> > > > +
> > > > regulator_disable(ihid_elan->vccio);
> > > > - regulator_disable(ihid_elan->vcc33);
> > > > + if (ihid_elan->vcc33)
> > > > + regulator_disable(ihid_elan->vcc33);
> > > > }
> > > >
> > > > static int i2c_hid_of_elan_probe(struct i2c_client *client)
> > > > @@ -89,24 +97,42 @@ static int i2c_hid_of_elan_probe(struct i2c_client *client)
> > > > if (IS_ERR(ihid_elan->vccio))
> > > > return PTR_ERR(ihid_elan->vccio);
> > > >
> > > > - ihid_elan->vcc33 = devm_regulator_get(&client->dev, "vcc33");
> > > > - if (IS_ERR(ihid_elan->vcc33))
> > > > - return PTR_ERR(ihid_elan->vcc33);
> > > > -
> > > > ihid_elan->chip_data = device_get_match_data(&client->dev);
> > > >
> > > > + if (ihid_elan->chip_data->main_supply_name) {
> > > > + ihid_elan->vcc33 = devm_regulator_get(&client->dev,
> > > > + ihid_elan->chip_data->main_supply_name);
> > > > + if (IS_ERR(ihid_elan->vcc33))
> > > > + return PTR_ERR(ihid_elan->vcc33);
> > > > + }
> > > > +
> > > > return i2c_hid_core_probe(client, &ihid_elan->ops,
> > > > ihid_elan->chip_data->hid_descriptor_address, 0);
> > > > }
> > > >
> > > > static const struct elan_i2c_hid_chip_data elan_ekth6915_chip_data = {
> > > > .post_power_delay_ms = 1,
> > > > - .post_gpio_reset_delay_ms = 300,
> > > > + .post_gpio_reset_on_delay_ms = 300,
> > > > + .hid_descriptor_address = 0x0001,
> > > > + .main_supply_name = "vcc33",
> > > > +};
> > > > +
> > > > +static const struct elan_i2c_hid_chip_data ilitek_ili9882t_chip_data = {
> > > > + .post_power_delay_ms = 1,
> > > > + .post_gpio_reset_on_delay_ms = 200,
> > > > + .post_gpio_reset_off_delay_ms = 65,
> > > > .hid_descriptor_address = 0x0001,
> > > > + /*
> > > > + * this touchscreen is tightly integrated with the panel and assumes
> > > > + * that the relevant power rails (other than the IO rail) have already
> > > > + * been turned on by the panel driver because we're a panel follower.
> > > > + */
> > > > + .main_supply_name = NULL,
> > > > };
> > > >
> > > > static const struct of_device_id elan_i2c_hid_of_match[] = {
> > > > { .compatible = "elan,ekth6915", .data = &elan_ekth6915_chip_data },
> > > > + { .compatible = "ilitek,ili9882t", .data = &ilitek_ili9882t_chip_data },
> > >
> > > Logically, this patch depends on the panel-follower series that's now
> > > landed in drm-misc-next. With your Ack, I'm willing to land these two
> > > patches into drm-misc-next too. Other options:
> >
> > If you are fine with the code, I think it could go with the drm tree
> > given that it depends on the panel-follower.
> >
> > Unless it's too late for you to take 6.6 material (sorry I was off in
> > August and just came back).
> >
> > Acked-By: Benjamin Tissoires <bentiss@kernel.org>
>
> Thanks for the Ack, but yeah, it's probably too late for drm-misc.
> Hopefully this can go through the normal tree after the next -rc1
> then. Thanks!
We don't have those strict rules in hid.git. And given that I was in
PTO, I think it's fine if we take the patch now if it's compiling fine
on its own and doesn't break on existing hardware. What are the
consequences of using this patch without the panel-follower series?
Also, does it has enough reviews from the DT folks?
Cheers,
Benjamin
>
> -Doug
^ permalink raw reply
* Re: [PATCH v1 00/12] HID: cp2112: Cleanups and refactorings
From: Benjamin Tissoires @ 2023-08-21 13:56 UTC (permalink / raw)
To: Andy Shevchenko
Cc: Benjamin Tissoires, Jiri Kosina, linux-input, linux-kernel
In-Reply-To: <ZOM+awN2CU+V1R1H@smile.fi.intel.com>
On Aug 21 2023, Andy Shevchenko wrote:
> On Mon, Aug 21, 2023 at 12:27:22PM +0200, Benjamin Tissoires wrote:
> > On Mon, Aug 21, 2023 at 12:19 PM Benjamin Tissoires
> > <benjamin.tissoires@redhat.com> wrote:
> > > On Mon, Aug 21, 2023 at 11:35 AM Andy Shevchenko
> > > <andriy.shevchenko@linux.intel.com> wrote:
> > > > On Mon, Aug 21, 2023 at 12:34:30PM +0300, Andy Shevchenko wrote:
> > > > > On Mon, Aug 21, 2023 at 10:51:04AM +0200, Benjamin Tissoires wrote:
> > > > > > On Aug 21 2023, Andy Shevchenko wrote:
>
> ...
>
> > > > > > Long story short, I'm not able to test it right now (and I got quite
> > > > > > some backlog as you can imagine). IIRC the code was fine, so I think we
> > > > > > can just take the series as is, and work on the quirks (if any) later.
> > > > >
> > > > > Thank you!
> > > > >
> > > > > The thing that might be broken is interrupts handling. If that works,
> > > > > I'm pretty confident with the rest.
> > > >
> > > > I.o.w. first 5 patches to test is already 98% of guarantee that everything
> > > > is fine.
> > >
> > > Actually I applied you series locally, and applied Danny's patches on
> > > top, and I could run your series in qemu with the cp2112 as USB
> > > passthrough.
> > >
> > > Everything is working fine, so I can take this one just now.
> >
> > I've pushed the series to for-6.6/cp2112, but for some reasons, b4
> > doesn't seem to believe the series is the one you submitted.
> >
> > Would you mind double checking on your side if everything is good?
> >
> > https://git.kernel.org/pub/scm/linux/kernel/git/hid/hid.git/log/?h=for-6.6/cp2112
>
> Everything is fine as far as I can tell.
Great, thanks for double checking.
Cheers,
Benjamin
>
> --
> With Best Regards,
> Andy Shevchenko
>
>
^ permalink raw reply
* Re: [PATCH v6 2/2] HID: i2c-hid: elan: Add ili9882t timing
From: Doug Anderson @ 2023-08-21 13:48 UTC (permalink / raw)
To: Benjamin Tissoires
Cc: Cong Yang, benjamin.tissoires, robh+dt, krzysztof.kozlowski+dt,
conor+dt, dmitry.torokhov, jikos, hsinyi, linux-input, devicetree,
linux-kernel
In-Reply-To: <lyns4qkh57xhppnqroaooqtniypfsmr2l5fujlry3stmhrjww4@3iy5mmmrazl6>
Hi,
On Mon, Aug 21, 2023 at 2:01 AM Benjamin Tissoires <bentiss@kernel.org> wrote:
>
> On Aug 02 2023, Doug Anderson wrote:
> > Benjamin,
> >
> > On Wed, Aug 2, 2023 at 12:20 AM Cong Yang
> > <yangcong5@huaqin.corp-partner.google.com> wrote:
> > >
> > > The ili9882t is a TDDI IC (Touch with Display Driver). The
> > > datasheet specifies there should be 60ms between touch SDA
> > > sleep and panel RESX. Doug's series[1] allows panels and
> > > touchscreens to power on/off together, so we can add the 65 ms
> > > delay in i2c_hid_core_suspend before panel_unprepare.
> > >
> > > Because ili9882t touchscrgeen is a panel follower, and
> > > needs to use vccio-supply instead of vcc33-supply, so set
> > > it NULL to ili9882t_chip_data, then not use vcc33 regulator.
> > >
> > > [1]: https://lore.kernel.org/all/20230727171750.633410-1-dianders@chromium.org
> > >
> > > Reviewed-by: Douglas Anderson <dianders@chromium.org>
> > > Signed-off-by: Cong Yang <yangcong5@huaqin.corp-partner.google.com>
> > > ---
> > > drivers/hid/i2c-hid/i2c-hid-of-elan.c | 50 ++++++++++++++++++++-------
> > > 1 file changed, 38 insertions(+), 12 deletions(-)
> >
> >
> > >
> > > diff --git a/drivers/hid/i2c-hid/i2c-hid-of-elan.c b/drivers/hid/i2c-hid/i2c-hid-of-elan.c
> > > index 029045d9661c..31abab57ad44 100644
> > > --- a/drivers/hid/i2c-hid/i2c-hid-of-elan.c
> > > +++ b/drivers/hid/i2c-hid/i2c-hid-of-elan.c
> > > @@ -18,9 +18,11 @@
> > > #include "i2c-hid.h"
> > >
> > > struct elan_i2c_hid_chip_data {
> > > - unsigned int post_gpio_reset_delay_ms;
> > > + unsigned int post_gpio_reset_on_delay_ms;
> > > + unsigned int post_gpio_reset_off_delay_ms;
> > > unsigned int post_power_delay_ms;
> > > u16 hid_descriptor_address;
> > > + const char *main_supply_name;
> > > };
> > >
> > > struct i2c_hid_of_elan {
> > > @@ -38,9 +40,11 @@ static int elan_i2c_hid_power_up(struct i2chid_ops *ops)
> > > container_of(ops, struct i2c_hid_of_elan, ops);
> > > int ret;
> > >
> > > - ret = regulator_enable(ihid_elan->vcc33);
> > > - if (ret)
> > > - return ret;
> > > + if (ihid_elan->vcc33) {
> > > + ret = regulator_enable(ihid_elan->vcc33);
> > > + if (ret)
> > > + return ret;
> > > + }
> > >
> > > ret = regulator_enable(ihid_elan->vccio);
> > > if (ret) {
> > > @@ -52,8 +56,8 @@ static int elan_i2c_hid_power_up(struct i2chid_ops *ops)
> > > msleep(ihid_elan->chip_data->post_power_delay_ms);
> > >
> > > gpiod_set_value_cansleep(ihid_elan->reset_gpio, 0);
> > > - if (ihid_elan->chip_data->post_gpio_reset_delay_ms)
> > > - msleep(ihid_elan->chip_data->post_gpio_reset_delay_ms);
> > > + if (ihid_elan->chip_data->post_gpio_reset_on_delay_ms)
> > > + msleep(ihid_elan->chip_data->post_gpio_reset_on_delay_ms);
> > >
> > > return 0;
> > > }
> > > @@ -64,8 +68,12 @@ static void elan_i2c_hid_power_down(struct i2chid_ops *ops)
> > > container_of(ops, struct i2c_hid_of_elan, ops);
> > >
> > > gpiod_set_value_cansleep(ihid_elan->reset_gpio, 1);
> > > + if (ihid_elan->chip_data->post_gpio_reset_off_delay_ms)
> > > + msleep(ihid_elan->chip_data->post_gpio_reset_off_delay_ms);
> > > +
> > > regulator_disable(ihid_elan->vccio);
> > > - regulator_disable(ihid_elan->vcc33);
> > > + if (ihid_elan->vcc33)
> > > + regulator_disable(ihid_elan->vcc33);
> > > }
> > >
> > > static int i2c_hid_of_elan_probe(struct i2c_client *client)
> > > @@ -89,24 +97,42 @@ static int i2c_hid_of_elan_probe(struct i2c_client *client)
> > > if (IS_ERR(ihid_elan->vccio))
> > > return PTR_ERR(ihid_elan->vccio);
> > >
> > > - ihid_elan->vcc33 = devm_regulator_get(&client->dev, "vcc33");
> > > - if (IS_ERR(ihid_elan->vcc33))
> > > - return PTR_ERR(ihid_elan->vcc33);
> > > -
> > > ihid_elan->chip_data = device_get_match_data(&client->dev);
> > >
> > > + if (ihid_elan->chip_data->main_supply_name) {
> > > + ihid_elan->vcc33 = devm_regulator_get(&client->dev,
> > > + ihid_elan->chip_data->main_supply_name);
> > > + if (IS_ERR(ihid_elan->vcc33))
> > > + return PTR_ERR(ihid_elan->vcc33);
> > > + }
> > > +
> > > return i2c_hid_core_probe(client, &ihid_elan->ops,
> > > ihid_elan->chip_data->hid_descriptor_address, 0);
> > > }
> > >
> > > static const struct elan_i2c_hid_chip_data elan_ekth6915_chip_data = {
> > > .post_power_delay_ms = 1,
> > > - .post_gpio_reset_delay_ms = 300,
> > > + .post_gpio_reset_on_delay_ms = 300,
> > > + .hid_descriptor_address = 0x0001,
> > > + .main_supply_name = "vcc33",
> > > +};
> > > +
> > > +static const struct elan_i2c_hid_chip_data ilitek_ili9882t_chip_data = {
> > > + .post_power_delay_ms = 1,
> > > + .post_gpio_reset_on_delay_ms = 200,
> > > + .post_gpio_reset_off_delay_ms = 65,
> > > .hid_descriptor_address = 0x0001,
> > > + /*
> > > + * this touchscreen is tightly integrated with the panel and assumes
> > > + * that the relevant power rails (other than the IO rail) have already
> > > + * been turned on by the panel driver because we're a panel follower.
> > > + */
> > > + .main_supply_name = NULL,
> > > };
> > >
> > > static const struct of_device_id elan_i2c_hid_of_match[] = {
> > > { .compatible = "elan,ekth6915", .data = &elan_ekth6915_chip_data },
> > > + { .compatible = "ilitek,ili9882t", .data = &ilitek_ili9882t_chip_data },
> >
> > Logically, this patch depends on the panel-follower series that's now
> > landed in drm-misc-next. With your Ack, I'm willing to land these two
> > patches into drm-misc-next too. Other options:
>
> If you are fine with the code, I think it could go with the drm tree
> given that it depends on the panel-follower.
>
> Unless it's too late for you to take 6.6 material (sorry I was off in
> August and just came back).
>
> Acked-By: Benjamin Tissoires <bentiss@kernel.org>
Thanks for the Ack, but yeah, it's probably too late for drm-misc.
Hopefully this can go through the normal tree after the next -rc1
then. Thanks!
-Doug
^ permalink raw reply
* Re: [PATCH v1 00/12] HID: cp2112: Cleanups and refactorings
From: Benjamin Tissoires @ 2023-08-21 12:06 UTC (permalink / raw)
To: Andy Shevchenko
Cc: Benjamin Tissoires, Jiri Kosina, linux-input, linux-kernel
In-Reply-To: <ZOM9SLLuWJzeHTiO@smile.fi.intel.com>
On Mon, Aug 21, 2023 at 12:32 PM Andy Shevchenko
<andriy.shevchenko@linux.intel.com> wrote:
>
> On Mon, Aug 21, 2023 at 12:19:39PM +0200, Benjamin Tissoires wrote:
> > On Mon, Aug 21, 2023 at 11:35 AM Andy Shevchenko
> > <andriy.shevchenko@linux.intel.com> wrote:
> > > On Mon, Aug 21, 2023 at 12:34:30PM +0300, Andy Shevchenko wrote:
> > > > On Mon, Aug 21, 2023 at 10:51:04AM +0200, Benjamin Tissoires wrote:
> > > > > On Aug 21 2023, Andy Shevchenko wrote:
>
> ...
>
> > > > > Long story short, I'm not able to test it right now (and I got quite
> > > > > some backlog as you can imagine). IIRC the code was fine, so I think we
> > > > > can just take the series as is, and work on the quirks (if any) later.
> > > >
> > > > Thank you!
> > > >
> > > > The thing that might be broken is interrupts handling. If that works,
> > > > I'm pretty confident with the rest.
> > >
> > > I.o.w. first 5 patches to test is already 98% of guarantee that everything
> > > is fine.
> >
> > Actually I applied you series locally, and applied Danny's patches on
> > top, and I could run your series in qemu with the cp2112 as USB
> > passthrough.
> >
> > Everything is working fine, so I can take this one just now.
>
> Thank you! I assume you have some IRQ (like GPIO button) to test with that.
Yeah, binding a test i2c-hid touchpad on top of hid forces you to use
GPIOs. Otherwise you are polling, and it's not allowed in i2c-hid
anymore IIRC :)
> If no, it's easily to describe (in ACPI, see [1]) and use a wire to emulate
> the button presses. In that case the /proc/interrupts should show the
> different numbers.
Thanks, but again, the GPIO is tested just by checking if the touchpad
can send events when touched.
Now I need to update my CI to rely on danny's patches and a DSDT overwrite :)
Cheers,
Benjamin
>
> [1]: https://github.com/westeri/meta-acpi/blob/master/recipes-bsp/acpi-tables/samples/edison/buttons.asli
>
> --
> With Best Regards,
> Andy Shevchenko
>
>
^ permalink raw reply
* Re: [PATCH v1 00/12] HID: cp2112: Cleanups and refactorings
From: Andy Shevchenko @ 2023-08-21 10:37 UTC (permalink / raw)
To: Benjamin Tissoires
Cc: Benjamin Tissoires, Jiri Kosina, linux-input, linux-kernel
In-Reply-To: <CAO-hwJ+EaFJEmuBYKRLmy-=xtOu96L=c5=zM=hS=0Ju_zGV=oA@mail.gmail.com>
On Mon, Aug 21, 2023 at 12:27:22PM +0200, Benjamin Tissoires wrote:
> On Mon, Aug 21, 2023 at 12:19 PM Benjamin Tissoires
> <benjamin.tissoires@redhat.com> wrote:
> > On Mon, Aug 21, 2023 at 11:35 AM Andy Shevchenko
> > <andriy.shevchenko@linux.intel.com> wrote:
> > > On Mon, Aug 21, 2023 at 12:34:30PM +0300, Andy Shevchenko wrote:
> > > > On Mon, Aug 21, 2023 at 10:51:04AM +0200, Benjamin Tissoires wrote:
> > > > > On Aug 21 2023, Andy Shevchenko wrote:
...
> > > > > Long story short, I'm not able to test it right now (and I got quite
> > > > > some backlog as you can imagine). IIRC the code was fine, so I think we
> > > > > can just take the series as is, and work on the quirks (if any) later.
> > > >
> > > > Thank you!
> > > >
> > > > The thing that might be broken is interrupts handling. If that works,
> > > > I'm pretty confident with the rest.
> > >
> > > I.o.w. first 5 patches to test is already 98% of guarantee that everything
> > > is fine.
> >
> > Actually I applied you series locally, and applied Danny's patches on
> > top, and I could run your series in qemu with the cp2112 as USB
> > passthrough.
> >
> > Everything is working fine, so I can take this one just now.
>
> I've pushed the series to for-6.6/cp2112, but for some reasons, b4
> doesn't seem to believe the series is the one you submitted.
>
> Would you mind double checking on your side if everything is good?
>
> https://git.kernel.org/pub/scm/linux/kernel/git/hid/hid.git/log/?h=for-6.6/cp2112
Everything is fine as far as I can tell.
--
With Best Regards,
Andy Shevchenko
^ permalink raw reply
* Re: [PATCH v1 00/12] HID: cp2112: Cleanups and refactorings
From: Andy Shevchenko @ 2023-08-21 10:32 UTC (permalink / raw)
To: Benjamin Tissoires
Cc: Benjamin Tissoires, Jiri Kosina, linux-input, linux-kernel
In-Reply-To: <CAO-hwJ+Pa0yMV5taEc9+RXEWJzkotpyj4gz2qftyLV4G73F-mg@mail.gmail.com>
On Mon, Aug 21, 2023 at 12:19:39PM +0200, Benjamin Tissoires wrote:
> On Mon, Aug 21, 2023 at 11:35 AM Andy Shevchenko
> <andriy.shevchenko@linux.intel.com> wrote:
> > On Mon, Aug 21, 2023 at 12:34:30PM +0300, Andy Shevchenko wrote:
> > > On Mon, Aug 21, 2023 at 10:51:04AM +0200, Benjamin Tissoires wrote:
> > > > On Aug 21 2023, Andy Shevchenko wrote:
...
> > > > Long story short, I'm not able to test it right now (and I got quite
> > > > some backlog as you can imagine). IIRC the code was fine, so I think we
> > > > can just take the series as is, and work on the quirks (if any) later.
> > >
> > > Thank you!
> > >
> > > The thing that might be broken is interrupts handling. If that works,
> > > I'm pretty confident with the rest.
> >
> > I.o.w. first 5 patches to test is already 98% of guarantee that everything
> > is fine.
>
> Actually I applied you series locally, and applied Danny's patches on
> top, and I could run your series in qemu with the cp2112 as USB
> passthrough.
>
> Everything is working fine, so I can take this one just now.
Thank you! I assume you have some IRQ (like GPIO button) to test with that.
If no, it's easily to describe (in ACPI, see [1]) and use a wire to emulate
the button presses. In that case the /proc/interrupts should show the
different numbers.
[1]: https://github.com/westeri/meta-acpi/blob/master/recipes-bsp/acpi-tables/samples/edison/buttons.asli
--
With Best Regards,
Andy Shevchenko
^ permalink raw reply
* Re: [PATCH v1 00/12] HID: cp2112: Cleanups and refactorings
From: Benjamin Tissoires @ 2023-08-21 10:27 UTC (permalink / raw)
To: Andy Shevchenko
Cc: Benjamin Tissoires, Jiri Kosina, linux-input, linux-kernel
In-Reply-To: <CAO-hwJ+Pa0yMV5taEc9+RXEWJzkotpyj4gz2qftyLV4G73F-mg@mail.gmail.com>
On Mon, Aug 21, 2023 at 12:19 PM Benjamin Tissoires
<benjamin.tissoires@redhat.com> wrote:
>
> On Mon, Aug 21, 2023 at 11:35 AM Andy Shevchenko
> <andriy.shevchenko@linux.intel.com> wrote:
> >
> > On Mon, Aug 21, 2023 at 12:34:30PM +0300, Andy Shevchenko wrote:
> > > On Mon, Aug 21, 2023 at 10:51:04AM +0200, Benjamin Tissoires wrote:
> > > > On Aug 21 2023, Andy Shevchenko wrote:
> >
> > ...
> >
> > > > Long story short, I'm not able to test it right now (and I got quite
> > > > some backlog as you can imagine). IIRC the code was fine, so I think we
> > > > can just take the series as is, and work on the quirks (if any) later.
> > >
> > > Thank you!
> > >
> > > The thing that might be broken is interrupts handling. If that works,
> > > I'm pretty confident with the rest.
> >
> > I.o.w. first 5 patches to test is already 98% of guarantee that everything
> > is fine.
>
> Actually I applied you series locally, and applied Danny's patches on
> top, and I could run your series in qemu with the cp2112 as USB
> passthrough.
>
> Everything is working fine, so I can take this one just now.
I've pushed the series to for-6.6/cp2112, but for some reasons, b4
doesn't seem to believe the series is the one you submitted.
Would you mind double checking on your side if everything is good?
https://git.kernel.org/pub/scm/linux/kernel/git/hid/hid.git/log/?h=for-6.6/cp2112
Cheers,
Benjamin
>
> Cheers,
> Benjamin
>
> >
> > --
> > With Best Regards,
> > Andy Shevchenko
> >
> >
^ permalink raw reply
* Re: [PATCH v1 00/12] HID: cp2112: Cleanups and refactorings
From: Benjamin Tissoires @ 2023-08-21 10:19 UTC (permalink / raw)
To: Andy Shevchenko
Cc: Benjamin Tissoires, Jiri Kosina, linux-input, linux-kernel
In-Reply-To: <ZOMv4VB0bZpupNlN@smile.fi.intel.com>
On Mon, Aug 21, 2023 at 11:35 AM Andy Shevchenko
<andriy.shevchenko@linux.intel.com> wrote:
>
> On Mon, Aug 21, 2023 at 12:34:30PM +0300, Andy Shevchenko wrote:
> > On Mon, Aug 21, 2023 at 10:51:04AM +0200, Benjamin Tissoires wrote:
> > > On Aug 21 2023, Andy Shevchenko wrote:
>
> ...
>
> > > Long story short, I'm not able to test it right now (and I got quite
> > > some backlog as you can imagine). IIRC the code was fine, so I think we
> > > can just take the series as is, and work on the quirks (if any) later.
> >
> > Thank you!
> >
> > The thing that might be broken is interrupts handling. If that works,
> > I'm pretty confident with the rest.
>
> I.o.w. first 5 patches to test is already 98% of guarantee that everything
> is fine.
Actually I applied you series locally, and applied Danny's patches on
top, and I could run your series in qemu with the cp2112 as USB
passthrough.
Everything is working fine, so I can take this one just now.
Cheers,
Benjamin
>
> --
> With Best Regards,
> Andy Shevchenko
>
>
^ permalink raw reply
* Re: [PATCH v1 00/12] HID: cp2112: Cleanups and refactorings
From: Andy Shevchenko @ 2023-08-21 9:35 UTC (permalink / raw)
To: Benjamin Tissoires
Cc: Jiri Kosina, linux-input, linux-kernel, Benjamin Tissoires
In-Reply-To: <ZOMvpmoWLCgcAyJR@smile.fi.intel.com>
On Mon, Aug 21, 2023 at 12:34:30PM +0300, Andy Shevchenko wrote:
> On Mon, Aug 21, 2023 at 10:51:04AM +0200, Benjamin Tissoires wrote:
> > On Aug 21 2023, Andy Shevchenko wrote:
...
> > Long story short, I'm not able to test it right now (and I got quite
> > some backlog as you can imagine). IIRC the code was fine, so I think we
> > can just take the series as is, and work on the quirks (if any) later.
>
> Thank you!
>
> The thing that might be broken is interrupts handling. If that works,
> I'm pretty confident with the rest.
I.o.w. first 5 patches to test is already 98% of guarantee that everything
is fine.
--
With Best Regards,
Andy Shevchenko
^ permalink raw reply
* Re: [PATCH v1 00/12] HID: cp2112: Cleanups and refactorings
From: Andy Shevchenko @ 2023-08-21 9:34 UTC (permalink / raw)
To: Benjamin Tissoires
Cc: Jiri Kosina, linux-input, linux-kernel, Benjamin Tissoires
In-Reply-To: <ez2oewpi3yeaiejrvbe433ude75pgm3k3s5sh5gnn7pvnzm7b4@ajuopfgwocft>
On Mon, Aug 21, 2023 at 10:51:04AM +0200, Benjamin Tissoires wrote:
> On Aug 21 2023, Andy Shevchenko wrote:
> > On Mon, Aug 14, 2023 at 11:28:58AM +0200, Jiri Kosina wrote:
> > > On Mon, 7 Aug 2023, Andy Shevchenko wrote:
...
> > > > > > > > After I updated GPIO library for the case Benjamin has with CP2112,
> > > > > > > > I have a brief look into the CP2112 driver itself.
> > > > > > > >
> > > > > > > > From GPIO perspective it has two main (maitenance) issues:
> > > > > > > > - usage of ->to_irq() with IRQ chip present;
> > > > > > > > - having IRQ chip not immutable.
> > > > > > > >
> > > > > > > > Besides that there are plenty small cleanups here and there.
> > > > > > > > Hence this series.
> > > > > > >
> > > > > > > Any comments on this?
> > > > > >
> > > > > > Gentle ping^2 for this...
> > > > > >
> > > > > > Anything should I do to improve it or is it okay to go as is?
> > > > >
> > > > > I have been off pretty much the whole July. I am now back and slowly
> > > > > making my way through everything that accumulated, I will eventually get
> > > > > to this.
> > > > >
> > > > > Thanks for the patience,
> > > >
> > > > Ah, okay, no worries and take your time!
> > > >
> > > > I was thinking more on Benjamin's answer as last time he had a hw setup
> > > > to test... Not sure what the status of that now and if he has a chance
> > > > to test this or busy enough with something else.
> > >
> > > Ah, that would be of course nice. Benjamin?
> >
> > Benjamin? It almost full release cycle passed...
> > I understand if you are busy with something, just tell us.
>
> Sorry for not answering, I was off in August until just now.
>
> I tried you series just before taking time off, but the problem was that
> my automation relies on this driver to not be too far from the current
> upstream, as I need to patch it to be able to inject a node child in it.
>
> Which is why I was very interested in the ACPI/DT work so that I do not
> have to patch the driver.
>
> Long story short, I'm not able to test it right now (and I got quite
> some backlog as you can imagine). IIRC the code was fine, so I think we
> can just take the series as is, and work on the quirks (if any) later.
Thank you!
The thing that might be broken is interrupts handling. If that works,
I'm pretty confident with the rest.
--
With Best Regards,
Andy Shevchenko
^ permalink raw reply
* Re: [PATCH v6 2/2] HID: i2c-hid: elan: Add ili9882t timing
From: Benjamin Tissoires @ 2023-08-21 9:01 UTC (permalink / raw)
To: Doug Anderson
Cc: Cong Yang, benjamin.tissoires, robh+dt, krzysztof.kozlowski+dt,
conor+dt, dmitry.torokhov, jikos, hsinyi, linux-input, devicetree,
linux-kernel
In-Reply-To: <CAD=FV=Um8875aMt_kWvCvpNjb3EwSk8VjVTEgv_TJ9WDS+LniA@mail.gmail.com>
On Aug 02 2023, Doug Anderson wrote:
> Benjamin,
>
> On Wed, Aug 2, 2023 at 12:20 AM Cong Yang
> <yangcong5@huaqin.corp-partner.google.com> wrote:
> >
> > The ili9882t is a TDDI IC (Touch with Display Driver). The
> > datasheet specifies there should be 60ms between touch SDA
> > sleep and panel RESX. Doug's series[1] allows panels and
> > touchscreens to power on/off together, so we can add the 65 ms
> > delay in i2c_hid_core_suspend before panel_unprepare.
> >
> > Because ili9882t touchscrgeen is a panel follower, and
> > needs to use vccio-supply instead of vcc33-supply, so set
> > it NULL to ili9882t_chip_data, then not use vcc33 regulator.
> >
> > [1]: https://lore.kernel.org/all/20230727171750.633410-1-dianders@chromium.org
> >
> > Reviewed-by: Douglas Anderson <dianders@chromium.org>
> > Signed-off-by: Cong Yang <yangcong5@huaqin.corp-partner.google.com>
> > ---
> > drivers/hid/i2c-hid/i2c-hid-of-elan.c | 50 ++++++++++++++++++++-------
> > 1 file changed, 38 insertions(+), 12 deletions(-)
>
>
> >
> > diff --git a/drivers/hid/i2c-hid/i2c-hid-of-elan.c b/drivers/hid/i2c-hid/i2c-hid-of-elan.c
> > index 029045d9661c..31abab57ad44 100644
> > --- a/drivers/hid/i2c-hid/i2c-hid-of-elan.c
> > +++ b/drivers/hid/i2c-hid/i2c-hid-of-elan.c
> > @@ -18,9 +18,11 @@
> > #include "i2c-hid.h"
> >
> > struct elan_i2c_hid_chip_data {
> > - unsigned int post_gpio_reset_delay_ms;
> > + unsigned int post_gpio_reset_on_delay_ms;
> > + unsigned int post_gpio_reset_off_delay_ms;
> > unsigned int post_power_delay_ms;
> > u16 hid_descriptor_address;
> > + const char *main_supply_name;
> > };
> >
> > struct i2c_hid_of_elan {
> > @@ -38,9 +40,11 @@ static int elan_i2c_hid_power_up(struct i2chid_ops *ops)
> > container_of(ops, struct i2c_hid_of_elan, ops);
> > int ret;
> >
> > - ret = regulator_enable(ihid_elan->vcc33);
> > - if (ret)
> > - return ret;
> > + if (ihid_elan->vcc33) {
> > + ret = regulator_enable(ihid_elan->vcc33);
> > + if (ret)
> > + return ret;
> > + }
> >
> > ret = regulator_enable(ihid_elan->vccio);
> > if (ret) {
> > @@ -52,8 +56,8 @@ static int elan_i2c_hid_power_up(struct i2chid_ops *ops)
> > msleep(ihid_elan->chip_data->post_power_delay_ms);
> >
> > gpiod_set_value_cansleep(ihid_elan->reset_gpio, 0);
> > - if (ihid_elan->chip_data->post_gpio_reset_delay_ms)
> > - msleep(ihid_elan->chip_data->post_gpio_reset_delay_ms);
> > + if (ihid_elan->chip_data->post_gpio_reset_on_delay_ms)
> > + msleep(ihid_elan->chip_data->post_gpio_reset_on_delay_ms);
> >
> > return 0;
> > }
> > @@ -64,8 +68,12 @@ static void elan_i2c_hid_power_down(struct i2chid_ops *ops)
> > container_of(ops, struct i2c_hid_of_elan, ops);
> >
> > gpiod_set_value_cansleep(ihid_elan->reset_gpio, 1);
> > + if (ihid_elan->chip_data->post_gpio_reset_off_delay_ms)
> > + msleep(ihid_elan->chip_data->post_gpio_reset_off_delay_ms);
> > +
> > regulator_disable(ihid_elan->vccio);
> > - regulator_disable(ihid_elan->vcc33);
> > + if (ihid_elan->vcc33)
> > + regulator_disable(ihid_elan->vcc33);
> > }
> >
> > static int i2c_hid_of_elan_probe(struct i2c_client *client)
> > @@ -89,24 +97,42 @@ static int i2c_hid_of_elan_probe(struct i2c_client *client)
> > if (IS_ERR(ihid_elan->vccio))
> > return PTR_ERR(ihid_elan->vccio);
> >
> > - ihid_elan->vcc33 = devm_regulator_get(&client->dev, "vcc33");
> > - if (IS_ERR(ihid_elan->vcc33))
> > - return PTR_ERR(ihid_elan->vcc33);
> > -
> > ihid_elan->chip_data = device_get_match_data(&client->dev);
> >
> > + if (ihid_elan->chip_data->main_supply_name) {
> > + ihid_elan->vcc33 = devm_regulator_get(&client->dev,
> > + ihid_elan->chip_data->main_supply_name);
> > + if (IS_ERR(ihid_elan->vcc33))
> > + return PTR_ERR(ihid_elan->vcc33);
> > + }
> > +
> > return i2c_hid_core_probe(client, &ihid_elan->ops,
> > ihid_elan->chip_data->hid_descriptor_address, 0);
> > }
> >
> > static const struct elan_i2c_hid_chip_data elan_ekth6915_chip_data = {
> > .post_power_delay_ms = 1,
> > - .post_gpio_reset_delay_ms = 300,
> > + .post_gpio_reset_on_delay_ms = 300,
> > + .hid_descriptor_address = 0x0001,
> > + .main_supply_name = "vcc33",
> > +};
> > +
> > +static const struct elan_i2c_hid_chip_data ilitek_ili9882t_chip_data = {
> > + .post_power_delay_ms = 1,
> > + .post_gpio_reset_on_delay_ms = 200,
> > + .post_gpio_reset_off_delay_ms = 65,
> > .hid_descriptor_address = 0x0001,
> > + /*
> > + * this touchscreen is tightly integrated with the panel and assumes
> > + * that the relevant power rails (other than the IO rail) have already
> > + * been turned on by the panel driver because we're a panel follower.
> > + */
> > + .main_supply_name = NULL,
> > };
> >
> > static const struct of_device_id elan_i2c_hid_of_match[] = {
> > { .compatible = "elan,ekth6915", .data = &elan_ekth6915_chip_data },
> > + { .compatible = "ilitek,ili9882t", .data = &ilitek_ili9882t_chip_data },
>
> Logically, this patch depends on the panel-follower series that's now
> landed in drm-misc-next. With your Ack, I'm willing to land these two
> patches into drm-misc-next too. Other options:
If you are fine with the code, I think it could go with the drm tree
given that it depends on the panel-follower.
Unless it's too late for you to take 6.6 material (sorry I was off in
August and just came back).
Acked-By: Benjamin Tissoires <bentiss@kernel.org>
Cheers,
Benjamin
>
> a) We could land the two patches in the i2c-hid tree since they don't
> appear to conflict. The touchscreen won't actually function until the
> patches meetup in linux-next but I don't think they'll give any
> compile errors (I haven't double-checked that, but I can). ...though
> it's possible that the dt bindings might generate errors? Again, I can
> investigate if we want to go this way.
>
> b) We can snooze this for a few months and you can pick it to i2c-hid
> when my series reaches mainline.
>
> Let me know how you'd like to proceed.
>
> -Doug
^ permalink raw reply
* Re: [PATCH v1 00/12] HID: cp2112: Cleanups and refactorings
From: Benjamin Tissoires @ 2023-08-21 8:51 UTC (permalink / raw)
To: Andy Shevchenko
Cc: Jiri Kosina, linux-input, linux-kernel, Benjamin Tissoires
In-Reply-To: <ZOMcHQc8Em/s6C+y@smile.fi.intel.com>
On Aug 21 2023, Andy Shevchenko wrote:
> On Mon, Aug 14, 2023 at 11:28:58AM +0200, Jiri Kosina wrote:
> > On Mon, 7 Aug 2023, Andy Shevchenko wrote:
>
> ...
>
> > > > > > > After I updated GPIO library for the case Benjamin has with CP2112,
> > > > > > > I have a brief look into the CP2112 driver itself.
> > > > > > >
> > > > > > > From GPIO perspective it has two main (maitenance) issues:
> > > > > > > - usage of ->to_irq() with IRQ chip present;
> > > > > > > - having IRQ chip not immutable.
> > > > > > >
> > > > > > > Besides that there are plenty small cleanups here and there.
> > > > > > > Hence this series.
> > > > > >
> > > > > > Any comments on this?
> > > > >
> > > > > Gentle ping^2 for this...
> > > > >
> > > > > Anything should I do to improve it or is it okay to go as is?
> > > >
> > > > I have been off pretty much the whole July. I am now back and slowly
> > > > making my way through everything that accumulated, I will eventually get
> > > > to this.
> > > >
> > > > Thanks for the patience,
> > >
> > > Ah, okay, no worries and take your time!
> > >
> > > I was thinking more on Benjamin's answer as last time he had a hw setup
> > > to test... Not sure what the status of that now and if he has a chance
> > > to test this or busy enough with something else.
> >
> > Ah, that would be of course nice. Benjamin?
>
> Benjamin? It almost full release cycle passed...
> I understand if you are busy with something, just tell us.
Sorry for not answering, I was off in August until just now.
I tried you series just before taking time off, but the problem was that
my automation relies on this driver to not be too far from the current
upstream, as I need to patch it to be able to inject a node child in it.
Which is why I was very interested in the ACPI/DT work so that I do not
have to patch the driver.
Long story short, I'm not able to test it right now (and I got quite
some backlog as you can imagine). IIRC the code was fine, so I think we
can just take the series as is, and work on the quirks (if any) later.
Cheers,
Benjamin
^ permalink raw reply
* Re: [PATCH v1 00/12] HID: cp2112: Cleanups and refactorings
From: Andy Shevchenko @ 2023-08-21 8:11 UTC (permalink / raw)
To: Jiri Kosina; +Cc: linux-input, linux-kernel, Benjamin Tissoires
In-Reply-To: <nycvar.YFH.7.76.2308141128260.14207@cbobk.fhfr.pm>
On Mon, Aug 14, 2023 at 11:28:58AM +0200, Jiri Kosina wrote:
> On Mon, 7 Aug 2023, Andy Shevchenko wrote:
...
> > > > > > After I updated GPIO library for the case Benjamin has with CP2112,
> > > > > > I have a brief look into the CP2112 driver itself.
> > > > > >
> > > > > > From GPIO perspective it has two main (maitenance) issues:
> > > > > > - usage of ->to_irq() with IRQ chip present;
> > > > > > - having IRQ chip not immutable.
> > > > > >
> > > > > > Besides that there are plenty small cleanups here and there.
> > > > > > Hence this series.
> > > > >
> > > > > Any comments on this?
> > > >
> > > > Gentle ping^2 for this...
> > > >
> > > > Anything should I do to improve it or is it okay to go as is?
> > >
> > > I have been off pretty much the whole July. I am now back and slowly
> > > making my way through everything that accumulated, I will eventually get
> > > to this.
> > >
> > > Thanks for the patience,
> >
> > Ah, okay, no worries and take your time!
> >
> > I was thinking more on Benjamin's answer as last time he had a hw setup
> > to test... Not sure what the status of that now and if he has a chance
> > to test this or busy enough with something else.
>
> Ah, that would be of course nice. Benjamin?
Benjamin? It almost full release cycle passed...
I understand if you are busy with something, just tell us.
--
With Best Regards,
Andy Shevchenko
^ permalink raw reply
* Re: [PATCH -next] HID: amd_sfh: Remove unused declarations
From: Basavaraj Natikar @ 2023-08-21 7:43 UTC (permalink / raw)
To: Yue Haibing, basavaraj.natikar, jikos, benjamin.tissoires; +Cc: linux-input
In-Reply-To: <20230817135127.36372-1-yuehaibing@huawei.com>
On 8/17/2023 7:21 PM, Yue Haibing wrote:
> Commit 4b2c53d93a4b ("SFH:Transport Driver to add support of AMD Sensor
> Fusion Hub (SFH)") declared but never implemented them.
>
> Signed-off-by: Yue Haibing <yuehaibing@huawei.com>
> ---
> drivers/hid/amd-sfh-hid/amd_sfh_hid.h | 2 --
> 1 file changed, 2 deletions(-)
>
> diff --git a/drivers/hid/amd-sfh-hid/amd_sfh_hid.h b/drivers/hid/amd-sfh-hid/amd_sfh_hid.h
> index 97296f587bc7..1c91be8daedd 100644
> --- a/drivers/hid/amd-sfh-hid/amd_sfh_hid.h
> +++ b/drivers/hid/amd-sfh-hid/amd_sfh_hid.h
> @@ -73,8 +73,6 @@ struct amdtp_hid_data {
> };
>
> /* Interface functions between HID LL driver and AMD SFH client */
> -void hid_amdtp_set_feature(struct hid_device *hid, char *buf, u32 len, int report_id);
> -void hid_amdtp_get_report(struct hid_device *hid, int report_id, int report_type);
> int amdtp_hid_probe(u32 cur_hid_dev, struct amdtp_cl_data *cli_data);
> void amdtp_hid_remove(struct amdtp_cl_data *cli_data);
> int amd_sfh_get_report(struct hid_device *hid, int report_id, int report_type);
Acked-by: Basavaraj Natikar <Basavaraj.Natikar@amd.com>
Thanks,
--
Basavaraj
^ permalink raw reply
* [syzbot] [input?] [usb?] [serial?] INFO: rcu detected stall in console_callback
From: syzbot @ 2023-08-19 22:28 UTC (permalink / raw)
To: gregkh, jirislaby, linux-input, linux-kernel, linux-serial,
linux-usb, syzkaller-bugs
Hello,
syzbot found the following issue on:
HEAD commit: bbb9e06d2c64 Merge 6.5-rc6 into usb-next
git tree: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing
console output: https://syzkaller.appspot.com/x/log.txt?x=1046356fa80000
kernel config: https://syzkaller.appspot.com/x/.config?x=12ca74309a170dc3
dashboard link: https://syzkaller.appspot.com/bug?extid=32af18ae7b894a681f2d
compiler: gcc (Debian 12.2.0-14) 12.2.0, GNU ld (GNU Binutils for Debian) 2.40
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=172d7763a80000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=13e7c603a80000
Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/f8b226772fa1/disk-bbb9e06d.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/3fc8e36b8616/vmlinux-bbb9e06d.xz
kernel image: https://storage.googleapis.com/syzbot-assets/b18a2dffe27d/bzImage-bbb9e06d.xz
IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+32af18ae7b894a681f2d@syzkaller.appspotmail.com
Free swap = 0kB
Total swap = 0kB
2097051 pages RAM
0 pages HighMem/MovableOnly
367867 pages reserved
rcu: INFO: rcu_preempt detected stalls on CPUs/tasks:
rcu: 0-...!: (1 GPs behind) idle=f41c/1/0x4000000000000000 softirq=3538/3539 fqs=1
rcu: (detected by 1, t=10511 jiffies, g=2885, q=45 ncpus=2)
Sending NMI from CPU 1 to CPUs 0:
lowmem_reserve[]: 0
NMI backtrace for cpu 0
CPU: 0 PID: 9 Comm: kworker/0:1 Not tainted 6.5.0-rc6-syzkaller-00119-gbbb9e06d2c64 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/26/2023
Workqueue: events console_callback
RIP: 0010:arch_atomic64_set arch/x86/include/asm/atomic64_64.h:20 [inline]
RIP: 0010:raw_atomic64_set include/linux/atomic/atomic-arch-fallback.h:2608 [inline]
RIP: 0010:raw_atomic_long_set include/linux/atomic/atomic-long.h:79 [inline]
RIP: 0010:atomic_long_set include/linux/atomic/atomic-instrumented.h:3196 [inline]
RIP: 0010:desc_read+0x2c9/0x370 kernel/printk/printk_ringbuffer.c:534
Code: e4 74 2d e8 19 b9 1b 00 be 08 00 00 00 4c 89 e7 e8 ec 77 66 00 4c 89 e2 48 b8 00 00 00 00 00 fc ff df 48 c1 ea 03 80 3c 02 00 <75> 78 4d 89 3c 24 e8 ec b8 1b 00 8b 44 24 08 48 83 c4 18 5b 5d 41
RSP: 0018:ffffc90000007090 EFLAGS: 00000046
RAX: dffffc0000000000 RBX: 00000001000027c2 RCX: ffffffff813092b4
RDX: 1ffff92000000e48 RSI: 0000000000000008 RDI: ffffc90000007240
RBP: 00000001000027c2 R08: 0000000000000001 R09: fffff52000000e48
R10: ffffc90000007247 R11: 00000000001445a0 R12: ffffc90000007240
R13: 0000000000000000 R14: ffffffff87de1170 R15: 80000001000027c2
FS: 0000000000000000(0000) GS:ffff8881f6600000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f9fd260e0f0 CR3: 0000000114035000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
<NMI>
</NMI>
<IRQ>
desc_read_finalized_seq+0x8a/0x1c0 kernel/printk/printk_ringbuffer.c:1763
prb_read kernel/printk/printk_ringbuffer.c:1831 [inline]
_prb_read_valid+0x49e/0x710 kernel/printk/printk_ringbuffer.c:1891
prb_read_valid+0x79/0xa0 kernel/printk/printk_ringbuffer.c:1940
printk_get_next_message+0x154/0x7c0 kernel/printk/printk.c:2783
console_emit_next_record kernel/printk/printk.c:2844 [inline]
console_flush_all+0x39e/0xf50 kernel/printk/printk.c:2933
console_unlock+0xc6/0x1f0 kernel/printk/printk.c:3007
vprintk_emit+0x1c5/0x640 kernel/printk/printk.c:2307
vprintk+0x89/0xa0 kernel/printk/printk_safe.c:50
_printk+0xc8/0x100 kernel/printk/printk.c:2328
__show_free_areas+0x1239/0x2140 mm/show_mem.c:352
__show_mem+0x34/0x140 mm/show_mem.c:409
k_spec drivers/tty/vt/keyboard.c:667 [inline]
k_spec+0xea/0x140 drivers/tty/vt/keyboard.c:656
kbd_keycode drivers/tty/vt/keyboard.c:1524 [inline]
kbd_event+0xcc8/0x17c0 drivers/tty/vt/keyboard.c:1543
input_to_handler+0x382/0x4c0 drivers/input/input.c:132
input_pass_values.part.0+0x536/0x7a0 drivers/input/input.c:161
input_pass_values drivers/input/input.c:148 [inline]
input_event_dispose+0x5ee/0x770 drivers/input/input.c:378
input_handle_event+0x11c/0xd80 drivers/input/input.c:406
input_repeat_key+0x251/0x340 drivers/input/input.c:2263
call_timer_fn+0x1a0/0x580 kernel/time/timer.c:1700
expire_timers kernel/time/timer.c:1751 [inline]
__run_timers+0x764/0xb10 kernel/time/timer.c:2022
run_timer_softirq+0x58/0xd0 kernel/time/timer.c:2035
__do_softirq+0x20b/0x94e kernel/softirq.c:553
invoke_softirq kernel/softirq.c:427 [inline]
__irq_exit_rcu kernel/softirq.c:632 [inline]
irq_exit_rcu+0xa7/0x110 kernel/softirq.c:644
sysvec_apic_timer_interrupt+0x8e/0xb0 arch/x86/kernel/apic/apic.c:1109
</IRQ>
<TASK>
asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:645
RIP: 0010:console_flush_all+0x9b6/0xf50 kernel/printk/printk.c:2939
Code: 30 c7 22 00 9c 5b 81 e3 00 02 00 00 31 ff 48 89 de e8 8e 21 1c 00 48 85 db 0f 85 94 03 00 00 e8 f0 25 1c 00 fb 48 8b 44 24 08 <48> 8b 14 24 0f b6 00 83 e2 07 38 d0 7f 08 84 c0 0f 85 9d 04 00 00
RSP: 0018:ffffc9000009fa98 EFLAGS: 00000293
RAX: fffff52000013f7e RBX: 0000000000000000 RCX: 0000000000000000
RDX: ffff888101e58000 RSI: ffffffff813025d0 RDI: 0000000000000007
RBP: ffffffff88347b00 R08: 0000000000000007 R09: 0000000000000000
R10: 0000000000000000 R11: 205d314320202020 R12: 0000000000000001
R13: ffffffff88347b58 R14: dffffc0000000000 R15: 0000000000000001
console_unlock+0xc6/0x1f0 kernel/printk/printk.c:3007
console_callback+0x27d/0x4c0 drivers/tty/vt/vt.c:2964
process_one_work+0xaa2/0x16f0 kernel/workqueue.c:2600
worker_thread+0x687/0x1110 kernel/workqueue.c:2751
kthread+0x33a/0x430 kernel/kthread.c:389
ret_from_fork+0x2c/0x70 arch/x86/kernel/process.c:145
ret_from_fork_asm+0x11/0x20 arch/x86/entry/entry_64.S:304
</TASK>
INFO: NMI handler (nmi_cpu_backtrace_handler) took too long to run: 3.757 msecs
rcu: rcu_preempt kthread starved for 10505 jiffies! g2885 f0x0 RCU_GP_WAIT_FQS(5) ->state=0x0 ->cpu=1
2812 6735
rcu: Unless rcu_preempt kthread gets sufficient CPU time, OOM is now expected behavior.
6735
rcu: RCU grace-period kthread stack dump:
task:rcu_preempt state:R
Node 0 DMA32 free:2879700kB boost:0kB min:4380kB low:7256kB high:10132kB reserved_highatomic:0KB active_anon:0kB inactive_anon:0kB active_file:0kB inactive_file:0kB unevictable:0kB writepending:0kB present:3129332kB managed:2883248kB mlocked:0kB bounce:0kB free_pcp:3548kB local_pcp:64kB free_cma:0kB
running task stack:29136 pid:15 ppid:2 flags:0x00004000
lowmem_reserve[]: 0
Call Trace:
<TASK>
0 3923
context_switch kernel/sched/core.c:5381 [inline]
__schedule+0xc79/0x30a0 kernel/sched/core.c:6710
3923
Node 0
Normal free:3438448kB boost:0kB min:6112kB low:10128kB high:14144kB reserved_highatomic:0KB active_anon:312kB inactive_anon:6984kB active_file:13664kB inactive_file:40900kB unevictable:0kB writepending:0kB present:5242880kB managed:4018128kB mlocked:0kB bounce:0kB free_pcp:8208kB local_pcp:4084kB free_cma:0kB
schedule+0xe7/0x1b0 kernel/sched/core.c:6786
lowmem_reserve[]: 0
schedule_timeout+0x157/0x2c0 kernel/time/timer.c:2167
0 0
0
Node 0 DMA:
0*4kB
0*8kB
rcu_gp_fqs_loop+0x1ec/0xa50 kernel/rcu/tree.c:1609
0*16kB
0*32kB
0*64kB
rcu_gp_kthread+0x249/0x380 kernel/rcu/tree.c:1808
0*128kB
0*256kB
0*512kB
1*1024kB
kthread+0x33a/0x430 kernel/kthread.c:389
(U) 1*2048kB
(M) 3*4096kB
ret_from_fork+0x2c/0x70 arch/x86/kernel/process.c:145
(M) = 15360kB
Node 0 DMA32:
ret_from_fork_asm+0x11/0x20 arch/x86/entry/entry_64.S:304
3*4kB
</TASK>
(M) 1*8kB
rcu: Stack dump where RCU GP kthread last ran:
CPU: 1 PID: 25 Comm: kworker/1:1 Not tainted 6.5.0-rc6-syzkaller-00119-gbbb9e06d2c64 #0
(M) 2*16kB
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/26/2023
(M) 3*32kB
Workqueue: usb_hub_wq hub_event
(M) 3*64kB
RIP: 0010:__raw_spin_unlock_irqrestore include/linux/spinlock_api_smp.h:152 [inline]
RIP: 0010:_raw_spin_unlock_irqrestore+0x31/0x70 kernel/locking/spinlock.c:194
(M) 3*128kB
Code: f5 53 48 8b 74 24 10 48 89 fb 48 83 c7 18 e8 c6 41 ec fa 48 89 df e8 9e c0 ec fa f7 c5 00 02 00 00 75 1f 9c 58 f6 c4 02 75 2f <bf> 01 00 00 00 e8 15 47 e1 fa 65 8b 05 26 57 c2 79 85 c0 74 12 5b
(M) 2*256kB
RSP: 0000:ffffc90000188c90 EFLAGS: 00000246
(M) 2*512kB
RAX: 0000000000000002 RBX: ffff8881096b4218 RCX: 1ffffffff16f69c2
(M) 2*1024kB
RDX: 0000000000000000 RSI: ffffffff8687a2e0 RDI: ffffffff86a59c00
(M) 2*2048kB
RBP: 0000000000000246 R08: 0000000000000001 R09: fffffbfff16eef4a
(M) 701*4096kB
R10: ffffffff8b777a57 R11: 00000000000441b8 R12: ffff8881096b4110
(M) = 2879700kB
R13: 1ffff92000031196 R14: ffffffff845832d0 R15: 0000000000000001
Node 0 Normal:
FS: 0000000000000000(0000) GS:ffff8881f6700000(0000) knlGS:0000000000000000
486*4kB
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
(UME) 767*8kB
CR2: 00007f9fd25dfce8 CR3: 0000000109343000 CR4: 00000000003506e0
(UE) 318*16kB
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
(UME) 4*32kB
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
(UM) 2*64kB
Call Trace:
<IRQ>
(M) 4*128kB
(UME) 1*256kB
(U) 6*512kB
(ME) 3*1024kB
(ME) 1*2048kB
(E) 834*4096kB
(M) = 3438448kB
Node 0 hugepages_total=4 hugepages_free=4 hugepages_surp=0 hugepages_size=2048kB
13796 total pagecache pages
0 pages in swap cache
Free swap = 0kB
Total swap = 0kB
2097051 pages RAM
0 pages HighMem/MovableOnly
367867 pages reserved
Mem-Info:
active_anon:78 inactive_anon:1746 isolated_anon:0
active_file:3416 inactive_file:10225 isolated_file:0
unevictable:0 dirty:0 writeback:0
slab_reclaimable:8953 slab_unreclaimable:62980
mapped:2091 shmem:155 pagetables:347
sec_pagetables:0 bounce:0
kernel_misc_reclaimable:0
free:1583377 free_pcp:2939 free_cma:0
Node 0 active_anon:312kB inactive_anon:6984kB active_file:13664kB inactive_file:40900kB unevictable:0kB isolated(anon):0kB isolated(file):0kB mapped:8364kB dirty:0kB writeback:0kB shmem:620kB writeback_tmp:0kB kernel_stack:3556kB pagetables:1388kB sec_pagetables:0kB all_unreclaimable? no
Node 0 DMA free:15360kB boost:0kB min:20kB low:32kB high:44kB reserved_highatomic:0KB active_anon:0kB inactive_anon:0kB active_file:0kB inactive_file:0kB unevictable:0kB writepending:0kB present:15992kB managed:15360kB mlocked:0kB bounce:0kB free_pcp:0kB local_pcp:0kB free_cma:0kB
lowmem_reserve[]: 0
2812 6735
6735
Node 0 DMA32 free:2879700kB boost:0kB min:4380kB low:7256kB high:10132kB reserved_highatomic:0KB active_anon:0kB inactive_anon:0kB active_file:0kB inactive_file:0kB unevictable:0kB writepending:0kB present:3129332kB managed:2883248kB mlocked:0kB bounce:0kB free_pcp:3548kB local_pcp:64kB free_cma:0kB
lowmem_reserve[]: 0
0 3923
call_timer_fn+0x1a0/0x580 kernel/time/timer.c:1700
3923
Node 0
Normal free:3438448kB boost:0kB min:6112kB low:10128kB high:14144kB reserved_highatomic:0KB active_anon:312kB inactive_anon:6984kB active_file:13664kB inactive_file:40900kB unevictable:0kB writepending:0kB present:5242880kB managed:4018128kB mlocked:0kB bounce:0kB free_pcp:8208kB local_pcp:4084kB free_cma:0kB
lowmem_reserve[]: 0
0 0
expire_timers kernel/time/timer.c:1751 [inline]
__run_timers+0x764/0xb10 kernel/time/timer.c:2022
0
Node 0 DMA:
0*4kB
0*8kB
run_timer_softirq+0x58/0xd0 kernel/time/timer.c:2035
0*16kB
__do_softirq+0x20b/0x94e kernel/softirq.c:553
0*32kB
0*64kB
invoke_softirq kernel/softirq.c:427 [inline]
__irq_exit_rcu kernel/softirq.c:632 [inline]
irq_exit_rcu+0xa7/0x110 kernel/softirq.c:644
0*128kB
sysvec_apic_timer_interrupt+0x8e/0xb0 arch/x86/kernel/apic/apic.c:1109
0*256kB
</IRQ>
0*512kB
<TASK>
asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:645
1*1024kB
RIP: 0010:console_flush_all+0x9b6/0xf50 kernel/printk/printk.c:2939
(U) 1*2048kB
Code: 30 c7 22 00 9c 5b 81 e3 00 02 00 00 31 ff 48 89 de e8 8e 21 1c 00 48 85 db 0f 85 94 03 00 00 e8 f0 25 1c 00 fb 48 8b 44 24 08 <48> 8b 14 24 0f b6 00 83 e2 07 38 d0 7f 08 84 c0 0f 85 9d 04 00 00
(M) 3*4096kB
RSP: 0000:ffffc900001b7548 EFLAGS: 00000293
(M) = 15360kB
RAX: fffff52000036ed4 RBX: 0000000000000000 RCX: 0000000000000000
Node 0 DMA32:
RDX: ffff888104a51d00 RSI: ffffffff813025d0 RDI: 0000000000000007
3*4kB
RBP: ffffffff88347b00 R08: 0000000000000007 R09: 0000000000000000
(M) 1*8kB
R10: 0000000000000000 R11: 205d314320202020 R12: 0000000000000001
(M) 2*16kB
R13: ffffffff88347b58 R14: dffffc0000000000 R15: 0000000000000001
(M) 3*32kB
(M) 3*64kB
(M) 3*128kB
(M) 2*256kB
(M) 2*512kB
(M) 2*1024kB
console_unlock+0xc6/0x1f0 kernel/printk/printk.c:3007
(M) 2*2048kB
(M) 701*4096kB
vprintk_emit+0x1c5/0x640 kernel/printk/printk.c:2307
(M) = 2879700kB
dev_vprintk_emit drivers/base/core.c:4840 [inline]
dev_printk_emit+0xfb/0x140 drivers/base/core.c:4851
Node 0 Normal:
486*4kB
(UME) 767*8kB
(UE) 318*16kB
__dev_printk+0xf5/0x270 drivers/base/core.c:4863
(UME) 4*32kB
_dev_info+0xe5/0x120 drivers/base/core.c:4909
(UM) 2*64kB
(M) 4*128kB
(UME) 1*256kB
hub_port_init+0xcd3/0x3920 drivers/usb/core/hub.c:4870
(U) 6*512kB
hub_port_connect drivers/usb/core/hub.c:5369 [inline]
hub_port_connect_change drivers/usb/core/hub.c:5580 [inline]
port_event drivers/usb/core/hub.c:5740 [inline]
hub_event+0x2c20/0x4f30 drivers/usb/core/hub.c:5822
(ME) 3*1024kB
(ME) 1*2048kB
(E) 834*4096kB
(M) = 3438448kB
Node 0 hugepages_total=4 hugepages_free=4 hugepages_surp=0 hugepages_size=2048kB
13796 total pagecache pages
process_one_work+0xaa2/0x16f0 kernel/workqueue.c:2600
0 pages in swap cache
Free swap = 0kB
Total swap = 0kB
2097051 pages RAM
0 pages HighMem/MovableOnly
367867 pages reserved
worker_thread+0x687/0x1110 kernel/workqueue.c:2751
Mem-Info:
active_anon:78 inactive_anon:1721 isolated_anon:0
active_file:3416 inactive_file:10225 isolated_file:0
unevictable:0 dirty:0 writeback:0
slab_reclaimable:8953 slab_unreclaimable:62916
mapped:2091 shmem:155 pagetables:347
sec_pagetables:0 bounce:0
kernel_misc_reclaimable:0
free:1583321 free_pcp:3105 free_cma:0
Node 0 active_anon:312kB inactive_anon:6884kB active_file:13664kB inactive_file:40900kB unevictable:0kB isolated(anon):0kB isolated(file):0kB mapped:8364kB dirty:0kB writeback:0kB shmem:620kB writeback_tmp:0kB kernel_stack:3584kB pagetables:1388kB sec_pagetables:0kB all_unreclaimable? no
kthread+0x33a/0x430 kernel/kthread.c:389
Node 0 DMA free:15360kB boost:0kB min:20kB low:32kB high:44kB reserved_highatomic:0KB active_anon:0kB inactive_anon:0kB active_file:0kB inactive_file:0kB unevictable:0kB writepending:0kB present:15992kB managed:15360kB mlocked:0kB bounce:0kB free_pcp:0kB local_pcp:0kB free_cma:0kB
lowmem_reserve[]: 0
ret_from_fork+0x2c/0x70 arch/x86/kernel/process.c:145
2812
6735 6735
ret_from_fork_asm+0x11/0x20 arch/x86/entry/entry_64.S:304
Node 0
</TASK>
DMA32 free:2879700kB boost:0kB min:4380kB low:7256kB high:10132kB reserved_highatomic:0KB active_anon:0kB inactive_anon:0kB active_file:0kB inactive_file:0kB unevictable:0kB writepending:0kB present:3129332kB managed:2883248kB mlocked:0kB bounce:0kB free_pcp:3548kB local_pcp:64kB free_cma:0kB
lowmem_reserve[]: 0 0 3923 3923
Node 0 Normal free:3438224kB boost:0kB min:6112kB low:10128kB high:14144kB reserved_highatomic:0KB active_anon:312kB inactive_anon:6884kB active_file:13664kB inactive_file:40900kB unevictable:0kB writepending:0kB present:5242880kB managed:4018128kB mlocked:0kB bounce:0kB free_pcp:8872kB local_pcp:4748kB free_cma:0kB
lowmem_reserve[]: 0 0 0 0
Node 0 DMA: 0*4kB 0*8kB 0*16kB 0*32kB 0*64kB 0*128kB 0*256kB 0*512kB 1*1024kB (U) 1*2048kB (M) 3*4096kB (M) = 15360kB
Node 0 DMA32: 3*4kB (M) 1*8kB (M) 2*16kB (M) 3*32kB (M) 3*64kB (M) 3*128kB (M) 2*256kB (M) 2*512kB (M) 2*1024kB (M) 2*2048kB (M) 701*4096kB (M) = 2879700kB
Node 0 Normal: 486*4kB (UME) 767*8kB (UE) 318*16kB (UME) 3*32kB (M) 3*64kB (UM) 4*128kB (UME) 0*256kB 6*512kB (ME) 3*1024kB (ME) 1*2048kB (E) 834*4096kB (M) = 3438224kB
Node 0 hugepages_total=4 hugepages_free=4 hugepages_surp=0 hugepages_size=2048kB
13796 total pagecache pages
0 pages in swap cache
Free swap = 0kB
Total swap = 0kB
2097051 pages RAM
0 pages HighMem/MovableOnly
367867 pages reserved
Mem-Info:
active_anon:78 inactive_anon:1721 isolated_anon:0
active_file:3416 inactive_file:10225 isolated_file:0
unevictable:0 dirty:0 writeback:0
slab_reclaimable:8953 slab_unreclaimable:62916
mapped:2091 shmem:155 pagetables:347
sec_pagetables:0 bounce:0
kernel_misc_reclaimable:0
free:1583321 free_pcp:3105 free_cma:0
Node 0 active_anon:312kB inactive_anon:6884kB active_file:13664kB inactive_file:40900kB unevictable:0kB isolated(anon):0kB isolated(file):0kB mapped:8364kB dirty:0kB writeback:0kB shmem:620kB writeback_tmp:0kB kernel_stack:3584kB pagetables:1388kB sec_pagetables:0kB all_unreclaimable? no
Node 0 DMA free:15360kB boost:0kB min:20kB low:32kB high:44kB reserved_highatomic:0KB active_anon:0kB inactive_anon:0kB active_file:0kB inactive_file:0kB unevictable:0kB writepending:0kB present:15992kB managed:15360kB mlocked:0kB bounce:0kB free_pcp:0kB local_pcp:0kB free_cma:0kB
lowmem_reserve[]: 0 2812 6735 6735
Node 0 DMA32 free:2879700kB boost:0kB min:4380kB low:7256kB high:10132kB reserved_highatomic:0KB active_anon:0kB inactive_anon:0kB active_file:0kB inactive_file:0kB unevictable:0kB writepending:0kB present:3129332kB managed:2883248kB mlocked:0kB bounce:0kB free_pcp:3548kB local_pcp:3484kB free_cma:0kB
lowmem_reserve[]: 0 0 3923 3923
Node 0 Normal free:3438224kB boost:0kB min:6112kB low:10128kB high:14144kB reserved_highatomic:0KB active_anon:312kB inactive_anon:6884kB active_file:13664kB inactive_file:40900kB unevictable:0kB writepending:0kB present:5242880kB managed:4018128kB mlocked:0kB bounce:0kB free_pcp:8872kB local_pcp:4124kB free_cma:0kB
lowmem_reserve[]: 0 0 0 0
Node 0 DMA: 0*4kB 0*8kB 0*16kB 0*32kB 0*64kB 0*128kB 0*256kB 0*512kB 1*1024kB (U) 1*2048kB (M) 3*4096kB (M) = 15360kB
Node 0 DMA32: 3*4kB (M) 1*8kB (M) 2*16kB (M) 3*32kB (M) 3*64kB (M) 3*128kB (M) 2*256kB (M) 2*512kB (M) 2*1024kB (M) 2*2048kB (M) 701*4096kB (M) = 2879700kB
Node 0 Normal: 486*4kB (UME) 767*8kB (UE) 318*16kB (UME) 3*32kB (M) 3*64kB (UM) 4*128kB (UME) 0*256kB 6*512kB (ME) 3*1024kB (ME) 1*2048kB (E) 834*4096kB (M) = 3438224kB
Node 0 hugepages_total=4 hugepages_free=4 hugepages_surp=0 hugepages_size=2048kB
13796 total pagecache pages
0 pages in swap cache
Free swap = 0kB
Total swap = 0kB
2097051 pages RAM
0 pages HighMem/MovableOnly
367867 pages reserved
Mem-Info:
active_anon:78 inactive_anon:1721 isolated_anon:0
active_file:3416 inactive_file:10225 isolated_file:0
unevictable:0 dirty:0 writeback:0
slab_reclaimable:8953 slab_unreclaimable:62916
mapped:2091 shmem:155 pagetables:347
sec_pagetables:0 bounce:0
kernel_misc_reclaimable:0
free:1583321 free_pcp:3105 free_cma:0
Node 0 active_anon:312kB inactive_anon:6884kB active_file:13664kB inactive_file:40900kB unevictable:0kB isolated(anon):0kB isolated(file):0kB mapped:8364kB dirty:0kB writeback:0kB shmem:620kB writeback_tmp:0kB kernel_stack:3584kB pagetables:1388kB sec_pagetables:0kB all_unreclaimable? no
Node 0 DMA free:15360kB boost:0kB min:20kB low:32kB high:44kB reserved_highatomic:0KB active_anon:0kB inactive_anon:0kB active_file:0kB inactive_file:0kB unevictable:0kB writepending:0kB present:15992kB managed:15360kB mlocked:0kB bounce:0kB free_pcp:0kB local_pcp:0kB free_cma:0kB
lowmem_reserve[]: 0 2812 6735 6735
Node 0 DMA32 free:2879700kB boost:0kB min:4380kB low:7256kB high:10132kB reserved_highatomic:0KB active_anon:0kB inactive_anon:0kB active_file:0kB inactive_file:0kB unevictable:0kB writepending:0kB present:3129332kB managed:2883248kB mlocked:0kB bounce:0kB free_pcp:3548kB local_pcp:64kB free_cma:0kB
lowmem_reserve[]: 0 0 3923 3923
Node 0 Normal free:3438224kB boost:0kB min:6112kB low:10128kB high:14144kB reserved_highatomic:0KB active_anon:312kB inactive_anon:6884kB active_file:13664kB inactive_file:40900kB unevictable:0kB writepending:0kB present:5242880kB managed:4018128kB mlocked:0kB bounce:0kB free_pcp:8872kB local_pcp:4748kB free_cma:0kB
lowmem_reserve[]: 0 0 0 0
Node 0 DMA: 0*4kB 0*8kB 0*16kB 0*32kB 0*64kB 0*128kB 0*256kB 0*512kB 1*1024kB (U) 1*2048kB (M) 3*4096kB (M) = 15360kB
Node 0 DMA32: 3*4kB (M) 1*8kB (M) 2*16kB (M) 3*32kB (M) 3*64kB (M) 3*128kB (M) 2*256kB (M) 2*512kB (M) 2*1024kB (M) 2*2048kB (M) 701*4096kB (M) = 2879700kB
Node 0 Normal: 486*4kB (UME) 767*8kB (UE) 318*16kB (UME) 3*32kB (M) 3*64kB (UM) 4*128kB (UME) 0*256kB 6*512kB (ME) 3*1024kB (ME) 1*2048kB (E) 834*4096kB (M) = 3438224kB
Node 0 hugepages_total=4 hugepages_free=4 hugepages_surp=0 hugepages_size=2048kB
13796 total pagecache pages
0 pages in swap cache
Free swap = 0kB
Total swap = 0kB
2097051 pages RAM
0 pages HighMem/MovableOnly
367867 pages reserved
Mem-Info:
active_anon:78 inactive_anon:1721 isolated_anon:0
active_file:3416 inactive_file:10225 isolated_file:0
unevictable:0 dirty:0 writeback:0
slab_reclaimable:8953 slab_unreclaimable:62916
mapped:2091 shmem:155 pagetables:347
sec_pagetables:0 bounce:0
kernel_misc_reclaimable:0
free:1583321 free_pcp:3105 free_cma:0
Node 0 active_anon:312kB inactive_anon:6884kB active_file:13664kB inactive_file:40900kB unevictable:0kB isolated(anon):0kB isolated(file):0kB mapped:8364kB dirty:0kB writeback:0kB shmem:620kB writeback_tmp:0kB kernel_stack:3584kB pagetables:1388kB sec_pagetables:0kB all_unreclaimable? no
Node 0 DMA free:15360kB boost:0kB min:20kB low:32kB high:44kB reserved_highatomic:0KB active_anon:0kB inactive_anon:0kB active_file:0kB inactive_file:0kB unevictable:0kB writepending:0kB present:15992kB managed:15360kB mlocked:0kB bounce:0kB free_pcp:0kB local_pcp:0kB free_cma:0kB
lowmem_reserve[]: 0 2812 6735 6735
Node 0 DMA32 free:2879700kB boost:0kB min:4380kB low:7256kB high:10132kB reserved_highatomic:0KB active_anon:0kB inactive_anon:0kB active_file:0kB inactive_file:0kB unevictable:0kB writepending:0kB present:3129332kB managed:2883248kB mlocked:0kB bounce:0kB free_pcp:3548kB local_pcp:3484kB free_cma:0kB
lowmem_reserve[]: 0 0 3923 3923
Node 0 Normal free:3438224kB boost:0kB min:6112kB low:10128kB high:14144kB reserved_highatomic:0KB active_anon:312kB inactive_anon:6884kB active_file:13664kB inactive_file:40900kB unevictable:0kB writepending:0kB present:5242880kB managed:4018128kB mlocked:0kB bounce:0kB free_pcp:8872kB local_pcp:4124kB free_cma:0kB
lowmem_reserve[]: 0 0 0 0
Node 0 DMA: 0*4kB 0*8kB 0*16kB 0*32kB 0*64kB 0*128kB 0*256kB 0*512kB 1*1024kB (U) 1*2048kB (M) 3*4096kB (M) = 15360kB
Node 0 DMA32: 3*4kB (M) 1*8kB (M) 2*16kB (M) 3*32kB (M) 3*64kB (M) 3*128kB (M) 2*256kB (M) 2*512kB (M) 2*1024kB (M) 2*2048kB (M) 701*4096kB (M) = 2879700kB
Node 0 Normal: 486*4kB (UME) 767*8kB (UE) 318*16kB (UME) 3*32kB (M) 3*64kB (UM) 4*128kB (UME) 0*256kB 6*512kB (ME) 3*1024kB (ME) 1*2048kB (E) 834*4096kB (M) = 3438224kB
Node 0 hugepages_total=4 hugepages_free=4 hugepages_surp=0 hugepages_size=2048kB
13796 total pagecache pages
0 pages in swap cache
Free swap = 0kB
Total swap = 0kB
2097051 pages RAM
0 pages HighMem/MovableOnly
367867 pages reserved
Mem-Info:
active_anon:78 inactive_anon:1721 isolated_anon:0
active_file:3416 inactive_file:10225 isolated_file:0
unevictable:0 dirty:0 writeback:0
slab_reclaimable:8953 slab_unreclaimable:62916
mapped:2091 shmem:155 pagetables:347
sec_pagetables:0 bounce:0
kernel_misc_reclaimable:0
free:1583321 free_pcp:3105 free_cma:0
Node 0 active_anon:312kB inactive_anon:6884kB active_file:13664kB inactive_file:40900kB unevictable:0kB isolated(anon):0kB isolated(file):0kB mapped:8364kB dirty:0kB writeback:0kB shmem:620kB writeback_tmp:0kB kernel_stack:3584kB pagetables:1388kB sec_pagetables:0kB all_unreclaimable? no
Node 0 DMA free:15360kB boost:0kB min:20kB low:32kB high:44kB reserved_highatomic:0KB active_anon:0kB inactive_anon:0kB active_file:0kB inactive_file:0kB unevictable:0kB writepending:0kB present:15992kB managed:15360kB mlocked:0kB bounce:0kB free_pcp:0kB local_pcp:0kB free_cma:0kB
lowmem_reserve[]: 0 2812 6735 6735
Node 0 DMA32 free:2879700kB boost:0kB min:4380kB low:7256kB high:10132kB reserved_highatomic:0KB active_anon:0kB inactive_anon:0kB active_file:0kB inactive_file:0kB unevictable:0kB writepending:0kB present:3129332kB managed:2883248kB mlocked:0kB bounce:0kB free_pcp:3548kB local_pcp:64kB free_cma:0kB
lowmem_reserve[]: 0 0 3923 3923
Node 0 Normal free:3438224kB boost:0kB min:6112kB low:10128kB high:14144kB reserved_highatomic:0KB active_anon:312kB inactive_anon:6884kB active_file:13664kB inactive_file:40900kB unevictable:0kB writepending:0kB present:5242880kB managed:4018128kB mlocked:0kB bounce:0kB free_pcp:8872kB local_pcp:4748kB free_cma:0kB
lowmem_reserve[]: 0 0 0 0
Node 0 DMA: 0*4kB 0*8kB 0*16kB 0*32kB 0*64kB 0*128kB 0*256kB 0*512kB 1*1024kB (U) 1*2048kB (M) 3*4096kB (M) = 15360kB
Node 0 DMA32: 3*4kB (M) 1*8kB (M) 2*16kB (M) 3*32kB (M) 3*64kB (M) 3*128kB (M) 2*256kB (M) 2*512kB (M) 2*1024kB (M) 2*2048kB (M) 701*4096kB (M) = 2879700kB
Node 0 Normal: 486*4kB (UME) 767*8kB (UE) 318*16kB (UME) 3*32kB (M) 3*64kB (UM) 4*128kB (UME) 0*256kB 6*512kB (ME) 3*1024kB (ME) 1*2048kB (E) 834*4096kB (M) = 3438224kB
Node 0 hugepages_total=4 hugepages_free=4 hugepages_surp=0 hugepages_size=2048kB
13796 total pagecache pages
0 pages in swap cache
Free swap = 0kB
Total swap = 0kB
2097051 pages RAM
0 pages HighMem/MovableOnly
367867 pages reserved
Mem-Info:
active_anon:78 inactive_anon:1721 isolated_anon:0
active_file:3416 inactive_file:10225 isolated_file:0
unevictable:0 dirty:0 writeback:0
slab_reclaimable:8953 slab_unreclaimable:62916
mapped:2091 shmem:155 pagetables:347
sec_pagetables:0 bounce:0
kernel_misc_reclaimable:0
free:1583321 free_pcp:3105 free_cma:0
Node 0 active_anon:312kB inactive_anon:6884kB active_file:13664kB inactive_file:40900kB unevictable:0kB isolated(anon):0kB isolated(file):0kB mapped:8364kB dirty:0kB writeback:0kB shmem:620kB writeback_tmp:0kB kernel_stack:3584kB pagetables:1388kB sec_pagetables:0kB all_unreclaimable? no
Node 0 DMA free:15360kB boost:0kB min:20kB low:32kB high:44kB reserved_highatomic:0KB active_anon:0kB inactive_anon:0kB active_file:0kB inactive_file:0kB unevictable:0kB writepending:0kB present:15992kB managed:15360kB mlocked:0kB bounce:0kB free_pcp:0kB local_pcp:0kB free_cma:0kB
lowmem_reserve[]: 0 2812 6735 6735
Node 0 DMA32 free:2879700kB boost:0kB min:4380kB low:7256kB high:10132kB reserved_highatomic:0KB active_anon:0kB inactive_anon:0kB active_file:0kB inactive_file:0kB unevictable:0kB writepending:0kB present:3129332kB managed:2883248kB mlocked:0kB bounce:0kB free_pcp:3548kB local_pcp:3484kB free_cma:0kB
lowmem_reserve[]: 0 0 3923 3923
Node 0 Normal free:3438224kB boost:0kB min:6112kB low:10128kB high:14144kB reserved_highatomic:0KB active_anon:312kB inactive_anon:6884kB active_file:13664kB inactive_file:40900kB unevictable:0kB writepending:0kB present:5242880kB managed:4018128kB mlocked:0kB bounce:0kB free_pcp:8872kB local_pcp:4124kB free_cma:0kB
lowmem_reserve[]: 0 0 0 0
Node 0 DMA: 0*4kB 0*8kB 0*16kB 0*32kB 0*64kB 0*128kB 0*256kB 0*512kB 1*1024kB (U) 1*2048kB (M) 3*4096kB (M) = 15360kB
Node 0 DMA32: 3*4kB (M) 1*8kB (M) 2*16kB (M) 3*32kB (M) 3*64kB (M) 3*128kB (M) 2*256kB (M) 2*512kB (M) 2*1024kB (M) 2*2048kB (M) 701*4096kB (M) = 2879700kB
Node 0 Normal: 486*4kB (UME) 767*8kB (UE) 318*16kB (UME) 3*32kB (M) 3*64kB (UM) 4*128kB (UME) 0*256kB 6*512kB (ME) 3*1024kB (ME) 1*2048kB (E) 834*4096kB (M) = 3438224kB
Node 0 hugepages_total=4 hugepages_free=4 hugepages_surp=0 hugepages_size=2048kB
13796 total pagecache pages
0 pages in swap cache
Free swap = 0kB
Total swap = 0kB
2097051 pages RAM
0 pages HighMem/MovableOnly
367867 pages reserved
Mem-Info:
active_anon:78 inactive_anon:1721 isolated_anon:0
active_file:3416 inactive_file:10225 isolated_file:0
unevictable:0 dirty:0 writeback:0
slab_reclaimable:8953 slab_unreclaimable:62916
mapped:2091 shmem:155 pagetables:347
sec_pagetables:0 bounce:0
kernel_misc_reclaimable:0
free:1583321 free_pcp:3105 free_cma:0
Node 0 active_anon:312kB inactive_anon:6884kB active_file:13664kB inactive_file:40900kB unevictable:0kB isolated(anon):0kB isolated(file):0kB mapped:8364kB dirty:0kB writeback:0kB shmem:620kB writeback_tmp:0kB kernel_stack:3584kB pagetables:1388kB sec_pagetables:0kB all_unreclaimable? no
Node 0 DMA free:15360kB boost:0kB min:20kB low:32kB high:44kB reserved_highatomic:0KB active_anon:0kB inactive_anon:0kB active_file:0kB inactive_file:0kB unevictable:0kB writepending:0kB present:15992kB managed:15360kB mlocked:0kB bounce:0kB free_pcp:0kB local_pcp:0kB free_cma:0kB
lowmem_reserve[]: 0 2812 6735 6735
Node 0 DMA32 free:2879700kB boost:0kB min:4380kB low:7256kB high:10132kB reserved_highatomic:0KB active_anon:0kB inactive_anon:0kB active_file:0kB inactive_file:0kB unevictable:0kB writepending:0kB present:3129332kB managed:2883248kB mlocked:0kB bounce:0kB free_pcp:3548kB local_pcp:64kB free_cma:0kB
lowmem_reserve[]: 0 0 3923 3923
Node 0 Normal free:3438224kB boost:0kB min:6112kB low:10128kB high:14144kB reserved_highatomic:0KB active_anon:312kB inactive_anon:6884kB active_file:13664kB inactive_file:40900kB unevictable:0kB writepending:0kB present:5242880kB managed:4018128kB mlocked:0kB bounce:0kB free_pcp:8872kB local_pcp:4748kB free_cma:0kB
lowmem_reserve[]: 0 0 0 0
Node 0 DMA: 0*4kB 0*8kB 0*16kB 0*32kB 0*64kB 0*128kB 0*256kB 0*512kB 1*1024kB (U) 1*2048kB (M) 3*4096kB (M) = 15360kB
Node 0 DMA32: 3*4kB (M) 1*8kB (M) 2*16kB (M) 3*32kB (M) 3*64kB (M) 3*128kB (M) 2*256kB (M) 2*512kB (M) 2*1024kB (M) 2*2048kB (M) 701*4096kB (M) = 2879700kB
Node 0 Normal: 486*4kB (UME) 767*8kB (UE) 318*16kB (UME) 3*32kB (M) 3*64kB (UM) 4*128kB (UME) 0*256kB 6*512kB (ME) 3*1024kB (ME) 1*2048kB (E) 834*4096kB (M) = 3438224kB
Node 0 hugepages_total=4 hugepages_free=4 hugepages_surp=0 hugepages_size=2048kB
13796 total pagecache pages
0 pages in swap cache
Free swap = 0kB
Total swap = 0kB
2097051 pages RAM
0 pages HighMem/MovableOnly
367867 pages reserved
Mem-Info:
active_anon:78 inactive_anon:1721 isolated_anon:0
active_file:3416 inactive_file:10225 isolated_file:0
unevictable:0 dirty:0 writeback:0
slab_reclaimable:8953 slab_unreclaimable:62916
mapped:2091 shmem:155 pagetables:347
sec_pagetables:0 bounce:0
kernel_misc_reclaimable:0
free:1583321 free_pcp:3105 free_cma:0
Node 0 active_anon:312kB inactive_anon:6884kB active_file:13664kB inactive_file:40900kB unevictable:0kB isolated(anon):0kB isolated(file):0kB mapped:8364kB dirty:0kB writeback:0kB shmem:620kB writeback_tmp:0kB kernel_stack:3584kB pagetables:1388kB sec_pagetables:0kB all_unreclaimable? no
Node 0 DMA free:15360kB boost:0kB min:20kB low:32kB high:44kB reserved_highatomic:0KB active_anon:0kB inactive_anon:0kB active_file:0kB inactive_file:0kB unevictable:0kB writepending:0kB present:15992kB managed:15360kB mlocked:0kB bounce:0kB free_pcp:0kB local_pcp:0kB free_cma:0kB
lowmem_reserve[]: 0 2812 6735 6735
Node 0 DMA32 free:2879700kB boost:0kB min:4380kB low:7256kB high:10132kB reserved_highatomic:0KB active_anon:0kB inactive_anon:0kB active_file:0kB inactive_file:0kB unevictable:0kB writepending:0kB present:3129332kB managed:2883248kB mlocked:0kB bounce:0kB free_pcp:3548kB local_pcp:3484kB free_cma:0kB
lowmem_reserve[]: 0 0 3923 3923
Node 0 Normal free:3438224kB boost:0kB min:6112kB low:10128kB high:14144kB reserved_highatomic:0KB active_anon:312kB inactive_anon:6884kB active_file:13664kB inactive_file:40900kB unevictable:0kB writepending:0kB present:5242880kB managed:4018128kB mlocked:0kB bounce:0kB free_pcp:8872kB local_pcp:4124kB free_cma:0kB
lowmem_reserve[]: 0 0 0 0
Node 0 DMA: 0*4kB 0*8kB 0*16kB 0*32kB 0*64kB 0*128kB 0*256kB 0*512kB 1*1024kB (U) 1*2048kB (M) 3*4096kB (M) = 15360kB
Node 0 DMA32: 3*4kB (M) 1*8kB (M) 2*16kB (M) 3*32kB (M) 3*64kB (M) 3*128kB (M) 2*256kB (M) 2*512kB (M) 2*1024kB (M) 2*2048kB (M) 701*4096kB (M) = 2879700kB
Node 0 Normal: 486*4kB (UME) 767*8kB (UE) 318*16kB (UME) 3*32kB (M) 3*64kB (UM) 4*128kB (UME) 0*256kB 6*512kB (ME) 3*1024kB (ME) 1*2048kB (E) 834*4096kB (M) = 3438224kB
Node 0 hugepages_total=4 hugepages_free=4 hugepages_surp=0 hugepages_size=2048kB
13796 total pagecache pages
0 pages in swap cache
Free swap = 0kB
Total swap = 0kB
2097051 pages RAM
0 pages HighMem/MovableOnly
367867 pages reserved
Mem-Info:
active_anon:78 inactive_anon:1721 isolated_anon:0
active_file:3416 inactive_file:10225 isolated_file:0
unevictable:0 dirty:0 writeback:0
slab_reclaimable:8953 slab_unreclaimable:62916
mapped:2091 shmem:155 pagetables:347
sec_pagetables:0 bounce:0
kernel_misc_reclaimable:0
free:1583321 free_pcp:3105 free_cma:0
Node 0 active_anon:312kB inactive_anon:6884kB active_file:13664kB inactive_file:40900kB unevictable:0kB isolated(anon):0kB isolated(file):0kB mapped:8364kB dirty:0kB writeback:0kB shmem:620kB writeback_tmp:0kB kernel_stack:3584kB pagetables:1388kB sec_pagetables:0kB all_unreclaimable? no
Node 0 DMA free:15360kB boost:0kB min:20kB low:32kB high:44kB reserved_highatomic:0KB active_anon:0kB inactive_anon:0kB active_file:0kB inactive_file:0kB unevictable:0kB writepending:0kB present:15992kB managed:15360kB mlocked:0kB bounce:0kB free_pcp:0kB local_pcp:0kB free_cma:0kB
lowmem_reserve[]: 0 2812 6735 6735
Node 0 DMA32 free:2879700kB boost:0kB min:4380kB low:7256kB high:10132kB reserved_highatomic:0KB active_anon:0kB inactive_anon:0kB active_file:0kB inactive_file:0kB unevictable:0kB writepending:0kB present:3129332kB managed:2883248kB mlocked:0kB bounce:0kB free_pcp:3548kB local_pcp:64kB free_cma:0kB
lowmem_reserve[]: 0 0 3923 3923
Node 0 Normal free:3438224kB boost:0kB min:6112kB low:10128kB high:14144kB reserved_highatomic:0KB active_anon:312kB inactive_anon:6884kB active_file:13664kB inactive_file:40900kB unevictable:0kB writepending:0kB present:5242880kB managed:4018128kB mlocked:0kB bounce:0kB free_pcp:8872kB local_pcp:4748kB free_cma:0kB
lowmem_reserve[]: 0 0 0 0
Node 0 DMA: 0*4kB 0*8kB 0*16kB 0*32kB 0*64kB 0*128kB 0*256kB 0*512kB 1*1024kB (U) 1*2048kB (M) 3*4096kB (M) = 15360kB
Node 0 DMA32: 3*4kB (M) 1*8kB (M) 2*16kB (M) 3*32kB (M) 3*64kB (M) 3*128kB (M) 2*256kB (M) 2*512kB (M) 2*1024kB (M) 2*2048kB (M) 701*4096kB (M) = 2879700kB
Node 0 Normal: 486*4kB (UME) 767*8kB (UE) 318*16kB (UME) 3*32kB (M) 3*64kB (UM) 4*128kB (UME) 0*256kB 6*512kB (ME) 3*1024kB (ME) 1*2048kB (E) 834*4096kB (M) = 3438224kB
Node 0 hugepages_total=4 hugepages_free=4 hugepages_surp=0 hugepages_size=2048kB
13796 total pagecache pages
0 pages in swap cache
Free swap = 0kB
Total swap = 0kB
2097051 pages RAM
0 pages HighMem/MovableOnly
367867 pages reserved
Mem-Info:
active_anon:78 inactive_anon:1721 isolated_anon:0
active_file:3416 inactive_file:10225 isolated_file:0
unevictable:0 dirty:0 writeback:0
slab_reclaimable:8953 slab_unreclaimable:62916
mapped:2091 shmem:155 pagetables:347
sec_pagetables:0 bounce:0
kernel_misc_reclaimable:0
free:1583321 free_pcp:3105 free_cma:0
Node 0 active_anon:312kB inactive_anon:6884kB active_file:13664kB inactive_file:40900kB unevictable:0kB isolated(anon):0kB isolated(file):0kB mapped:8364kB dirty:0kB writeback:0kB shmem:620kB writeback_tmp:0kB kernel_stack:3584kB pagetables:1388kB sec_pagetables:0kB all_unreclaimable? no
Node 0 DMA free:15360kB boost:0kB min:20kB low:32kB high:44kB reserved_highatomic:0KB active_anon:0kB inactive_anon:0kB active_file:0kB inactive_file:0kB unevictable:0kB writepending:0kB present:15992kB managed:15360kB mlocked:0kB bounce:0kB free_pcp:0kB local_pcp:0kB free_cma:0kB
lowmem_reserve[]: 0 2812 6735 6735
Node 0 DMA32 free:2879700kB boost:0kB min:4380kB low:7256kB high:10132kB reserved_highatomic:0KB active_anon:0kB inactive_anon:0kB active_file:0kB inactive_file:0kB unevictable:0kB writepending:0kB present:3129332kB managed:2883248kB mlocked:0kB bounce:0kB free_pcp:3548kB local_pcp:3484kB free_cma:0kB
lowmem_reserve[]: 0 0 3923 3923
Node 0 Normal free:3438224kB boost:0kB min:6112kB low:10128kB high:14144kB reserved_highatomic:0KB active_anon:312kB inactive_anon:6884kB active_file:13664kB inactive_file:40900kB unevictable:0kB writepending:0kB present:5242880kB managed:4018128kB mlocked:0kB bounce:0kB free_pcp:8872kB local_pcp:4124kB free_cma:0kB
lowmem_reserve[]: 0 0 0 0
Node 0 DMA: 0*4kB 0*8kB 0*16kB 0*32kB 0*64kB 0*128kB 0*256kB 0*512kB 1*1024kB (U) 1*2048kB (M) 3*4096kB (M) = 15360kB
Node 0 DMA32: 3*4kB (M) 1*8kB (M) 2*16kB (M) 3*32kB (M) 3*64kB (M) 3*128kB (M) 2*256kB (M) 2*512kB (M) 2*1024kB (M) 2*2048kB (M) 701*4096kB (M) = 2879700kB
Node 0 Normal: 486*4kB (UME) 767*8kB (UE) 318*16kB (UME) 3*32kB (M) 3*64kB (UM) 4*128kB (UME) 0*256kB 6*512kB (ME) 3*1024kB (ME) 1*2048kB (E) 834*4096kB (M) = 3438224kB
Node 0 hugepages_total=4 hugepages_free=4 hugepages_surp=0 hugepages_size=2048kB
13796 total pagecache pages
0 pages in swap cache
Free swap = 0kB
Total swap = 0kB
2097051 pages RAM
0 pages HighMem/MovableOnly
367867 pages reserved
Mem-Info:
active_anon:78 inactive_anon:1721 isolated_anon:0
active_file:3416 inactive_file:10225 isolated_file:0
unevictable:0 dirty:0 writeback:0
slab_reclaimable:8953 slab_unreclaimable:62916
mapped:2091 shmem:155 pagetables:347
sec_pagetables:0 bounce:0
kernel_misc_reclaimable:0
free:1583321 free_pcp:3105 free_cma:0
Node 0 active_anon:312kB inactive_anon:6884kB active_file:13664kB inactive_file:40900kB unevictable:0kB isolated(anon):0kB isolated(file):0kB mapped:8364kB dirty:0kB writeback:0kB shmem:620kB writeback_tmp:0kB kernel_stack:3584kB pagetables:1388kB sec_pagetables:0kB all_unreclaimable? no
Node 0 DMA free:15360kB boost:0kB min:20kB low:32kB high:44kB reserved_highatomic:0KB active_anon:0kB inactive_anon:0kB active_file:0kB inactive_file:0kB unevictable:0kB writepending:0kB present:15992kB managed:15360kB mlocked:0kB bounce:0kB free_pcp:0kB local_pcp:0kB free_cma:0kB
lowmem_reserve[]: 0 2812 6735 6735
Node 0 DMA32 free:2879700kB boost:0kB min:4380kB low:7256kB high:10132kB reserved_highatomic:0KB active_anon:0kB inactive_anon:0kB active_file:0kB inactive_file:0kB unevictable:0kB writepending:0kB present:3129332kB managed:2883248kB mlocked:0kB bounce:0kB free_pcp:3548kB local_pcp:64kB free_cma:0kB
lowmem_reserve[]: 0 0 3923 3923
Node 0 Normal free:3438224kB boost:0kB min:6112kB low:10128kB high:14144kB reserved_highatomic:0KB active_anon:312kB inactive_anon:6884kB active_file:13664kB inactive_file:40900kB unevictable:0kB writepending:0kB present:5242880kB managed:4018128kB mlocked:0kB bounce:0kB free_pcp:8872kB local_pcp:4748kB free_cma:0kB
lowmem_reserve[]: 0 0 0 0
Node 0 DMA: 0*4kB 0*8kB 0*16kB 0*32kB 0*64kB 0*128kB 0*256kB 0*512kB 1*1024kB (U) 1*2048kB (M) 3*4096kB (M) = 15360kB
Node 0 DMA32: 3*4kB (M) 1*8kB (M) 2*16kB (M) 3*32kB (M) 3*64kB (M) 3*128kB (M) 2*256kB (M) 2*512kB (M) 2*1024kB (M) 2*2048kB (M) 701*4096kB (M) = 2879700kB
Node 0 Normal: 486*4kB (UME) 767*8kB (UE) 318*16kB (UME) 3*32kB (M) 3*64kB (UM) 4*128kB (UME) 0*256kB 6*512kB (ME) 3*1024kB (ME) 1*2048kB (E) 834*4096kB (M) = 3438224kB
Node 0 hugepages_total=4 hugepages_free=4 hugepages_surp=0 hugepages_size=2048kB
13796 total pagecache pages
0 pages in swap cache
Free swap = 0kB
Total swap = 0kB
2097051 pages RAM
0 pages HighMem/MovableOnly
367867 pages reserved
Mem-Info:
active_anon:78 inactive_anon:1721 isolated_anon:0
active_file:3416 inactive_file:10225 isolated_file:0
unevictable:0 dirty:0 writeback:0
slab_reclaimable:8953 slab_unreclaimable:62916
mapped:2091 shmem:155 pagetables:347
sec_pagetables:0 bounce:0
kernel_misc_reclaimable:0
free:1583321 free_pcp:3105 free_cma:0
Node 0 active_anon:312kB inactive_anon:6884kB active_file:13664kB inactive_file:40900kB unevictable:0kB isolated(anon):0kB isolated(file):0kB mapped:8364kB dirty:0kB writeback:0kB shmem:620kB writeback_tmp:0kB kernel_stack:3584kB pagetables:1388kB sec_pagetables:0kB all_unreclaimable? no
Node 0 DMA free:15360kB boost:0kB min:20kB low:32kB high:44kB reserved_highatomic:0KB active_anon:0kB inactive_anon:0kB active_file:0kB inactive_file:0kB unevictable:0kB writepending:0kB present:15992kB managed:15360kB mlocked:0kB bounce:0kB free_pcp:0kB local_pcp:0kB free_cma:0kB
lowmem_reserve[]: 0 2812 6735 6735
Node 0 DMA32 free:2879700kB boost:0kB min:4380kB low:7256kB high:10132kB reserved_highatomic:0KB active_anon:0kB inactive_anon:0kB active_file:0kB inactive_file:0kB unevictable:0kB writepending:0kB present:3129332kB managed:2883248kB mlocked:0kB bounce:0kB free_pcp:3548kB local_pcp:3484kB free_cma:0kB
lowmem_reserve[]: 0 0 3923 3923
Node 0 Normal free:3438224kB boost:0kB min:6112kB low:10128kB high:14144kB reserved_highatomic:0KB active_anon:312kB inactive_anon:6884kB active_file:13664kB inactive_file:40900kB unevictable:0kB writepending:0kB present:5242880kB managed:4018128kB mlocked:0kB bounce:0kB free_pcp:8872kB local_pcp:4124kB free_cma:0kB
lowmem_reserve[]: 0 0 0 0
Node 0 DMA: 0*4kB 0*8kB 0*16kB 0*32kB 0*64kB 0*128kB 0*256kB 0*512kB 1*1024kB (U) 1*2048kB (M) 3*4096kB (M) = 15360kB
Node 0 DMA32: 3*4kB (M) 1*8kB (M) 2*16kB (M) 3*32kB (M) 3*64kB (M) 3*128kB (M) 2*256kB (M) 2*512kB (M) 2*1024kB (M) 2*2048kB (M) 701*4096kB (M) = 2879700kB
Node 0 Normal: 486*4kB (UME) 767*8kB (UE) 318*16kB (UME) 3*32kB (M) 3*64kB (UM) 4*128kB (UME) 0*256kB 6*512kB (ME) 3*1024kB (ME) 1*2048kB (E) 834*4096kB (M) = 3438224kB
Node 0 hugepages_total=4 hugepages_free=4 hugepages_surp=0 hugepages_size=2048kB
13796 total pagecache pages
0 pages in swap cache
Free swap = 0kB
Total swap = 0kB
2097051 pages RAM
0 pages HighMem/MovableOnly
367867 pages reserved
Mem-Info:
active_anon:78 inactive_anon:1721 isolated_anon:0
active_file:3416 inactive_file:10225 isolated_file:0
unevictable:0 dirty:0 writeback:0
slab_reclaimable:8953 slab_unreclaimable:62916
mapped:2091 shmem:155 pagetables:347
sec_pagetables:0 bounce:0
kernel_misc_reclaimable:0
free:1583321 free_pcp:3105 free_cma:0
Node 0 active_anon:312kB inactive_anon:6884kB active_file:13664kB inactive_file:40900kB unevictable:0kB isolated(anon):0kB isolated(file):0kB mapped:8364kB dirty:0kB writeback:0kB shmem:620kB writeback_tmp:0kB kernel_stack:3584kB pagetables:1388kB sec_pagetables:0kB all_unreclaimable? no
Node 0 DMA free:15360kB boost:0kB min:20kB low:32kB high:44kB reserved_highatomic:0KB active_anon:0kB inactive_anon:0kB active_file:0kB inactive_file:0kB unevictable:0kB writepending:0kB present:15992kB managed:15360kB mlocked:0kB bounce:0kB free_pcp:0kB local_pcp:0kB free_cma:0kB
lowmem_reserve[]: 0 2812 6735 6735
Node 0 DMA32 free:2879700kB boost:0kB min:4380kB low:7256kB high:10132kB reserved_highatomic:0KB active_anon:0kB inactive_anon:0kB active_file:0kB inactive_file:0kB unevictable:0kB writepending:0kB present:3129332kB managed:2883248kB mlocked:0kB bounce:0kB free_pcp:3548kB local_pcp:64kB free_cma:0kB
lowmem_reserve[]: 0 0 3923 3923
Node 0 Normal free:3438224kB boost:0kB min:6112kB low:10128kB high:14144kB reserved_highatomic:0KB active_anon:312kB inactive_anon:6884kB active_file:13664kB inactive_file:40900kB unevictable:0kB writepending:0kB present:5242880kB managed:4018128kB mlocked:0kB bounce:0kB free_pcp:8872kB local_pcp:4748kB free_cma:0kB
lowmem_reserve[]: 0 0 0 0
Node 0 DMA: 0*4kB 0*8kB 0*16kB 0*32kB 0*64kB 0*128kB 0*256kB 0*512kB 1*1024kB (U) 1*2048kB (M) 3*4096kB (M) = 15360kB
Node 0 DMA32: 3*4kB (M) 1*8kB (M) 2*16kB (M) 3*32kB (M) 3*64kB (M) 3*128kB (M) 2*256kB (M) 2*512kB (M) 2*1024kB (M) 2*2048kB (M) 701*4096kB (M) = 2879700kB
Node 0 Normal: 486*4kB (UME) 767*8kB (UE) 318*16kB (UME) 3*32kB (M) 3*64kB (UM) 4*128kB (UME) 0*256kB 6*512kB (ME) 3*1024kB (ME) 1*2048kB (E) 834*4096kB (M) = 3438224kB
Node 0 hugepages_total=4 hugepages_free=4 hugepages_surp=0 hugepages_size=2048kB
13796 total pagecache pages
0 pages in swap cache
Free swap = 0kB
Total swap = 0kB
2097051 pages RAM
0 pages HighMem/MovableOnly
367867 pages reserved
Mem-Info:
active_anon:78 inactive_anon:1721 isolated_anon:0
active_file:3416 inactive_file:10225 isolated_file:0
unevictable:0 dirty:0 writeback:0
slab_reclaimable:8953 slab_unreclaimable:62916
mapped:2091 shmem:155 pagetables:347
sec_pagetables:0 bounce:0
kernel_misc_reclaimable:0
free:1583321 free_pcp:3105 free_cma:0
Node 0 active_anon:312kB inactive_anon:6884kB active_file:13664kB inactive_file:40900kB unevictable:0kB isolated(anon):0kB isolated(file):0kB mapped:8364kB dirty:0kB writeback:0kB shmem:620kB writeback_tmp:0kB kernel_stack:3584kB pagetables:1388kB sec_pagetables:0kB all_unreclaimable? no
Node 0 DMA free:15360kB boost:0kB min:20kB low:32kB high:44kB reserved_highatomic:0KB active_anon:0kB inactive_anon:0kB active_file:0kB inactive_file:0kB unevictable:0kB writepending:0kB present:15992kB managed:15360kB mlocked:0kB bounce:0kB free_pcp:0kB local_pcp:0kB free_cma:0kB
lowmem_reserve[]: 0 2812 6735 6735
Node 0 DMA32 free:2879700kB boost:0kB min:4380kB low:7256kB high:10132kB reserved_highatomic:0KB active_anon:0kB inactive_anon:0kB active_file:0kB inactive_file:0kB unevictable:0kB writepending:0kB present:3129332kB managed:2883248kB mlocked:0kB bounce:0kB free_pcp:3548kB local_pcp:3484kB free_cma:0kB
lowmem_reserve[]: 0 0 3923 3923
Node 0 Normal free:3438224kB boost:0kB min:6112kB low:10128kB high:14144kB reserved_highatomic:0KB active_anon:312kB inactive_anon:6884kB active_file:13664kB inactive_file:40900kB unevictable:0kB writepending:0kB present:5242880kB managed:4018128kB mlocked:0kB bounce:0kB free_pcp:8872kB local_pcp:4124kB free_cma:0kB
lowmem_reserve[]: 0 0 0 0
Node 0 DMA: 0*4kB 0*8kB 0*16kB 0*32kB 0*64kB 0*128kB 0*256kB 0*512kB 1*1024kB (U) 1*2048kB (M) 3*4096kB (M) = 15360kB
Node 0 DMA32: 3*4kB (M) 1*8kB (M) 2*16kB (M) 3*32kB (M) 3*64kB (M) 3*128kB (M) 2*256kB (M) 2*512kB (M) 2*1024kB (M) 2*2048kB (M) 701*4096kB (M) = 2879700kB
Node 0 Normal: 486*4kB (UME) 767*8kB (UE) 318*16kB (UME) 3*32kB (M) 3*64kB (UM) 4*128kB (UME) 0*256kB 6*512kB (ME) 3*1024kB (ME) 1*2048kB (E) 834*4096kB (M) = 3438224kB
Node 0 hugepages_total=4 hugepages_free=4 hugepages_surp=0 hugepages_size=2048kB
13796 total pagecache pages
0 pages in swap cache
Free swap = 0kB
Total swap = 0kB
2097051 pages RAM
0 pages HighMem/MovableOnly
367867 pages reserved
Mem-Info:
active_anon:78 inactive_anon:1721 isolated_anon:0
active_file:3416 inactive_file:10225 isolated_file:0
unevictable:0 dirty:0 writeback:0
slab_reclaimable:8953 slab_unreclaimable:62916
mapped:2091 shmem:155 pagetables:347
sec_pagetables:0 bounce:0
kernel_misc_reclaimable:0
free:1583321 free_pcp:3105 free_cma:0
Node 0 active_anon:312kB inactive_anon:6884kB active_file:13664kB inactive_file:40900kB unevictable:0kB isolated(anon):0kB isolated(file):0kB mapped:8364kB dirty:0kB writeback:0kB shmem:620kB writeback_tmp:0kB kernel_stack:3584kB pagetables:1388kB sec_pagetables:0kB all_unreclaimable? no
Node 0 DMA free:15360kB boost:0kB min:20kB low:32kB high:44kB reserved_highatomic:0KB active_anon:0kB inactive_anon:0kB active_file:0kB inactive_file:0kB unevictable:0kB writepending:0kB present:15992kB managed:15360kB mlocked:0kB bounce:0kB free_pcp:0kB local_pcp:0kB free_cma:0kB
lowmem_reserve[]: 0 2812 6735 6735
Node 0 DMA32 free:2879700kB boost:0kB min:4380kB low:7256kB high:10132kB reserved_highatomic:0KB active_anon:0kB inactive_anon:0kB active_file:0kB inactive_file:0kB unevictable:0kB writepending:0kB present:3129332kB managed:2883248kB mlocked:0kB bounce:0kB free_pcp:3548kB local_pcp:64kB free_cma:0kB
lowmem_reserve[]: 0 0 3923 3923
Node 0 Normal free:3438224kB boost:0kB min:6112kB low:10128kB high:14144kB reserved_highatomic:0KB active_anon:312kB inactive_anon:6884kB active_file:13664kB inactive_file:40900kB unevictable:0kB writepending:0kB present:5242880kB managed:4018128kB mlocked:0kB bounce:0kB free_pcp:8872kB local_pcp:4748kB free_cma:0kB
lowmem_reserve[]: 0 0 0 0
Node 0 DMA: 0*4kB 0*8kB 0*16kB 0*32kB 0*64kB 0*128kB 0*256kB 0*512kB 1*1024kB (U) 1*2048kB (M) 3*4096kB (M) = 15360kB
Node 0 DMA32: 3*4kB (M) 1*8kB (M) 2*16kB (M) 3*32kB (M) 3*64kB (M) 3*128kB (M) 2*256kB (M) 2*512kB (M) 2*1024kB (M) 2*2048kB (M) 701*4096kB (M) = 2879700kB
Node 0 Normal: 486*4kB (UME) 767*8kB (UE) 318*16kB (UME) 3*32kB (M) 3*64kB (UM) 4*128kB (UME) 0*256kB 6*512kB (ME) 3*1024kB (ME) 1*2048kB (E) 834*4096kB (M) = 3438224kB
Node 0 hugepages_total=4 hugepages_free=4 hugepages_surp=0 hugepages_size=2048kB
13796 total pagecache pages
0 pages in swap cache
Free swap = 0kB
Total swap = 0kB
2097051 pages RAM
0 pages HighMem/MovableOnly
367867 pages reserved
Mem-Info:
active_anon:78 inactive_anon:1721 isolated_anon:0
active_file:3416 inactive_file:10225 isolated_file:0
unevictable:0 dirty:0 writeback:0
slab_reclaimable:8953 slab_unreclaimable:62916
mapped:2091 shmem:155 pagetables:347
sec_pagetables:0 bounce:0
kernel_misc_reclaimable:0
free:1583321 free_pcp:3105 free_cma:0
Node 0 active_anon:312kB inactive_anon:6884kB active_file:13664kB inactive_file:40900kB unevictable:0kB isolated(anon):0kB isolated(file):0kB mapped:8364kB dirty:0kB writeback:0kB shmem:620kB writeback_tmp:0kB kernel_stack:3584kB pagetables:1388kB sec_pagetables:0kB all_unreclaimable? no
Node 0 DMA free:15360kB boost:0kB min:20kB low:32kB high:44kB reserved_highatomic:0KB active_anon:0kB inactive_anon:0kB active_file:0kB inactive_file:0kB unevictable:0kB writepending:0kB present:15992kB managed:15360kB mlocked:0kB bounce:0kB free_pcp:0kB local_pcp:0kB free_cma:0kB
lowmem_reserve[]: 0 2812 6735 6735
Node 0 DMA32 free:2879700kB boost:0kB min:4380kB low:7256kB high:10132kB reserved_highatomic:0KB active_anon:0kB inactive_anon:0kB active_file:0kB inactive_file:0kB unevictable:0kB writepending:0kB present:3129332kB managed:2883248kB mlocked:0kB bounce:0kB free_pcp:3548kB local_pcp:3484kB free_cma:0kB
lowmem_reserve[]: 0 0 3923 3923
Node 0 Normal free:3438224kB boost:0kB min:6112kB low:10128kB high:14144kB reserved_highatomic:0KB active_anon:312kB inactive_anon:6884kB active_file:13664kB inactive_file:40900kB unevictable:0kB writepending:0kB present:5242880kB managed:4018128kB mlocked:0kB bounce:0kB free_pcp:8872kB local_pcp:4124kB free_cma:0kB
lowmem_reserve[]: 0 0 0 0
Node 0 DMA: 0*4kB 0*8kB 0*16kB 0*32kB 0*64kB 0*128kB 0*256kB 0*512kB 1*1024kB (U) 1*2048kB (M) 3*4096kB (M) = 15360kB
Node 0 DMA32: 3*4kB (M) 1*8kB (M) 2*16kB (M) 3*32kB (M) 3*64kB (M) 3*128kB (M) 2*256kB (M) 2*512kB (M) 2*1024kB (M) 2*2048kB (M) 701*4096kB (M) = 2879700kB
Node 0 Normal: 486*4kB (UME) 767*8kB (UE) 318*16kB (UME) 3*32kB (M) 3*64kB (UM) 4*128kB (UME) 0*256kB 6*512kB (ME) 3*1024kB (ME) 1*2048kB (E) 834*4096kB (M) = 3438224kB
Node 0 hugepages_total=4 hugepages_free=4 hugepages_surp=0 hugepages_size=2048kB
13796 total pagecache pages
0 pages in swap cache
Free swap = 0kB
Total swap = 0kB
2097051 pages RAM
0 pages HighMem/MovableOnly
367867 pages reserved
Mem-Info:
active_anon:78 inactive_anon:1721 isolated_anon:0
active_file:3416 inactive_file:10225 isolated_file:0
unevictable:0 dirty:0 writeback:0
slab_reclaimable:8953 slab_unreclaimable:62916
mapped:2091 shmem:155 pagetables:347
sec_pagetables:0 bounce:0
kernel_misc_reclaimable:0
free:1583321 free_pcp:3105 free_cma:0
Node 0 active_anon:312kB inactive_anon:6884kB active_file:13664kB inactive_file:40900kB unevictable:0kB isolated(anon):0kB isolated(file):0kB mapped:8364kB dirty:0kB writeback:0kB shmem:620kB writeback_tmp:0kB kernel_stack:3584kB pagetables:1388kB sec_pagetables:0kB all_unreclaimable? no
Node 0 DMA free:15360kB boost:0kB min:20kB low:32kB high:44kB reserved_highatomic:0KB active_anon:0kB inactive_anon:0kB active_file:0kB inactive_file:0kB unevictable:0kB writepending:0kB present:15992kB managed:15360kB mlocked:0kB bounce:0kB free_pcp:0kB local_pcp:0kB free_cma:0kB
lowmem_reserve[]: 0 2812 6735 6735
Node 0 DMA32 free:2879700kB boost:0kB min:4380kB low:7256kB high:10132kB reserved_highatomic:0KB active_anon:0kB inactive_anon:0kB active_file:0kB inactive_file:0kB unevictable:0kB writepending:0kB present:3129332kB managed:2883248kB mlocked:0kB bounce:0kB free_pcp:3548kB local_pcp:64kB free_cma:0kB
lowmem_reserve[]: 0 0 3923 3923
Node 0 Normal free:3438224kB boost:0kB min:6112kB low:10128kB high:14144kB reserved_highatomic:0KB active_anon:312kB inactive_anon:6884kB active_file:13664kB inactive_file:40900kB unevictable:0kB writepending:0kB present:5242880kB managed:4018128kB mlocked:0kB bounce:0kB free_pcp:8872kB local_pcp:4748kB free_cma:0kB
lowmem_reserve[]: 0 0 0 0
Node 0 DMA: 0*4kB 0*8kB 0*16kB 0*32kB 0*64kB 0*128kB 0*256kB 0*512kB 1*1024kB (U) 1*2048kB (M) 3*4096kB (M) = 15360kB
Node 0 DMA32: 3*4kB (M) 1*8kB (M) 2*16kB (M) 3*32kB (M) 3*64kB (M) 3*128kB (M) 2*256kB (M) 2*512kB (M) 2*1024kB (M) 2*2048kB (M) 701*4096kB (M) = 2879700kB
Node 0 Normal: 486*4kB (UME) 767*8kB (UE) 318*16kB (UME) 3*32kB (M) 3*64kB (UM) 4*128kB (UME) 0*256kB 6*512kB (ME) 3*1024kB (ME) 1*2048kB (E) 834*4096kB (M) = 3438224kB
Node 0 hugepages_total=4 hugepages_free=4 hugepages_surp=0 hugepages_size=2048kB
13796 total pagecache pages
0 pages in swap cache
Free swap = 0kB
Total swap = 0kB
2097051 pages RAM
0 pages HighMem/MovableOnly
367867 pages reserved
Mem-Info:
active_anon:78 inactive_anon:1721 isolated_anon:0
active_file:3416 inactive_file:10225 isolated_file:0
unevictable:0 dirty:0 writeback:0
slab_reclaimable:8953 slab_unreclaimable:62916
mapped:2091 shmem:155 pagetables:347
sec_pagetables:0 bounce:0
kernel_misc_reclaimable:0
free:1583321 free_pcp:3105 free_cma:0
Node 0 active_anon:312kB inactive_anon:6884kB active_file:13664kB inactive_file:40900kB unevictable:0kB isolated(anon):0kB isolated(file):0kB mapped:8364kB dirty:0kB writeback:0kB shmem:620kB writeback_tmp:0kB kernel_stack:3584kB pagetables:1388kB sec_pagetables:0kB all_unreclaimable? no
Node 0 DMA free:15360kB boost:0kB min:20kB low:32kB high:44kB reserved_highatomic:0KB active_anon:0kB inactive_anon:0kB active_file:0kB inactive_file:0kB unevictable:0kB writepending:0kB present:15992kB managed:15360kB mlocked:0kB bounce:0kB free_pcp:0kB local_pcp:0kB free_cma:0kB
lowmem_reserve[]: 0 2812 6735 6735
Node 0 DMA32 free:2879700kB boost:0kB min:4380kB low:7256kB high:10132kB reserved_highatomic:0KB active_anon:0kB inactive_anon:0kB active_file:0kB inactive_file:0kB unevictable:0kB writepending:0kB present:3129332kB managed:2883248kB mlocked:0kB bounce:0kB free_pcp:3548kB local_pcp:3484kB free_cma:0kB
lowmem_reserve[]: 0 0 3923 3923
Node 0 Normal free:3438224kB boost:0kB min:6112kB low:10128kB high:14144kB reserved_highatomic:0KB active_anon:312kB inactive_anon:6884kB active_file:13664kB inactive_file:40900kB unevictable:0kB writepending:0kB present:5242880kB managed:4018128kB mlocked:0kB bounce:0kB free_pcp:8872kB local_pcp:4124kB free_cma:0kB
lowmem_reserve[]: 0 0 0 0
Node 0 DMA: 0*4kB 0*8kB 0*16kB 0*32kB 0*64kB 0*128kB 0*256kB 0*512kB 1*1024kB (U) 1*2048kB (M) 3*4096kB (M) = 15360kB
Node 0 DMA32: 3*4kB (M) 1*8kB (M) 2*16kB (M) 3*32kB (M) 3*64kB (M) 3*128kB (M) 2*256kB (M) 2*512kB (M) 2*1024kB (M) 2*2048kB (M) 701*4096kB (M) = 2879700kB
Node 0 Normal: 486*4kB (UME) 767*8kB (UE) 318*16kB (UME) 3*32kB (M) 3*64kB (UM) 4*128kB (UME) 0*256kB 6*512kB (ME) 3*1024kB (ME) 1*2048kB (E) 834*4096kB (M) = 3438224kB
Node 0 hugepages_total=4 hugepages_free=4 hugepages_surp=0 hugepages_size=2048kB
13796 total pagecache pages
0 pages in swap cache
Free swap = 0kB
Total swap = 0kB
2097051 pages RAM
0 pages HighMem/MovableOnly
367867 pages reserved
Mem-Info:
active_anon:78 inactive_anon:1721 isolated_anon:0
active_file:3416 inactive_file:10225 isolated_file:0
unevictable:0 dirty:0 writeback:0
slab_reclaimable:8953 slab_unreclaimable:62916
mapped:2091 shmem:155 pagetables:347
sec_pagetables:0 bounce:0
kernel_misc_reclaimable:0
free:1583321 free_pcp:3105 free_cma:0
Node 0 active_anon:312kB inactive_anon:6884kB active_file:13664kB inactive_file:40900kB unevictable:0kB isolated(anon):0kB isolated(file):0kB mapped:8364kB dirty:0kB writeback:0kB shmem:620kB writeback_tmp:0kB kernel_stack:3584kB pagetables:1388kB sec_pagetables:0kB all_unreclaimable? no
Node 0 DMA free:15360kB boost:0kB min:20kB low:32kB high:44kB reserved_highatomic:0KB active_anon:0kB inactive_anon:0kB active_file:0kB inactive_file:0kB unevictable:0kB writepending:0kB present:15992kB managed:15360kB mlocked:0kB bounce:0kB free_pcp:0kB local_pcp:0kB free_cma:0kB
lowmem_reserve[]: 0 2812 6735 6735
Node 0 DMA32 free:2879700kB boost:0kB min:4380kB low:7256kB high:10132kB reserved_highatomic:0KB active_anon:0kB inactive_anon:0kB active_file:0kB inactive_file:0kB unevictable:0kB writepending:0kB present:3129332kB managed:2883248kB mlocked:0kB bounce:0kB free_pcp:3548kB local_pcp:64kB free_cma:0kB
lowmem_reserve[]: 0 0 3923 3923
Node 0 Normal free:3438224kB boost:0kB min:6112kB low:10128kB high:14144kB reserved_highatomic:0KB active_anon:312kB inactive_anon:6884kB active_file:13664kB inactive_file:40900kB unevictable:0kB writepending:0kB present:5242880kB managed:4018128kB mlocked:0kB bounce:0kB free_pcp:8872kB local_pcp:4748kB free_cma:0kB
lowmem_reserve[]: 0 0 0 0
Node 0 DMA: 0*4kB 0*8kB 0*16kB 0*32kB 0*64kB 0*128kB 0*256kB 0*512kB 1*1024kB (U) 1*2048kB (M) 3*4096kB (M) = 15360kB
Node 0 DMA32: 3*4kB (M) 1*8kB (M) 2*16kB (M) 3*32kB (M) 3*64kB (M) 3*128kB (M) 2*256kB (M) 2*512kB (M) 2*1024kB (M) 2*2048kB (M) 701*4096kB (M) = 2879700kB
Node 0 Normal: 486*4kB (UME) 767*8kB (UE) 318*16kB (UME) 3*32kB (M) 3*64kB (UM) 4*128kB (UME) 0*256kB 6*512kB (ME) 3*1024kB (ME) 1*2048kB (E) 834*4096kB (M) = 3438224kB
Node 0 hugepages_total=4 hugepages_free=4 hugepages_surp=0 hugepages_size=2048kB
13796 total pagecache pages
0 pages in swap cache
Free swap = 0kB
Total swap = 0kB
2097051 pages RAM
0 pages HighMem/MovableOnly
367867 pages reserved
Mem-Info:
active_anon:78 inactive_anon:1721 isolated_anon:0
active_file:3416 inactive_file:10225 isolated_file:0
unevictable:0 dirty:0 writeback:0
slab_reclaimable:8953 slab_unreclaimable:62916
mapped:2091 shmem:155 pagetables:347
sec_pagetables:0 bounce:0
kernel_misc_reclaimable:0
free:1583321 free_pcp:3105 free_cma:0
Node 0 active_anon:312kB inactive_anon:6884kB active_file:13664kB inactive_file:40900kB unevictable:0kB isolated(anon):0kB isolated(file):0kB mapped:8364kB dirty:0kB writeback:0kB shmem:620kB writeback_tmp:0kB kernel_stack:3584kB pagetables:1388kB sec_pagetables:0kB all_unreclaimable? no
Node 0 DMA free:15360kB boost:0kB min:20kB low:32kB high:44kB reserved_highatomic:0KB active_anon:0kB inactive_anon:0kB active_file:0kB inactive_file:0kB unevictable:0kB writepending:0kB present:15992kB managed:15360kB mlocked:0kB bounce:0kB free_pcp:0kB local_pcp:0kB free_cma:0kB
lowmem_reserve[]: 0 2812 6735 6735
Node 0 DMA32 free:2879700kB boost:0kB min:4380kB low:7256kB high:10132kB reserved_highatomic:0KB active_anon:0kB inactive_anon:0kB active_file:0kB inactive_file:0kB unevictable:0kB writepending:0kB present:3129332kB managed:2883248kB mlocked:0kB bounce:0kB free_pcp:3548kB local_pcp:3484kB free_cma:0kB
lowmem_reserve[]: 0 0 3923 3923
Node 0 Normal free:3438224kB boost:0kB min:6112kB low:10128kB high:14144kB reserved_highatomic:0KB active_anon:312kB inactive_anon:6884kB active_file:13664kB inactive_file:40900kB unevictable:0kB writepending:0kB present:5242880kB managed:4018128kB mlocked:0kB bounce:0kB free_pcp:8872kB local_pcp:4124kB free_cma:0kB
lowmem_reserve[]: 0 0 0 0
Node 0 DMA: 0*4kB 0*8kB 0*16kB 0*32kB 0*64kB 0*128kB 0*256kB 0*512kB 1*1024kB (U) 1*2048kB (M) 3*4096kB (M) = 15360kB
Node 0 DMA32: 3*4kB (M) 1*8kB (M) 2*16kB (M) 3*32kB (M) 3*64kB (M) 3*128kB (M) 2*256kB (M) 2*512kB (M) 2*1024kB (M) 2*2048kB (M) 701*4096kB (M) = 2879700kB
Node 0 Normal: 486*4kB (UME) 767*8kB (UE) 318*16kB (UME) 3*32kB (M) 3*64kB (UM) 4*128kB (UME) 0*256kB 6*512kB (ME) 3*1024kB (ME) 1*2048kB (E) 834*4096kB (M) = 3438224kB
Node 0 hugepages_total=4 hugepages_free=4 hugepages_surp=0 hugepages_size=2048kB
13796 total pagecache pages
0 pages in swap cache
Free swap = 0kB
Total swap = 0kB
2097051 pages RAM
0 pages HighMem/MovableOnly
367867 pages reserved
Mem-Info:
active_anon:78 inactive_anon:1721 isolated_anon:0
active_file:3416 inactive_file:10225 isolated_file:0
unevictable:0 dirty:0 writeback:0
slab_reclaimable:8953 slab_unreclaimable:62916
mapped:2091 shmem:155 pagetables:347
sec_pagetables:0 bounce:0
kernel_misc_reclaimable:0
free:1583321 free_pcp:3105 free_cma:0
Node 0 active_anon:312kB inactive_anon:6884kB active_file:13664kB inactive_file:40900kB unevictable:0kB isolated(anon):0kB isolated(file):0kB mapped:8364kB dirty:0kB writeback:0kB shmem:620kB writeback_tmp:0kB kernel_stack:3584kB pagetables:1388kB sec_pagetables:0kB all_unreclaimable? no
Node 0 DMA free:15360kB boost:0kB min:20kB low:32kB high:44kB reserved_highatomic:0KB active_anon:0kB inactive_anon:0kB active_file:0kB inactive_file:0kB unevictable:0kB writepending:0kB present:15992kB managed:15360kB mlocked:0kB bounce:0kB free_pcp:0kB local_pcp:0kB free_cma:0kB
lowmem_reserve[]: 0 2812 6735 6735
Node 0 DMA32 free:2879700kB boost:0kB min:4380kB low:7256kB high:10132kB reserved_highatomic:0KB active_anon:0kB inactive_anon:0kB active_file:0kB inactive_file:0kB unevictable:0kB writepending:0kB present:3129332kB managed:2883248kB mlocked:0kB bounce:0kB free_pcp:3548kB local_pcp:64kB free_cma:0kB
lowmem_reserve[]: 0 0 3923 3923
Node 0 Normal free:3438224kB boost:0kB min:6112kB low:10128kB high:14144kB reserved_highatomic:0KB active_anon:312kB inactive_anon:6884kB active_file:13664kB inactive_file:40900kB unevictable:0kB writepending:0kB present:5242880kB managed:4018128kB mlocked:0kB bounce:0kB free_pcp:8872kB local_pcp:4748kB free_cma:0kB
lowmem_reserve[]: 0 0 0 0
Node 0 DMA: 0*4kB 0*8kB 0*16kB 0*32kB 0*64kB 0*128kB 0*256kB 0*512kB 1*1024kB (U) 1*2048kB (M) 3*4096kB (M) = 15360kB
Node 0 DMA32: 3*4kB (M) 1*8kB (M) 2*16kB (M) 3*32kB (M) 3*64kB (M) 3*128kB (M) 2*256kB (M) 2*512kB (M) 2*1024kB (M) 2*2048kB (M) 701*4096kB (M) = 2879700kB
Node 0 Normal: 486*4kB (UME) 767*8kB (UE) 318*16kB (UME) 3*32kB (M) 3*64kB (UM) 4*128kB (UME) 0*256kB 6*512kB (ME) 3*1024kB (ME) 1*2048kB (E) 834*4096kB (M) = 3438224kB
Node 0 hugepages_total=4 hugepages_free=4 hugepages_surp=0 hugepages_size=2048kB
13796 total pagecache pages
0 pages in swap cache
Free swap = 0kB
Total swap = 0kB
2097051 pages RAM
0 pages HighMem/MovableOnly
367867 pages reserved
Mem-Info:
active_anon:78 inactive_anon:1721 isolated_anon:0
active_file:3416 inactive_file:10225 isolated_file:0
unevictable:0 dirty:0 writeback:0
slab_reclaimable:8953 slab_unreclaimable:62916
mapped:2091 shmem:155 pagetables:347
sec_pagetables:0 bounce:0
kernel_misc_reclaimable:0
free:1583321 free_pcp:3105 free_cma:0
Node 0 active_anon:312kB inactive_anon:6884kB active_file:13664kB inactive_file:40900kB unevictable:0kB isolated(anon):0kB isolated(file):0kB mapped:8364kB dirty:0kB writeback:0kB shmem:620kB writeback_tmp:0kB kernel_stack:3584kB pagetables:1388kB sec_pagetables:0kB all_unreclaimable? no
Node 0 DMA free:15360kB boost:0kB min:20kB low:32kB high:44kB reserved_highatomic:0KB active_anon:0kB inactive_anon:0kB active_file:0kB inactive_file:0kB unevictable:0kB writepending:0kB present:15992kB managed:15360kB mlocked:0kB bounce:0kB free_pcp:0kB local_pcp:0kB free_cma:0kB
lowmem_reserve[]: 0 2812 6735 6735
Node 0 DMA32 free:2879700kB boost:0kB min:4380kB low:7256kB high:10132kB reserved_highatomic:0KB active_anon:0kB inactive_anon:0kB active_file:0kB inactive_file:0kB unevictable:0kB writepending:0kB present:3129332kB managed:2883248kB mlocked:0kB bounce:0kB free_pcp:3548kB local_pcp:3484kB free_cma:0kB
lowmem_reserve[]: 0 0 3923 3923
Node 0 Normal free:3438224kB boost:0kB min:6112kB low:10128kB high:14144kB reserved_highatomic:0KB active_anon:312kB inactive_anon:6884kB active_file:13664kB inactive_file:40900kB unevictable:0kB writepending:0kB present:5242880kB managed:4018128kB mlocked:0kB bounce:0kB free_pcp:8872kB local_pcp:4124kB free_cma:0kB
lowmem_reserve[]: 0 0 0 0
Node 0 DMA: 0*4kB 0*8kB 0*16kB 0*32kB 0*64kB 0*128kB 0*256kB 0*512kB 1*1024kB (U) 1*2048kB (M) 3*4096kB (M) = 15360kB
Node 0 DMA32: 3*4kB (M) 1*8kB (M) 2*16kB (M) 3*32kB (M) 3*64kB (M) 3*128kB (M) 2*256kB (M) 2*512kB (M) 2*1024kB (M) 2*2048kB (M) 701*4096kB (M) = 2879700kB
Node 0 Normal: 486*4kB (UME) 767*8kB (UE) 318*16kB (UME) 3*32kB (M) 3*64kB (UM) 4*128kB (UME) 0*256kB 6*512kB (ME) 3*1024kB (ME) 1*2048kB (E) 834*4096kB (M) = 3438224kB
Node 0 hugepages_total=4 hugepages_free=4 hugepages_surp=0 hugepages_size=2048kB
13796 total pagecache pages
0 pages in swap cache
Free swap = 0kB
Total swap = 0kB
2097051 pages RAM
0 pages HighMem/MovableOnly
367867 pages reserved
Mem-Info:
active_anon:78 inactive_anon:1721 isolated_anon:0
active_file:3416 inactive_file:10225 isolated_file:0
unevictable:0 dirty:0 writeback:0
slab_reclaimable:8953 slab_unreclaimable:62916
mapped:2091 shmem:155 pagetables:347
sec_pagetables:0 bounce:0
kernel_misc_reclaimable:0
free:1583321 free_pcp:3105 free_cma:0
Node 0 active_anon:312kB inactive_anon:6884kB active_file:13664kB inactive_file:40900kB unevictable:0kB isolated(anon):0kB isolated(file):0kB mapped:8364kB dirty:0kB writeback:0kB shmem:620kB writeback_tmp:0kB kernel_stack:3584kB pagetables:1388kB sec_pagetables:0kB all_unreclaimable? no
Node 0 DMA free:15360kB boost:0kB min:20kB low:32kB high:44kB reserved_highatomic:0KB active_anon:0kB inactive_anon:0kB active_file:0kB inactive_file:0kB unevictable:0kB writepending:0kB present:15992kB managed:15360kB mlocked:0kB bounce:0kB free_pcp:0kB local_pcp:0kB free_cma:0kB
lowmem_reserve[]: 0 2812 6735 6735
Node 0 DMA32 free:2879700kB boost:0kB min:4380kB low:7256kB high:10132kB reserved_highatomic:0KB active_anon:0kB inactive_anon:0kB active_file:0kB inactive_file:0kB unevictable:0kB writepending:0kB present:3129332kB managed:2883248kB mlocked:0kB bounce:0kB free_pcp:3548kB local_pcp:64kB free_cma:0kB
lowmem_reserve[]: 0 0 3923 3923
Node 0 Normal free:3438224kB boost:0kB min:6112kB low:10128kB high:14144kB reserved_highatomic:0KB active_anon:312kB inactive_anon:6884kB active_file:13664kB inactive_file:40900kB unevictable:0kB writepending:0kB present:5242880kB managed:4018128kB mlocked:0kB bounce:0kB free_pcp:8872kB local_pcp:4748kB free_cma:0kB
lowmem_reserve[]: 0 0 0 0
Node 0 DMA: 0*4kB 0*8kB 0*16kB 0*32kB 0*64kB 0*128kB 0*256kB 0*512kB 1*1024kB (U) 1*2048kB (M) 3*4096kB (M) = 15360kB
Node 0 DMA32: 3*4kB (M) 1*8kB (M) 2*16kB (M) 3*32kB (M) 3*64kB (M) 3*128kB (M) 2*256kB (M) 2*512kB (M) 2*1024kB (M) 2*2048kB (M) 701*4096kB (M) = 2879700kB
Node 0 Normal: 486*4kB (UME) 767*8kB (UE) 318*16kB (UME) 3*32kB (M) 3*64kB (UM) 4*128kB (UME) 0*256kB 6*512kB (ME) 3*1024kB (ME) 1*2048kB (E) 834*4096kB (M) = 3438224kB
Node 0 hugepages_total=4 hugepages_free=4 hugepages_surp=0 hugepages_size=2048kB
13796 total pagecache pages
0 pages in swap cache
Free swap = 0kB
Total swap = 0kB
2097051 pages RAM
0 pages HighMem/MovableOnly
367867 pages reserved
Mem-Info:
active_anon:78 inactive_anon:1721 isolated_anon:0
---
This report is generated by a bot. It may contain errors.
See https://goo.gl/tpsmEJ for more information about syzbot.
syzbot engineers can be reached at syzkaller@googlegroups.com.
syzbot will keep track of this issue. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.
If the bug is already fixed, let syzbot know by replying with:
#syz fix: exact-commit-title
If you want syzbot to run the reproducer, reply with:
#syz test: git://repo/address.git branch-or-commit-hash
If you attach or paste a git patch, syzbot will apply it before testing.
If you want to overwrite bug's subsystems, reply with:
#syz set subsystems: new-subsystem
(See the list of subsystem names on the web dashboard)
If the bug is a duplicate of another bug, reply with:
#syz dup: exact-subject-of-another-report
If you want to undo deduplication, reply with:
#syz undup
^ permalink raw reply
* Re: [PATCH v3 1/1] backlight: hid_bl: Add VESA VCP HID backlight driver
From: Christophe JAILLET @ 2023-08-20 10:06 UTC (permalink / raw)
To: Julius Zint, Lee Jones, Daniel Thompson, Jingoo Han, Jiri Kosina,
Benjamin Tissoires
Cc: Helge Deller, Thomas Weißschuh, linux-kernel, dri-devel,
linux-input, linux-fbdev
In-Reply-To: <20230820094118.20521-2-julius@zint.sh>
Le 20/08/2023 à 11:41, Julius Zint a écrit :
> The HID spec defines the following Usage IDs (p. 345 ff):
>
> - Monitor Page (0x80) -> Monitor Control (0x01)
> - VESA Virtual Controls Page (0x82) -> Brightness (0x10)
>
> Apple made use of them in their Apple Studio Display and most likely on
> other external displays (LG UltraFine 5k, Pro Display XDR).
>
> The driver will work for any HID device with a report, where the
> application matches the Monitor Control Usage ID and:
>
> 1. An Input field in this report with the Brightness Usage ID (to get
> the current brightness)
> 2. A Feature field in this report with the Brightness Usage ID (to
> set the current brightness)
>
> This driver has been developed and tested with the Apple Studio Display.
> Here is a small excerpt from the decoded HID descriptor showing the
> feature field for setting the brightness:
>
> Usage Page (Monitor VESA VCP), ; Monitor VESA VPC (82h, monitor page)
> Usage (10h, Brightness),
> Logical Minimum (400),
> Logical Maximum (60000),
> Unit (Centimeter^-2 * Candela),
> Unit Exponent (14),
> Report Size (32),
> Report Count (1),
> Feature (Variable, Null State),
>
> The full HID descriptor dump is available as a comment in the source
> code.
>
> Signed-off-by: Julius Zint <julius@zint.sh>
> ---
[...]
> +static void hid_bl_remove(struct hid_device *hdev)
> +{
> + struct backlight_device *bl;
> + struct hid_bl_data *data;
> +
> + hid_dbg(hdev, "remove\n");
> + bl = hid_get_drvdata(hdev);
> + data = bl_get_data(bl);
> +
> + devm_backlight_device_unregister(&hdev->dev, bl);
Hi,
If this need to be called here, before the hid_() calls below, there
seems to be no real point in using devm_backlight_device_register() /
devm_backlight_device_unregister().
The non-devm_ version should be enough.
> + hid_hw_close(hdev);
> + hid_hw_stop(hdev);
> + hid_set_drvdata(hdev, NULL);
> + devm_kfree(&hdev->dev, data);
'data' is devm_kzalloc()'ed.
It is likely that this explicit devm_kfree() could be saved. It will be
freed by the framework.
> +}
[...]
> +static int hid_bl_probe(struct hid_device *hdev, const struct hid_device_id *id)
> +{
> + int ret;
> + struct hid_field *input_field;
> + struct hid_field *feature_field;
> + struct hid_bl_data *data;
> + struct backlight_properties props;
> + struct backlight_device *bl;
> +
> + hid_dbg(hdev, "probe\n");
> +
> + ret = hid_parse(hdev);
> + if (ret) {
> + hid_err(hdev, "parse failed: %d\n", ret);
> + return ret;
> + }
> +
> + ret = hid_hw_start(hdev, HID_CONNECT_DRIVER);
> + if (ret) {
> + hid_err(hdev, "hw start failed: %d\n", ret);
> + return ret;
> + }
> +
> + input_field = hid_get_usage_field(hdev, HID_INPUT_REPORT,
> + HID_USAGE_MONITOR_CTRL,
> + HID_USAGE_VESA_VCP_BRIGHTNESS);
> + if (input_field == NULL) {
> + ret = -ENODEV;
> + goto exit_stop;
> + }
> +
> + feature_field = hid_get_usage_field(hdev, HID_FEATURE_REPORT,
> + HID_USAGE_MONITOR_CTRL,
> + HID_USAGE_VESA_VCP_BRIGHTNESS);
> + if (feature_field == NULL) {
> + ret = -ENODEV;
> + goto exit_stop;
> + }
> +
> + if (input_field->logical_minimum != feature_field->logical_minimum) {
> + hid_warn(hdev, "minimums do not match: %d / %d\n",
> + input_field->logical_minimum,
> + feature_field->logical_minimum);
> + ret = -ENODEV;
> + goto exit_stop;
> + }
> +
> + if (input_field->logical_maximum != feature_field->logical_maximum) {
> + hid_warn(hdev, "maximums do not match: %d / %d\n",
> + input_field->logical_maximum,
> + feature_field->logical_maximum);
> + ret = -ENODEV;
> + goto exit_stop;
> + }
> +
> + hid_dbg(hdev, "Monitor VESA VCP with brightness control\n");
> +
> + ret = hid_hw_open(hdev);
> + if (ret) {
> + hid_err(hdev, "hw open failed: %d\n", ret);
> + goto exit_stop;
> + }
> +
> + data = devm_kzalloc(&hdev->dev, sizeof(*data), GFP_KERNEL);
> + if (data == NULL) {
> + ret = -ENOMEM;
> + goto exit_stop;
exit_free?
in order to undo the hid_hw_open() just above.
> + }
> + data->hdev = hdev;
> + data->min_brightness = input_field->logical_minimum;
> + data->max_brightness = input_field->logical_maximum;
> + data->input_field = input_field;
> + data->feature_field = feature_field;
> +
> + memset(&props, 0, sizeof(props));
> + props.type = BACKLIGHT_RAW;
> + props.max_brightness = data->max_brightness - data->min_brightness;
> +
> + bl = devm_backlight_device_register(&hdev->dev, "vesa_vcp",
> + &hdev->dev, data,
> + &hid_bl_ops,
> + &props);
> + if (IS_ERR(bl)) {
> + ret = PTR_ERR(bl);
> + hid_err(hdev, "failed to register backlight: %d\n", ret);
> + goto exit_free;
> + }
> +
> + hid_set_drvdata(hdev, bl);
> +
> + return 0;
> +
> +exit_free:
> + hid_hw_close(hdev);
> + devm_kfree(&hdev->dev, data);
'data' is devm_kzalloc()'ed.
It is likely that this explicit devm_kfree() could be saved. It will be
freed by the framework.
> +
> +exit_stop:
> + hid_hw_stop(hdev);
> + return ret;
> +}
[...]
^ permalink raw reply
* [PATCH v3 1/1] backlight: hid_bl: Add VESA VCP HID backlight driver
From: Julius Zint @ 2023-08-20 9:41 UTC (permalink / raw)
To: Lee Jones, Daniel Thompson, Jingoo Han, Jiri Kosina,
Benjamin Tissoires
Cc: Helge Deller, Thomas Weißschuh, linux-kernel, dri-devel,
linux-input, linux-fbdev, Julius Zint
In-Reply-To: <20230820094118.20521-1-julius@zint.sh>
The HID spec defines the following Usage IDs (p. 345 ff):
- Monitor Page (0x80) -> Monitor Control (0x01)
- VESA Virtual Controls Page (0x82) -> Brightness (0x10)
Apple made use of them in their Apple Studio Display and most likely on
other external displays (LG UltraFine 5k, Pro Display XDR).
The driver will work for any HID device with a report, where the
application matches the Monitor Control Usage ID and:
1. An Input field in this report with the Brightness Usage ID (to get
the current brightness)
2. A Feature field in this report with the Brightness Usage ID (to
set the current brightness)
This driver has been developed and tested with the Apple Studio Display.
Here is a small excerpt from the decoded HID descriptor showing the
feature field for setting the brightness:
Usage Page (Monitor VESA VCP), ; Monitor VESA VPC (82h, monitor page)
Usage (10h, Brightness),
Logical Minimum (400),
Logical Maximum (60000),
Unit (Centimeter^-2 * Candela),
Unit Exponent (14),
Report Size (32),
Report Count (1),
Feature (Variable, Null State),
The full HID descriptor dump is available as a comment in the source
code.
Signed-off-by: Julius Zint <julius@zint.sh>
---
drivers/video/backlight/Kconfig | 8 +
drivers/video/backlight/Makefile | 1 +
drivers/video/backlight/hid_bl.c | 269 +++++++++++++++++++++++++++++++
3 files changed, 278 insertions(+)
create mode 100644 drivers/video/backlight/hid_bl.c
diff --git a/drivers/video/backlight/Kconfig b/drivers/video/backlight/Kconfig
index 51387b1ef012..b964a820956d 100644
--- a/drivers/video/backlight/Kconfig
+++ b/drivers/video/backlight/Kconfig
@@ -472,6 +472,14 @@ config BACKLIGHT_LED
If you have a LCD backlight adjustable by LED class driver, say Y
to enable this driver.
+config BACKLIGHT_HID
+ tristate "VESA VCP HID Backlight Driver"
+ depends on HID
+ help
+ If you have an external display with VESA compliant HID brightness
+ controls then say Y to enable this backlight driver. Currently the
+ only supported device is the Apple Studio Display.
+
endif # BACKLIGHT_CLASS_DEVICE
endmenu
diff --git a/drivers/video/backlight/Makefile b/drivers/video/backlight/Makefile
index f72e1c3c59e9..835f9b8772c7 100644
--- a/drivers/video/backlight/Makefile
+++ b/drivers/video/backlight/Makefile
@@ -58,3 +58,4 @@ obj-$(CONFIG_BACKLIGHT_WM831X) += wm831x_bl.o
obj-$(CONFIG_BACKLIGHT_ARCXCNN) += arcxcnn_bl.o
obj-$(CONFIG_BACKLIGHT_RAVE_SP) += rave-sp-backlight.o
obj-$(CONFIG_BACKLIGHT_LED) += led_bl.o
+obj-$(CONFIG_BACKLIGHT_HID) += hid_bl.o
diff --git a/drivers/video/backlight/hid_bl.c b/drivers/video/backlight/hid_bl.c
new file mode 100644
index 000000000000..b40f8f412ee2
--- /dev/null
+++ b/drivers/video/backlight/hid_bl.c
@@ -0,0 +1,269 @@
+// SPDX-License-Identifier: GPL-2.0
+#include <linux/device.h>
+#include <linux/hid.h>
+#include <linux/module.h>
+#include <linux/backlight.h>
+
+#define APPLE_STUDIO_DISPLAY_VENDOR_ID 0x05ac
+#define APPLE_STUDIO_DISPLAY_PRODUCT_ID 0x1114
+
+#define HID_USAGE_MONITOR_CTRL 0x800001
+#define HID_USAGE_VESA_VCP_BRIGHTNESS 0x820010
+
+/*
+ * Apple Studio Display HID report descriptor
+ *
+ * Usage Page (Monitor), ; USB monitor (80h, monitor page)
+ * Usage (01h),
+ * Collection (Application),
+ * Report ID (1),
+ *
+ * Usage Page (Monitor VESA VCP), ; Monitor VESA virtual control panel (82h, monitor page)
+ * Usage (10h, Brightness),
+ * Logical Minimum (400),
+ * Logical Maximum (60000),
+ * Unit (Centimeter^-2 * Candela),
+ * Unit Exponent (14),
+ * Report Size (32),
+ * Report Count (1),
+ * Feature (Variable, Null State),
+ *
+ * Usage Page (PID), ; Physical interface device (0Fh)
+ * Usage (50h),
+ * Logical Minimum (0),
+ * Logical Maximum (20000),
+ * Unit (1001h),
+ * Unit Exponent (13),
+ * Report Size (16),
+ * Feature (Variable, Null State),
+ *
+ * Usage Page (Monitor VESA VCP), ; Monitor VESA virtual control panel (82h, monitor page)
+ * Usage (10h, Brightness),
+ * Logical Minimum (400),
+ * Logical Maximum (60000),
+ * Unit (Centimeter^-2 * Candela),
+ * Unit Exponent (14),
+ * Report Size (32),
+ * Report Count (1),
+ * Input (Variable),
+ * End Collection
+ */
+
+struct hid_bl_data {
+ struct hid_device *hdev;
+ unsigned int min_brightness;
+ unsigned int max_brightness;
+ struct hid_field *input_field;
+ struct hid_field *feature_field;
+};
+
+static struct hid_field *hid_get_usage_field(struct hid_device *hdev,
+ unsigned int report_type,
+ unsigned int application, unsigned int usage)
+{
+ struct hid_report_enum *re = &hdev->report_enum[report_type];
+ struct hid_report *report;
+ int i, j;
+
+ list_for_each_entry(report, &re->report_list, list) {
+ if (report->application != application)
+ continue;
+
+ for (i = 0; i < report->maxfield; i++) {
+ struct hid_field *field = report->field[i];
+
+ for (j = 0; j < field->maxusage; j++)
+ if (field->usage[j].hid == usage)
+ return field;
+ }
+ }
+ return NULL;
+}
+
+static void hid_bl_remove(struct hid_device *hdev)
+{
+ struct backlight_device *bl;
+ struct hid_bl_data *data;
+
+ hid_dbg(hdev, "remove\n");
+ bl = hid_get_drvdata(hdev);
+ data = bl_get_data(bl);
+
+ devm_backlight_device_unregister(&hdev->dev, bl);
+ hid_hw_close(hdev);
+ hid_hw_stop(hdev);
+ hid_set_drvdata(hdev, NULL);
+ devm_kfree(&hdev->dev, data);
+}
+
+static int hid_bl_get_brightness_raw(struct hid_bl_data *data)
+{
+ struct hid_field *field;
+ int result;
+
+ field = data->input_field;
+ hid_hw_request(data->hdev, field->report, HID_REQ_GET_REPORT);
+ hid_hw_wait(data->hdev);
+ result = *field->new_value;
+ hid_dbg(data->hdev, "get brightness: %d\n", result);
+
+ return result;
+}
+
+static int hid_bl_get_brightness(struct backlight_device *bl)
+{
+ struct hid_bl_data *data;
+ int brightness;
+
+ data = bl_get_data(bl);
+ brightness = hid_bl_get_brightness_raw(data);
+ return brightness - data->min_brightness;
+}
+
+static void hid_bl_set_brightness_raw(struct hid_bl_data *data, int brightness)
+{
+ struct hid_field *field;
+
+ field = data->feature_field;
+ *field->value = brightness;
+ hid_hw_request(data->hdev, field->report, HID_REQ_SET_REPORT);
+ hid_hw_wait(data->hdev);
+ hid_dbg(data->hdev, "set brightness: %d\n", brightness);
+}
+
+static int hid_bl_update_status(struct backlight_device *bl)
+{
+ struct hid_bl_data *data;
+ int brightness;
+
+ data = bl_get_data(bl);
+ brightness = backlight_get_brightness(bl);
+ brightness += data->min_brightness;
+ hid_bl_set_brightness_raw(data, brightness);
+ return 0;
+}
+
+static const struct backlight_ops hid_bl_ops = {
+ .update_status = hid_bl_update_status,
+ .get_brightness = hid_bl_get_brightness,
+};
+
+static int hid_bl_probe(struct hid_device *hdev, const struct hid_device_id *id)
+{
+ int ret;
+ struct hid_field *input_field;
+ struct hid_field *feature_field;
+ struct hid_bl_data *data;
+ struct backlight_properties props;
+ struct backlight_device *bl;
+
+ hid_dbg(hdev, "probe\n");
+
+ ret = hid_parse(hdev);
+ if (ret) {
+ hid_err(hdev, "parse failed: %d\n", ret);
+ return ret;
+ }
+
+ ret = hid_hw_start(hdev, HID_CONNECT_DRIVER);
+ if (ret) {
+ hid_err(hdev, "hw start failed: %d\n", ret);
+ return ret;
+ }
+
+ input_field = hid_get_usage_field(hdev, HID_INPUT_REPORT,
+ HID_USAGE_MONITOR_CTRL,
+ HID_USAGE_VESA_VCP_BRIGHTNESS);
+ if (input_field == NULL) {
+ ret = -ENODEV;
+ goto exit_stop;
+ }
+
+ feature_field = hid_get_usage_field(hdev, HID_FEATURE_REPORT,
+ HID_USAGE_MONITOR_CTRL,
+ HID_USAGE_VESA_VCP_BRIGHTNESS);
+ if (feature_field == NULL) {
+ ret = -ENODEV;
+ goto exit_stop;
+ }
+
+ if (input_field->logical_minimum != feature_field->logical_minimum) {
+ hid_warn(hdev, "minimums do not match: %d / %d\n",
+ input_field->logical_minimum,
+ feature_field->logical_minimum);
+ ret = -ENODEV;
+ goto exit_stop;
+ }
+
+ if (input_field->logical_maximum != feature_field->logical_maximum) {
+ hid_warn(hdev, "maximums do not match: %d / %d\n",
+ input_field->logical_maximum,
+ feature_field->logical_maximum);
+ ret = -ENODEV;
+ goto exit_stop;
+ }
+
+ hid_dbg(hdev, "Monitor VESA VCP with brightness control\n");
+
+ ret = hid_hw_open(hdev);
+ if (ret) {
+ hid_err(hdev, "hw open failed: %d\n", ret);
+ goto exit_stop;
+ }
+
+ data = devm_kzalloc(&hdev->dev, sizeof(*data), GFP_KERNEL);
+ if (data == NULL) {
+ ret = -ENOMEM;
+ goto exit_stop;
+ }
+ data->hdev = hdev;
+ data->min_brightness = input_field->logical_minimum;
+ data->max_brightness = input_field->logical_maximum;
+ data->input_field = input_field;
+ data->feature_field = feature_field;
+
+ memset(&props, 0, sizeof(props));
+ props.type = BACKLIGHT_RAW;
+ props.max_brightness = data->max_brightness - data->min_brightness;
+
+ bl = devm_backlight_device_register(&hdev->dev, "vesa_vcp",
+ &hdev->dev, data,
+ &hid_bl_ops,
+ &props);
+ if (IS_ERR(bl)) {
+ ret = PTR_ERR(bl);
+ hid_err(hdev, "failed to register backlight: %d\n", ret);
+ goto exit_free;
+ }
+
+ hid_set_drvdata(hdev, bl);
+
+ return 0;
+
+exit_free:
+ hid_hw_close(hdev);
+ devm_kfree(&hdev->dev, data);
+
+exit_stop:
+ hid_hw_stop(hdev);
+ return ret;
+}
+
+static const struct hid_device_id hid_bl_devices[] = {
+ { HID_USB_DEVICE(APPLE_STUDIO_DISPLAY_VENDOR_ID,
+ APPLE_STUDIO_DISPLAY_PRODUCT_ID) },
+ { }
+};
+MODULE_DEVICE_TABLE(hid, hid_bl_devices);
+
+static struct hid_driver hid_bl_driver = {
+ .name = "hid_backlight",
+ .id_table = hid_bl_devices,
+ .probe = hid_bl_probe,
+ .remove = hid_bl_remove,
+};
+module_hid_driver(hid_bl_driver);
+
+MODULE_AUTHOR("Julius Zint <julius@zint.sh>");
+MODULE_LICENSE("GPL");
+MODULE_DESCRIPTION("Backlight driver for HID devices");
--
2.41.0
^ permalink raw reply related
* [PATCH v3 0/1] HID backlight driver
From: Julius Zint @ 2023-08-20 9:41 UTC (permalink / raw)
To: Lee Jones, Daniel Thompson, Jingoo Han, Jiri Kosina,
Benjamin Tissoires
Cc: Helge Deller, Thomas Weißschuh, linux-kernel, dri-devel,
linux-input, linux-fbdev, Julius Zint
This patch adds support for HID backlight devices, found in the Apple
Studio Display.
Changes in v1 [1]:
- Add USB backlight driver for Studio Display
Changes in v2 [2]:
- Rewrite from a USB driver to a HID driver
Changes in v3:
- Added missing hid_bl prefix for some functions
- Early exit in probe when HID parsing fails
- Add return code to error logs
- Adding HID Maintainers for review
[1] https://lore.kernel.org/dri-devel/20230701120806.11812-1-julius@zint.sh/
[2] https://lore.kernel.org/dri-devel/20230806091403.10002-1-julius@zint.sh/
Julius Zint (1):
backlight: hid_bl: Add VESA VCP HID backlight driver
drivers/video/backlight/Kconfig | 8 +
drivers/video/backlight/Makefile | 1 +
drivers/video/backlight/hid_bl.c | 269 +++++++++++++++++++++++++++++++
3 files changed, 278 insertions(+)
create mode 100644 drivers/video/backlight/hid_bl.c
base-commit: dfd122fe8591d513b5e51313601217b67ae98d13
--
2.41.0
^ permalink raw reply
* Re: [hid-logitech-dj] Inaccurate Mouse Wheel Behaviour using G502 with Logitech Lightspeed Receiver (USB_DEVICE_ID_LOGITECH_NANO_RECEIVER_LIGHTSPEED_1)
From: Rahul Rameshbabu @ 2023-08-19 18:42 UTC (permalink / raw)
To: Sewer56; +Cc: linux-input
In-Reply-To: <5f45c1b7-cf6c-4949-9839-db28f38bd490@sewer56.dev>
On Fri, 18 Aug, 2023 23:16:14 +0100 "Sewer56" <admin@sewer56.dev> wrote:
> When scrolling with a Logitech G502 Lightspeed mouse (046d:c08d) in wireless mode
> with the official wireless receiver (046d:c539, i.e. USB_DEVICE_ID_LOGITECH_NANO_RECEIVER_LIGHTSPEED_1
> in `hid-logitech-dj.c`), the REL_WHEEL event is not fired consistently on mouse wheel notch/tick.
>
> [Note: This only affects wireless through receiver; wired works as expected]
>
> Rather than the event being fired when the mouse skips a notch/tick on the scroll
> wheel, it feels like the REL_WHEEL event is fired somewhere roughly around the middle
> point of the last notch/tick and the next notch/tick.
>
> I recorded a quick video to demonstrate this:
> https://youtu.be/IwaQAMDkotg
>
> In this clip I scroll the mouse wheel gently up and down, back and forth. Notice the
> appearance of REL_WHEEL_HI_RES with the value changing from 15 to -15 as the direction
> is changed; the wheel is being scrolled past the notch, but the REL_WHEEL event is not fired.
I think it's good to provide some background on what REL_WHEEL and
REL_WHEEL_HI_RES values indicate for the sake of this conversation.
REL_WHEEL is the number of detents (notches) that have been scrolled by.
REL_WHEEL_HI_RES is 1/120th of a detent. For fancier gaming peripherals,
having this capability is important to be able to advertise high
resolution information when someone makes minute wheel movements.
Event: time 1692246247.376147, type 2 (EV_REL), code 11 (REL_WHEEL_HI_RES), value -15
Event: time 1692246247.376147, -------------- SYN_REPORT ------------
Event: time 1692246247.448155, type 2 (EV_REL), code 11 (REL_WHEEL_HI_RES), value -15
Event: time 1692246247.448155, -------------- SYN_REPORT ------------
Event: time 1692246247.519161, type 2 (EV_REL), code 11 (REL_WHEEL_HI_RES), value -15
Event: time 1692246247.519161, -------------- SYN_REPORT ------------
Event: time 1692246247.549169, type 2 (EV_REL), code 11 (REL_WHEEL_HI_RES), value -15
Event: time 1692246247.549169, type 2 (EV_REL), code 8 (REL_WHEEL), value -1
Event: time 1692246247.549169, -------------- SYN_REPORT ------------
Event: time 1692246247.589171, type 2 (EV_REL), code 11 (REL_WHEEL_HI_RES), value -15
Event: time 1692246247.589171, -------------- SYN_REPORT ------------
Event: time 1692246247.626176, type 2 (EV_REL), code 11 (REL_WHEEL_HI_RES), value -15
Event: time 1692246247.626176, -------------- SYN_REPORT ------------
Event: time 1692246248.574336, type 2 (EV_REL), code 11 (REL_WHEEL_HI_RES), value 15
Event: time 1692246248.574336, -------------- SYN_REPORT ------------
Event: time 1692246248.593325, type 2 (EV_REL), code 11 (REL_WHEEL_HI_RES), value 15
Event: time 1692246248.593325, -------------- SYN_REPORT ------------
Event: time 1692246248.606319, type 2 (EV_REL), code 11 (REL_WHEEL_HI_RES), value 15
Event: time 1692246248.606319, -------------- SYN_REPORT ------------
Event: time 1692246248.619329, type 2 (EV_REL), code 11 (REL_WHEEL_HI_RES), value 15
Event: time 1692246248.619329, type 2 (EV_REL), code 8 (REL_WHEEL), value 1
Event: time 1692246248.619329, -------------- SYN_REPORT ------------
What hid-logitech-dj does for the lightspeed receiver is append
information about the report descriptor structure to tell the HID stack
how to parse the HID reports provided by the mouse. For the lightspeed
receiver, hid-logitech-dj will concat the mse_high_res_descriptor
descriptor.
https://git.kernel.org/pub/scm/linux/kernel/git/hid/hid.git/tree/drivers/hid/hid-logitech-dj.c?id=1d7546042f8fdc4bc39ab91ec966203e2d64f8bd#n380
When you use the generic usbhid driver, you do not parse the special
report table with the high resolution information but only the defacto
descriptor with the mouse wheel USAGE information.
Event: time 1692245830.208738, type 2 (EV_REL), code 8 (REL_WHEEL), value -1
Event: time 1692245830.208738, type 2 (EV_REL), code 11 (REL_WHEEL_HI_RES), value -120
Event: time 1692245830.208738, -------------- SYN_REPORT ------------
Event: time 1692245831.231868, type 2 (EV_REL), code 8 (REL_WHEEL), value 1
Event: time 1692245831.231868, type 2 (EV_REL), code 11 (REL_WHEEL_HI_RES), value 120
Event: time 1692245831.231868, -------------- SYN_REPORT ------------
Event: time 1692245831.783933, type 2 (EV_REL), code 8 (REL_WHEEL), value -1
Event: time 1692245831.783933, type 2 (EV_REL), code 11 (REL_WHEEL_HI_RES), value -120
Event: time 1692245831.783933, -------------- SYN_REPORT ------------
Event: time 1692245833.004410, type 2 (EV_REL), code 8 (REL_WHEEL), value 1
Event: time 1692245833.004410, type 2 (EV_REL), code 11 (REL_WHEEL_HI_RES), value 120
Event: time 1692245833.004410, -------------- SYN_REPORT ------------
What you will notice here is we do get the single detent measurements,
and they are correct. However, we have lost the granularity to measure
the high precision information supported by the device (which is why we
see REL_WHEEL_HI_RES toggle between -120 and 120). This works out well
for games where you do not care about the high resolution precision but
is problematic in general. That said, not accurately counting detents is
also a problem.
>
> When the hid-logitech-dj module is blacklisted, and linux defaults to a more generic
> driver (usbhid); this issue is not present; which can be seen here: https://youtu.be/8AkVWHUe88M
>
> To put this into a realistic end user perspective: If you try to play a game on Linux
> with the current behaviour; and perform an action that requires the use of a scroll wheel
> [for example; changing the current weapon in a shooter], the input is often 'dropped' from
> the user perspective, leading to frustration.
The experience may seem like it's 'dropped', but I am getting a feeling
its more about miscounting . At least that's my intuition, but I think
what would likely shine light on this is collecting more information.
>
> I'm not exactly sure what further sort of information I could provide; I've only got back
> to using Linux on the desktop after 7 years; and it's my first time raising a kernel issue.
> That said, I'm happy to provide any further feedback, or even play with the kernel sources
> if someone could give me ideas of what I should experiment with.
>
I think collecting more information using hid-tools would be helpful.
https://gitlab.freedesktop.org/libevdev/hid-tools
I am interested in capturing a HID recording of the following.
1. Move the wheel just one detent in a single direction
2. Wait for a moment
3. Move the wheel back one detent in the opposite direction
4. Wait for a moment
5. Move the wheel two detents in the original direction
If you are interested in looking at the report descriptor structure
yourself, you can use hid-decode on the recording or directly on the
hidraw device fs node.
Here is an example of what happens when I use hid-decode to read the
report descriptor of my mouse device.
hid-decode /dev/hidraw0 # ran with elevated privileges
# device 0:0
# 0x05, 0x01, // Usage Page (Generic Desktop) 0
# 0x09, 0x02, // Usage (Mouse) 2
# 0xa1, 0x01, // Collection (Application) 4
# 0x09, 0x01, // Usage (Pointer) 6
# 0xa1, 0x00, // Collection (Physical) 8
# 0x05, 0x09, // Usage Page (Button) 10
# 0x19, 0x01, // Usage Minimum (1) 12
# 0x29, 0x10, // Usage Maximum (16) 14
# 0x15, 0x00, // Logical Minimum (0) 16
# 0x25, 0x01, // Logical Maximum (1) 18
# 0x75, 0x01, // Report Size (1) 20
# 0x95, 0x10, // Report Count (16) 22
# 0x81, 0x02, // Input (Data,Var,Abs) 24
# 0x05, 0x01, // Usage Page (Generic Desktop) 26
# 0x09, 0x30, // Usage (X) 28
# 0x09, 0x31, // Usage (Y) 30
# 0x16, 0x01, 0x80, // Logical Minimum (-32767) 32
# 0x26, 0xff, 0x7f, // Logical Maximum (32767) 35
# 0x75, 0x10, // Report Size (16) 38
# 0x95, 0x02, // Report Count (2) 40
# 0x81, 0x06, // Input (Data,Var,Rel) 42
# 0x09, 0x38, // Usage (Wheel) 44
# 0x75, 0x08, // Report Size (8) 46
# 0x95, 0x01, // Report Count (1) 48
# 0x15, 0x81, // Logical Minimum (-127) 50
# 0x25, 0x7f, // Logical Maximum (127) 52
# 0x81, 0x06, // Input (Data,Var,Rel) 54
# 0x05, 0x0c, // Usage Page (Consumer Devices) 56
# 0x0a, 0x38, 0x02, // Usage (AC Pan) 58
# 0x95, 0x01, // Report Count (1) 61
# 0x81, 0x06, // Input (Data,Var,Rel) 63
# 0xc0, // End Collection 65
# 0xc0, // End Collection 66
#
R: 67 05 01 09 02 a1 01 09 01 a1 00 05 09 19 01 29 10 15 00 25 01 75 01 95 10 81 02 05 01 09 30 09 31 16 01 80 26 ff 7f 75 10 95 02 81 06 09 38 75 08 95 01 15 81 25 7f 81 06 05 0c 0a 38 02 95 01 81 06 c0 c0
N: device 0:0
I: 3 0001 0001
Some new documentation was recently merged into next. Might be a helpful
reference as well.
https://www.kernel.org/doc/html/next/hid/hidintro.html
--
Thanks,
Rahul Rameshbabu
^ permalink raw reply
* Re: [PATCH v5] hid-mcp2200: added driver for GPIOs of MCP2200
From: Rahul Rameshbabu @ 2023-08-19 16:42 UTC (permalink / raw)
To: johannes
Cc: jikos, benjamin.tissoires, linux-kernel, linux-input, andi.shyti,
christophe.jaillet, rdunlap, ak
In-Reply-To: <20230818104852.64923-1-johannes@gnu-linux.rocks>
Commit message subject should probably start with "HID: mcp2200:"
rather than "hid-mcp2200:". This matches mcp2221.
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/log/drivers/hid/hid-mcp2221.c
On Fri, 18 Aug, 2023 12:48:52 +0200 <johannes@gnu-linux.rocks> wrote:
> From: Johannes Roith <johannes@gnu-linux.rocks>
>
> Added a gpiochip compatible driver to control the 8 GPIOs of
> the MCP2200 by using the HID interface.
>
> Using GPIOs with alternative functions (GP0<->SSPND, GP1<->USBCFG,
> GP6<->RXLED, GP7<->TXLED) will reset the functions, if set (unset by
> default).
>
> The driver was tested while also using the UART of the chip. Setting
> and reading the GPIOs has no effect on the UART communication. However,
> a reset is triggered after the CONFIGURE command. If the GPIO Direction
> is constantly changed, this will affect the communication at low baud
> rates. This is a hardware problem of the MCP2200 and is not caused by
> the driver.
>
The content below should not be in the commit message body but rather
git notes or a section in the patch that will not be applied.
> Feedback from reviewers Christophe JAILLET <christophe.jaillet@wanadoo.fr>
> and Andi Shyti <andi.shyti@kernel.org> was added.
>
> Changelog:
>
> - v1: added driver
> - v2: added ProductID in hid-ids.h
> - v3: added feedback from review and make patch compilable
> - v4: added more feedback from second review, tested as module and
> builtin on x86 and arm64
> - v5: adopted Kconfig to style guidelines, fixed mcp_set_direction
For your reference in case you find it helpful.
* https://git-scm.com/docs/git-notes
* https://git-scm.com/docs/git-format-patch#Documentation/git-format-patch.txt---notesltrefgt
>
> Signed-off-by: Johannes Roith <johannes@gnu-linux.rocks>
> ---
> drivers/hid/Kconfig | 10 +
> drivers/hid/Makefile | 1 +
> drivers/hid/hid-ids.h | 1 +
> drivers/hid/hid-mcp2200.c | 419 ++++++++++++++++++++++++++++++++++++++
> 4 files changed, 431 insertions(+)
> create mode 100644 drivers/hid/hid-mcp2200.c
>
> diff --git a/drivers/hid/Kconfig b/drivers/hid/Kconfig
> index e11c1c803676..efe01b473cc2 100644
> --- a/drivers/hid/Kconfig
> +++ b/drivers/hid/Kconfig
> @@ -1301,6 +1301,16 @@ config HID_MCP2221
> To compile this driver as a module, choose M here: the module
> will be called hid-mcp2221.ko.
>
> +config HID_MCP2200
> + tristate "Microchip MCP2200 HID USB-to-GPIO bridge"
> + depends on USB_HID
> + imply GPIOLIB
> + help
> + Provides GPIO functionality over USB-HID through MCP2200 device.
> +
> + To compile this driver as a module, choose M here: the module
> + will be called hid-mcp2200.ko.
> +
Alphabetically, HID_MCP2200 should be before HID_MCP2221.
> config HID_KUNIT_TEST
> tristate "KUnit tests for HID" if !KUNIT_ALL_TESTS
> depends on KUNIT
> diff --git a/drivers/hid/Makefile b/drivers/hid/Makefile
> index 7a9e160158f7..050f740304c4 100644
> --- a/drivers/hid/Makefile
> +++ b/drivers/hid/Makefile
> @@ -79,6 +79,7 @@ obj-$(CONFIG_HID_MACALLY) += hid-macally.o
> obj-$(CONFIG_HID_MAGICMOUSE) += hid-magicmouse.o
> obj-$(CONFIG_HID_MALTRON) += hid-maltron.o
> obj-$(CONFIG_HID_MCP2221) += hid-mcp2221.o
> +obj-$(CONFIG_HID_MCP2200) += hid-mcp2200.o
Similar comment as previous here.
> obj-$(CONFIG_HID_MAYFLASH) += hid-mf.o
> obj-$(CONFIG_HID_MEGAWORLD_FF) += hid-megaworld.o
> obj-$(CONFIG_HID_MICROSOFT) += hid-microsoft.o
> diff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h
> index 8a310f8ff20f..4926ca41225b 100644
> --- a/drivers/hid/hid-ids.h
> +++ b/drivers/hid/hid-ids.h
> @@ -914,6 +914,7 @@
> #define USB_DEVICE_ID_PICK16F1454_V2 0xf2f7
> #define USB_DEVICE_ID_LUXAFOR 0xf372
> #define USB_DEVICE_ID_MCP2221 0x00dd
> +#define USB_DEVICE_ID_MCP2200 0x00df
This file is sorted primarily by the define name rather than the device
id, so I would expect the define for mcp2200 to be before mcp2221 (even
though its device id would be after).
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/hid/hid-ids.h?id=aa9ea98cca3a56869df1dc6347f3e3bfe0c01f44#n449
>
> #define USB_VENDOR_ID_MICROSOFT 0x045e
> #define USB_DEVICE_ID_SIDEWINDER_GV 0x003b
> diff --git a/drivers/hid/hid-mcp2200.c b/drivers/hid/hid-mcp2200.c
> new file mode 100644
> index 000000000000..ed4483fa5bdf
> --- /dev/null
> +++ b/drivers/hid/hid-mcp2200.c
> @@ -0,0 +1,419 @@
> +// SPDX-License-Identifier: GPL-2.0-only
> +/*
> + * MCP2200 - Microchip USB to GPIO bridge
> + *
> + * Copyright (c) 2023, Johannes Roith <johannes@gnu-linux.rocks>
> + *
> + * Datasheet: https://ww1.microchip.com/downloads/en/DeviceDoc/22228A.pdf
> + * App Note for HID: https://ww1.microchip.com/downloads/en/DeviceDoc/93066A.pdf
> + */
> +#include <linux/completion.h>
> +#include <linux/delay.h>
> +#include <linux/err.h>
> +#include <linux/gpio/driver.h>
> +#include <linux/hid.h>
> +#include <linux/hidraw.h>
> +#include <linux/module.h>
> +#include <linux/mutex.h>
> +#include "hid-ids.h"
> +
> +/* Commands codes in a raw output report */
> +#define SET_CLEAR_OUTPUTS 0x08
> +#define CONFIGURE 0x10
> +#define READ_EE 0x20
> +#define WRITE_EE 0x40
> +#define READ_ALL 0x80
> +
> +/* MCP GPIO direction encoding */
> +enum MCP_IO_DIR {
> + MCP2200_DIR_OUT = 0x00,
> + MCP2200_DIR_IN = 0x01,
> +};
> +
> +/* Altternative pin assignments */
> +#define TXLED 2
> +#define RXLED 3
> +#define USBCFG 6
> +#define SSPND 7
> +#define MCP_NGPIO 8
> +
> +/* CMD to set or clear a GPIO output */
> +struct mcp_set_clear_outputs {
> + u8 cmd;
> + u8 dummys1[10];
> + u8 set_bmap;
> + u8 clear_bmap;
> + u8 dummys2[3];
> +} __packed;
> +
> +/* CMD to configure the IOs */
> +struct mcp_configure {
> + u8 cmd;
> + u8 dummys1[3];
> + u8 io_bmap;
> + u8 config_alt_pins;
> + u8 io_default_val_bmap;
> + u8 config_alt_options;
> + u8 baud_h;
> + u8 baud_l;
> + u8 dummys2[6];
> +} __packed;
> +
> +/* CMD to read all parameters */
> +struct mcp_read_all {
> + u8 cmd;
> + u8 dummys[15];
> +} __packed;
> +
> +/* Response to the read all cmd */
> +struct mcp_read_all_resp {
> + u8 cmd;
> + u8 eep_addr;
> + u8 dummy;
> + u8 eep_val;
> + u8 io_bmap;
> + u8 config_alt_pins;
> + u8 io_default_val_bmap;
> + u8 config_alt_options;
> + u8 baud_h;
> + u8 baud_l;
> + u8 io_port_val_bmap;
> + u8 dummys[5];
> +} __packed;
> +
> +struct mcp2200 {
> + struct hid_device *hdev;
> + struct mutex lock;
> + struct completion wait_in_report;
> + u8 gpio_dir;
> + u8 gpio_val;
> + u8 gpio_inval;
> + u8 baud_h;
> + u8 baud_l;
> + u8 config_alt_pins;
> + u8 gpio_reset_val;
> + u8 config_alt_options;
> + int status;
> + struct gpio_chip gc;
> +};
> +
> +/* this executes the READ_ALL cmd */
> +static int mcp_cmd_read_all(struct mcp2200 *mcp)
> +{
> + struct mcp_read_all *read_all;
> + int len, t;
> +
> + reinit_completion(&mcp->wait_in_report);
> + read_all = kzalloc(sizeof(struct mcp_read_all), GFP_KERNEL);
> + if (!read_all)
> + return -ENOMEM;
My personal recommendation is to just have a single DMA buffer allocated
for the mcp2200 instance rather than having to call the allocator and
release the memory per command.
Here is a reference.
https://git.kernel.org/pub/scm/linux/kernel/git/hid/hid.git/tree/drivers/hid/hid-nvidia-shield.c?id=1d7546042f8fdc4bc39ab91ec966203e2d64f8bd#n502
> +
> + read_all->cmd = READ_ALL;
> +
> + mutex_lock(&mcp->lock);
> + len = hid_hw_output_report(mcp->hdev, (u8 *) read_all,
> + sizeof(struct mcp_read_all));
> +
> + mutex_unlock(&mcp->lock);
> + kfree(read_all);
> +
> + if (len != sizeof(struct mcp_read_all))
> + return -EINVAL;
> +
> + t = wait_for_completion_timeout(&mcp->wait_in_report,
> + msecs_to_jiffies(4000));
> + if (!t)
> + return -ETIMEDOUT;
> +
> + /* return status, negative value if wrong response was received */
> + return mcp->status;
> +}
> +
> +static void mcp_set_multiple(struct gpio_chip *gc, unsigned long *mask,
> + unsigned long *bits)
> +{
> + struct mcp2200 *mcp = gpiochip_get_data(gc);
> + u8 value;
> + int status;
> + struct mcp_set_clear_outputs *cmd;
> +
> + cmd = kzalloc(sizeof(struct mcp_set_clear_outputs), GFP_KERNEL);
> + if (!cmd)
> + return;
> +
> + mutex_lock(&mcp->lock);
> +
> + value = mcp->gpio_val & ~*mask;
> + value |= (*mask & *bits);
> +
> + cmd->cmd = SET_CLEAR_OUTPUTS;
> + cmd->set_bmap = value;
> + cmd->clear_bmap = ~(value);
> +
> + status = hid_hw_output_report(mcp->hdev, (u8 *) cmd,
> + sizeof(struct mcp_set_clear_outputs));
> +
> + if (status == sizeof(struct mcp_set_clear_outputs))
> + mcp->gpio_val = value;
> +
> + mutex_unlock(&mcp->lock);
> + kfree(cmd);
> +}
> +
> +static void mcp_set(struct gpio_chip *gc, unsigned int gpio_nr, int value)
> +{
> + unsigned long mask = 1 << gpio_nr;
> + unsigned long bmap_value = value << gpio_nr;
> +
> + mcp_set_multiple(gc, &mask, &bmap_value);
> +}
> +
> +static int mcp_get_multiple(struct gpio_chip *gc, unsigned long *mask,
> + unsigned long *bits)
> +{
> + u32 val;
> + struct mcp2200 *mcp = gpiochip_get_data(gc);
> + int status;
> +
> + status = mcp_cmd_read_all(mcp);
> + if (status != 0)
Can be simplified as 'if (status)'.
> + return status;
> +
> + val = mcp->gpio_inval;
> + *bits = (val & *mask);
> + return 0;
> +}
> +
> +static int mcp_get(struct gpio_chip *gc, unsigned int gpio_nr)
> +{
> + unsigned long mask = 0, bits = 0;
You do not need to zero init these variables? It's useful to avoid
initializing variables unnecessarily for compile time checking/static
analysis purposes.
> +
> + mask = (1 << gpio_nr);
> + mcp_get_multiple(gc, &mask, &bits);
> + return bits > 0;
> +}
> +
> +static int mcp_get_direction(struct gpio_chip *gc, unsigned int gpio_nr)
> +{
> + struct mcp2200 *mcp = gpiochip_get_data(gc);
> +
> + return (mcp->gpio_dir & (MCP2200_DIR_IN << gpio_nr))
> + ? GPIO_LINE_DIRECTION_IN : GPIO_LINE_DIRECTION_OUT;
> +}
> +
> +static int mcp_set_direction(struct gpio_chip *gc, unsigned int gpio_nr,
> + enum MCP_IO_DIR io_direction)
> +{
> + struct mcp2200 *mcp = gpiochip_get_data(gc);
> + struct mcp_configure *conf;
> + int status;
> + /* after the configure cmd we will need to set the outputs again */
> + unsigned long mask = ~(mcp->gpio_dir); /* only set outputs */
> + unsigned long bits = mcp->gpio_val;
> + /* Offsets of alternative pins in config_alt_pins, 0 is not used */
> + u8 alt_pin_conf[8] = {SSPND, USBCFG, 0, 0, 0, 0, RXLED, TXLED};
> + u8 config_alt_pins = mcp->config_alt_pins;
> +
> + /* Read in the reset baudrate first, we need it later */
> + status = mcp_cmd_read_all(mcp);
> + if (status != 0)
> + return status;
> +
> + conf = kzalloc(sizeof(struct mcp_configure), GFP_KERNEL);
> + if (!conf)
> + return -ENOMEM;
> +
> + mutex_lock(&mcp->lock);
> +
> + /* configure will reset the chip! */
> + conf->cmd = CONFIGURE;
> + conf->io_bmap = (mcp->gpio_dir & ~(1 << gpio_nr))
> + | (io_direction << gpio_nr);
> + /* Don't overwrite the reset parameters */
> + conf->baud_h = mcp->baud_h;
> + conf->baud_l = mcp->baud_l;
> + conf->config_alt_options = mcp->config_alt_options;
> + conf->io_default_val_bmap = mcp->gpio_reset_val;
> + /* Adjust alt. func if necessary */
> + if (alt_pin_conf[gpio_nr])
> + config_alt_pins &= ~(1 << alt_pin_conf[gpio_nr]);
> + conf->config_alt_pins = config_alt_pins;
> +
> + status = hid_hw_output_report(mcp->hdev, (u8 *) conf,
> + sizeof(struct mcp_set_clear_outputs));
> +
> + if (status == sizeof(struct mcp_set_clear_outputs)) {
> + mcp->gpio_dir = conf->io_bmap;
> + mcp->config_alt_pins = config_alt_pins;
> + } else {
> + mutex_unlock(&mcp->lock);
> + kfree(conf);
> + return -EIO;
> + }
> +
> + mutex_unlock(&mcp->lock);
> + kfree(conf);
> +
> + /* Configure CMD will clear all IOs -> rewrite them */
> + mcp_set_multiple(gc, &mask, &bits);
> + return 0;
> +}
> +
> +static int mcp_direction_input(struct gpio_chip *gc, unsigned int gpio_nr)
> +{
> + return mcp_set_direction(gc, gpio_nr, MCP2200_DIR_IN);
> +}
> +
> +static int mcp_direction_output(struct gpio_chip *gc, unsigned int gpio_nr,
> + int value)
> +{
> + int ret;
> + unsigned long mask, bmap_value;
> +
> + mask = 1 << gpio_nr;
> + bmap_value = value << gpio_nr;
> +
> + ret = mcp_set_direction(gc, gpio_nr, MCP2200_DIR_OUT);
> + if (ret == 0)
'if (!ret)' can be used here.
> + mcp_set_multiple(gc, &mask, &bmap_value);
> + return ret;
> +}
> +
> +static const struct gpio_chip template_chip = {
> + .label = "mcp2200",
> + .owner = THIS_MODULE,
> + .get_direction = mcp_get_direction,
> + .direction_input = mcp_direction_input,
> + .direction_output = mcp_direction_output,
> + .set = mcp_set,
> + .set_multiple = mcp_set_multiple,
> + .get = mcp_get,
> + .get_multiple = mcp_get_multiple,
> + .base = -1,
> + .ngpio = MCP_NGPIO,
> + .can_sleep = true,
> +};
> +
> +/*
> + * MCP2200 uses interrupt endpoint for input reports. This function
> + * is called by HID layer when it receives i/p report from mcp2200,
> + * which is actually a response to the previously sent command.
> + */
> +static int mcp2200_raw_event(struct hid_device *hdev, struct hid_report *report,
> + u8 *data, int size)
> +{
> + struct mcp2200 *mcp = hid_get_drvdata(hdev);
> + struct mcp_read_all_resp *all_resp;
> +
> + switch (data[0]) {
> + case READ_ALL:
> + all_resp = (struct mcp_read_all_resp *) data;
> + mcp->status = 0;
> + mcp->gpio_inval = all_resp->io_port_val_bmap;
> + mcp->baud_h = all_resp->baud_h;
> + mcp->baud_l = all_resp->baud_l;
> + mcp->gpio_reset_val = all_resp->io_default_val_bmap;
> + mcp->config_alt_pins = all_resp->config_alt_pins;
> + mcp->config_alt_options = all_resp->config_alt_options;
> + break;
> + default:
> + mcp->status = -EIO;
> + break;
> + }
> +
> + complete(&mcp->wait_in_report);
> + return 1;
While this is not problematic today, I think it would be better to
return 0 here rather than 1.
> +}
> +
> +static void mcp2200_hid_unregister(void *ptr)
> +{
> + struct hid_device *hdev = ptr;
> +
> + hid_hw_close(hdev);
> + hid_hw_stop(hdev);
> +}
> +
> +static int mcp2200_probe(struct hid_device *hdev, const struct hid_device_id *id)
> +{
> + int ret;
> + struct mcp2200 *mcp;
> +
> + mcp = devm_kzalloc(&hdev->dev, sizeof(*mcp), GFP_KERNEL);
> + if (!mcp)
> + return -ENOMEM;
> +
> + ret = hid_parse(hdev);
> + if (ret) {
> + hid_err(hdev, "can't parse reports\n");
> + return ret;
> + }
> +
> + /*
> + * This driver uses the .raw_event callback and therefore does not need any
> + * HID_CONNECT_xxx flags.
> + */
> + ret = hid_hw_start(hdev, 0);
> + if (ret) {
> + hid_err(hdev, "can't start hardware\n");
> + return ret;
> + }
> +
> + hid_info(hdev, "USB HID v%x.%02x Device [%s] on %s\n", hdev->version >> 8,
> + hdev->version & 0xff, hdev->name, hdev->phys);
> +
> + ret = hid_hw_open(hdev);
> + if (ret) {
Need to call hid_hw_stop here since hid_hw_start succeeded.
> + hid_err(hdev, "can't open device\n");
> + return ret;
> + }
> +
> + mutex_init(&mcp->lock);
> + init_completion(&mcp->wait_in_report);
> + hid_set_drvdata(hdev, mcp);
> + mcp->hdev = hdev;
> +
> + ret = devm_add_action_or_reset(&hdev->dev, mcp2200_hid_unregister, hdev);
> + if (ret)
You probably want to call mcp2200_hid_unregister here since the action
was not added?
> + return ret;
> +
> + mcp->gc = template_chip;
> + mcp->gc.parent = &hdev->dev;
> +
> + ret = devm_gpiochip_add_data(&hdev->dev, &mcp->gc, mcp);
> + if (ret < 0) {
> + hid_err(hdev, "Unable to register gpiochip\n");
> + return ret;
> + }
> +
> + return 0;
> +}
> +
> +static void mcp2200_remove(struct hid_device *hdev)
> +{
> + (void) hdev;
> + /*
> + * With no remove function you sometimes get a segmentation fault when
> + * unloading the module or disconnecting the USB device
> + */
The reason you run into this is likely because of the action added to
devm conflicting with hid_device_remove....
I recommend not depending on devm for teardown rather than making a stub
remove function to work around the issue.
static void hid_device_remove(struct device *dev)
{
struct hid_device *hdev = to_hid_device(dev);
struct hid_driver *hdrv;
down(&hdev->driver_input_lock);
hdev->io_started = false;
hdrv = hdev->driver;
if (hdrv) {
if (hdrv->remove)
hdrv->remove(hdev);
else /* default remove */
hid_hw_stop(hdev);
hid_device_remove will call hid_hw_stop and so will
mcp2200_hid_unregister because of the devm action you added.
> +}
> +
> +static const struct hid_device_id mcp2200_devices[] = {
> + { HID_USB_DEVICE(USB_VENDOR_ID_MICROCHIP, USB_DEVICE_ID_MCP2200) },
> + { }
> +};
> +MODULE_DEVICE_TABLE(hid, mcp2200_devices);
> +
> +static struct hid_driver mcp2200_driver = {
> + .name = "mcp2200",
> + .id_table = mcp2200_devices,
> + .probe = mcp2200_probe,
> + .remove = mcp2200_remove,
> + .raw_event = mcp2200_raw_event,
> +};
> +
> +/* Register with HID core */
> +module_hid_driver(mcp2200_driver);
> +
> +MODULE_AUTHOR("Johannes Roith <johannes@gnu-linux.rocks>");
> +MODULE_DESCRIPTION("MCP2200 Microchip HID USB to GPIO bridge");
> +MODULE_LICENSE("GPL");
--
Thanks,
Rahul Rameshbabu
^ permalink raw reply
* Re: [hid-logitech-dj] Inaccurate Mouse Wheel Behaviour using G502 with Logitech Lightspeed Receiver (USB_DEVICE_ID_LOGITECH_NANO_RECEIVER_LIGHTSPEED_1)
From: Sewer56 @ 2023-08-18 22:16 UTC (permalink / raw)
To: linux-input
[-- Attachment #1: Type: text/plain, Size: 1763 bytes --]
When scrolling with a Logitech G502 Lightspeed mouse (046d:c08d) in wireless mode
with the official wireless receiver (046d:c539, i.e. USB_DEVICE_ID_LOGITECH_NANO_RECEIVER_LIGHTSPEED_1
in `hid-logitech-dj.c`), the REL_WHEEL event is not fired consistently on mouse wheel notch/tick.
[Note: This only affects wireless through receiver; wired works as expected]
Rather than the event being fired when the mouse skips a notch/tick on the scroll
wheel, it feels like the REL_WHEEL event is fired somewhere roughly around the middle
point of the last notch/tick and the next notch/tick.
I recorded a quick video to demonstrate this:
https://youtu.be/IwaQAMDkotg
In this clip I scroll the mouse wheel gently up and down, back and forth. Notice the
appearance of REL_WHEEL_HI_RES with the value changing from 15 to -15 as the direction
is changed; the wheel is being scrolled past the notch, but the REL_WHEEL event is not fired.
When the hid-logitech-dj module is blacklisted, and linux defaults to a more generic
driver (usbhid); this issue is not present; which can be seen here: https://youtu.be/8AkVWHUe88M
To put this into a realistic end user perspective: If you try to play a game on Linux
with the current behaviour; and perform an action that requires the use of a scroll wheel
[for example; changing the current weapon in a shooter], the input is often 'dropped' from
the user perspective, leading to frustration.
I'm not exactly sure what further sort of information I could provide; I've only got back
to using Linux on the desktop after 7 years; and it's my first time raising a kernel issue.
That said, I'm happy to provide any further feedback, or even play with the kernel sources
if someone could give me ideas of what I should experiment with.
[-- Attachment #2: evtest samples.zip --]
[-- Type: application/zip, Size: 2654 bytes --]
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox