lib/i915/intel_memory_region: free query_info in gem_get_lmem_region_count
PATCH 1/1 lib/i915/intel_memory_region: free query_info in gem_get_lmem_region_count
query_info calloc'd in gem_get_query_memory_regions should be freed in gem_get_lmem_region_count.
Cc Andrzej Turko <[email protected]>
Cc Zbigniew Kempczynski <[email protected]>
Cc Matthew Auld <[email protected]>
Fixes f32993a2ed ("lib/i915/intel_memory_region: Add new memory region lib")
Signed-off-by Ashutosh Dixit <[email protected]>
--- lib/i915/intel_memory_region.c | 1 + 1 file changed, 1 insertion(+)
lib/i915/intel_memory_region.c +1 -0
@@ -149,6 +149,7 @@ uint8_t gem_get_lmem_region_count(int fd)if (query_info->regions[i].region.memory_class ==I915_MEMORY_CLASS_DEVICE ) lmem_regions +=1 ; } +free (query_info);return lmem_regions; }
Signature · 6 lines
2.31.1 _______________________________________________ igt-dev mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/igt-dev
PATCH 1/1 lib: Use fast WC reads for gem_pread fallback
From: Chris Wilson <[email protected]>
Replacing pread with an uncached read is abysmmally slow. Replacing pread with a streaming read is still slow, but at least faster than not.
Signed-off-by Chris Wilson <[email protected]>
Reviewed-by Ashutosh Dixit <[email protected]>
--- lib/ioctl_wrappers.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
lib/ioctl_wrappers.c +2 -1
@@ -55,6 +55,7 @@#include "intel_io.h" #include "igt_debugfs.h" #include "igt_sysfs.h" +#include "igt_x86.h" #include "config.h" #include "i915/gem_mman.h"
@@ -385,7 +386,7 @@ static void mmap_read(int fd, uint32_t handle, uint64_t offset, void *buf, uint6gem_set_domain (fd, handle,I915_GEM_DOMAIN_WC ,0 ); } -memcpy (buf, map + offset, length); +igt_memcpy_from_wc (buf, map + offset, length);munmap (map, offset + length); }
Signature · 6 lines
2.31.1 _______________________________________________ igt-dev mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/igt-dev