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)
commit79273e1b7eb0e2007c5a9cae71af31075df8e6c5
treebea654fe0a2be5cbb72f9cd4197d89ab0a0fe145
parent9c11fcf1a74d338774faa059b0aea24264c95658
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