From mboxrd@z Thu Jan 1 00:00:00 1970 From: Daniel Vetter Subject: Re: [PATCH] drm/i915: Fix __wait_seqno to use true infinite timeouts Date: Fri, 23 Aug 2013 09:27:42 +0200 Message-ID: References: <1377219916-3943-1-git-send-email-chris@chris-wilson.co.uk> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail-ie0-f179.google.com (mail-ie0-f179.google.com [209.85.223.179]) by gabe.freedesktop.org (Postfix) with ESMTP id 169E5E5C65 for ; Fri, 23 Aug 2013 00:27:43 -0700 (PDT) Received: by mail-ie0-f179.google.com with SMTP id m16so339857ieq.10 for ; Fri, 23 Aug 2013 00:27:42 -0700 (PDT) In-Reply-To: <1377219916-3943-1-git-send-email-chris@chris-wilson.co.uk> 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: Chris Wilson Cc: intel-gfx List-Id: intel-gfx@lists.freedesktop.org On Fri, Aug 23, 2013 at 3:05 AM, Chris Wilson wrote: > Rather than continue to fix up the timeouts to work around the interface > impedence in wait_event_*(), open code the combination of > wait_event[_interruptible][_timeout]. And note the code size reduction, > and dare say readability?, in doing so.. > > v2: In order to satisfy the debug requirement of logging missed > interrupts with the real world requirments of making machines work even > if interrupts are hosed, we revert to polling after detecting a missed > interrupt. > > Signed-off-by: Chris Wilson Yeah, I think this approach should work. A few comments: - I think we need a debugfs file to shut the safety quirk off - when testing on a machine where we actually miss interrupts it might be usful to get the warning output every time. - I'd go for a new bool dev_priv->unreliable_seqno_signalling or so to avoid any races due to the rmw cycle you now do on dev_priv->quirks. - I'd have opted for a faster timeout of the fake irq, but one that rearms. Also I'd love to be able to test all this (both the missed irq detection stuff and the fake irq) but I don't have a good idea right now ... So I guess we need to again hope that it won't break too quickly (since it eventually will break again). -Daniel -- Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch