drm/udl: Rework URB allocation
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest11 patches 9 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/11 | drm/udl: Release URB in udl_put_urb()drivers/ drivers/ | +18 | 1 reply | |
| 2/11 | drm/udl: Do not use URB completion handler for error cleanupdrivers/ drivers/ drivers/ +1 more | +4 | 0 replies | |
| 3/11 | drm/udl: Store per-URB allocation length in struct urb_nodedrivers/ drivers/ | +8 | 0 replies | |
| 4/11 | drm/udl: Allocate bulk URBs in helper functionsdrivers/ | +47 | 3 replies | |
| 5/11 | drm/udl: Free bulk URBs in helper functionsdrivers/ | +10 | 0 replies | |
| 6/11 | drm/udl: Rework the error handling in udl_submit_urb()drivers/ | +10 | 0 replies | |
| 7/11 | drm/udl: Managed cleanup of URB cachedrivers/ drivers/ drivers/ | +22 | 0 replies | |
| 8/11 | drm/udl: Track number of URBs in flightdrivers/ drivers/ | +34 | 0 replies | |
| 9/11 | drm/udl: Synchronize pending URBs on each framedrivers/ | +18 | 2 replies | |
| 10/11 | drm/udl: Allocate URBs on demanddrivers/ drivers/ | +44 | 3 replies | |
| 11/11 | drm/udl: Implement URB cache as LIFO stackdrivers/ | +1 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH 00/11] drm/udl: Rework URB allocation
Udl caches once-allocated URBs for later use. By default, it has a fixed number of 20 URBs in flight at most. Depending on the USB, this can either consume too much bandwidth or keep free bandwidth unused.
Replace the fixed-size cache with dynamic allocation of the URBs required. Adapt page-flip rate according to the actually available bandwidth on the USB.
Patches 1 to 6 clean up the code, fix a few minor issue and provide a clean interface for allocating and freeing URBs.
Patch 7 switches the URB cache to managed release. As before, the cache collects all outstanding URBs as part of the USB device removal.
Patches 8 to 11 implement dynamic allocation of URBs. The URB cache tracks the number of URBs in flight and allocates new ones of the cache has been exhausted. The udl driver now sends out as many URBs as necessary for the current frame without limitting itself to 20 URBs at a time. To avoid overloading the USB, udl waits in atomic_begin() for the previous frame's URBs to complete. This adapts page-flip rate to the bandwidth available on the USB.
Patch 11 contains a minor improvement of the cache locality.
Tested with superttuxkart and vkcube on weston.
Note that display output might not happen faster in any way. This series only addresses one of many bottlenecks (e.g., message packing, software rendering).
Thomas Zimmermann (11):
drm/udl: Release URB in udl_put_urb()
drm/udl: Do not use URB completion handler for error cleanup drm/udl: Store per-URB allocation length in struct urb_node drm/udl: Allocate bulk URBs in helper functions drm/udl: Free bulk URBs in helper functions drm/udl: Rework the error handling in udl_submit_urb() drm/udl: Managed cleanup of URB cache
drm/udl: Track number of URBs in flight
drm/udl: Synchronize pending URBs on each frame drm/udl: Allocate URBs on demand
drm/udl: Implement URB cache as LIFO stack
drivers/gpu/drm/udl/udl_drv.c | 2 - drivers/gpu/drm/udl/udl_drv.h | 8 +- drivers/gpu/drm/udl/udl_main.c | 280 +++++++++++++++-------------- drivers/gpu/drm/udl/udl_modeset.c | 20 ++- drivers/gpu/drm/udl/udl_transfer.c | 2 +- 5 files changed, 168 insertions(+), 144 deletions(-)
base-commit: 7d502136b31169f6b5575f7f89c3da60cdf7891d
Signature · 1 line
2.56.0