summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/radeon/rv250d.h
diff options
context:
space:
mode:
authorNoralf Trønnes <noralf@tronnes.org>2021-07-01 19:07:48 +0200
committerNoralf Trønnes <noralf@tronnes.org>2021-07-08 14:32:32 +0200
commit2eecd93b743b5611cd3654698794b4d0cefdc9ee (patch)
tree0ccbdfa9163126586581fbc44be72e9f39ab35b4 /drivers/gpu/drm/radeon/rv250d.h
parentf8ac863b6a93863334cefb94285daaa6617381b5 (diff)
drm/gud: Use scatter-gather USB bulk transfer
There'a limit to how big a kmalloc buffer can be, and as memory gets fragmented it becomes more difficult to get big buffers. The downside of smaller buffers is that the driver has to split the transfer up which hampers performance. Compression might also take a hit because of the splitting. Solve this by allocating the transfer buffer using vmalloc and create a SG table to be passed on to the USB subsystem. vmalloc_32() is used to avoid DMA bounce buffers on USB controllers that can only access 32-bit addresses. This also solves the problem that split transfers can give host side tearing since flushing is decoupled from rendering. usb_sg_wait() doesn't have timeout handling builtin, so it is wrapped in a timer like 4 out of 6 users in the kernel have done. v2: - Use DIV_ROUND_UP (Linus) - Add timeout note to the commit log (Linus) - Expand note about upper buffer limit (Linus) - Change var name s/timer/ctx/ in gud_usb_bulk_timeout() Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Noralf Trønnes <noralf@tronnes.org> Link: https://patchwork.freedesktop.org/patch/msgid/20210701170748.58009-2-noralf@tronnes.org
Diffstat (limited to 'drivers/gpu/drm/radeon/rv250d.h')
0 files changed, 0 insertions, 0 deletions