Bug 97290

Summary: Commit "drm/i915/gen9: Give one extra block per line for SKL plane WM calculations" breaks multi monitor setup
Product: DRI Reporter: Kim Lidström <dxtr>
Component: DRM/IntelAssignee: Intel GFX Bugs mailing list <intel-gfx-bugs>
Status: CLOSED FIXED QA Contact: Intel GFX Bugs mailing list <intel-gfx-bugs>
Severity: major    
Priority: medium CC: intel-gfx-bugs
Version: unspecified   
Hardware: x86-64 (AMD64)   
OS: Linux (All)   
Whiteboard:
i915 platform: SKL i915 features: display/DP
Attachments:
Description Flags
Picture that shows the symptoms
none
dmesg
none
Patch that makes everything work again none

Description Kim Lidström 2016-08-11 08:12:25 UTC
Created attachment 125691 [details]
Picture that shows the symptoms

After commit 055c3ff69d440928964228455ec29b071258d5fa my multi monitor setup breaks.
I simply cannot get any output on the external monitors on my Thinkpad X260 (Connected to a docking station) whatsoever and nothing in particular shows up in dmesg.

I attached a picture I took with my camera to show demonstrate the symptom.

Reverting the commit makes everything work as intended again.
Comment 1 Kim Lidström 2016-08-11 08:14:57 UTC
Created attachment 125692 [details]
dmesg

Attaching a dmesg right after I have booted, started X and tried running xrandr.
Comment 2 Kim Lidström 2016-08-11 08:17:16 UTC
Created attachment 125693 [details]
Patch that makes everything work again

I am successfully running the latest nightly with this patch applied.
Comment 3 Kim Lidström 2016-08-11 08:18:38 UTC
The xrandr line I am running is:

xrandr --output VIRTUAL1 --off --output eDP1 --mode 1920x1080 --pos 3120x632 --rotate normal --output DP1 --off --output DP2-1 --primary --mode 1920x1200 --pos 0x632 --rotate normal --output DP2-2 --mode 1920x1200 --pos 1920x0 --rotate right --output DP2-3 --off --output HDMI2 --off --output HDMI1 --off --output DP2 --off
Comment 4 Kim Lidström 2016-08-11 08:21:29 UTC
I missed a slight detail.

I don't get any X output on the external monitors.

Sorry about that.
Comment 5 Kim Lidström 2016-08-11 08:28:19 UTC
Comment on attachment 125693 [details]
Patch that makes everything work again

diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c
index 99014d7..1438a4b 100644
--- a/drivers/gpu/drm/i915/intel_pm.c
+++ b/drivers/gpu/drm/i915/intel_pm.c
@@ -3352,8 +3352,6 @@ static uint32_t skl_wm_method2(uint32_t pixel_rate, uint32_t pipe_htotal,
                plane_bytes_per_line *= 4;
                plane_blocks_per_line = DIV_ROUND_UP(plane_bytes_per_line, 512);
                plane_blocks_per_line /= 4;
-       } else if (tiling == DRM_FORMAT_MOD_NONE) {
-               plane_blocks_per_line = DIV_ROUND_UP(plane_bytes_per_line, 512) + 1;
        } else {
                plane_blocks_per_line = DIV_ROUND_UP(plane_bytes_per_line, 512);
        }
Comment 6 Kim Lidström 2016-08-11 08:30:00 UTC
I made a boo-boo with a patch. That is the correct one.
Comment 7 Joonas Lahtinen 2016-08-11 08:31:01 UTC
So basically, reverting the following patch helps;

commit 58e311b09c319183254d9220c50a533e7157c9ab
Author: Matt Roper <matthew.d.roper@intel.com>
Date:   Thu Aug 4 14:08:00 2016 -0700

    drm/i915/gen9: Give one extra block per line for SKL plane WM calculations
Comment 8 Kim Lidström 2016-08-25 19:14:56 UTC
It works with the latest nightly now.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.