[PULL][Vivid SRU] another urgent fix for i915_bpo -- PATCHES
Andy Whitcroft
apw at canonical.com
Wed Sep 9 09:20:52 UTC 2015
On Wed, Sep 09, 2015 at 12:02:27PM +0300, Timo Aaltonen wrote:
>
> Hi
>
> This backport fixes an urgent bug on Skylake, where changing between
> mirror/extended modes causes a system hang..
>
>
> The following changes since commit 48daf2e6d3442eb86a3cb8b912e432fa2a3d7804:
>
> Linux 3.19.8-ckt6 (2015-09-08 15:48:27 +0100)
>
> are available in the git repository at:
>
> git://kernel.ubuntu.com/tjaalton/ubuntu-vivid.git i915-bpo
>
> for you to fetch changes up to fca8a268c36f223bc923e6443bf51811133c97cb:
>
> UBUNTU: SAUCE: i915_bpo: drm/i915: Split atomic wm update to pre and
> post variants (2015-09-09 11:55:13 +0300)
>
> ----------------------------------------------------------------
> Ville Syrjälä (1):
> UBUNTU: SAUCE: i915_bpo: drm/i915: Split atomic wm update to pre
> and post variants
>
> ubuntu/i915/intel_display.c | 15 +++++++++++----
> ubuntu/i915/intel_drv.h | 2 +-
> ubuntu/i915/intel_sprite.c | 2 +-
> 3 files changed, 13 insertions(+), 6 deletions(-)
Patches:
commit fca8a268c36f223bc923e6443bf51811133c97cb
Author: Ville Syrjälä <ville.syrjala at linux.intel.com>
Date: Wed Jun 24 22:00:02 2015 +0300
UBUNTU: SAUCE: i915_bpo: drm/i915: Split atomic wm update to pre and post variants
BugLink: http://bugs.launchpad.net/bugs/1493746
Try to update the watermarks on the right side of the plane update. This
is just a temporary hack until we get the proper two part update into
place. However in the meantime this might have some chance of at least
working.
Signed-off-by: Ville Syrjälä <ville.syrjala at linux.intel.com>
Reviewed-by: Clint Taylor <Clinton.A.Taylor at intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter at ffwll.ch>
(backported from commit f015c5518879fb3e578caaa63806617468a24045)
Signed-off-by: Timo Aaltonen <timo.aaltonen at canonical.com>
diff --git a/ubuntu/i915/intel_display.c b/ubuntu/i915/intel_display.c
index 44bc1c9..36e2860 100644
--- a/ubuntu/i915/intel_display.c
+++ b/ubuntu/i915/intel_display.c
@@ -13294,8 +13294,12 @@ intel_check_primary_plane(struct drm_plane *plane,
intel_crtc->atomic.update_fbc = true;
- if (intel_wm_need_update(plane, &state->base))
- intel_crtc->atomic.update_wm = true;
+ if (state->visible && !old_state->visible)
+ intel_crtc->atomic.update_wm_pre = true;
+ else if (!state->visible && old_state->visible)
+ intel_crtc->atomic.update_wm_post = true;
+ else if (intel_wm_need_update(plane, &state->base))
+ intel_crtc->atomic.update_wm_pre = true;
}
if (INTEL_INFO(dev)->gen >= 9) {
@@ -13392,7 +13396,7 @@ static void intel_begin_crtc_commit(struct drm_crtc *crtc)
if (intel_crtc->atomic.pre_disable_primary)
intel_pre_disable_primary(crtc);
- if (intel_crtc->atomic.update_wm)
+ if (intel_crtc->atomic.update_wm_pre)
intel_update_watermarks(crtc);
intel_runtime_pm_get(dev_priv);
@@ -13422,6 +13426,9 @@ static void intel_finish_crtc_commit(struct drm_crtc *crtc)
intel_frontbuffer_flip(dev, intel_crtc->atomic.fb_bits);
+ if (intel_crtc->atomic.update_wm_post)
+ intel_update_watermarks(crtc);
+
if (intel_crtc->atomic.update_fbc) {
mutex_lock(&dev->struct_mutex);
intel_fbc_update(dev);
@@ -13593,7 +13600,7 @@ intel_check_cursor_plane(struct drm_plane *plane,
finish:
if (intel_crtc->active) {
if (plane->state->crtc_w != state->base.crtc_w)
- intel_crtc->atomic.update_wm = true;
+ intel_crtc->atomic.update_wm_post = true;
intel_crtc->atomic.fb_bits |=
INTEL_FRONTBUFFER_CURSOR(intel_crtc->pipe);
diff --git a/ubuntu/i915/intel_drv.h b/ubuntu/i915/intel_drv.h
index 9983ba7..76252a88 100644
--- a/ubuntu/i915/intel_drv.h
+++ b/ubuntu/i915/intel_drv.h
@@ -487,7 +487,7 @@ struct intel_crtc_atomic_commit {
bool disable_fbc;
bool disable_ips;
bool pre_disable_primary;
- bool update_wm;
+ bool update_wm_pre, update_wm_post;
unsigned disabled_planes;
/* Sleepable operations to perform after commit */
diff --git a/ubuntu/i915/intel_sprite.c b/ubuntu/i915/intel_sprite.c
index 8193a35..15379f9 100644
--- a/ubuntu/i915/intel_sprite.c
+++ b/ubuntu/i915/intel_sprite.c
@@ -927,7 +927,7 @@ finish:
INTEL_FRONTBUFFER_SPRITE(intel_crtc->pipe);
if (intel_wm_need_update(plane, &state->base))
- intel_crtc->atomic.update_wm = true;
+ intel_crtc->atomic.update_wm_pre = true;
if (!state->visible) {
/*
More information about the kernel-team
mailing list