From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kenneth Graunke Subject: Re: [Intel gfx][i-g-t PATCH 1/4] lib: Clean the batch buffer store after reset Date: Fri, 06 Dec 2013 02:14:52 -0800 Message-ID: <52A1A39C.6000905@whitecape.org> References: <1386320087-3017-1-git-send-email-haihao.xiang@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from homiemail-a14.g.dreamhost.com (caiajhbdccac.dreamhost.com [208.97.132.202]) by gabe.freedesktop.org (Postfix) with ESMTP id 93427FB58B for ; Fri, 6 Dec 2013 02:11:50 -0800 (PST) In-Reply-To: <1386320087-3017-1-git-send-email-haihao.xiang@intel.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: intel-gfx-bounces@lists.freedesktop.org Errors-To: intel-gfx-bounces@lists.freedesktop.org To: "Xiang, Haihao" , intel-gfx@lists.freedesktop.org List-Id: intel-gfx@lists.freedesktop.org On 12/06/2013 12:54 AM, Xiang, Haihao wrote: > From: "Xiang, Haihao" > > Otherwise the stale data in the buffer > > Signed-off-by: Xiang, Haihao > --- > lib/intel_batchbuffer.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/lib/intel_batchbuffer.c b/lib/intel_batchbuffer.c > index 06a5437..9ce7424 100644 > --- a/lib/intel_batchbuffer.c > +++ b/lib/intel_batchbuffer.c > @@ -50,6 +50,8 @@ intel_batchbuffer_reset(struct intel_batchbuffer *batch) > batch->bo = drm_intel_bo_alloc(batch->bufmgr, "batchbuffer", > BATCH_SZ, 4096); > > + memset(batch->buffer, 0, sizeof(batch->buffer)); > + > batch->ptr = batch->buffer; > } > > I don't think that should be harmful, but this would definitely make debugging nicer. For intel-gpu-tools, I think it makes sense. Reviewed-by: Kenneth Graunke