#
94f5f422 |
| 16-Aug-2024 |
Patrick Williams <patrick@stwcx.xyz> |
clang-format: re-format for clang-18
clang-format-18 isn't compatible with the clang-format-17 output, so we need to reformat the code with the latest version. The way clang-18 handles lambda forma
clang-format: re-format for clang-18
clang-format-18 isn't compatible with the clang-format-17 output, so we need to reformat the code with the latest version. The way clang-18 handles lambda formatting also changed, so we have made changes to the organization default style format to better handle lambda formatting.
See I5e08687e696dd240402a2780158664b7113def0e for updated style. See Iea0776aaa7edd483fa395e23de25ebf5a6288f71 for clang-18 enablement.
Change-Id: I6e1b877213f3a2921d78ffe2a5fe71d93db65574 Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
show more ...
|
#
3c110335 |
| 10-May-2023 |
Patrick Williams <patrick@stwcx.xyz> |
clang-format: copy latest and re-format
clang-format-16 has some backwards incompatible changes that require additional settings for best compatibility and re-running the formatter. Copy the latest
clang-format: copy latest and re-format
clang-format-16 has some backwards incompatible changes that require additional settings for best compatibility and re-running the formatter. Copy the latest .clang-format from the docs repository and reformat the repository.
Change-Id: I520ea7fb067992065539299a2e5dfa4ff28788ab Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
show more ...
|
#
4148d0c6 |
| 15-Mar-2023 |
Troy Lee <troy_lee@aspeedtech.com> |
Incorrect port id for gadget driver
The portId should be 1e6a0000.usb-vhub.X instead of gadget.Y.
Tested with 1. Connect evb-ast2500 evb to a mother board. 2. Dump the input devices event by evtest
Incorrect port id for gadget driver
The portId should be 1e6a0000.usb-vhub.X instead of gadget.Y.
Tested with 1. Connect evb-ast2500 evb to a mother board. 2. Dump the input devices event by evtest. 3. Establish KVM session on WebUI. 4. Move around the mouse on WebUI. 5. Press keyboard on WebUI.
Mouse: ``` $ sudo evtest /dev/input/event16 Input driver version is 1.0.1 Input device ID: bus 0x3 vendor 0x1d6b product 0x104 version 0x101 Input device name: "OpenBMC virtual_input" Supported events: Event type 0 (EV_SYN) Event type 1 (EV_KEY) Event code 272 (BTN_LEFT) Event code 273 (BTN_RIGHT) Event code 274 (BTN_MIDDLE) Event type 2 (EV_REL) Event code 8 (REL_WHEEL) Event code 11 (REL_WHEEL_HI_RES) Event type 3 (EV_ABS) Event code 0 (ABS_X) Value 16383 Min 0 Max 32767 Event code 1 (ABS_Y) Value 16383 Min 0 Max 32767 Event type 4 (EV_MSC) Event code 4 (MSC_SCAN) Properties: Testing ... (interrupt to exit) Event: time 1678869292.665398, type 3 (EV_ABS), code 0 (ABS_X), value 30720 Event: time 1678869292.665398, type 3 (EV_ABS), code 1 (ABS_Y), value 0 Event: time 1678869292.665398, -------------- SYN_REPORT ------------ Event: time 1678869292.683394, type 3 (EV_ABS), code 0 (ABS_X), value 30566 Event: time 1678869292.683394, type 3 (EV_ABS), code 1 (ABS_Y), value 546 Event: time 1678869292.683394, -------------- SYN_REPORT ------------ Event: time 1678869292.699394, type 3 (EV_ABS), code 0 (ABS_X), value 30412 Event: time 1678869292.699394, type 3 (EV_ABS), code 1 (ABS_Y), value 819 Event: time 1678869292.699394, -------------- SYN_REPORT ------------ Event: time 1678869292.716394, type 3 (EV_ABS), code 0 (ABS_X), value 30259 Event: time 1678869292.716394, type 3 (EV_ABS), code 1 (ABS_Y), value 1228 Event: time 1678869292.716394, -------------- SYN_REPORT ------------ Event: time 1678869292.734401, type 3 (EV_ABS), code 0 (ABS_X), value 16383 Event: time 1678869292.734401, type 3 (EV_ABS), code 1 (ABS_Y), value 16383 ```
Keyboard: ``` $ sudo evtest /dev/input/event15 Input driver version is 1.0.1 Input device ID: bus 0x3 vendor 0x1d6b product 0x104 version 0x101 Input device name: "OpenBMC virtual_input" Supported events: Event type 0 (EV_SYN) Event type 1 (EV_KEY) Event code 1 (KEY_ESC) Event code 2 (KEY_1) Event code 3 (KEY_2) Event code 4 (KEY_3) Event code 5 (KEY_4) Event code 6 (KEY_5) Event code 7 (KEY_6) Event code 8 (KEY_7) Event code 9 (KEY_8) Event code 10 (KEY_9) ... skip Event: time 1678869404.403709, -------------- SYN_REPORT ------------ Event: time 1678869404.566714, type 4 (EV_MSC), code 4 (MSC_SCAN), value 70007 Event: time 1678869404.566714, type 1 (EV_KEY), code 32 (KEY_D), value 1 Event: time 1678869404.566714, -------------- SYN_REPORT ------------ Event: time 1678869404.612705, type 4 (EV_MSC), code 4 (MSC_SCAN), value 70007 Event: time 1678869404.612705, type 1 (EV_KEY), code 32 (KEY_D), value 0 Event: time 1678869404.612705, -------------- SYN_REPORT ------------ Event: time 1678869405.525694, type 4 (EV_MSC), code 4 (MSC_SCAN), value 700e1 Event: time 1678869405.525694, type 1 (EV_KEY), code 42 (KEY_LEFTSHIFT), value 1 Event: time 1678869405.525694, -------------- SYN_REPORT ------------ Event: time 1678869405.535692, type 4 (EV_MSC), code 4 (MSC_SCAN), value 700e1 Event: time 1678869405.535692, type 1 (EV_KEY), code 42 (KEY_LEFTSHIFT), value 0 ```
Fixes: 20de859 ("Potentially connect udc device incorrectly") Change-Id: Ia01d767c2f07145ab0abe660ff63f42d5e8974a2 Signed-off-by: Troy Lee <troy_lee@aspeedtech.com>
show more ...
|
#
fda1393c |
| 07-Mar-2023 |
charkear <charles.kearney@hpe.com> |
whitespace removal suggested by format-code.sh script run on the repository.
Change-Id: Ib54bd222ba3549bcf310a211992c2e35681f8b81 Signed-off-by: charles kearney <charles.kearney@hpe.com>
|
#
20de859f |
| 10-Feb-2023 |
Troy Lee <troy_lee@aspeedtech.com> |
Potentially connect udc device incorrectly
The fs::directory_iterator doesn't specify the order of enumeration of folders. The if-condition here doesn't prevent the folder other than gadget port, e
Potentially connect udc device incorrectly
The fs::directory_iterator doesn't specify the order of enumeration of folders. The if-condition here doesn't prevent the folder other than gadget port, e.g. 1e6a0000.usb-vhub:pX, be taken into account, e.g. power folder. In this case, an exception will be generate internally in connect(). This patch add another check to make sure the folder is a gadget port.
Without this patch, occasionally obmc-ikvm shows below message and failed to enumerate USB-HID gadget devices (mouse and keyboard). ``` [ 101.840770] Error: Driver 'configfs-gadget' is already registered, aborting... [ 101.848547] UDC core: obmc_hid: driver registration failed: -16
```
Tested with evb-ast2500 to connect VM, then launch KVM and disconnect for several times.
Fixes: c11257d864ff ("Connect HID gadget device dynamically") Signed-off-by: Troy Lee <troy_lee@aspeedtech.com> Change-Id: I0cad041d69d580a544e60c79e1c991482ca79819
show more ...
|
#
fe685fb4 |
| 25-Oct-2022 |
Marvin Lin <milkfafa@gmail.com> |
Add support for specifying UDC that HID gadget will connect to
Currently, HID gadget always connects to the USB virtual hub port under /sys/bus/platform/devices/1e6a0000.usb-vhub, which only works o
Add support for specifying UDC that HID gadget will connect to
Currently, HID gadget always connects to the USB virtual hub port under /sys/bus/platform/devices/1e6a0000.usb-vhub, which only works on ASPEED platform.
This commit adds support for specifying UDC that HID gadget will connect to, it could be useful for non-ASPEED platform. Although there are still some other ASPEED-specific behaviors need to be addressed, but this commit is the first step for non-ASPEED platform.
Tested: Specify UDC by '-u' parameter and HID gadget will connect to it. Otherwise, HID gadget will connect to the USB virtual hub port.
Signed-off-by: Marvin Lin <milkfafa@gmail.com> Change-Id: Ie24ed9d32cb4f7483e8d4c8b51cc5e1bb5fa94de
show more ...
|
#
f79f6f54 |
| 05-Jul-2022 |
George Liu <liuxiwei@inspur.com> |
Add clang-format
Refer:https://github.com/openbmc/docs/blob/ac5d544553934f8083c61c5986a1420261bc8a4c/style/cpp/.clang-format
Signed-off-by: George Liu <liuxiwei@inspur.com> Change-Id: I931503febf4e
Add clang-format
Refer:https://github.com/openbmc/docs/blob/ac5d544553934f8083c61c5986a1420261bc8a4c/style/cpp/.clang-format
Signed-off-by: George Liu <liuxiwei@inspur.com> Change-Id: I931503febf4e17af5c328a6496e499992bc4e381
show more ...
|
#
3fa0bfba |
| 23-Dec-2021 |
Tejas Patil <tejaspp@ami.com> |
Add Mouse Wheel Scroll Events
This commit add support for mouse wheel scroll events in KVM. It supports for mouse scroll up/down buttons, by which user can use mouse wheel functionality.
Testing: T
Add Mouse Wheel Scroll Events
This commit add support for mouse wheel scroll events in KVM. It supports for mouse scroll up/down buttons, by which user can use mouse wheel functionality.
Testing: Tested mouse wheel functionality. Verified mouse wheel scroll up/down functions.
Signed-off-by: Tejas Patil <tejaspp@ami.com> Change-Id: I7f53f0f203a81b55f2377982571e8f415ed99df2
show more ...
|
#
40fd5429 |
| 17-Jun-2021 |
Zev Weiss <zweiss@equinix.com> |
Fix error reporting in Input::writeKeyboard()
write(2) only sets errno on failure; a successful call leaves it unchanged. We had been being using errno to determine whether or not the write succeed
Fix error reporting in Input::writeKeyboard()
write(2) only sets errno on failure; a successful call leaves it unchanged. We had been being using errno to determine whether or not the write succeeded, but weren't zeroing it before the call and hence could end up spuriously reporting failure from writeKeyboard() even when the write actually succeeded.
That false report can in turn cause sendWakeupPacket() to not send the key release after its XK_Shift_L key press, leading to the host thinking the shift key is being held down, which among other minor bits of confusion can cause a boot hang (Ubuntu's GRUB, for example, is patched to interpret a held shift key as a signal from the user to interrupt its default boot sequence and switch to an interactive menu).
We now instead just return success immediately after a complete write and false otherwise (if we exhaust our retry attempts or hit a non-EAGAIN failure).
Tested: verified with strace that obmc-ikvm sends both the press and the release of the shift key in sendWakeupPacket(); Ubuntu host booted cleanly instead of stopping at the GRUB menu.
Signed-off-by: Zev Weiss <zweiss@equinix.com> Change-Id: Ic1229b3979690040879c7e4471ebc987878289e6
show more ...
|
#
673ac2eb |
| 30-Jul-2020 |
Jae Hyun Yoo <jae.hyun.yoo@linux.intel.com> |
Refine HID report writing logic
Blocking write on the keyboard HID device causes screen freezing during turning off the host power. To fix this issue, this commit refines the logic using non-blockin
Refine HID report writing logic
Blocking write on the keyboard HID device causes screen freezing during turning off the host power. To fix this issue, this commit refines the logic using non-blocking write. As a side effect, non-blocking write introduces event dropping when kernel HID driver returns -EAGAIN when the driver is in busy state so this commit also adds retry logic to cover the case.
Tested: Didn't see the screen freezing issue.
Change-Id: Ibd95f567c49f448cd053948c14c006de17c52420 Signed-off-by: Jae Hyun Yoo <jae.hyun.yoo@linux.intel.com>
show more ...
|
#
c11257d8 |
| 23-Jul-2020 |
Jae Hyun Yoo <jae.hyun.yoo@intel.com> |
Connect HID gadget device dynamically
Connecting HID gadget device statically from the beginning of this service causes an issue on WHLK test. To prevent the issue, this commit changes the HID gadge
Connect HID gadget device dynamically
Connecting HID gadget device statically from the beginning of this service causes an issue on WHLK test. To prevent the issue, this commit changes the HID gadget device handling as dynamic so that the HID gadget device can be connected when this service has at least one KVM client.
Tested: /dev/hidg0 and /dev/hidg1 created only when at least one KVM client is connected.
Change-Id: I5f6596b9e4e297fb6b507000499fc041460659f7 Signed-off-by: Jae Hyun Yoo <jae.hyun.yoo@intel.com>
show more ...
|
#
7a89cd23 |
| 21-Aug-2019 |
Jae Hyun Yoo <jae.hyun.yoo@linux.intel.com> |
Fix keyboard and mouse input events dropping issue
Restarting of HID input devices causes input events dropping issue which is critical for BMC KVM uses. For an example, user can't enter to BIOS by
Fix keyboard and mouse input events dropping issue
Restarting of HID input devices causes input events dropping issue which is critical for BMC KVM uses. For an example, user can't enter to BIOS by doing keep pressing 'F2' or 'Del' key because of this issue.
To fix the issue, this commit removes the input device restarting logic and refines error log journaling logic using errno checking.
Tested: 1. Open BMCweb -> Server control -> KVM. 2. Make a host reset and keep pressing 'F2' key. 3. Was able to enter to BIOS using the key press.
Change-Id: Iec1bfad1d9e5825858844cab658bbfa3e6bc24f6 Signed-off-by: Jae Hyun Yoo <jae.hyun.yoo@linux.intel.com>
show more ...
|
#
7cf1f1d4 |
| 30-Sep-2019 |
Eddie James <eajames@linux.ibm.com> |
Prevent excessive journal logging by wakeup signal
When the application is waiting for timings, it restarts the video to try and get a signal. Part of this process sends a wake-up signal on the virt
Prevent excessive journal logging by wakeup signal
When the application is waiting for timings, it restarts the video to try and get a signal. Part of this process sends a wake-up signal on the virtual keyboard and pointer in case host VGA has slept. But if the host is shut down, this causes repeated errors in the journal as the HID gadgets return errors.
Fix this by consolidating the keyboard/pointer write functions and therefore closing the HID gadget file handles when the host is shut down, preventing further wake-up attempts until host returns.
Change-Id: Id5fe484c976eccefa6a72393d4d6b2b301d28a1a Signed-off-by: Eddie James <eajames@linux.ibm.com>
show more ...
|
#
513d95ef |
| 20-Aug-2019 |
Jae Hyun Yoo <jae.hyun.yoo@linux.intel.com> |
Add keypad input support
This commit makes keypad inputs available.
Change-Id: I95a9268cd930c85846947b6bd49c97087121ca8a Signed-off-by: Jae Hyun Yoo <jae.hyun.yoo@linux.intel.com>
|
#
23135dd9 |
| 09-Aug-2019 |
Eddie James <eajames@linux.ibm.com> |
eliminate excessive journal errors
When the USB gadget is shut down, the application needs to avoid writes to it in order to avoid lots of errors in the kernel log. Close the file handle and re-open
eliminate excessive journal errors
When the USB gadget is shut down, the application needs to avoid writes to it in order to avoid lots of errors in the kernel log. Close the file handle and re-open it when timings are detected again. Also, prevent logging the failed timings query more than once.
Change-Id: Ic126828fe26ef44ebb0a5cb65cc47b23bb84f7f3 Signed-off-by: Eddie James <eajames@linux.ibm.com>
show more ...
|
#
4749f934 |
| 18-Apr-2019 |
Eddie James <eajames@linux.ibm.com> |
Switch pointer gadget to non-blocking
Writes to the pointer gadget can hang if the host has no cursor. Using non-blocking mode prevents this hanging. Also prevent repeated error logging due to point
Switch pointer gadget to non-blocking
Writes to the pointer gadget can hang if the host has no cursor. Using non-blocking mode prevents this hanging. Also prevent repeated error logging due to pointer write failures in this case.
Change-Id: I9c423a4a0af4b37a69ae20650b86a6266e5b4b41 Signed-off-by: Eddie James <eajames@linux.ibm.com>
show more ...
|
#
3389098f |
| 19-Mar-2019 |
Jae Hyun Yoo <jae.hyun.yoo@linux.intel.com> |
Fix mouse button mapping issue
Mapping of a mouse button event delivered from libvncserver is different from HID gadget driver so this patch swaps bit position 1 and 2 to map center and right button
Fix mouse button mapping issue
Mapping of a mouse button event delivered from libvncserver is different from HID gadget driver so this patch swaps bit position 1 and 2 to map center and right button correctly.
Tested: KVM mouse buttons worked correctly.
Change-Id: Ia1771df6763b906b5cff3041df9095e0c72c892b Signed-off-by: Jae Hyun Yoo <jae.hyun.yoo@linux.intel.com>
show more ...
|
#
2bc661d3 |
| 25-Feb-2019 |
Jae Hyun Yoo <jae.hyun.yoo@linux.intel.com> |
Fix pointer position mismatch issue
In case of big size resolution of host video, mouse pointer indicates slightly upper left than client GUI pointer. It's caused by rounding off value below the dec
Fix pointer position mismatch issue
In case of big size resolution of host video, mouse pointer indicates slightly upper left than client GUI pointer. It's caused by rounding off value below the decimal point on the coordinate unit. For an example, in 1600x1200 screen size, the x coordinate unit is 32768 / 1600 = 20.48 but we use 20 after rounding off the 0.48.
To prevent this issue, this commit changes logic of the calculation. It uses integer operations instead of using floating point operations for better performance.
Change-Id: Ie1fbb6b41ace997c50982d9542b0b03280b2220f Signed-off-by: Jae Hyun Yoo <jae.hyun.yoo@linux.intel.com>
show more ...
|
#
eaf5c5b6 |
| 20-Feb-2019 |
Jae Hyun Yoo <jae.hyun.yoo@linux.intel.com> |
Send a keyboard event too for a wake-up event
This commit adds a keyboard event sending for waking up the host. So both keyboard and mouse events will be triggered for a case when the host is in mod
Send a keyboard event too for a wake-up event
This commit adds a keyboard event sending for waking up the host. So both keyboard and mouse events will be triggered for a case when the host is in mode that doesn't support mouse.
Change-Id: I90d9a1e53706cd860340dfd8be688128fa95c4fc Signed-off-by: Jae Hyun Yoo <jae.hyun.yoo@linux.intel.com>
show more ...
|
#
7dfac9ff |
| 15-Jan-2019 |
Jae Hyun Yoo <jae.hyun.yoo@linux.intel.com> |
Fix HID issues
Mixed type HID report descriptor in the current trunk doesn't work well so this patch fixes the HID creation logic to make it use composite configuration which has separated keyboard
Fix HID issues
Mixed type HID report descriptor in the current trunk doesn't work well so this patch fixes the HID creation logic to make it use composite configuration which has separated keyboard and mouse HID descriptor using a single USB port.
ikvm service also should be changed using below setting after applying this patch: ExecStart=/usr/bin/env obmc-ikvm -v /dev/video0 -k /dev/hidg0 -p /dev/hidg1
Change-Id: I9b2975f4fdade2c6030def829951d02b24bea562 Signed-off-by: Jae Hyun Yoo <jae.hyun.yoo@linux.intel.com>
show more ...
|
#
21b177e0 |
| 11-Dec-2018 |
Eddie James <eajames@linux.ibm.com> |
Add input handling class
The Input class depends on the RFB server and V4L2 video classes, so add outlines for those as well.
Change-Id: I2826f3da78dee10826e378dfc2c773b891da1f03 Signed-off-by: Edd
Add input handling class
The Input class depends on the RFB server and V4L2 video classes, so add outlines for those as well.
Change-Id: I2826f3da78dee10826e378dfc2c773b891da1f03 Signed-off-by: Eddie James <eajames@linux.ibm.com>
show more ...
|