diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2009-10-14 15:12:46 -0400 |
---|---|---|
committer | Eric Anholt <eric@anholt.net> | 2009-10-15 12:20:58 -0400 |
commit | 0d9c778978ff268228c095ae737c282c03a5986d (patch) | |
tree | e20e4c63530b8b25cd582cf3602fa2da143003a8 /drivers/gpu | |
parent | 0eb96d6ed38430b72897adde58f5477a6b71757a (diff) |
drm/i915: Install a fence register for fbc on g4x
To enable framebuffer compression on a g4x, we not only need the buffer
to tiled (X only), we also need to hold a fence register for the buffer.
Currently we only install a fence register for pre-i965s when setting up
the scanout buffer. Rather than adding some convoluted logic to
g4x_enable_fbc() to acquire a fence register, and perhaps to
g4x_disable_fbc() to release it again, we can extend the acquisition
during setup to all chipsets.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Eric Anholt <eric@anholt.net>
Diffstat (limited to 'drivers/gpu')
-rw-r--r-- | drivers/gpu/drm/i915/intel_display.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index 8278d9d163ad..123cce1ae470 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c | |||
@@ -1260,9 +1260,11 @@ intel_pipe_set_base(struct drm_crtc *crtc, int x, int y, | |||
1260 | return ret; | 1260 | return ret; |
1261 | } | 1261 | } |
1262 | 1262 | ||
1263 | /* Pre-i965 needs to install a fence for tiled scan-out */ | 1263 | /* Install a fence for tiled scan-out. Pre-i965 always needs a fence, |
1264 | if (!IS_I965G(dev) && | 1264 | * whereas 965+ only requires a fence if using framebuffer compression. |
1265 | obj_priv->fence_reg == I915_FENCE_REG_NONE && | 1265 | * For simplicity, we always install a fence as the cost is not that onerous. |
1266 | */ | ||
1267 | if (obj_priv->fence_reg == I915_FENCE_REG_NONE && | ||
1266 | obj_priv->tiling_mode != I915_TILING_NONE) { | 1268 | obj_priv->tiling_mode != I915_TILING_NONE) { |
1267 | ret = i915_gem_object_get_fence_reg(obj); | 1269 | ret = i915_gem_object_get_fence_reg(obj); |
1268 | if (ret != 0) { | 1270 | if (ret != 0) { |