From mboxrd@z Thu Jan 1 00:00:00 1970 From: Daniel Vetter Subject: Re: [PATCH v2 2/2] drm/i915: move module parameters into a struct, in a new file Date: Sun, 26 Jan 2014 15:38:41 +0100 Message-ID: <20140126143841.GU9772@phenom.ffwll.local> References: <20140107075546.GE4770@phenom.ffwll.local> <1390296265-23565-1-git-send-email-jani.nikula@intel.com> <1390296265-23565-2-git-send-email-jani.nikula@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail-ea0-f178.google.com (mail-ea0-f178.google.com [209.85.215.178]) by gabe.freedesktop.org (Postfix) with ESMTP id 62EA3FA596 for ; Sun, 26 Jan 2014 06:38:46 -0800 (PST) Received: by mail-ea0-f178.google.com with SMTP id a15so1824329eae.23 for ; Sun, 26 Jan 2014 06:38:45 -0800 (PST) Content-Disposition: inline In-Reply-To: <1390296265-23565-2-git-send-email-jani.nikula@intel.com> 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: Jani Nikula Cc: intel-gfx@lists.freedesktop.org List-Id: intel-gfx@lists.freedesktop.org On Tue, Jan 21, 2014 at 11:24:25AM +0200, Jani Nikula wrote: > With 20+ module parameters, I think referring to them via a struct > improves clarity over just having a bunch of globals. While at it, move > the parameter initialization and definitions into a new file > i915_params.c to reduce clutter in i915_drv.c. > > Apart from the ill-named i915_enable_rc6, i915_enable_fbc and > i915_enable_ppgtt parameters, for which we lose the "i915_" prefix > internally, the module parameters now look the same both on the kernel > command line and in code. For example, "i915.modeset". > > The downsides of the change are losing static on a couple of variables > and not having the initialization and module_param_named() right next to > each other. On the other hand, all module parameters are now defined in > one place at i915_params.c. Plus you can do this to find all module > parameter references: > > $ git grep "i915\." -- drivers/gpu/drm/i915 > > v2: > - move the definitions into a new file > - s/i915_params/i915/ > - make i915_try_reset i915.reset, for consistency > > Signed-off-by: Jani Nikula Queued for -next, thanks for the patch. While we're at it: Can you please smash another patch on top ot drop the i915_ prefix from the module parameters? i915.i915_ really is a bit verbose ;-) and I think we can declare this to be non-abi, i.e. a good excuse to update all the various bug reports ;-) -Daniel -- Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch