-
From my experience, I believe there is a buffer size limit for GUD_REQ_SET_BUFFER requests. If I set the USB Bulk transfer size to 9216000 bytes (1920x1200x4) and send it to the Raspberry Pi4 GUD, the GUD_REQ_SET_BUFFER request is accepted, but the next GUD_REQ_GET_STATUS request returns 0x03 (GUD_STATUS_ PROTOCOL_ERROR), while a request for 4147200 bytes (1920x1080x2) is accepted and succeeding GUD_REQ_GET_STATUS returns 0x00 (OK). I then found the GUD Gadget source code fragment below, in gud_gadget_init() function.
What is of interest here is KMALLOC_MAX_SIZE, which is said to be around 4 MB in many cases. (I am not very familiar with this). Thanks, |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 4 replies
-
The max buffer size is communicated in gud_display_descriptor_req. See If the buffer is not big enough to send a display update it is split into smaller updates. See gud_flush_damage() in the host driver. KMALLOC_MAX_SIZE can be increased by changing the kconfig knob CONFIG_ARCH_FORCE_MAX_ORDER |
Beta Was this translation helpful? Give feedback.
-
Thank you for quick response. magic=0x1d50614d, version=0x01, flags=0x00000001 So, KMALLOC_MAX_SIZE must be 4194304 bytes (4MB) then split bulk transfer for every 4MB worked very fine. |
Beta Was this translation helpful? Give feedback.
-
In fact, I am now in charge of developing a proprietary Windows 10 USB display driver, also works for GUD devices (at this point). |
Beta Was this translation helpful? Give feedback.
The max buffer size is communicated in gud_display_descriptor_req. See
gud_gadget_req_get_descriptor()
in the gadget.If the buffer is not big enough to send a display update it is split into smaller updates. See gud_flush_damage() in the host driver.
KMALLOC_MAX_SIZE can be increased by changing the kconfig knob CONFIG_ARCH_FORCE_MAX_ORDER