mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-11 13:04:03 +08:00
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>
This commit is contained in:
parent
de568510cd
commit
9ce9d0695d
@ -579,6 +579,7 @@
|
|||||||
#define DPFC_CTL_PLANEA (0<<30)
|
#define DPFC_CTL_PLANEA (0<<30)
|
||||||
#define DPFC_CTL_PLANEB (1<<30)
|
#define DPFC_CTL_PLANEB (1<<30)
|
||||||
#define DPFC_CTL_FENCE_EN (1<<29)
|
#define DPFC_CTL_FENCE_EN (1<<29)
|
||||||
|
#define DPFC_CTL_PERSISTENT_MODE (1<<25)
|
||||||
#define DPFC_SR_EN (1<<10)
|
#define DPFC_SR_EN (1<<10)
|
||||||
#define DPFC_CTL_LIMIT_1X (0<<6)
|
#define DPFC_CTL_LIMIT_1X (0<<6)
|
||||||
#define DPFC_CTL_LIMIT_2X (1<<6)
|
#define DPFC_CTL_LIMIT_2X (1<<6)
|
||||||
|
@ -1581,6 +1581,8 @@ static void ironlake_enable_fbc(struct drm_crtc *crtc, unsigned long interval)
|
|||||||
|
|
||||||
dpfc_ctl &= DPFC_RESERVED;
|
dpfc_ctl &= DPFC_RESERVED;
|
||||||
dpfc_ctl |= (plane | DPFC_CTL_LIMIT_1X);
|
dpfc_ctl |= (plane | DPFC_CTL_LIMIT_1X);
|
||||||
|
/* Set persistent mode for front-buffer rendering, ala X. */
|
||||||
|
dpfc_ctl |= DPFC_CTL_PERSISTENT_MODE;
|
||||||
dpfc_ctl |= (DPFC_CTL_FENCE_EN | dev_priv->cfb_fence);
|
dpfc_ctl |= (DPFC_CTL_FENCE_EN | dev_priv->cfb_fence);
|
||||||
I915_WRITE(ILK_DPFC_CHICKEN, DPFC_HT_MODIFY);
|
I915_WRITE(ILK_DPFC_CHICKEN, DPFC_HT_MODIFY);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user