From mboxrd@z Thu Jan 1 00:00:00 1970 From: Chris Wilson Subject: Re: [PATCH 3/4] drm/i915: Allow userspace to hint that the relocations were known Date: Sat, 10 Nov 2012 18:08:11 +0000 Message-ID: References: <1352560547-1423-1-git-send-email-chris@chris-wilson.co.uk> <1352560547-1423-3-git-send-email-chris@chris-wilson.co.uk> <20121110171616.GH5854@phenom.ffwll.local> 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 9450D9E98A for ; Sat, 10 Nov 2012 10:08:14 -0800 (PST) In-Reply-To: <20121110171616.GH5854@phenom.ffwll.local> 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: Daniel Vetter Cc: intel-gfx@lists.freedesktop.org List-Id: intel-gfx@lists.freedesktop.org On Sat, 10 Nov 2012 18:16:16 +0100, Daniel Vetter wrote: > - Can we abolish the pending_read/write_domains and just go with a > per-object GPU_WRITE flag? Afaik that's all we need with the > flushing_list gone. To avoid a massive rewrite of the code I'm thinking > of just keeping around a pending_gpu_write bool (since reads are > implicit) and then using that to fill out generic gpu domains in > i915_gem_execbuffer_move_to_active. E.g. set all gpu read domains if > there is no write, otherwise just set the render domain in both. Just a quick comment. I started with just a WRITE flag, then realised I needed to mark the read domains as well (for GPU activity tracking). So I concluded that just passing along the domains was easy enough for userspace and better for future-proofing. That is definitely one of the places where we need to be careful with designing the API - more ideas are welcome. -Chris -- Chris Wilson, Intel Open Source Technology Centre