diff options
author | Ville Syrjälä <ville.syrjala@linux.intel.com> | 2013-10-01 18:02:17 +0300 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2013-10-10 12:47:01 +0200 |
commit | 20bc86739b835da21476ea0bf7381f6aab03be64 (patch) | |
tree | 627c469af06f2efd608261960f6370db81687153 /drivers/gpu/drm/i915/intel_sprite.c | |
parent | abae50ed12b6f556afce0febb41639f0ede28fb9 (diff) | |
download | lwn-20bc86739b835da21476ea0bf7381f6aab03be64.tar.gz lwn-20bc86739b835da21476ea0bf7381f6aab03be64.zip |
drm/i915: Enable/disable IPS when primary is enabled/disabled
IPS should be OK as long as one plane is enabled on the pipe, but
it does seem to cause problems when going between primary only and
sprite only.
This needs more investigations, but for now just disable IPS whenever
the primary plane is disabled.
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Acked-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/gpu/drm/i915/intel_sprite.c')
-rw-r--r-- | drivers/gpu/drm/i915/intel_sprite.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/intel_sprite.c b/drivers/gpu/drm/i915/intel_sprite.c index d19146992f34..76d0e2f5c4aa 100644 --- a/drivers/gpu/drm/i915/intel_sprite.c +++ b/drivers/gpu/drm/i915/intel_sprite.c @@ -528,6 +528,17 @@ intel_enable_primary(struct drm_crtc *crtc) I915_WRITE(reg, I915_READ(reg) | DISPLAY_PLANE_ENABLE); + /* + * FIXME IPS should be fine as long as one plane is + * enabled, but in practice it seems to have problems + * when going from primary only to sprite only and vice + * versa. + */ + if (intel_crtc->config.ips_enabled) { + intel_wait_for_vblank(dev, intel_crtc->pipe); + hsw_enable_ips(intel_crtc); + } + mutex_lock(&dev->struct_mutex); intel_update_fbc(dev); mutex_unlock(&dev->struct_mutex); @@ -551,6 +562,14 @@ intel_disable_primary(struct drm_crtc *crtc) intel_disable_fbc(dev); mutex_unlock(&dev->struct_mutex); + /* + * FIXME IPS should be fine as long as one plane is + * enabled, but in practice it seems to have problems + * when going from primary only to sprite only and vice + * versa. + */ + hsw_disable_ips(intel_crtc); + I915_WRITE(reg, I915_READ(reg) & ~DISPLAY_PLANE_ENABLE); } |