From mboxrd@z Thu Jan 1 00:00:00 1970 From: Daniel Vetter Subject: Re: [PATCH 14/15] drm/i915: Track frontbuffer invalidation/flushing Date: Tue, 17 Jun 2014 09:37:35 +0200 Message-ID: <20140617073735.GV5821@phenom.ffwll.local> References: <1402941095-27879-1-git-send-email-daniel.vetter@ffwll.ch> <1402941095-27879-15-git-send-email-daniel.vetter@ffwll.ch> <20140617065045.GE17744@nuc-i3427.alporthouse.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail-wg0-f42.google.com (mail-wg0-f42.google.com [74.125.82.42]) by gabe.freedesktop.org (Postfix) with ESMTP id D552C6E433 for ; Tue, 17 Jun 2014 00:37:42 -0700 (PDT) Received: by mail-wg0-f42.google.com with SMTP id z12so6539149wgg.13 for ; Tue, 17 Jun 2014 00:37:42 -0700 (PDT) Content-Disposition: inline In-Reply-To: <20140617065045.GE17744@nuc-i3427.alporthouse.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" To: Chris Wilson , Daniel Vetter , Intel Graphics Development , Rodrigo Vivi List-Id: intel-gfx@lists.freedesktop.org On Tue, Jun 17, 2014 at 07:50:45AM +0100, Chris Wilson wrote: > On Mon, Jun 16, 2014 at 07:51:34PM +0200, Daniel Vetter wrote: > > @@ -2227,6 +2223,9 @@ i915_gem_object_move_to_inactive(struct drm_i915_gem_object *obj) > > list_move_tail(&vma->mm_list, &vm->inactive_list); > > } > > > > + if (obj->frontbuffer_bits) > > + intel_fb_flush(obj, true); > > + > > list_del_init(&obj->ring_list); > > obj->ring = NULL; > > > > @@ -3556,6 +3555,8 @@ i915_gem_object_flush_gtt_write_domain(struct drm_i915_gem_object *obj) > > old_write_domain = obj->base.write_domain; > > obj->base.write_domain = 0; > > > > + intel_fb_flush(obj, false); > > + > I think it is worth the if (obj->frontbuffer_bit) check everywhere. Well it's the first thing fb_flush checks, so the additional ones are just stupid micro-optimizations I guess. Should I remove them everywhere? -Daniel -- Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch