From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ville =?iso-8859-1?Q?Syrj=E4l=E4?= Subject: Re: [PATCH] drm/i915: Provide a parameter to disable loading Date: Thu, 16 Jan 2014 19:07:09 +0200 Message-ID: <20140116170708.GN9454@intel.com> References: <1389890006-11702-1-git-send-email-damien.lespiau@intel.com> 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 C934D10585F for ; Thu, 16 Jan 2014 09:07:14 -0800 (PST) Content-Disposition: inline In-Reply-To: <1389890006-11702-1-git-send-email-damien.lespiau@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: Damien Lespiau Cc: intel-gfx@lists.freedesktop.org List-Id: intel-gfx@lists.freedesktop.org On Thu, Jan 16, 2014 at 04:33:26PM +0000, Damien Lespiau wrote: > It can be handy at times to forbid i915 from loading at startup to > modprobe it later. modprobe.blacklist=3Di915 > = > In particular, when trying to debug a problem that occurs at startup, > it's usually easier to boot into a working machine and modprobe the > driver at a more convenient time. > = > Signed-off-by: Damien Lespiau > --- > drivers/gpu/drm/i915/i915_drv.c | 11 +++++++++++ > 1 file changed, 11 insertions(+) > = > diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_= drv.c > index 61fb9fc..d80e47e 100644 > --- a/drivers/gpu/drm/i915/i915_drv.c > +++ b/drivers/gpu/drm/i915/i915_drv.c > @@ -38,6 +38,12 @@ > #include > #include > = > +static int i915_fail __read_mostly =3D 0; > +module_param_named(fail, i915_fail, int, 0400); > +MODULE_PARM_DESC(fail, > + "Allow a user to skip loading the i915 driver, " > + "0=3Dload i915 as usual [default], 1=3Ddon't load"); > + > static int i915_modeset __read_mostly =3D -1; > module_param_named(modeset, i915_modeset, int, 0400); > MODULE_PARM_DESC(modeset, > @@ -823,6 +829,11 @@ static int i915_pci_probe(struct pci_dev *pdev, cons= t struct pci_device_id *ent) > struct intel_device_info *intel_info =3D > (struct intel_device_info *) ent->driver_data; > = > + if (i915_fail) { > + DRM_INFO("i915 disabled by module parameter\n"); > + return -ENODEV; > + } > + > if (IS_PRELIMINARY_HW(intel_info) && !i915_preliminary_hw_support) { > DRM_INFO("This hardware requires preliminary hardware support.\n" > "See CONFIG_DRM_I915_PRELIMINARY_HW_SUPPORT, and/or modparam prelimi= nary_hw_support\n"); > -- = > 1.8.3.1 > = > _______________________________________________ > Intel-gfx mailing list > Intel-gfx@lists.freedesktop.org > http://lists.freedesktop.org/mailman/listinfo/intel-gfx -- = Ville Syrj=E4l=E4 Intel OTC