Patch "drm/i915/gen9: fix the WaWmMemoryReadLatency implementation" has been added to the 4.8-stable tree
Subsystems (3)
This is a note to let you know that I've just added the patch titled
drm/i915/gen9: fix the WaWmMemoryReadLatency implementation
to the 4.8-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
drm-i915-gen9-fix-the-wawmmemoryreadlatency-implementation.patch
and it can be found in the queue-4.8 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.
Quoted 1 line
From
4e4d3814a9bb4d71cd3ff0701d8d7041edefd8f0Mon Sep 17 00:00:00 2001
From: Paulo Zanoni <[email protected]>
Date: Thu, 22 Sep 2016 18:00:30 -0300
Subject: drm/i915/gen9: fix the WaWmMemoryReadLatency implementation
From: Paulo Zanoni <[email protected]>
commit 4e4d3814a9bb4d71cd3ff0701d8d7041edefd8f0 upstream.
Bspec says:
"The mailbox response data may not account for memory read latency.
If the mailbox response data for level 0 is 0us, add 2 microseconds to the result for each valid level."
This means we should only do the +2 in case wm[0] == 0, not always.
So split the sanitizing implementation from the WA implementation and fix the WA implementation.
v2: Add Fixes tag (Maarten).
--- drivers/gpu/drm/i915/intel_pm.c | 42 ++++++++++++++++++++-------------------- 1 file changed, 22 insertions(+), 20 deletions(-)
drivers/gpu/drm/i915/intel_pm.c +22 -20
@@ -2119,32 +2119,34 @@ static void intel_read_wm_latency(structGEN9_MEM_LATENCY_LEVEL_MASK ;/* +* If a level n (n > 1) has a 0us latency, all levels m (m >= n) +* need to be disabled. We make sure to sanitize the values out +* of the punit to satisfy this requirement. +*/ +for (level =1 ; level <= max_level; level++) { +if (wm[level] ==0 ) { +for (i = level +1 ; i <= max_level; i++) + wm[i] =0 ; +break ; + } + } + +/* * WaWmMemoryReadLatency:skl * * punit doesn't take into account the read latency so we need -* to add 2us to the various latency levels we retrieve from -* the punit. -* - W0 is a bit special in that it's the only level that -* can't be disabled if we want to have display working, so -* we always add 2us there. -* - For levels >=1, punit returns 0us latency when they are -* disabled, so we respect that and don't add 2us then -* -* Additionally, if a level n (n > 1) has a 0us latency, all -* levels m (m >= n) need to be disabled. We make sure to -* sanitize the values out of the punit to satisfy this -* requirement. +* to add 2us to the various latency levels we retrieve from the +* punit when level 0 response data us 0us. */ - wm[0 ] +=2 ; -for (level =1 ; level <= max_level; level++) -if (wm[level] !=0 ) +if (wm[0 ] ==0 ) { + wm[0 ] +=2 ; +for (level =1 ; level <= max_level; level++) { +if (wm[level] ==0 ) +break ; wm[level] +=2 ; -else { -for (i = level +1 ; i <= max_level; i++) - wm[i] =0 ; - -break ; } + } + }else if (IS_HASWELL (dev) ||IS_BROADWELL (dev)) {uint64_t sskpd =I915_READ64 (MCH_SSKPD );
Patches currently in stable-queue which might be from [email protected] are
queue-4.8/drm-i915-gen9-fix-the-watermark-res_blocks-value.patch queue-4.8/drm-i915-gen9-only-add-the-planes-actually-affected-by-ddb-changes.patch queue-4.8/drm-i915-gen9-fix-the-wawmmemoryreadlatency-implementation.patch queue-4.8/drm-i915-introduce-intel_has_sagv.patch queue-4.8/drm-i915-gen9-fix-plane_blocks_per_line-on-watermarks-calculations.patch queue-4.8/drm-i915-kbl-kbl-also-needs-to-run-the-sagv-code.patch queue-4.8/drm-i915-gen9-minimum-scanlines-for-y-tile-is-not-always-4.patch queue-4.8/drm-i915-sagv-is-not-skl-only-so-rename-a-few-things.patch