diff options
author | Paulo Zanoni <paulo.r.zanoni@intel.com> | 2015-02-13 14:23:47 -0500 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2015-02-23 18:02:20 -0500 |
commit | cb0a08c1ed7daa16d13876e3e1b8787d95b25b0e (patch) | |
tree | cfba8e129b0a4b6f8e1c1d06e5a199184bbcc013 | |
parent | e489e38e3f880ec3ff3281c5ceafa3b750600556 (diff) |
drm/i915: don't reallocate the compressed FB at every frame
With the current code we just reallocate the compressed FB at every
FBC update: we have X in one frame, then in the other frame we need X
again, but we check "needed < have" instead of "needed <= have".
v2: Rebase after Jani addressed the other problems described in v1.
Cc: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
-rw-r--r-- | drivers/gpu/drm/i915/i915_gem_stolen.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/i915/i915_gem_stolen.c b/drivers/gpu/drm/i915/i915_gem_stolen.c index 59401f3b902c..f1de95f7432c 100644 --- a/drivers/gpu/drm/i915/i915_gem_stolen.c +++ b/drivers/gpu/drm/i915/i915_gem_stolen.c | |||
@@ -253,7 +253,7 @@ int i915_gem_stolen_setup_compression(struct drm_device *dev, int size, int fb_c | |||
253 | if (!drm_mm_initialized(&dev_priv->mm.stolen)) | 253 | if (!drm_mm_initialized(&dev_priv->mm.stolen)) |
254 | return -ENODEV; | 254 | return -ENODEV; |
255 | 255 | ||
256 | if (size < dev_priv->fbc.uncompressed_size) | 256 | if (size <= dev_priv->fbc.uncompressed_size) |
257 | return 0; | 257 | return 0; |
258 | 258 | ||
259 | /* Release any current block */ | 259 | /* Release any current block */ |