<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Exchange Server">
<!-- converted from rtf -->
<style><!-- .EmailQuote { margin-left: 1pt; padding-left: 4pt; border-left: #800000 2px solid; } --></style>
</head>
<body>
<font face="Calibri" size="2"><span style="font-size:11pt;">
<div>This commit introduced a divide-by-zero crash on plugging in an external display to the system. Below is the crash.</div>
<div> </div>
<div style="padding-left:36pt;"><font size="2"><span style="font-size:10pt;">[ 122.320882] divide error: 0000 [#1] PREEMPT SMP</span></font></div>
<div style="padding-left:36pt;"><font size="2"><span style="font-size:10pt;">[ 122.320893] Modules linked in: rfcomm i2c_dev uinput snd_soc_hdac_hdmi snd_soc_dmic aesni_intel aes_x86_64 glue_helper lrw gf128mul ablk_helper cryptd btusb uvcvideo</span></font></div>
<div style="padding-left:36pt;"><font size="2"><span style="font-size:10pt;"> snd_soc_skl snd_soc_skl_ipc snd_hda_ext_core videobuf2_vmalloc snd_hda_core btrtl videobuf2_memops btbcm videobuf2_v4l2 btintel videobuf2_core bluetooth snd_soc_ssm456</span></font></div>
<div style="padding-left:36pt;"><font size="2"><span style="font-size:10pt;">7 fuse cfg80211 nf_conntrack_ipv6 nf_defrag_ipv6 ip6table_filter ip6_tables r8152 mii joydev snd_seq_midi snd_seq_midi_event snd_rawmidi snd_seq snd_seq_device ppp_asyn</span></font></div>
<div style="padding-left:36pt;"><font size="2"><span style="font-size:10pt;">c ppp_generic slhc tun</span></font></div>
<div style="padding-left:36pt;"><font size="2"><span style="font-size:10pt;">[ 122.321004] CPU: 3 PID: 9307 Comm: DrmThread Tainted: G U 4.6.0-rc3-00039-g11f59d6 #420</span></font></div>
<div style="padding-left:36pt;"><font size="2"><span style="font-size:10pt;">[ 122.321008] Hardware name: xxxxxxxxxxxxx, BIOS xxxxx.7820.64.0 03/17/2016</span></font></div>
<div style="padding-left:36pt;"><font size="2"><span style="font-size:10pt;">[ 122.321011] task: ffff880071c58e40 ti: ffff880272afc000 task.ti: ffff880272afc000</span></font></div>
<div style="padding-left:36pt;"><font size="2"><span style="font-size:10pt;">[ 122.321014] RIP: 0010:[<ffffffffac93c3b8>] [<ffffffffac93c3b8>] skl_update_pipe_wm+0x384/0x814</span></font></div>
<div style="padding-left:36pt;"><font size="2"><span style="font-size:10pt;">[ 122.321022] RSP: 0018:ffff880272affa18 EFLAGS: 00010202</span></font></div>
<div style="padding-left:36pt;"><font size="2"><span style="font-size:10pt;">[ 122.321025] RAX: 0000000000000000 RBX: ffff8802750a01be RCX: 0000000000010000</span></font></div>
<div style="padding-left:36pt;"><font size="2"><span style="font-size:10pt;">[ 122.321028] RDX: 0000000000000000 RSI: 0000000000000004 RDI: 00000000750a01c6</span></font></div>
<div style="padding-left:36pt;"><font size="2"><span style="font-size:10pt;">[ 122.321031] RBP: ffff880272affad0 R08: ffff88026c6f7780 R09: ffff8802750a5000</span></font></div>
<div style="padding-left:36pt;"><font size="2"><span style="font-size:10pt;">[ 122.321033] R10: ffff880274aea800 R11: 00000000000005a0 R12: ffff880274aea7fc</span></font></div>
<div style="padding-left:36pt;"><font size="2"><span style="font-size:10pt;">[ 122.321036] R13: 0000000000000000 R14: ffff880274add000 R15: ffff880269571000</span></font></div>
<div style="padding-left:36pt;"><font size="2"><span style="font-size:10pt;">[ 122.321039] FS: 00007f8b04a30700(0000) GS:ffff88027ed80000(0000) knlGS:0000000000000000</span></font></div>
<div style="padding-left:36pt;"><font size="2"><span style="font-size:10pt;">[ 122.321042] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033</span></font></div>
<div style="padding-left:36pt;"><font size="2"><span style="font-size:10pt;">[ 122.321045] CR2: 00007f97a0f33000 CR3: 0000000075b08000 CR4: 00000000003406e0</span></font></div>
<div style="padding-left:36pt;"><font size="2"><span style="font-size:10pt;">[ 122.321047] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000</span></font></div>
<div style="padding-left:36pt;"><font size="2"><span style="font-size:10pt;">[ 122.321050] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400</span></font></div>
<div style="padding-left:36pt;"><font size="2"><span style="font-size:10pt;">[ 122.321053] Stack:</span></font></div>
<div style="padding-left:36pt;"><font size="2"><span style="font-size:10pt;">[ 122.321056] ffff880274a81598 0000000000000001 ffff880272affa80 ffffffffac9b6973</span></font></div>
<div style="padding-left:36pt;"><font size="2"><span style="font-size:10pt;">[ 122.321066] ffff8802750a5000 ffff8802750a5000 ffff88026c6f7780 ffff88026c6f7780</span></font></div>
<div style="padding-left:36pt;"><font size="2"><span style="font-size:10pt;">[ 122.321077] ffff8802750a34e8 0000000000000004 0000000000000000 00000000000001ae</span></font></div>
<div style="padding-left:36pt;"><font size="2"><span style="font-size:10pt;">[ 122.321087] Call Trace:</span></font></div>
<div style="padding-left:36pt;"><font size="2"><span style="font-size:10pt;">[ 122.321092] [<ffffffffac9b6973>] ? intel_dp_aux_transfer+0x169/0x1d8</span></font></div>
<div style="padding-left:36pt;"><font size="2"><span style="font-size:10pt;">[ 122.321096] [<ffffffffac93cbbe>] skl_update_wm+0xf8/0x652</span></font></div>
<div style="padding-left:36pt;"><font size="2"><span style="font-size:10pt;">[ 122.321108] [<ffffffffac9790eb>] ? gen9_write32+0x1ba/0x1cc</span></font></div>
<div style="padding-left:36pt;"><font size="2"><span style="font-size:10pt;">[ 122.321112] [<ffffffffac93debc>] intel_update_watermarks+0x1e/0x20</span></font></div>
<div style="padding-left:36pt;"><font size="2"><span style="font-size:10pt;">[ 122.321119] [<ffffffffac994f98>] haswell_crtc_enable+0x359/0x786</span></font></div>
<div style="padding-left:36pt;"><font size="2"><span style="font-size:10pt;">[ 122.321123] [<ffffffffac9984b1>] intel_atomic_commit+0x85e/0xff3</span></font></div>
<div style="padding-left:36pt;"><font size="2"><span style="font-size:10pt;">[ 122.321127] [<ffffffffac925f75>] ? drm_atomic_check_only+0x3f0/0x55c</span></font></div>
<div style="padding-left:36pt;"><font size="2"><span style="font-size:10pt;">[ 122.321130] [<ffffffffac92612e>] drm_atomic_commit+0x4d/0x52</span></font></div>
<div style="padding-left:36pt;"><font size="2"><span style="font-size:10pt;">[ 122.321135] [<ffffffffac907e06>] drm_atomic_helper_set_config+0x53/0x9e</span></font></div>
<div style="padding-left:36pt;"><font size="2"><span style="font-size:10pt;">[ 122.321138] [<ffffffffac9183f1>] drm_mode_set_config_internal+0x5e/0xf8</span></font></div>
<div style="padding-left:36pt;"><font size="2"><span style="font-size:10pt;">[ 122.321142] [<ffffffffac91c4b1>] drm_mode_setcrtc+0x3e3/0x465</span></font></div>
<div style="padding-left:36pt;"><font size="2"><span style="font-size:10pt;">[ 122.321145] [<ffffffffac90f60d>] drm_ioctl+0x274/0x3ce</span></font></div>
<div style="padding-left:36pt;"><font size="2"><span style="font-size:10pt;">[ 122.321149] [<ffffffffac91c0ce>] ? drm_mode_setplane+0x158/0x158</span></font></div>
<div style="padding-left:36pt;"><font size="2"><span style="font-size:10pt;">[ 122.321153] [<ffffffffac6bf6b6>] ? seccomp_phase1+0xf2/0x1ca</span></font></div>
<div style="padding-left:36pt;"><font size="2"><span style="font-size:10pt;">[ 122.321170] [<ffffffffac714b8f>] ? remove_vma+0x60/0x68</span></font></div>
<div style="padding-left:36pt;"><font size="2"><span style="font-size:10pt;">[ 122.321179] [<ffffffffac73dde6>] vfs_ioctl+0x18/0x34</span></font></div>
<div style="padding-left:36pt;"><font size="2"><span style="font-size:10pt;">[ 122.321187] [<ffffffffac73e362>] do_vfs_ioctl+0x4a2/0x4c5</span></font></div>
<div style="padding-left:36pt;"><font size="2"><span style="font-size:10pt;">[ 122.321199] [<ffffffffac746c18>] ? __fget+0x77/0x83</span></font></div>
<div style="padding-left:36pt;"><font size="2"><span style="font-size:10pt;">[ 122.321203] [<ffffffffac73e3dc>] SyS_ioctl+0x57/0x79</span></font></div>
<div style="padding-left:36pt;"><font size="2"><span style="font-size:10pt;">[ 122.321207] [<ffffffffac6017a0>] do_syscall_64+0x4c/0x5b</span></font></div>
<div style="padding-left:36pt;"><font size="2"><span style="font-size:10pt;">[ 122.321212] [<ffffffffacc735fc>] entry_SYSCALL64_slow_path+0x25/0x25</span></font></div>
<div style="padding-left:36pt;"><font size="2"><span style="font-size:10pt;">[ 122.321215] Code: f6 4c 89 c7 e8 28 d0 ff ff 89 c0 31 d2 89 df 48 0f af 45 a0 66 42 03 7c 6d c0 48 8b 75 a8 4c 8b 45 80 4c 01 ee 66 41 89 5c b4 0c <48> f7 75 98 8d 1c 07 66 41 89
5c b4 0e 49 8b 40 10 81 b8 8c 00</span></font></div>
<div style="padding-left:36pt;"><font size="2"><span style="font-size:10pt;">[ 122.321481] RIP [<ffffffffac93c3b8>] skl_update_pipe_wm+0x384/0x814</span></font></div>
<div style="padding-left:36pt;"><font size="2"><span style="font-size:10pt;">[ 122.321488] RSP <ffff880272affa18></span></font></div>
<div style="padding-left:36pt;"><font size="2"><span style="font-size:10pt;">[ 122.321491] ---[ end trace a66fed013d3c5bdf ]---</span></font></div>
<div style="padding-left:36pt;"><font size="2"><span style="font-size:10pt;">[ 122.321978] Kernel panic - not syncing: Fatal exception</span></font></div>
<div style="padding-left:36pt;"><font size="2"><span style="font-size:10pt;">[ 122.321999] Kernel Offset: 0x2b600000 from 0xffffffff81000000 (relocation range: 0xffffffff80000000-0xffffffffbfffffff)</span></font></div>
<div style="padding-left:36pt;"><font size="2"><span style="font-size:10pt;">[ 122.324445] ACPI MEMORY or I/O RESET_REG.</span></font></div>
<a name="_MailEndCompose"></a>
<div> </div>
<div>Thanks,</div>
<div>RK</div>
<a name="_____replyseparator"></a>
<div>-----Original Message-----<br>
From: Intel-gfx [<a href="mailto:intel-gfx-bounces@lists.freedesktop.org">mailto:intel-gfx-bounces@lists.freedesktop.org</a>] On Behalf Of Matt Roper<br>
Sent: Monday, March 07, 2016 5:06 PM<br>
To: intel-gfx@lists.freedesktop.org<br>
Cc: Kumar, Shobhit<br>
Subject: [Intel-gfx] [PATCH 4/8] drm/i915/skl+: Use scaling amount for plane data rate calculation (v3)</div>
<div> </div>
<div>From: "Kumar, Mahesh" <<a href="mailto:mahesh1.kumar@intel.com">mahesh1.kumar@intel.com</a>></div>
<div> </div>
<div>if downscaling is enabled plane data rate increases according to scaling amount. take scaling amount under consideration while calculating plane data rate</div>
<div> </div>
<div>v2: Address Matt's comments, where data rate was overridden because of missing else.</div>
<div> </div>
<div>v3 (by Matt):</div>
<div> - Add braces to 'else' branch to match kernel coding style</div>
<div> - Adjust final calculation now that skl_plane_downscale_amount()</div>
<div> returns 16.16 fixed point value instead of a decimal fixed point</div>
<div> </div>
<div>Cc: <a href="mailto:matthew.d.roper@intel.com">matthew.d.roper@intel.com</a></div>
<div>Signed-off-by: Kumar, Mahesh <<a href="mailto:mahesh1.kumar@intel.com">mahesh1.kumar@intel.com</a>></div>
<div>Reviewed-by(v2): Matt Roper <<a href="mailto:matthew.d.roper@intel.com">matthew.d.roper@intel.com</a>></div>
<div>Signed-off-by: Matt Roper <<a href="mailto:matthew.d.roper@intel.com">matthew.d.roper@intel.com</a>></div>
<div>---</div>
<div> drivers/gpu/drm/i915/intel_pm.c | 15 +++++++++++----</div>
<div> 1 file changed, 11 insertions(+), 4 deletions(-)</div>
<div> </div>
<div>diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c index e828bde..041db5d3 100644</div>
<div>--- a/drivers/gpu/drm/i915/intel_pm.c</div>
<div>+++ b/drivers/gpu/drm/i915/intel_pm.c</div>
<div>@@ -2974,6 +2974,8 @@ skl_plane_relative_data_rate(const struct intel_crtc_state *cstate, {</div>
<div> struct intel_plane_state *intel_pstate = to_intel_plane_state(pstate);</div>
<div> struct drm_framebuffer *fb = pstate->fb;</div>
<div>+ struct intel_plane *intel_plane = to_intel_plane(pstate->plane);</div>
<div>+ uint32_t down_scale_amount, data_rate;</div>
<div> uint32_t width = 0, height = 0;</div>
<div> </div>
<div> width = drm_rect_width(&intel_pstate->src) >> 16; @@ -2985,15 +2987,20 @@ skl_plane_relative_data_rate(const struct intel_crtc_state *cstate,</div>
<div> /* for planar format */</div>
<div> if (fb->pixel_format == DRM_FORMAT_NV12) {</div>
<div> if (y) /* y-plane data rate */</div>
<div>- return width * height *</div>
<div>+ data_rate = width * height *</div>
<div> drm_format_plane_cpp(fb->pixel_format, 0);</div>
<div> else /* uv-plane data rate */</div>
<div>- return (width / 2) * (height / 2) *</div>
<div>+ data_rate = (width / 2) * (height / 2) *</div>
<div> drm_format_plane_cpp(fb->pixel_format, 1);</div>
<div>+ } else {</div>
<div>+ /* for packed formats */</div>
<div>+ data_rate = width * height *</div>
<div>+ drm_format_plane_cpp(fb->pixel_format, 0);</div>
<div> }</div>
<div> </div>
<div>- /* for packed formats */</div>
<div>- return width * height * drm_format_plane_cpp(fb->pixel_format, 0);</div>
<div>+ down_scale_amount = skl_plane_downscale_amount(intel_plane);</div>
<div>+</div>
<div>+ return data_rate * down_scale_amount >> 16;</div>
<div> }</div>
<div> </div>
<div> /*</div>
<div>--</div>
<div>2.1.4</div>
<div> </div>
<div>_______________________________________________</div>
<div>Intel-gfx mailing list</div>
<div><a href="mailto:Intel-gfx@lists.freedesktop.org">Intel-gfx@lists.freedesktop.org</a></div>
<div><a href="https://lists.freedesktop.org/mailman/listinfo/intel-gfx">https://lists.freedesktop.org/mailman/listinfo/intel-gfx</a></div>
<div> </div>
</span></font>
</body>
</html>