By simply removing volatile qualifier in draw() from uint32_t *ptr, memory
accesses improve a lot in that test. We practically saw 1 order of magnitude in
the performance of VGEM and the speed was equally on using drm_intel specific
ioctls.
The inclusion of volatile has forced the compiler to load and store the
variable from memory on every run, hurting quite badly the performance.
Therefore, performance is dropped due many read operations in the mapped
pointer which is a no-no when objects are write-combining mapped.
This patch also removes sleep, that bothers performance measurements
This CL introduces -p option to vgem_fb_test. For now it only prints the
time to mmap imported vgem buffers, which is particularly useful to
benchmark and compare with other driver implementations.
Signed-off-by: Tiago Vignatti <tiago.vignatti@intel.com>