[igt-dev] [Intel-gfx] [PATCH i-g-t] lib: Pass device fd to gem_mmappable_aperture_size()

Chris Wilson chris at chris-wilson.co.uk
Mon Dec 14 20:48:40 UTC 2020


Quoting Chang, Yu bruce (2020-12-14 18:45:04)
> +/**
> + * gem_mappable_aperture_size:
> + *
> + * Feature test macro to query the kernel for the mappable gpu aperture size.
> + * This is the area available for GTT memory mappings.
> + *
> + * Returns: The mappable gtt address space size.
> + */
> +uint64_t gem_mappable_aperture_size(int fd)
> +{
> +       struct pci_device *pci_dev = igt_device_get_pci_device(fd);
> 
> Does it make sense to eliminate the function intel_get_pci_device() if not
> being used anymore? But it can be a separate patch.

It's still used by tools. The complication there is that we mostly
need to lookup the pci device without loading i915.ko. 
-Chris


More information about the igt-dev mailing list