[PATCH v2 05/29] drm/gpusvm: Add support for GPU Shared Virtual Memory

Gwan-gyeong Mun gwan-gyeong.mun at intel.com
Wed Nov 20 03:00:52 UTC 2024



On 10/16/24 6:24 AM, Matthew Brost wrote:

> +
> +/**
> + * drm_gpusvm_get_devmem_page - Get a reference to a device memory page
> + * @page: Pointer to the page
> + * @zdd: Pointer to the GPU SVM zone device data
> + *
> + * This function associates the given page with the specified GPU SVM zone
> + * device data and initializes it for zone device usage.
> + */
> +static void drm_gpusvm_get_devmem_page(struct page *page,
> +				     struct drm_gpusvm_zdd *zdd)
> +{
> +	page->zone_device_data = drm_gpusvm_zdd_get(zdd);
> +	zone_device_page_init(page);
> +}
> +
To use the zone_device_page_init() function, CONFIG_ZONE_DEVICE=y in config.
To resolve build issues, CONFIG_ZONE_DEVICE dependency is required in 
xe's kconfig.


More information about the dri-devel mailing list