From: Chris Wilson Date: Tue, 9 Oct 2012 18:24:37 +0000 (+0100) Subject: drm/i915: Only insert the mb() before updating the fence parameter X-Git-Tag: v3.9-rc1~83^2~36^2~68 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d0a57789d5ec807fc218151b2fb2de4da30fbef5;p=pandora-kernel.git drm/i915: Only insert the mb() before updating the fence parameter With a fence, we only need to insert a memory barrier around the actual fence alteration for CPU accesses through the GTT. Performing the barrier in flush-fence was inserting unnecessary and expensive barriers for never fenced objects. Note removing the barriers from flush-fence, which was effectively a barrier before every direct access through the GTT, revealed that we where missing a barrier before the first access through the GTT. Lack of that barrier was sufficient to cause GPU hangs. v2: Add a couple more comments to explain the new barriers Signed-off-by: Chris Wilson Reviewed-by: Daniel Vetter Reviewed-by: Jesse Barnes Signed-off-by: Daniel Vetter --- Reading git-diff-tree failed