From mboxrd@z Thu Jan 1 00:00:00 1970 From: Daniel Vetter Subject: Re: [PATCH 5/7] drm/i915: pass status instead of enable flags to i915_enable_pipestat Date: Wed, 5 Feb 2014 17:12:39 +0100 Message-ID: <20140205161239.GI17001@phenom.ffwll.local> 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> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail-ea0-f174.google.com (mail-ea0-f174.google.com [209.85.215.174]) by gabe.freedesktop.org (Postfix) with ESMTP id 670A041BE for ; Wed, 5 Feb 2014 08:12:48 -0800 (PST) Received: by mail-ea0-f174.google.com with SMTP id b10so339204eae.33 for ; Wed, 05 Feb 2014 08:12:45 -0800 (PST) Content-Disposition: inline In-Reply-To: <20140205153515.47c112f5@jbarnes-t420> 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: Jesse Barnes Cc: intel-gfx@lists.freedesktop.org List-Id: intel-gfx@lists.freedesktop.org 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. Merged the patches thus far in this series to dinq. Cheers, Daniel -- Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch