From mboxrd@z Thu Jan 1 00:00:00 1970 From: Damien Lespiau Subject: Re: [PATCH 02/17] drm/i915: Rearrange the comments in i915_add_request() Date: Fri, 30 Aug 2013 15:21:12 +0100 Message-ID: <20130830142112.GC30430@strange.amr.corp.intel.com> References: <1377557469-4078-1-git-send-email-rodrigo.vivi@gmail.com> <1377557469-4078-3-git-send-email-rodrigo.vivi@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by gabe.freedesktop.org (Postfix) with ESMTP id 3FAF1E6B35 for ; Fri, 30 Aug 2013 07:21:17 -0700 (PDT) Content-Disposition: inline In-Reply-To: <1377557469-4078-3-git-send-email-rodrigo.vivi@gmail.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: intel-gfx-bounces+gcfxdi-intel-gfx=m.gmane.org@lists.freedesktop.org Errors-To: intel-gfx-bounces+gcfxdi-intel-gfx=m.gmane.org@lists.freedesktop.org To: Rodrigo Vivi Cc: intel-gfx@lists.freedesktop.org List-Id: intel-gfx@lists.freedesktop.org On Mon, Aug 26, 2013 at 07:50:54PM -0300, Rodrigo Vivi wrote: > From: Chris Wilson > > The comments were a little out-of-sequence with the code, forcing the > reader to jump around whilst reading. Whilst moving the comments around, > add one to explain the context reference. > > Signed-off-by: Chris Wilson Reviewed-by: Damien Lespiau -- Damien > --- > drivers/gpu/drm/i915/i915_gem.c | 7 +++++-- > 1 file changed, 5 insertions(+), 2 deletions(-) > > diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c > index 56c9104..d5c8a02 100644 > --- a/drivers/gpu/drm/i915/i915_gem.c > +++ b/drivers/gpu/drm/i915/i915_gem.c > @@ -2063,8 +2063,6 @@ int __i915_add_request(struct intel_ring_buffer *ring, > request->ring = ring; > request->head = request_start; > request->tail = request_ring_position; > - request->ctx = ring->last_context; > - request->batch_obj = obj; > > /* Whilst this request exists, batch_obj will be on the > * active_list, and so will hold the active reference. Only when this > @@ -2072,7 +2070,12 @@ int __i915_add_request(struct intel_ring_buffer *ring, > * inactive_list and lose its active reference. Hence we do not need > * to explicitly hold another reference here. > */ > + request->batch_obj = obj; > > + /* Hold a reference to the current context so that we can inspect > + * it later in case a hangcheck error event fires. > + */ > + request->ctx = ring->last_context; > if (request->ctx) > i915_gem_context_reference(request->ctx); > > -- > 1.8.1.4 > > _______________________________________________ > Intel-gfx mailing list > Intel-gfx@lists.freedesktop.org > http://lists.freedesktop.org/mailman/listinfo/intel-gfx