From mboxrd@z Thu Jan 1 00:00:00 1970 From: Daniel Vetter Subject: Re: [PATCH] drm/i915: Add debug module option for VTd validation Date: Thu, 3 Apr 2014 11:25:54 +0200 Message-ID: <20140403092554.GW7225@phenom.ffwll.local> References: <87eh1hee2y.fsf@intel.com> <1396337627-21554-1-git-send-email-daniel.vetter@ffwll.ch> <8738hxeab3.fsf@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail-wg0-f44.google.com (mail-wg0-f44.google.com [74.125.82.44]) by gabe.freedesktop.org (Postfix) with ESMTP id 567996EC22 for ; Thu, 3 Apr 2014 02:25:59 -0700 (PDT) Received: by mail-wg0-f44.google.com with SMTP id m15so1537980wgh.27 for ; Thu, 03 Apr 2014 02:25:58 -0700 (PDT) Content-Disposition: inline In-Reply-To: <8738hxeab3.fsf@intel.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" To: Jani Nikula Cc: Daniel Vetter , Intel Graphics Development List-Id: intel-gfx@lists.freedesktop.org On Tue, Apr 01, 2014 at 11:14:08AM +0300, Jani Nikula wrote: > On Tue, 01 Apr 2014, Daniel Vetter wrote: > > VTd has a few too many "outright disable the damn thing" workarounds > > accumulated and for validation we want a simple knob to make sure we > > disable them all. > > > > Since this is for bdw+ validation and atm we don't have any > > workarounds for bdw this option currently does nothing. So currently > > this is just a placeholder to make sure reality will match with the > > documented process for our validation people. > > > > v2: Fix up param description (Jani). > > > > v3: Actually git add ... > > *rolls eyes* ;) > > I'm really sorry I just spotted that one param desc and failed to do any > proper review. So here's some bikeshedding. > > > > > Cc: Jani Nikula > > Cc: David Woodhouse > > Signed-off-by: Daniel Vetter > > --- > > drivers/gpu/drm/i915/i915_drv.h | 1 + > > drivers/gpu/drm/i915/i915_params.c | 4 ++++ > > 2 files changed, 5 insertions(+) > > > > diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h > > index ff02225d5edd..610ff70f8609 100644 > > --- a/drivers/gpu/drm/i915/i915_drv.h > > +++ b/drivers/gpu/drm/i915/i915_drv.h > > @@ -1925,6 +1925,7 @@ struct i915_params { > > bool prefault_disable; > > bool reset; > > bool disable_display; > > + bool disable_vtd_wa; > > }; > > extern struct i915_params i915 __read_mostly; > > > > diff --git a/drivers/gpu/drm/i915/i915_params.c b/drivers/gpu/drm/i915/i915_params.c > > index e1027cc5f0ee..d05a2afa17dc 100644 > > --- a/drivers/gpu/drm/i915/i915_params.c > > +++ b/drivers/gpu/drm/i915/i915_params.c > > @@ -47,6 +47,7 @@ struct i915_params i915 __read_mostly = { > > .invert_brightness = 0, > > .disable_display = 0, > > .enable_cmd_parser = 1, > > + .disable_vtd_wa = 0, > > Gringe at initializing bools with ints. Yeah, I think I'll do a quick follow-up patch. > > > }; > > > > module_param_named(modeset, i915.modeset, int, 0400); > > @@ -149,6 +150,9 @@ MODULE_PARM_DESC(invert_brightness, > > module_param_named(disable_display, i915.disable_display, bool, 0600); > > MODULE_PARM_DESC(disable_display, "Disable display (default: false)"); > > > > +module_param_named(disable_vtd_wa, i915.disable_vtd_wa, bool, 0600); > > +MODULE_PARM_DESC(disable_vtd_wa, "Disable all VT-d workarounds (default: false)"); > > + > > Why negative? Why not enable_vtd_wa defaulting to true? The disable will > lead to code like: > > if (!i915.disable_vtd_wa) > > instead of > > if (i915.enable_vtd_wa) I've kinda optimized the naming for the validation users, not us ;-) And "disable" tends to turn away experimenting users, I hope. > Regardless of the bikeshedding, it's > > Reviewed-by: Jani Nikula Ok, I've picked these vtd patches up. -Daniel > > > > module_param_named(enable_cmd_parser, i915.enable_cmd_parser, int, 0600); > > MODULE_PARM_DESC(enable_cmd_parser, > > "Enable command parsing (1=enabled [default], 0=disabled)"); > > -- > > 1.8.5.2 > > > > -- > Jani Nikula, Intel Open Source Technology Center -- Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch