From: Greg Kroah-Hartman Date: Tue, 18 Feb 2020 09:26:43 +0000 (+0100) Subject: 5.5-stable patches X-Git-Tag: v4.19.105~9 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=65bcf3d69cf3e21edc3bf5528a073fe730f4693f;p=thirdparty%2Fkernel%2Fstable-queue.git 5.5-stable patches added patches: drm-i915-pmu-correct-the-rc6-offset-upon-enabling.patch revert-drm-sun4i-drv-allow-framebuffer-modifiers-in-mode-config.patch --- diff --git a/queue-5.5/drm-i915-pmu-correct-the-rc6-offset-upon-enabling.patch b/queue-5.5/drm-i915-pmu-correct-the-rc6-offset-upon-enabling.patch new file mode 100644 index 00000000000..539057da0cd --- /dev/null +++ b/queue-5.5/drm-i915-pmu-correct-the-rc6-offset-upon-enabling.patch @@ -0,0 +1,69 @@ +From 88a9c66d998b1d2dac412fcd458c5d17d70513c8 Mon Sep 17 00:00:00 2001 +From: Chris Wilson +Date: Tue, 14 Jan 2020 10:56:47 +0000 +Subject: drm/i915/pmu: Correct the rc6 offset upon enabling + +From: Chris Wilson + +commit 88a9c66d998b1d2dac412fcd458c5d17d70513c8 upstream. + +The rc6 residency starts ticking from 0 from BIOS POST, but the kernel +starts measuring the time from its boot. If we start measuruing +I915_PMU_RC6_RESIDENCY while the GT is idle, we start our sampling from +0 and then upon first activity (park/unpark) add in all the rc6 +residency since boot. After the first park with the sampler engaged, the +sleep/active counters are aligned. + +v2: With a wakeref to be sure + +Closes: https://gitlab.freedesktop.org/drm/intel/issues/973 +Fixes: df6a42053513 ("drm/i915/pmu: Ensure monotonic rc6") +Signed-off-by: Chris Wilson +Cc: Tvrtko Ursulin +Reviewed-by: Tvrtko Ursulin +Link: https://patchwork.freedesktop.org/patch/msgid/20200114105648.2172026-1-chris@chris-wilson.co.uk +(cherry picked from commit f4e9894b6952a2819937f363cd42e7cd7894a1e4) +Signed-off-by: Jani Nikula +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/gpu/drm/i915/i915_pmu.c | 12 ++++++++++++ + 1 file changed, 12 insertions(+) + +--- a/drivers/gpu/drm/i915/i915_pmu.c ++++ b/drivers/gpu/drm/i915/i915_pmu.c +@@ -594,8 +594,10 @@ static void i915_pmu_enable(struct perf_ + container_of(event->pmu, typeof(*i915), pmu.base); + unsigned int bit = event_enabled_bit(event); + struct i915_pmu *pmu = &i915->pmu; ++ intel_wakeref_t wakeref; + unsigned long flags; + ++ wakeref = intel_runtime_pm_get(&i915->runtime_pm); + spin_lock_irqsave(&pmu->lock, flags); + + /* +@@ -605,6 +607,14 @@ static void i915_pmu_enable(struct perf_ + BUILD_BUG_ON(ARRAY_SIZE(pmu->enable_count) != I915_PMU_MASK_BITS); + GEM_BUG_ON(bit >= ARRAY_SIZE(pmu->enable_count)); + GEM_BUG_ON(pmu->enable_count[bit] == ~0); ++ ++ if (pmu->enable_count[bit] == 0 && ++ config_enabled_mask(I915_PMU_RC6_RESIDENCY) & BIT_ULL(bit)) { ++ pmu->sample[__I915_SAMPLE_RC6_LAST_REPORTED].cur = 0; ++ pmu->sample[__I915_SAMPLE_RC6].cur = __get_rc6(&i915->gt); ++ pmu->sleep_last = ktime_get(); ++ } ++ + pmu->enable |= BIT_ULL(bit); + pmu->enable_count[bit]++; + +@@ -645,6 +655,8 @@ static void i915_pmu_enable(struct perf_ + * an existing non-zero value. + */ + local64_set(&event->hw.prev_count, __i915_pmu_event_read(event)); ++ ++ intel_runtime_pm_put(&i915->runtime_pm, wakeref); + } + + static void i915_pmu_disable(struct perf_event *event) diff --git a/queue-5.5/revert-drm-sun4i-drv-allow-framebuffer-modifiers-in-mode-config.patch b/queue-5.5/revert-drm-sun4i-drv-allow-framebuffer-modifiers-in-mode-config.patch new file mode 100644 index 00000000000..d834ce6312c --- /dev/null +++ b/queue-5.5/revert-drm-sun4i-drv-allow-framebuffer-modifiers-in-mode-config.patch @@ -0,0 +1,39 @@ +From cf913e9683273f2640501094fa63a67e29f437b3 Mon Sep 17 00:00:00 2001 +From: Jernej Skrabec +Date: Sun, 26 Jan 2020 07:59:37 +0100 +Subject: Revert "drm/sun4i: drv: Allow framebuffer modifiers in mode config" + +From: Jernej Skrabec + +commit cf913e9683273f2640501094fa63a67e29f437b3 upstream. + +This reverts commit 9db9c0cf5895e4ddde2814360cae7bea9282edd2. + +Setting mode_config.allow_fb_modifiers manually is completely +unnecessary. It is set automatically by drm_universal_plane_init() based +on the fact if modifier list is provided or not. Even more, it breaks +DE2 and DE3 as they don't support any modifiers beside linear. Modifiers +aware applications can be confused by provided empty modifier list - at +least linear modifier should be included, but it's not for DE2 and DE3. + +Fixes: 9db9c0cf5895 ("drm/sun4i: drv: Allow framebuffer modifiers in mode config") +Signed-off-by: Jernej Skrabec +Reviewed-by: Paul Kocialkowski +Signed-off-by: Maxime Ripard +Link: https://patchwork.freedesktop.org/patch/msgid/20200126065937.9564-1-jernej.skrabec@siol.net +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/gpu/drm/sun4i/sun4i_drv.c | 1 - + 1 file changed, 1 deletion(-) + +--- a/drivers/gpu/drm/sun4i/sun4i_drv.c ++++ b/drivers/gpu/drm/sun4i/sun4i_drv.c +@@ -85,7 +85,6 @@ static int sun4i_drv_bind(struct device + } + + drm_mode_config_init(drm); +- drm->mode_config.allow_fb_modifiers = true; + + ret = component_bind_all(drm->dev, drm); + if (ret) { diff --git a/queue-5.5/series b/queue-5.5/series index 121695e563a..914fb01e13f 100644 --- a/queue-5.5/series +++ b/queue-5.5/series @@ -72,3 +72,5 @@ kvm-nvmx-handle-pending-db-when-injecting-init-vm-exit.patch perf-stat-don-t-report-a-null-stalled-cycles-per-insn-metric.patch nfsv4.1-make-cachethis-no-for-writes.patch nfsv4-ensure-the-delegation-cred-is-pinned-when-we-call-delegreturn.patch +revert-drm-sun4i-drv-allow-framebuffer-modifiers-in-mode-config.patch +drm-i915-pmu-correct-the-rc6-offset-upon-enabling.patch