From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754067AbbKWI45 (ORCPT ); Mon, 23 Nov 2015 03:56:57 -0500 Received: from mail-wm0-f53.google.com ([74.125.82.53]:33403 "EHLO mail-wm0-f53.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754005AbbKWI4y (ORCPT ); Mon, 23 Nov 2015 03:56:54 -0500 Date: Mon, 23 Nov 2015 09:56:51 +0100 From: Daniel Vetter To: Daniel Stone Cc: Christian =?iso-8859-1?Q?K=F6nig?= , Linux Kernel Mailing List , dri-devel , Jerome Glisse , Benjamin Tissoires , Alex Deucher , cpaul@redhat.com Subject: Re: [PATCH] drm/radeon: Retry DDC probing on DVI on failure if we got an HPD interrupt Message-ID: <20151123085651.GX17050@phenom.ffwll.local> Mail-Followup-To: Daniel Stone , Christian =?iso-8859-1?Q?K=F6nig?= , Linux Kernel Mailing List , dri-devel , Jerome Glisse , Benjamin Tissoires , Alex Deucher , cpaul@redhat.com References: <1448034740-30193-1-git-send-email-cpaul@redhat.com> <56507E0F.7030009@amd.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Operating-System: Linux phenom 4.1.0-2-amd64 User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Nov 21, 2015 at 02:49:20PM +0000, Daniel Stone wrote: > Hi, > > On 21 November 2015 at 14:22, Christian König wrote: > > On 20.11.2015 16:52, cpaul@redhat.com wrote: > >> This is somewhat rare on most cards (depending on what angle you plug > >> the DVI connector in), but on some cards it happens constantly. The > >> Radeon R5 on the machine used for testing this patch for instance, runs > >> into this issue just about every time I try to hotplug a DVI monitor and > >> as a result hotplugging almost never works. > >> > >> Rescheduling the hotplug work for a second when we run into an HPD > >> signal with a failing DDC probe usually gives enough time for the rest > >> of the connector's pins to make contact, and fixes this issue. > >> > >> Signed-off-by: Stephen Chandler Paul > > > > > > Yeah, that's something I always wondered a about bit as well. > > > > Debouncing is something very common done in electronics, but as far as I > > know the HPD pins don't necessary have an RC circuit so we might need to > > handle this case in software here. > > > > A delay of something between 10-30ms between the last HPD interrupt and > > further processing of the signal doesn't sounds like such a bad idea. > > > > Retrying on the other hand doesn't necessarily improve the situation cause > > the delay introduced by this might not be enough. > > > > So I would rather vote for a fixed delay between an HPD interrupt and > > actually starting to process anything. > > Yes-ish. Debouncing is useful, and ignoring buggy devices (e.g. those > on marginal power) which send you HPD storms as well. But DP relies on > 'short HPD' pulses which can be as brief as 2ms. So attempting to > totally debounce all HPD won't work. In our experience in i915 DP hpd works perfectly on all machines. At least we never had to add timeout hacks to settle hpd, storm handling code isn't enabled for DP either and we always checked hpd status bits to decide whether something is connected or not. hdmi/dvi is the troublemaker which needs settling time and storm handling. -Daniel -- Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch