From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Volkin, Bradley D" Subject: Re: [PATCH v3] drm/i915: Add null state batch to active list Date: Wed, 21 May 2014 08:29:06 -0700 Message-ID: <20140521152906.GA2828@bdvolkin-ubuntu-desktop> References: <20140521130602.GA12436@nuc-i3427.alporthouse.com> <1400680976-19107-1-git-send-email-mika.kuoppala@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by gabe.freedesktop.org (Postfix) with ESMTP id 0C9A56E342 for ; Wed, 21 May 2014 08:28:27 -0700 (PDT) Content-Disposition: inline In-Reply-To: <1400680976-19107-1-git-send-email-mika.kuoppala@intel.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" To: Mika Kuoppala Cc: "intel-gfx@lists.freedesktop.org" , "miku@iki.fi" List-Id: intel-gfx@lists.freedesktop.org On Wed, May 21, 2014 at 07:02:56AM -0700, Mika Kuoppala wrote: > + if (ring->id == RCS && !to->is_initialized && from == NULL) { > + ret = i915_gem_render_state_init(ring); > + if (ret) > + DRM_ERROR("init render state: %d\n", ret); > + } Apologies if this has already been discussed, but why do we have the 'from == NULL' check? Shouldn't we initialize all uninitialized RCS contexts? Otherwise I thought we'll inherit whatever state 'from' left behind. The hw state should be valid in either case (and so I expect would fix the rc6 issue either way), it's just the difference between initializing every context to a specific valid state or initializing every context to _some_ valid state. The commit message on the first render state patch seemed to indicate the former while the implementation looks like the latter. Just want to understand which we intended. Thanks, Brad