dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 00/11] drm/udl: Rework URB allocation
@ 2026-11-19 14:02 Thomas Zimmermann
  2026-11-19 14:02 ` [PATCH 01/11] drm/udl: Release URB in udl_put_urb() Thomas Zimmermann
                   ` (10 more replies)
  0 siblings, 11 replies; 16+ messages in thread
From: Thomas Zimmermann @ 2026-11-19 14:02 UTC (permalink / raw)
  To: airlied, sean, tiwai, patrik.r.jakobsson, maarten.lankhorst,
	mripard, airlied, simona
  Cc: dri-devel, sashiko-reviews, Thomas Zimmermann

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
-- 
2.56.0


^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2026-11-19 18:06 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-19 14:02 [PATCH 00/11] drm/udl: Rework URB allocation Thomas Zimmermann
2026-11-19 14:02 ` [PATCH 01/11] drm/udl: Release URB in udl_put_urb() Thomas Zimmermann
2026-11-19 17:03   ` Jie Feng
2026-11-19 14:02 ` [PATCH 02/11] drm/udl: Do not use URB completion handler for error cleanup Thomas Zimmermann
2026-11-19 14:02 ` [PATCH 03/11] drm/udl: Store per-URB allocation length in struct urb_node Thomas Zimmermann
2026-11-19 14:02 ` [PATCH 04/11] drm/udl: Allocate bulk URBs in helper functions Thomas Zimmermann
2026-11-19 16:38   ` Jie Feng
2026-11-19 14:02 ` [PATCH 05/11] drm/udl: Free " Thomas Zimmermann
2026-11-19 14:02 ` [PATCH 06/11] drm/udl: Rework the error handling in udl_submit_urb() Thomas Zimmermann
2026-11-19 14:02 ` [PATCH 07/11] drm/udl: Managed cleanup of URB cache Thomas Zimmermann
2026-11-19 14:02 ` [PATCH 08/11] drm/udl: Track number of URBs in flight Thomas Zimmermann
2026-11-19 14:02 ` [PATCH 09/11] drm/udl: Synchronize pending URBs on each frame Thomas Zimmermann
2026-11-19 14:02 ` [PATCH 10/11] drm/udl: Allocate URBs on demand Thomas Zimmermann
2026-11-19 14:47   ` sashiko-bot
2026-11-19 18:05     ` Thomas Zimmermann
2026-11-19 14:02 ` [PATCH 11/11] drm/udl: Implement URB cache as LIFO stack Thomas Zimmermann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox