From mboxrd@z Thu Jan 1 00:00:00 1970 From: Shobhit Kumar Subject: Re: drm/i915: Disable DDI Pipe Control on HSW while disabling pipe Date: Mon, 11 Jun 2012 10:55:38 +0530 Message-ID: <4FD58152.8090902@intel.com> References: <1339136063-29548-1-git-send-email-shobhit.kumar@intel.com> <20120608124928.GB5761@phenom.ffwll.local> <4FD20308.40700@linux.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit Return-path: Received: from mga14.intel.com (mga14.intel.com [143.182.124.37]) by gabe.freedesktop.org (Postfix) with ESMTP id AB1149E75C for ; Sun, 10 Jun 2012 22:25:40 -0700 (PDT) In-Reply-To: <4FD20308.40700@linux.intel.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: intel-gfx-bounces+gcfxdi-intel-gfx=m.gmane.org@lists.freedesktop.org Errors-To: intel-gfx-bounces+gcfxdi-intel-gfx=m.gmane.org@lists.freedesktop.org To: eugeni.dodonov@intel.com Cc: intel-gfx@lists.freedesktop.org List-Id: intel-gfx@lists.freedesktop.org On 06/08/2012 07:20 PM, Eugeni Dodonov wrote: > On 06/08/2012 09:49 AM, Daniel Vetter wrote: >> On Fri, Jun 08, 2012 at 11:44:23AM +0530, Shobhit Kumar wrote: >>> In Haswell while disabling a pipe, we need to disable the DDI control as >>> well along with the PIPECONF. Otherwise we will hit assertions during >>> crtc >>> disable >> >> Hm, can you add such an example assert with backtrace please? All these >> asserts encode our current understanding of the hw depency chain, so I'd >> like to check whether we're really doing the right thing and don't just >> stfu some dmesg noise. >> >> Thanks, Daniel > > This is part of the pipe disabling process starting with Haswell. DDI > pipe function control should be disabled when pipe is being disabled, > otherwise it stays in enabled state and on next enabling we hit the > assert within assert_fdi_tx: > > ... > if (IS_HASWELL(dev_priv->dev)) { > /* On Haswell, DDI is used instead of FDI_TX_CTL */ > reg = DDI_FUNC_CTL(pipe); > val = I915_READ(reg); > cur_state = !!(val & PIPE_DDI_FUNC_ENABLE); > ... > Eugeni already explained how and where the assertion will be raised. Please find a sample assertion while loading the driver with HDMI output connected - [ 19.172852] WARNING: at drivers/gpu/drm/i915/intel_display.c:976 assert_fdi_tx+0x87/0x90 [i915]() [ 19.172901] Hardware name: Shark Bay Client platform [ 19.172941] FDI TX state assertion failure (expected off, current on) [ 19.172986] Modules linked in: i915(+) drm_kms_helper [ 19.173085] Pid: 1072, comm: modprobe Not tainted 3.4.0+ #26 [ 19.173185] Call Trace: [ 19.173282] [] warn_slowpath_common+0x7a/0xb0 [ 19.173384] [] warn_slowpath_fmt+0x41/0x50 [ 19.173496] [] assert_fdi_tx+0x87/0x90 [i915] [ 19.173616] [] ironlake_crtc_disable+0x176/0x800 [i915] [ 19.173726] [] ironlake_crtc_dpms+0x86/0x90 [i915] [ 19.173835] [] intel_crtc_dpms+0x43/0x140 [i915] [ 19.173943] [] intel_crtc_disable+0x30/0xa0 [i915] [ 19.174046] [] drm_helper_disable_unused_functions+0x115/0x190 [drm_kms_helper] [ 19.174220] [] intel_modeset_init+0x677/0xe30 [i915] [ 19.174332] [] i915_driver_load+0xa36/0xad0 [i915] [ 19.174436] [] ? drm_get_minor+0x263/0x310 [ 19.174538] [] drm_get_pci_dev+0x189/0x2b0 [ 19.174655] [] i915_pci_probe+0x1b/0x1d [i915] [ 19.174757] [] pci_device_probe+0x12a/0x130 [ 19.174859] [] driver_probe_device+0x73/0x210 [ 19.174960] [] __driver_attach+0x9b/0xa0 [ 19.175060] [] ? driver_probe_device+0x210/0x210 [ 19.175162] [] bus_for_each_dev+0x4e/0x80 [ 19.175262] [] driver_attach+0x19/0x20 [ 19.175362] [] bus_add_driver+0x1a0/0x270 [ 19.175463] [] driver_register+0x71/0x130 [ 19.175568] [] __pci_register_driver+0x50/0xc0 [ 19.175671] [] ? notifier_call_chain+0x4d/0x70 [ 19.175772] [] drm_pci_init+0x115/0x130 [ 19.175872] [] ? 0xffffffffa007dfff [ 19.175978] [] i915_init+0x8b/0x8d [i915] [ 19.176079] [] do_one_initcall+0x3a/0x160 [ 19.176181] [] sys_init_module+0xa1c/0x1ba0 [ 19.176283] [] ? ftrace_define_fields_module_load+0x70/0x70 [ 19.176445] [] system_call_fastpath+0x16/0x1b Regards Shobhit