From mboxrd@z Thu Jan 1 00:00:00 1970 From: Daniel Vetter Subject: Re: [PATCH] drm/i915: Remove ctx->last_ring Date: Wed, 18 Jun 2014 21:43:19 +0200 Message-ID: <20140618194319.GP5821@phenom.ffwll.local> References: <1403108163-6474-1-git-send-email-oscar.mateo@intel.com> <20140618163449.GW31023@nuc-i3427.alporthouse.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail-wi0-f169.google.com (mail-wi0-f169.google.com [209.85.212.169]) by gabe.freedesktop.org (Postfix) with ESMTP id 229686E772 for ; Wed, 18 Jun 2014 12:43:26 -0700 (PDT) Received: by mail-wi0-f169.google.com with SMTP id hi2so9077108wib.0 for ; Wed, 18 Jun 2014 12:43:26 -0700 (PDT) Content-Disposition: inline In-Reply-To: <20140618163449.GW31023@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 , oscar.mateo@intel.com, intel-gfx@lists.freedesktop.org List-Id: intel-gfx@lists.freedesktop.org On Wed, Jun 18, 2014 at 05:34:49PM +0100, Chris Wilson wrote: > On Wed, Jun 18, 2014 at 05:16:03PM +0100, oscar.mateo@intel.com wrote: > > From: Oscar Mateo > > > > The original comment that introduced it said: > > > > commit 0009e46cd54324c4af20b0b52b89973b1b914167 > > Author: Ben Widawsky > > Date: Fri Dec 6 14:11:02 2013 -0800 > > > > drm/i915: Track which ring a context ran on > > > > 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. > > > > But this is not really true, because we are already checking to != from (with > > "from" being = ring->last_context) and that should be enough to make sure we > > switch to the right address space. > > > > We would have a problem if we switched the context object for every ring (since > > then we would fail to do it in some situations) but we only switch it for the > > render ring, so we don't care. > > > > Signed-off-by: Oscar Mateo > > I have sent the very same patch, so > Reviewed-by: Chris Wilson Queued for -next, thanks for the patch. -Daniel -- Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch