From mboxrd@z Thu Jan 1 00:00:00 1970 From: Daniel Vetter Subject: Re: [PATCH] drm/i915: Fixup hpd irq register setup ordering Date: Tue, 11 Dec 2012 17:24:08 +0100 Message-ID: <20121211162408.GT11556@phenom.ffwll.local> References: <1355176540-25282-1-git-send-email-daniel.vetter@ffwll.ch> <1355231107-4211-1-git-send-email-daniel.vetter@ffwll.ch> <1355241528.1025.5.camel@localhost> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail-ee0-f49.google.com (mail-ee0-f49.google.com [74.125.83.49]) by gabe.freedesktop.org (Postfix) with ESMTP id 3F508E5C3D for ; Tue, 11 Dec 2012 08:22:38 -0800 (PST) Received: by mail-ee0-f49.google.com with SMTP id c4so2301649eek.36 for ; Tue, 11 Dec 2012 08:22:37 -0800 (PST) Content-Disposition: inline In-Reply-To: <1355241528.1025.5.camel@localhost> 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: Imre Deak Cc: Daniel Vetter , Intel Graphics Development List-Id: intel-gfx@lists.freedesktop.org On Tue, Dec 11, 2012 at 05:58:48PM +0200, Imre Deak wrote: > On Tue, 2012-12-11 at 14:05 +0100, Daniel Vetter wrote: > > For GMCH platforms we set up the hpd irq registers in the irq > > postinstall hook. But since we only enable the irq sources we actually > > need in PORT_HOTPLUG_EN/STATUS, taking dev_priv->hotplug_supported_mask > > into account, no hpd interrupt sources is enabled since > > > > commit 52d7ecedac3f96fb562cb482c139015372728638 > > Author: Daniel Vetter > > Date: Sat Dec 1 21:03:22 2012 +0100 > > > > drm/i915: reorder setup sequence to have irqs for output setup > > > > Wrongly set-up interrupts also lead to broken hw-based load-detection > > on at least GM45, resulting in ghost VGA/TV-out outputs. > > > > To fix this, delay the hotplug register setup until after all outputs > > are set up, by moving it into a new dev_priv->display.hpd_irq_callback. > > We might also move the PCH_SPLIT platforms to such a setup eventually. > > > > Another funny part is that we need to delay the fbdev initial config > > probing until after the hpd regs are setup, for otherwise it'll detect > > ghost outputs. But we can only enable the hpd interrupt handling > > itself (and the output polling) _after_ that initial scan, due to > > massive locking brain-damage in the fbdev setup code. Add a big > > comment to explain this cute little dragon lair. > > > > v2: Encapsulate all the fbdev handling by wrapping the move call into > > intel_fbdev_initial_config in intel_fb.c. Requested by Chris Wilson. > > > > v3: Applied bikeshed from Jesse Barnes. > > > > v4: Imre Deak noticed that we also need to call intel_hpd_init after > > the drm_irqinstall calls in the gpu reset and resume paths - otherwise > > hotplug will be broken. Also improve the comment a bit about why > > hpd_init needs to be called before we set up the initial fbdev config. > > > > Bugzilla: Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=54943 > > Reported-by: Chris Wilson > > Signed-off-by: Daniel Vetter > > Looks ok: > Reviewed-by: Imre Deak Ok, patch merged again, thanks a lot for catching that resume/reset bug. -Daniel -- Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch