From beff0d0f6121f6a2a818a050a1e4d91706b3f190 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Ville=20Syrj=C3=A4l=C3=A4?= Date: Tue, 17 Jun 2014 21:03:00 +0300 Subject: [PATCH] drm/i915: Don't prefault the entire obj if the vma is smaller MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Take the minimum of the object size and the vma size and prefault only that much. Avoids a SIGBUS when mmapping only a portion of the object. Prefaulting was introduced here: commit b90b91d87038f6b257b40a02b42ed4f9705e06f0 Author: Chris Wilson Date: Tue Jun 10 12:14:40 2014 +0100 drm/i915: Prefault the entire object on first page fault Cc: Chris Wilson Signed-off-by: Ville Syrjälä Testcase: igt/gem_mmap/short-mmap Signed-off-by: Daniel Vetter --- Reading git-format-patch failed