From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wi0-f170.google.com ([209.85.212.170]:36867 "EHLO mail-wi0-f170.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751660AbbHNMS0 (ORCPT ); Fri, 14 Aug 2015 08:18:26 -0400 Received: by wibhh20 with SMTP id hh20so18824903wib.0 for ; Fri, 14 Aug 2015 05:18:24 -0700 (PDT) Date: Fri, 14 Aug 2015 14:18:22 +0200 From: Daniel Vetter To: Chris Wilson Cc: intel-gfx@lists.freedesktop.org, stable@vger.kernel.org Subject: Re: [Intel-gfx] [PATCH] drm/i915: Flag the execlists context object as dirty after every use Message-ID: <20150814121822.GY17734@phenom.ffwll.local> References: <1439553559-23004-1-git-send-email-chris@chris-wilson.co.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1439553559-23004-1-git-send-email-chris@chris-wilson.co.uk> Sender: stable-owner@vger.kernel.org List-ID: On Fri, Aug 14, 2015 at 12:59:19PM +0100, Chris Wilson wrote: > Everytime we use the logical context with execlists it becomes dirty (as > the hardware will write the new register values afterwards, as well as > the GPU state that will be used). We need to then flag the context as > dirty everytime since after a swap-out/swap-in cycle the dirty flag will > be cleared, and a further swap-out cycle will then loose the most recent > GPU state. > > Signed-off-by: Chris Wilson > Cc: stable@vger.kernel.org Yay for reinventing active tracking I guess, legacy hw ctx has this already. Reviewed-by: Daniel Vetter -Daniel > --- > drivers/gpu/drm/i915/intel_lrc.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/drivers/gpu/drm/i915/intel_lrc.c b/drivers/gpu/drm/i915/intel_lrc.c > index 138964afd187..41cfa6fa909d 100644 > --- a/drivers/gpu/drm/i915/intel_lrc.c > +++ b/drivers/gpu/drm/i915/intel_lrc.c > @@ -1013,6 +1013,8 @@ static int intel_lr_context_pin(struct drm_i915_gem_request *rq) > ret = intel_pin_and_map_ringbuffer_obj(ring->dev, ringbuf); > if (ret) > goto unpin_ctx_obj; > + > + ctx_obj->dirty = true; > } > > return ret; > -- > 2.5.0 > > _______________________________________________ > Intel-gfx mailing list > Intel-gfx@lists.freedesktop.org > http://lists.freedesktop.org/mailman/listinfo/intel-gfx -- Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch