[Intel-gfx] [PATCH 4/5] drm/i915: rewrite shmem_pwrite_slow to use copy_from_user

Daniel Vetter daniel at ffwll.ch
Sat Sep 17 22:52:20 CEST 2011


On Sat, Sep 17, 2011 at 08:55:48PM +0200, Daniel Vetter wrote:
>  out:
> -	for (i = 0; i < pinned_pages; i++)
> -		page_cache_release(user_pages[i]);
> -	drm_free_large(user_pages);
> +	mutex_lock(&dev->struct_mutex);
> +	/* Fixup: Kill any reinstated backing storage pages */
> +	if (obj->madv == __I915_MADV_PURGED)
> +		i915_gem_object_truncate(obj);
> +	/* and flush dirty cachelines in case the object isn't in the cpu write
> +	 * domain anymore. */
> +	if (obj->base.write_domain != I915_GEM_DOMAIN_CPU)
> +		i915_gem_clflush_object(obj);

Meh, just noticed that I'm missing an intel_gtt_chipset_flush() here ...
-Daniel
-- 
Daniel Vetter
Mail: daniel at ffwll.ch
Mobile: +41 (0)79 365 57 48



More information about the Intel-gfx mailing list