[Intel-gfx] [PATCH] drm/i915/gtt: split up i915_gem_gtt

Tvrtko Ursulin tvrtko.ursulin at linux.intel.com
Tue Jan 26 17:13:24 UTC 2021



On 06/01/2020 23:47, Matthew Auld wrote:
> Attempt to split i915_gem_gtt.[ch] into more manageable chunks.

> +void clear_pages(struct i915_vma *vma)
> +{
> +	GEM_BUG_ON(!vma->pages);
> +
> +	if (vma->pages != vma->obj->mm.pages) {
> +		sg_free_table(vma->pages);
> +		kfree(vma->pages);
> +	}
> +	vma->pages = NULL;
> +
> +	memset(&vma->page_sizes, 0, sizeof(vma->page_sizes));
> +}

We probably want to add a prefix now that the function is exported.

Regards,

Tvrtko


More information about the Intel-gfx mailing list