From: Daniel Vetter Date: Tue, 13 May 2014 10:11:26 +0000 (+0200) Subject: drm/i915: WARN_ON fence pin leaks X-Git-Tag: omap-for-v3.16/fixes-against-rc1~44^2~38^2~137 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d8ffa60b52ab171e89aebdbdd96dbe2a2460a5dd;p=pandora-kernel.git drm/i915: WARN_ON fence pin leaks The fence pin count should always be <= the bo pin count. If that's not the case then we have a funny problem and are leaking references somewhere. Which means we can catch fence pin leaks by checking for the same upper limit as we do for the bo pin count. Inspired by a discussion with Ville about a fence leak igt testcase. v2: Also check for fence->pin_count <= ggtt_vma->pin_count, since that might catch a leak even quicker. Also de-inline them, they're getting too big. v3: Don't separately check for MAX_PIN_COUNT since the > vma->pin_count check will catch that already (Chris). Cc: Chris Wilson Cc: Ville Syrjälä Signed-off-by: Daniel Vetter --- Reading git-diff-tree failed