From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Zhigang Gong" Subject: Re: [PATCH 2/2] glamor: Address GLAMOR/UXA flushing problem. Date: Tue, 15 Nov 2011 20:54:13 +0800 Message-ID: <06fb01cca395$adad6ba0$090842e0$@linux.intel.com> References: <1321356974-14282-1-git-send-email-zhigang.gong@linux.intel.com> <1321356974-14282-2-git-send-email-zhigang.gong@linux.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by gabe.freedesktop.org (Postfix) with ESMTP id 68D6D9EFFB for ; Tue, 15 Nov 2011 04:54:15 -0800 (PST) In-Reply-To: Content-Language: zh-cn 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: 'Chris Wilson' , intel-gfx@lists.freedesktop.org List-Id: intel-gfx@lists.freedesktop.org > -----Original Message----- > From: Chris Wilson [mailto:chris@chris-wilson.co.uk] > Sent: Tuesday, November 15, 2011 8:25 PM > To: Zhigang Gong; intel-gfx@lists.freedesktop.org > Cc: zhigang.gong@linux.intel.com > Subject: Re: [PATCH 2/2] glamor: Address GLAMOR/UXA flushing problem. > > On Tue, 15 Nov 2011 19:36:14 +0800, Zhigang Gong > wrote: > > This commit introduces a new function in UXA layer need_flush which is > > used to let the UXA layer to notify the lower layer that some pixmap > > get modified by GLAMOR. And then the intel driver could know it need > > to flush front buffer latter. > > > > This commit also adds some necessary flushing pointis for UXA layer > > and glamor layer. Basicly, there are three scenarios: > > > > 1. Before calling into glamor layer, it needs to flush all the > > corresponding UXA batch comand buffer. > > > > 2. After calling the glamor rendering functions, it needs to flush the > > pending GL operations. > > > > 3. Before we map a pixmap's BO, we also need to flush all the pending > > GL operations. > > > > The scenario 2 could be eliminated when we fully change to glamor > > path. > > I much prefer the one-sided uxa_prepare_access() you have implemented > here for the glamor side. For completeness, you still probably want the > uxa_finish_access() though. I was thinking about that, but current uxa_finish_access doesn't have a parameter to indicate the access type. I prefer to change the uxa_finish_access's prototype to the same as uxa_prepare_access(). And then will do glamor flush there if the access type is GLAMOR_WRITE. I'm just not very sure whether it is the best way. Will work out a new patch to implement that soon. BTW, May I have your review tag in the commits which get reviewed by you. Thanks. > Alternatively you need to mark up all > operations with uxa_prepare_access(GLAMOR | NATIVE | SW, READ | > WRITE) which then perform the implicit uxa_finish_access() when the > mode changes, and would also allow you to only flush the glamor > operations as required. This looks much complicate than the first solution. I prefer the first solution. -- Zhigang > > Aside from that, this looks like the right approach to handling the flushing. > -Chris > > -- > Chris Wilson, Intel Open Source Technology Centre