From: "Xiang, Haihao" Subject: Re: [Inter-gfx][PATCH][v3 3/4] drm/i915: add set_tail hook in struct intel_ring_buffer Date: Thu, 16 Sep 2010 14:03:08 +0800 Message-ID: <1284616988.24494.38.camel@xhh-ctg32> References: <1284604993-2810-1-git-send-email-haihao.xiang@intel.com> <1284604993-2810-3-git-send-email-haihao.xiang@intel.com> <20100916042121.GN9765@zhen-devel.sh.intel.com> <1284613829.24494.24.camel@xhh-ctg32> <20100916053749.GP9765@zhen-devel.sh.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by gabe.freedesktop.org (Postfix) with ESMTP id EF18B9ED70 for ; Wed, 15 Sep 2010 23:02:33 -0700 (PDT) In-Reply-To: <20100916053749.GP9765@zhen-devel.sh.intel.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: Zhenyu Wang Cc: "intel-gfx@lists.freedesktop.org" List-Id: intel-gfx@lists.freedesktop.org On Thu, 2010-09-16 at 13:37 +0800, Zhenyu Wang wrote: > On 2010.09.16 13:10:29 +0800, Xiang, Haihao wrote: > > > Or can't that be done in init function by using advance_ring? > > advance_ring uses ring->tail to set TAIL register, i965_reset() also > > invokes ring->init() to re-init ring buffer, how to guarantee ring->tail > > is 0? BTW advance_ring can be implemented as set_tail(dev, ring->tail). > > > > oh, that's bad, not only just for render ring, but ring tail should > always be inited correctly, not just in static variable.. > init_ring_common() always inits ring tail. so it is not just in static variable.