From mboxrd@z Thu Jan 1 00:00:00 1970 From: Chris Wilson Subject: Re: [PATCH 1/5] drm/i915: Cleanup instdone state Date: Wed, 15 Aug 2012 10:14:08 +0100 Message-ID: <1345022058_97130@CP5-2952> References: <1344980117-1993-1-git-send-email-ben@bwidawsk.net> <1344980117-1993-2-git-send-email-ben@bwidawsk.net> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from fireflyinternet.com (smtp.fireflyinternet.com [109.228.6.236]) by gabe.freedesktop.org (Postfix) with ESMTP id 8A14DA0D8C for ; Wed, 15 Aug 2012 02:14:25 -0700 (PDT) In-Reply-To: <1344980117-1993-2-git-send-email-ben@bwidawsk.net> 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: intel-gfx@lists.freedesktop.org Cc: Ben Widawsky List-Id: intel-gfx@lists.freedesktop.org On Tue, 14 Aug 2012 14:35:13 -0700, Ben Widawsky wrote: > Clear the cached instdone state to match what we expect from hardware > and prevent us from comparing stale values. > > Actually, clearing the state is not the same as setting idle state. > There would be a known state of idle (ie. all units are done), but since > it differs for every platform, we can just set 0, and let the hangcheck > progress as normal. > > By putting the clear into add_request we are essentially initializing > the cached instdone to a known state before we start the hangcheck > timer. > > v2: clear instdone in more place (Chris) > Rewrote the commit message > > References: https://bugs.freedesktop.org/show_bug.cgi?id=52429 > Tested-by: Guang A Yang > Signed-off-by: Ben Widawsky So if hangcheck is already running and we add a new request, we still clear the "stale" state. This means that we may take an extra tick after a new request for hangcheck to raise an error. Not a big deal and it keeps the code clean. Though possibly deserves a comment? Reviewed-by: Chris Wilson -Chris -- Chris Wilson, Intel Open Source Technology Centre