freedreno: bo cache improvements
The bo cache keeps released bo's around for 1sec.. at 1sec granularity. That might be suboptimal (ie. how long it is kept around is a function of where within a one-second period you are when it is freed.)
Also, if we know that we are allocating a buffer whose first use will be GPU write, we don't necessarily have to wait for the bo to become idle.. but there is the slight complication that we need to know it will be used at same priority level, so the new use of the bo won't happen before previous use completes. This could potentially let us keep fewer bo's in the cache and avoid turning to the kernel to allocate a new buffer.
Hopefully some tweaks along these lines will reduce the amount of madvise related purging seen in some cases.