freedreno: reduce mmap
Use blitter to clear/initialize UBWC data, rather than mmap()
+memset()
, to reduce virtual memory usage.. which is especially useful for 32b processes.
Looking at chrome gpu-process before/after opening a giant 11517x12000 png of doom:
gpu-process VIRT/RES/SHR:
current:
open Files: 418M / 80396 / 35456
big png: 1532M / 99520 / 52092
move UBWC init to blitter:
open Files: 346M / 81520 / 35452
big png: 384M / 99876 / 51960
add _NOMAP hint:
open Files: 345M / 78688 / 34724
big png: 381M / 97312 / 51232
Note that these figures are constantly fluctuating so take a small difference with a grain of salt. The _NOMAP
hint didn't really seem to make much of an impact, so I might drop the last two patches.