From mboxrd@z Thu Jan 1 00:00:00 1970 From: Daniel Vetter Subject: Re: [PATCH 17/48] drm/i915: Track which ring a context ran on Date: Tue, 22 Apr 2014 16:25:22 +0200 Message-ID: <20140422142522.GR10722@phenom.ffwll.local> References: <20131206215521.GA6922@bwidawsk.net> <1386367941-7131-1-git-send-email-benjamin.widawsky@intel.com> <1386367941-7131-17-git-send-email-benjamin.widawsky@intel.com> <20140418095146.GA7270@nuc-i3427.alporthouse.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail-ee0-f43.google.com (mail-ee0-f43.google.com [74.125.83.43]) by gabe.freedesktop.org (Postfix) with ESMTP id 899736E541 for ; Tue, 22 Apr 2014 07:25:27 -0700 (PDT) Received: by mail-ee0-f43.google.com with SMTP id e53so4750845eek.30 for ; Tue, 22 Apr 2014 07:25:26 -0700 (PDT) Content-Disposition: inline In-Reply-To: <20140418095146.GA7270@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 , Ben Widawsky , Intel GFX , Ben Widawsky List-Id: intel-gfx@lists.freedesktop.org On Fri, Apr 18, 2014 at 10:51:46AM +0100, Chris Wilson wrote: > On Fri, Dec 06, 2013 at 02:11:02PM -0800, Ben Widawsky wrote: > > From: Ben Widawsky > > > > Previously we dropped the association of a context to a ring. It is > > however very important to know which ring a context ran on (we could > > have reused the other member, but I was nitpicky). > > > > This is very important when we switch address spaces, which unlike > > context objects, do change per ring. > > > > As an example, if we have: > > > > RCS BCS > > ctx A > > ctx A > > ctx B > > ctx B > > > > Without tracking the last ring B ran on, we wouldn't know to switch the > > address space on BCS in the last row. > > > > As a result, we no longer need to track which ring a context "belongs" > > to, as it never really made much sense anyway. > > What about ring->last_context != to? That would force the update on BCS > from A to B. Yeah ctx->last_ring isn't really what we want, I'll add another JIRA for switching all the ctx->last_ring checks to instead check ring->last_context != to. Since that's what matters I think this doesn't have the possibility to have broken anything yet since we don't allow the same context on multiple rings. Except the default one, but mesa creates new contexts anyway afaik. Or am I wrong? It's a definite blocker for execlists and full ppgtt though. -Daniel -- Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch