From: Greg Kroah-Hartman Date: Fri, 6 Jan 2017 15:51:15 +0000 (+0100) Subject: 4.9-stable patches X-Git-Tag: v4.4.41~2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=7fe815d93dd58413efc313585d45c3be1ff573fc;p=thirdparty%2Fkernel%2Fstable-queue.git 4.9-stable patches added patches: drm-i915-fix-cdclk-vs.-dev_cdclk-mess-when-not-recomputing-things.patch drm-i915-fix-setting-of-boost-freq-tunable.patch drm-i915-initialize-dev_priv-atomic_cdclk_freq-at-init-time.patch drm-i915-skip-the-first-4k-of-stolen-memory-on-everything-gen8.patch --- diff --git a/queue-4.9/drm-i915-fix-cdclk-vs.-dev_cdclk-mess-when-not-recomputing-things.patch b/queue-4.9/drm-i915-fix-cdclk-vs.-dev_cdclk-mess-when-not-recomputing-things.patch new file mode 100644 index 00000000000..a417633e2be --- /dev/null +++ b/queue-4.9/drm-i915-fix-cdclk-vs.-dev_cdclk-mess-when-not-recomputing-things.patch @@ -0,0 +1,72 @@ +From 14676ec6b1a6f2f7fa0bafd98ab42ce77be7a7d4 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Ville=20Syrj=C3=A4l=C3=A4?= +Date: Mon, 14 Nov 2016 18:35:09 +0200 +Subject: drm/i915: Fix cdclk vs. dev_cdclk mess when not recomputing things +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +From: Ville Syrjälä + +commit 14676ec6b1a6f2f7fa0bafd98ab42ce77be7a7d4 upstream. + +When we end up not recomputing the cdclk, we need to populate +intel_state->cdclk with the "atomic_cdclk_freq" instead of the +current cdclk_freq. When no pipes are active, the actual cdclk_freq +may be lower than what the configuration of the planes and +pipes would require from the point of view of the software state. + +This fixes bogus WARNS from skl_max_scale() which is trying to check +the plane software state against the cdclk frequency. So any time +it got called during DPMS off for instance, we might have tripped +the warn if the current mode would have required a higher than +minimum cdclk. + +v2: Drop the dev_cdclk stuff (Maarten) + +Cc: Maarten Lankhorst +Cc: Mika Kahola +Cc: bruno.pagani@ens-lyon.org +Cc: Daniel J Blueman +Cc: Paul Bolle +Cc: Joseph Yasi +Tested-by: Paul Bolle +Tested-by: Joseph Yasi (v1) +Fixes: 1a617b77658e ("drm/i915: Keep track of the cdclk as if all crtc's were active.") +Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=98214 +Signed-off-by: Ville Syrjälä +Reviewed-by: Maarten Lankhorst +Link: http://patchwork.freedesktop.org/patch/msgid/1479141311-11904-2-git-send-email-ville.syrjala@linux.intel.com +(cherry picked from commit e0ca7a6be38ce603d26df5707c22e53870a623e0) +Signed-off-by: Jani Nikula +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/gpu/drm/i915/intel_display.c | 8 +++++--- + 1 file changed, 5 insertions(+), 3 deletions(-) + +--- a/drivers/gpu/drm/i915/intel_display.c ++++ b/drivers/gpu/drm/i915/intel_display.c +@@ -13970,8 +13970,9 @@ static int intel_modeset_checks(struct d + + DRM_DEBUG_KMS("New cdclk calculated to be atomic %u, actual %u\n", + intel_state->cdclk, intel_state->dev_cdclk); +- } else ++ } else { + to_intel_atomic_state(state)->cdclk = dev_priv->atomic_cdclk_freq; ++ } + + intel_modeset_clear_plls(state); + +@@ -14072,8 +14073,9 @@ static int intel_atomic_check(struct drm + + if (ret) + return ret; +- } else +- intel_state->cdclk = dev_priv->cdclk_freq; ++ } else { ++ intel_state->cdclk = dev_priv->atomic_cdclk_freq; ++ } + + ret = drm_atomic_helper_check_planes(dev, state); + if (ret) diff --git a/queue-4.9/drm-i915-fix-setting-of-boost-freq-tunable.patch b/queue-4.9/drm-i915-fix-setting-of-boost-freq-tunable.patch new file mode 100644 index 00000000000..1d4b7c22c5d --- /dev/null +++ b/queue-4.9/drm-i915-fix-setting-of-boost-freq-tunable.patch @@ -0,0 +1,42 @@ +From b1b7ec985805e005055d1d471ca586a715ffc10a Mon Sep 17 00:00:00 2001 +From: Mika Kuoppala +Date: Wed, 14 Dec 2016 14:26:20 +0200 +Subject: drm/i915: Fix setting of boost freq tunable + +From: Mika Kuoppala + +commit b1b7ec985805e005055d1d471ca586a715ffc10a upstream. + +For limiting the max frequency of gpu, the max freq tunable +is not enough to hard limit the max gap. We now have also per +client boost max freq. When this tunable was introduced, +it was mistakenly made read only. Allow user to gain control by +setting it writable. + +Fixes: 29ecd78d3b79 ("drm/i915: Define a separate variable and control for RPS waitboost frequency") +Cc: Chris Wilson +Cc: Mika Kuoppala +Cc: Daniel Vetter +Cc: Jani Nikula +Reviewed-by: Chris Wilson +Signed-off-by: Mika Kuoppala +Link: http://patchwork.freedesktop.org/patch/msgid/1481718380-9170-1-git-send-email-mika.kuoppala@intel.com +(cherry picked from commit 73a798711314b54cbd4fe224e24db92c306a8d8c) +Signed-off-by: Jani Nikula +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/gpu/drm/i915/i915_sysfs.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/gpu/drm/i915/i915_sysfs.c ++++ b/drivers/gpu/drm/i915/i915_sysfs.c +@@ -460,7 +460,7 @@ static ssize_t gt_min_freq_mhz_store(str + + static DEVICE_ATTR(gt_act_freq_mhz, S_IRUGO, gt_act_freq_mhz_show, NULL); + static DEVICE_ATTR(gt_cur_freq_mhz, S_IRUGO, gt_cur_freq_mhz_show, NULL); +-static DEVICE_ATTR(gt_boost_freq_mhz, S_IRUGO, gt_boost_freq_mhz_show, gt_boost_freq_mhz_store); ++static DEVICE_ATTR(gt_boost_freq_mhz, S_IRUGO | S_IWUSR, gt_boost_freq_mhz_show, gt_boost_freq_mhz_store); + static DEVICE_ATTR(gt_max_freq_mhz, S_IRUGO | S_IWUSR, gt_max_freq_mhz_show, gt_max_freq_mhz_store); + static DEVICE_ATTR(gt_min_freq_mhz, S_IRUGO | S_IWUSR, gt_min_freq_mhz_show, gt_min_freq_mhz_store); + diff --git a/queue-4.9/drm-i915-initialize-dev_priv-atomic_cdclk_freq-at-init-time.patch b/queue-4.9/drm-i915-initialize-dev_priv-atomic_cdclk_freq-at-init-time.patch new file mode 100644 index 00000000000..0fe7839f5a8 --- /dev/null +++ b/queue-4.9/drm-i915-initialize-dev_priv-atomic_cdclk_freq-at-init-time.patch @@ -0,0 +1,49 @@ +From 1f3dc3e334c1192ebe2939ea17ba12f4776f90c3 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Ville=20Syrj=C3=A4l=C3=A4?= +Date: Tue, 29 Nov 2016 16:13:57 +0200 +Subject: drm/i915: Initialize dev_priv->atomic_cdclk_freq at init time +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +From: Ville Syrjälä + +commit 1f3dc3e334c1192ebe2939ea17ba12f4776f90c3 upstream. + +Looks like we're only initializing dev_priv->atomic_cdclk_freq +at resume and commit times, not at init time. Let's do that as +well. + +We're now hitting the 'WARN_ON(intel_state->cdclk == 0)' in +hsw_compute_linetime_wm() on account of populating +intel_state->cdclk from dev_priv->atomic_cdclk_freq. +Previously we were mispopulating intel_state->cdclk with +dev_priv->cdclk_freq which always had a proper value at init +time and hence the WARN_ON() didn't trigger. + +Cc: Matthew Auld +Reported-by: Matthew Auld +Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=98902 +Fixes: 14676ec6b1a6 ("drm/i915: Fix cdclk vs. dev_cdclk mess when not recomputing things") +Signed-off-by: Ville Syrjälä +Link: http://patchwork.freedesktop.org/patch/msgid/1480428837-4207-1-git-send-email-ville.syrjala@linux.intel.com +Tested-by: Matthew Auld +Reviewed-by: Matthew Auld +(cherry picked from commit 6a259b1f8a9e99b1ed114f8bf8b0cfccee130e54) +Signed-off-by: Jani Nikula +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/gpu/drm/i915/intel_display.c | 1 + + 1 file changed, 1 insertion(+) + +--- a/drivers/gpu/drm/i915/intel_display.c ++++ b/drivers/gpu/drm/i915/intel_display.c +@@ -16443,6 +16443,7 @@ void intel_modeset_init(struct drm_devic + + intel_update_czclk(dev_priv); + intel_update_cdclk(dev); ++ dev_priv->atomic_cdclk_freq = dev_priv->cdclk_freq; + + intel_shared_dpll_init(dev); + diff --git a/queue-4.9/drm-i915-skip-the-first-4k-of-stolen-memory-on-everything-gen8.patch b/queue-4.9/drm-i915-skip-the-first-4k-of-stolen-memory-on-everything-gen8.patch new file mode 100644 index 00000000000..8d5e9c5308c --- /dev/null +++ b/queue-4.9/drm-i915-skip-the-first-4k-of-stolen-memory-on-everything-gen8.patch @@ -0,0 +1,46 @@ +From 6ba0566cf2afcdb17bff882e3a95cbbcb22c4a83 Mon Sep 17 00:00:00 2001 +From: Paulo Zanoni +Date: Wed, 14 Dec 2016 12:55:37 -0200 +Subject: drm/i915: skip the first 4k of stolen memory on everything >= gen8 + +From: Paulo Zanoni + +commit 6ba0566cf2afcdb17bff882e3a95cbbcb22c4a83 upstream. + +BSpec got updated and this workaround is now listed as standard +required programming for all subsequent projects. This is confirmed to +fix Skylake screen flickering issues (probably caused by the fact that +we initialized a ring in the first page of stolen, but I didn't 100% +confirm this theory). + +v2: this is the patch that fixes the screen flickering, document it. + +Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=94605 +Tested-by: Dominik Klementowski +Signed-off-by: Paulo Zanoni +Acked-by: Chris Wilson +Reviewed-by: Daniel Vetter +Link: http://patchwork.freedesktop.org/patch/msgid/1481727338-9901-1-git-send-email-paulo.r.zanoni@intel.com +(cherry picked from commit d43537610470d8829ebd17cd7842f47176e35ebd) +Signed-off-by: Jani Nikula +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/gpu/drm/i915/i915_gem_stolen.c | 5 ++--- + 1 file changed, 2 insertions(+), 3 deletions(-) + +--- a/drivers/gpu/drm/i915/i915_gem_stolen.c ++++ b/drivers/gpu/drm/i915/i915_gem_stolen.c +@@ -55,10 +55,9 @@ int i915_gem_stolen_insert_node_in_range + return -ENODEV; + + /* See the comment at the drm_mm_init() call for more about this check. +- * WaSkipStolenMemoryFirstPage:bdw,chv,kbl (incomplete) ++ * WaSkipStolenMemoryFirstPage:bdw+ (incomplete) + */ +- if (start < 4096 && (IS_GEN8(dev_priv) || +- IS_KBL_REVID(dev_priv, 0, KBL_REVID_A0))) ++ if (start < 4096 && INTEL_GEN(dev_priv) >= 8) + start = 4096; + + mutex_lock(&dev_priv->mm.stolen_lock); diff --git a/queue-4.9/series b/queue-4.9/series index dbb035859ef..f0a2c2d1434 100644 --- a/queue-4.9/series +++ b/queue-4.9/series @@ -110,3 +110,7 @@ sg_write-bsg_write-is-not-fit-to-be-called-under-kernel_ds.patch net-mvpp2-fix-dma-unmapping-of-tx-buffers-for-fragments.patch drm-i915-dsi-fix-chv_exec_gpio-disabling-the-gpios-it-is-setting.patch drm-i915-dsi-do-not-clear-dpounit_clock_gate_disable-from-vlv_init_display_clock_gating.patch +drm-i915-fix-cdclk-vs.-dev_cdclk-mess-when-not-recomputing-things.patch +drm-i915-initialize-dev_priv-atomic_cdclk_freq-at-init-time.patch +drm-i915-skip-the-first-4k-of-stolen-memory-on-everything-gen8.patch +drm-i915-fix-setting-of-boost-freq-tunable.patch