[igt-dev] [RFC PATCH 2/4] lib/i915/intel_memory_region: Add lib to manage memory regions
Chris Wilson
chris at chris-wilson.co.uk
Wed Aug 14 10:31:10 UTC 2019
Quoting Lukasz Kalamarz (2019-08-14 11:21:38)
> +/**
> + * gem_get_page_size:
> + * @fd: open i915 drm file descriptor
> + * @mem_region_type: used memory_region type
> + *
> + * With introduction of LMEM we observe different page sizes for those two
> + * memory regions. Without this helper function we may be prone to forget
> + * about setting proper page size.
> + */
> +uint32_t gem_get_batch_size(int fd, uint8_t mem_region_type)
> +{
> + return (mem_region_type == LOCAL_I915_DEVICE_MEMORY) ? 65536 : 4096;
You have to be kidding me. This, this constitutes a forward thinking uAPI?
-Chris
More information about the igt-dev
mailing list