From: Daniel Vetter Subject: Re: [PATCH 1/6] drm/i915: Reinitialize default context after reset Date: Fri, 19 Sep 2014 17:43:05 +0200 Message-ID: <20140919154305.GG15734@phenom.ffwll.local> References: <1411052315-22979-1-git-send-email-mika.kuoppala@intel.com> <1411052315-22979-2-git-send-email-mika.kuoppala@intel.com> <20140918153647.GF23478@nuc-i3427.alporthouse.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail-wg0-f47.google.com (mail-wg0-f47.google.com [74.125.82.47]) by gabe.freedesktop.org (Postfix) with ESMTP id 7AF4C6E127 for ; Fri, 19 Sep 2014 08:42:38 -0700 (PDT) Received: by mail-wg0-f47.google.com with SMTP id l18so2594515wgh.6 for ; Fri, 19 Sep 2014 08:42:37 -0700 (PDT) Content-Disposition: inline In-Reply-To: <20140918153647.GF23478@nuc-i3427.alporthouse.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" To: Chris Wilson , Mika Kuoppala , intel-gfx@lists.freedesktop.org List-Id: intel-gfx@lists.freedesktop.org On Thu, Sep 18, 2014 at 04:36:47PM +0100, Chris Wilson wrote: > On Thu, Sep 18, 2014 at 05:58:30PM +0300, Mika Kuoppala wrote: > > We don't know in what shape the default context was before reset. > > The reset also dropped our changes that were done in > > ring->init_context. > > > > Mark our default context as uninitialized for it to be properly > > setup up on reset recovery . > > The fundamental problem here is that context_init is not correctly split > into init/init_hw (or init/enable) pairs. That is we simply do not > attempt to reset the default state after reset via i915_gem_init_hw(). I > would rather we brought rationality to the gem init/init_hw sequence > first. Yeah I agree with Chris that context setup doesn't follow our established split with _init doing the software setup (and doesn't touch the hw at all) and _init_hw doing the hw setup. _init is run at driver load, while _init_hw is run at driver load, resume, after gpu reset and maybe even from runtime pm code. But I don't mind if we do this after or before this series, whatever is less fuzz is fine with me. -Daniel -- Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch