From mboxrd@z Thu Jan 1 00:00:00 1970 From: Daniel Vetter Subject: Re: [PATCH] drm/i915: s/seqno/request/ tracking inside objects Date: Tue, 29 Jul 2014 12:41:26 +0200 Message-ID: <20140729104126.GP4747@phenom.ffwll.local> References: <1406291220-14151-1-git-send-email-chris@chris-wilson.co.uk> <20140728134412.6d3b5a10@jbarnes-t420> <20140729072953.GB21570@nuc-i3427.alporthouse.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail-we0-f169.google.com (mail-we0-f169.google.com [74.125.82.169]) by gabe.freedesktop.org (Postfix) with ESMTP id EBA2C89CB2 for ; Tue, 29 Jul 2014 03:41:23 -0700 (PDT) Received: by mail-we0-f169.google.com with SMTP id u56so8675417wes.28 for ; Tue, 29 Jul 2014 03:41:20 -0700 (PDT) Content-Disposition: inline In-Reply-To: <20140729072953.GB21570@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 , Jesse Barnes , intel-gfx@lists.freedesktop.org, Daniel Vetter , Oscar Mateo , Brad Volkin List-Id: intel-gfx@lists.freedesktop.org On Tue, Jul 29, 2014 at 08:29:53AM +0100, Chris Wilson wrote: > On Mon, Jul 28, 2014 at 01:44:12PM -0700, Jesse Barnes wrote: > > > @@ -3038,44 +3203,35 @@ out: > > > */ > > > int > > > i915_gem_object_sync(struct drm_i915_gem_object *obj, > > > - struct intel_engine_cs *to) > > > + struct intel_engine_cs *to, > > > + bool readonly) > > > { > > > > It might be nice to have sync_read/sync_write functions instead, since > > looking up bool args or unnamed enums is a pain. > > Not convinced since it is used in a single location and two function > calls would look unelegant - but we could switch to PROT_READ | > PROT_WRITE throughout. Switching to PROT_READ/WRITE might be nice as a general cleanup (or some other named thing) since read_only/write booleans are all over the place. So I like this, but definitely something for a separate patch. -Daniel -- Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch