drm/i915: don't increment the FBC threshold at fbc_enable
authorPaulo Zanoni <paulo.r.zanoni@intel.com>
Tue, 30 Jun 2015 13:53:05 +0000 (10:53 -0300)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Fri, 3 Jul 2015 05:39:00 +0000 (07:39 +0200)
commitce65e47b78789b4f78be1fd7e4c884df74a9f075
tree8ea1670d2220639f55c8f5bfe5c1764c6e5abf54
parentca1543be2c4233fbc266bf66f4320806e61e05dd
drm/i915: don't increment the FBC threshold at fbc_enable

We first set the threshold value when we're allocating the CFB, and
then later at {ilk,gen7}_fbc_enable() we increment it in case we're
using 16bpp. While that is correct, it is dangerous: if we rework the
code a little bit in a way that allows us to call intel_fbc_enable()
without necessarily calling i915_gem_stolen_setup_compression() first,
we might end up incrementing threshold more than once. To prevent
that, increment a temporary variable instead.

v2: Rebase.

Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/intel_fbc.c