From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ville =?iso-8859-1?Q?Syrj=E4l=E4?= Subject: Re: [PATCH 5/7] drm/i915: pass status instead of enable flags to i915_enable_pipestat Date: Wed, 5 Feb 2014 18:53:28 +0200 Message-ID: <20140205165328.GO3891@intel.com> References: <1391542551-20239-1-git-send-email-imre.deak@intel.com> <1391542551-20239-6-git-send-email-imre.deak@intel.com> <20140205153515.47c112f5@jbarnes-t420> <20140205161239.GI17001@phenom.ffwll.local> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Return-path: Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by gabe.freedesktop.org (Postfix) with ESMTP id 7869C4144 for ; Wed, 5 Feb 2014 08:53:32 -0800 (PST) Content-Disposition: inline In-Reply-To: <20140205161239.GI17001@phenom.ffwll.local> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: intel-gfx-bounces@lists.freedesktop.org Errors-To: intel-gfx-bounces@lists.freedesktop.org To: Daniel Vetter Cc: intel-gfx@lists.freedesktop.org List-Id: intel-gfx@lists.freedesktop.org On Wed, Feb 05, 2014 at 05:12:39PM +0100, Daniel Vetter wrote: > On Wed, Feb 05, 2014 at 03:35:15PM +0000, Jesse Barnes wrote: > > I almost think we should just separate enable vs status entirely. As > > long as the bits are named consistently it may be easier to follow (as > > Ville found in your next patch with the subtle remapping of status > > bits). > = > Yeah, I think for cases where the hw engineers just made a mess of it it's > better to be explicit. So what about keeping the current pipestat > enable/disable functions as wrappers which assume a regular mapping > betweeen status and mask bit, and then add a low-level function which > takes both mask and status explicitly? > = > That way we have less churn in the code, mostly pipestat enable/disable > still looks sane but the irregular cases will really stick out. For a name > I'd just go with __i915_enable_pipestat for lack of better ideas. Or maybe > i915_enable_pipestat_irregular. That could lead to someone accidentally using the regular function when they should be using the irregular one and then we have some weird bug on our hands. I rather like keeping the mess in one central place. -- = Ville Syrj=E4l=E4 Intel OTC