[igt-dev] [PATCH i-g-t] tests/kms: Return false in gem_has_lmem for kernels not having DRM_I915_QUERY_MEMORY_REGIONS support

Dixit, Ashutosh ashutosh.dixit at intel.com
Sat Jul 24 21:20:19 UTC 2021


On Sat, 24 Jul 2021 09:53:17 -0700, Vidya Srinivas wrote:
>
> @@ -164,6 +175,9 @@ uint8_t gem_get_lmem_region_count(int fd)
>   */
>  bool gem_has_lmem(int fd)
>  {
> +	int ret = gem_has_memregion_query_support(fd);
> +	if (ret == ENOSYS || ret == ENOTSUP)
> +		return false;
>	return gem_get_lmem_region_count(fd) > 0;

gem_get_query_memory_regions is still broken. So we should use
__i915_query_items there.

The patch title also should not say tests/kms.


More information about the igt-dev mailing list