[Intel-gfx] [PATCH 04/15] drm/i915: introduce gem object page_sizes

Chris Wilson chris at chris-wilson.co.uk
Thu Jun 1 09:49:09 UTC 2017


On Wed, May 31, 2017 at 07:51:59PM +0100, Matthew Auld wrote:
> +	max_page_size = BIT(fls64(obj->mm.page_sizes.sg)-1);
> +
> +	/* If were are actually dealing with a single page-size, mark it so */
> +	if (IS_ALIGNED(obj->mm.page_sizes.phys, max_page_size))
> +		obj->mm.page_sizes.sg = max_page_size;

Pardon?

If the physical page sizes is a multiple of the max sg->length (rounded
to GTT page sizes), only use the max?

page_sizes.sg will already express the smallest unit that can be used to
for the whole object (as well as the largest one that may be used
opportunistically).

The current kselftests that mix sg chunk sizes are ignorant of the large
pages sizes, it would be useful to add some that did mix huge pages.
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre


More information about the Intel-gfx mailing list