[Intel-gfx] [PATCH 03/11] drm/i915: Use insert_page for pwrite_fast

Chris Wilson chris at chris-wilson.co.uk
Thu Jan 14 01:46:43 PST 2016


On Thu, Jan 14, 2016 at 11:46:39AM +0530, ankitprasad.r.sharma at intel.com wrote:
>  out_unpin:
> -	i915_gem_object_ggtt_unpin(obj);
> +	if (node.allocated) {
> +		wmb();
> +		i915->gtt.base.clear_range(&i915->gtt.base,
> +					   node.start, node.size,
> +					   true);
> +		remove_mappable_node(&node);
> +		i915_gem_object_unpin_pages(obj);
> +		i915_gem_object_put_pages(obj);

Oops, just unpin the pages don't free (put) them. The API is asymmetic
and greedy, we grab the pages and don't give them back until the system
asks for them back.
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre


More information about the Intel-gfx mailing list