]> git.baikalelectronics.ru Git - kernel.git/commit
drm/vmwgfx: Add a cpu blit utility that can be used for page-backed bos
authorThomas Hellstrom <thellstrom@vmware.com>
Tue, 16 Jan 2018 08:33:27 +0000 (09:33 +0100)
committerThomas Hellstrom <thellstrom@vmware.com>
Thu, 22 Mar 2018 11:08:23 +0000 (12:08 +0100)
commit853b4ed4a0dad6851f9d4d51f588395e5a738b49
treebea654fe0a2be5cbb72f9cd4197d89ab0a0fe145
parentb0f519016ae9bab73e430d004d7d0045b2c6ac07
drm/vmwgfx: Add a cpu blit utility that can be used for page-backed bos

The utility uses kmap_atomic() instead of vmapping the whole buffer
object. As a result there will be more book-keeping but on some
architectures this will help avoid exhausting vmalloc space and also
avoid expensive TLB flushes.

The blit utility also adds a provision to compute a bounding box of
changed content, which is very useful to optimize presentation speed
of ill-behaved applications that don't supply proper damage regions, and
for page-flips. The cost of computing the bounding box is not that
expensive when done in a cpu-blit utility like this.

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
drivers/gpu/drm/vmwgfx/Makefile
drivers/gpu/drm/vmwgfx/vmwgfx_blit.c [new file with mode: 0644]
drivers/gpu/drm/vmwgfx/vmwgfx_drv.h