summaryrefslogtreecommitdiff
path: root/tests/kms_writeback.c
diff options
context:
space:
mode:
authorBrian Starkey <rodrigosiqueiramelo@gmail.com>2020-08-30 13:44:09 -0400
committerPetri Latvala <petri.latvala@intel.com>2020-09-04 14:51:17 +0300
commitfa23d371fb3899408dc2cfdb4ccc4474e7f8eee8 (patch)
tree732b8b132f47711168939119f897b850bd6e25d7 /tests/kms_writeback.c
parent150948b9fdac87135b04f767bfa0617ff0bb1f84 (diff)
lib: Add function to hash a framebuffer
To use writeback buffers as a CRC source, we need to be able to hash them. Implement a simple FVA-1a hashing routine for this purpose. Doing a bytewise hash on the framebuffer directly can be very slow if the memory is noncached. By making a copy of each line in the FB first (which can take advantage of word-access speedup), we can do the hash on a cached copy, which is much faster (10x speedup on my platform). Changes since V7 (Maxime Ripard): * Maxime Ripard: - Replace `gem_mmap__gtt` by `igt_fb_map_buffer` on `igt_fb_get_crc()` * Rodrigo Siqueira: - Rename igt_fb_get_crc to igt_fb_get_fnv1a_crc Changes since V6 (Simon Ser): * Use plain uint32_t for FNV1a_OFFSET_BIAS and FNV1a_PRIME * Return -EINVAL in case fb->num_planes != 1 * Just copy fb->width * cpp instead of copy the whole stride v5: use igt_memcpy_from_wc() instead of plain memcpy, as suggested by Chris Wilson Signed-off-by: Brian Starkey <brian.starkey@arm.com> [rebased and updated to the most recent API] Signed-off-by: Liviu Dudau <liviu.dudau@arm.com> [rebased and updated] Signed-off-by: Rodrigo Siqueira <rodrigosiqueiramelo@gmail.com> Reviewed-by: Simon Ser <simon.ser@intel.com> Reviewed-by: Liviu Dudau <liviu.dudau@arm.com>
Diffstat (limited to 'tests/kms_writeback.c')
0 files changed, 0 insertions, 0 deletions