aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2011-07-08 07:22:40 -0400
committerKeith Packard <keithp@keithp.com>2011-07-08 13:23:12 -0400
commit9ce9d0695d15da23ffe817516ba5d0b58caf8d05 (patch)
treee836095751192032f732dceb94d9329f0c8b4121 /drivers/gpu
parentde568510cd410d82d370d3000808aca63ef28a22 (diff)
drm/i915: Set persistent-mode for ILK/SNB framebuffer compression
Persistent mode is intended for use with front-buffer rendering, such as X, where it is necessary to detect writes to the scanout either by the GPU or through the CPU's fence, and recompress the dirty regions on the fly. (By comparison to the back-buffer rendering, the scanout is always recompressed after a page-flip.) References: https://bugs.freedesktop.org/show_bug.cgi?id=33487 References: https://bugs.freedesktop.org/show_bug.cgi?id=31742 Signed-off-by: Ben Widawsky <ben@bwidawsk.net> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org> Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'drivers/gpu')
-rw-r--r--drivers/gpu/drm/i915/i915_reg.h1
-rw-r--r--drivers/gpu/drm/i915/intel_display.c2
2 files changed, 3 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h
index 4a446b116e6a..96fb0fa47c40 100644
--- a/drivers/gpu/drm/i915/i915_reg.h
+++ b/drivers/gpu/drm/i915/i915_reg.h
@@ -579,6 +579,7 @@
579#define DPFC_CTL_PLANEA (0<<30) 579#define DPFC_CTL_PLANEA (0<<30)
580#define DPFC_CTL_PLANEB (1<<30) 580#define DPFC_CTL_PLANEB (1<<30)
581#define DPFC_CTL_FENCE_EN (1<<29) 581#define DPFC_CTL_FENCE_EN (1<<29)
582#define DPFC_CTL_PERSISTENT_MODE (1<<25)
582#define DPFC_SR_EN (1<<10) 583#define DPFC_SR_EN (1<<10)
583#define DPFC_CTL_LIMIT_1X (0<<6) 584#define DPFC_CTL_LIMIT_1X (0<<6)
584#define DPFC_CTL_LIMIT_2X (1<<6) 585#define DPFC_CTL_LIMIT_2X (1<<6)
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index 31c75266a456..9df96bdc002e 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -1581,6 +1581,8 @@ static void ironlake_enable_fbc(struct drm_crtc *crtc, unsigned long interval)
1581 1581
1582 dpfc_ctl &= DPFC_RESERVED; 1582 dpfc_ctl &= DPFC_RESERVED;
1583 dpfc_ctl |= (plane | DPFC_CTL_LIMIT_1X); 1583 dpfc_ctl |= (plane | DPFC_CTL_LIMIT_1X);
1584 /* Set persistent mode for front-buffer rendering, ala X. */
1585 dpfc_ctl |= DPFC_CTL_PERSISTENT_MODE;
1584 dpfc_ctl |= (DPFC_CTL_FENCE_EN | dev_priv->cfb_fence); 1586 dpfc_ctl |= (DPFC_CTL_FENCE_EN | dev_priv->cfb_fence);
1585 I915_WRITE(ILK_DPFC_CHICKEN, DPFC_HT_MODIFY); 1587 I915_WRITE(ILK_DPFC_CHICKEN, DPFC_HT_MODIFY);
1586 1588