From mboxrd@z Thu Jan 1 00:00:00 1970 From: Daniel Vetter Subject: Re: [PATCH] drm/i915: Only mark the ctx as initialised after a SET_CONTEXT operation Date: Tue, 10 Jun 2014 15:17:40 +0200 Message-ID: <20140610131740.GK5821@phenom.ffwll.local> References: <1401455790-10682-1-git-send-email-chris@chris-wilson.co.uk> <20140610103434.GE8056@nuc-i3427.alporthouse.com> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Return-path: Received: from mail-wi0-f182.google.com (mail-wi0-f182.google.com [209.85.212.182]) by gabe.freedesktop.org (Postfix) with ESMTP id 195E66E20F for ; Tue, 10 Jun 2014 06:17:45 -0700 (PDT) Received: by mail-wi0-f182.google.com with SMTP id r20so6116223wiv.15 for ; Tue, 10 Jun 2014 06:17:45 -0700 (PDT) Content-Disposition: inline In-Reply-To: <20140610103434.GE8056@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 , intel-gfx@lists.freedesktop.org, Ville =?iso-8859-1?Q?Syrj=E4l=E4?= , Damien Lespiau , Mika Kuoppala , Ben Widawsky List-Id: intel-gfx@lists.freedesktop.org On Tue, Jun 10, 2014 at 11:34:34AM +0100, Chris Wilson wrote: > On Fri, May 30, 2014 at 02:16:30PM +0100, Chris Wilson wrote: > > Fallout from > > = > > commit 46470fc932ac8a0e8317a220b3f4ea4ed903338e > > Author: Mika Kuoppala > > Date: Wed May 21 19:01:06 2014 +0300 > > = > > drm/i915: Add null state batch to active list > > = > > undid the earlier fix of only marking the ctx as initialised after it is > > saved by the hardware during a SET_CONTEXT operation. > > = > > Signed-off-by: Chris Wilson > > Cc: Ville Syrj=E4l=E4 > > Cc: Damien Lespiau > > Cc: Mika Kuoppala > > Cc: Ben Widawsky > = > Ping. Ben's comments do not impact upon the urgent need for this fix. Ok, this code is extremely convoluted. ctx->last_ring is terrible, and we should make a clear disdinction of which ctx->foo fields are for the logical context and which for the per-engine stuff. Will be much more important for execlists so that we properly fan out the state. I'm ranting here a bit since it took me a while to realize that ->is_initialized is _only_ for the RCS stuff. I guess we should have ctx->obj[ring] and ctx->is_initialized[ring] or even better, a substruct i915_hw_context with an array. With that out of the way, this is Reviewed-by: Daniel Vetter Thanks, Daniel -- = Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch