From: Chris Wilson Date: Tue, 4 Sep 2012 20:02:55 +0000 (+0100) Subject: drm/i915: Pin backing pages for pwrite X-Git-Tag: omap-for-v3.7-rc1/fixes-cpufreq-signed~20^2~14^2~36 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=755d22184f1e5015b040acee794542d9cf8a16c5;p=pandora-kernel.git drm/i915: Pin backing pages for pwrite By using the recently introduced pinning of pages, we can safely drop the mutex in the knowledge that the pages are not going to disappear jeneath us, and so we can simplify the code for iterating over the pages. Note: The old code had such complicated page refcounting since it used obj->pages as a micro-optimization if it's there, but that could (before this patch) disappear when we drop the dev->struct_mutex. Hence some manual page refcounting was required for the slow path, complicated by the fact that pages returned by shmem_read_mapping_page already have a pageref, which needs to be dropped again. Signed-off-by: Chris Wilson Reviewed-by: Ben Widawsky [danvet: Added note to explain the question Ben raised in review.] Signed-off-by: Daniel Vetter --- Reading git-diff-tree failed