From mboxrd@z Thu Jan 1 00:00:00 1970 From: Chris Wilson Subject: Re: [PATCH 3/5] drm/i915: don't return a spurious -EIO from intel_ring_begin Date: Mon, 25 Jun 2012 21:32:23 +0100 Message-ID: <1340656383_69674@CP5-2952> References: <1340548956-4097-1-git-send-email-daniel.vetter@ffwll.ch> <1340548956-4097-4-git-send-email-daniel.vetter@ffwll.ch> 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 45D1F9F0E3 for ; Mon, 25 Jun 2012 13:33:08 -0700 (PDT) In-Reply-To: <1340548956-4097-4-git-send-email-daniel.vetter@ffwll.ch> 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 Graphics Development Cc: Daniel Vetter List-Id: intel-gfx@lists.freedesktop.org On Sun, 24 Jun 2012 16:42:34 +0200, Daniel Vetter wrote: > We have a careful logic in i915_gem_check_wedge already to asses whether > the gpu reset has been tried already and hence whether to return -EIO > or -EAGAIN. > > Having this early check in intel_ring_begin doesn't buy us anything, > since we'll be calling into wait_request in the usual case already > anyway. In the corner case of not waiting for free space using the > last_retired_head we simply need to do the same check, too. > > With these changes we'll only ever get an -EIO from intel_ring_begin > if the gpu has truely been declared dead. The intention here was that only operations that queued a command to a wedged GPU would trigger the EIO. That has been superseded by the error checking during mutex acquisition. The patch looks sane, but I'd like it split into two, one to remove the wedged check before intel_ring_begin (with some of the rationale about it now being superfluous) and a separate patch to reuse check_wedge(). It looks like the patch to reuse check_wedge() should be first as it is the common theme in the series. -Chris -- Chris Wilson, Intel Open Source Technology Centre