drm/i915: use uncached writes in pwrite
authorDaniel Vetter <daniel.vetter@ffwll.ch>
Sun, 25 Mar 2012 17:47:39 +0000 (19:47 +0200)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Tue, 27 Mar 2012 11:29:38 +0000 (13:29 +0200)
It's around 20% faster.

Tested-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/i915_gem.c

index 7f33e6a..c84060c 100644 (file)
@@ -642,9 +642,9 @@ i915_gem_shmem_pwrite(struct drm_device *dev,
                        if (partial_cacheline_write)
                                drm_clflush_virt_range(vaddr + shmem_page_offset,
                                                       page_length);
-                       ret = __copy_from_user_inatomic(vaddr + shmem_page_offset,
-                                                       user_data,
-                                                       page_length);
+                       ret = __copy_from_user_inatomic_nocache(vaddr + shmem_page_offset,
+                                                               user_data,
+                                                               page_length);
                        if (needs_clflush_after)
                                drm_clflush_virt_range(vaddr + shmem_page_offset,
                                                       page_length);