From patchwork Wed Dec 10 07:53:42 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pierre Moreau X-Patchwork-Id: 5467061 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 956C99F1D4 for ; Wed, 10 Dec 2014 07:54:03 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id B0ED52011D for ; Wed, 10 Dec 2014 07:54:02 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id B31FD200F3 for ; Wed, 10 Dec 2014 07:54:01 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 7C5496E01C; Tue, 9 Dec 2014 23:54:00 -0800 (PST) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from smtp6-g21.free.fr (smtp6-g21.free.fr [212.27.42.6]) by gabe.freedesktop.org (Postfix) with ESMTP id 745456E01C; Tue, 9 Dec 2014 23:53:59 -0800 (PST) Received: from Normandy.eduroam.u-bordeaux.fr (unknown [147.210.245.180]) (Authenticated sender: pierre.morrow) by smtp6-g21.free.fr (Postfix) with ESMTPSA id 14B21822E3; Wed, 10 Dec 2014 08:53:27 +0100 (CET) From: Pierre Moreau To: Nouveau List , DRI List , Ben Skeggs Subject: [PATCH RESEND 1/2] Allow noaccel to be a pci address Date: Wed, 10 Dec 2014 08:53:42 +0100 Message-Id: <1418198023-14225-1-git-send-email-pierre.morrow@free.fr> X-Mailer: git-send-email 2.1.3 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_MED, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: Pierre Moreau --- drm/nouveau_drm.c | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/drm/nouveau_drm.c b/drm/nouveau_drm.c index afb93bb..ffa1e4f 100644 --- a/drm/nouveau_drm.c +++ b/drm/nouveau_drm.c @@ -61,9 +61,10 @@ MODULE_PARM_DESC(debug, "debug string to pass to driver core"); static char *nouveau_debug; module_param_named(debug, nouveau_debug, charp, 0400); -MODULE_PARM_DESC(noaccel, "disable kernel/abi16 acceleration"); -static int nouveau_noaccel = 0; -module_param_named(noaccel, nouveau_noaccel, int, 0400); +MODULE_PARM_DESC(noaccel, "disable kernel/abi16 acceleration for all cards," + "or only for the card given its pci bus name"); +static char *nouveau_noaccel; +module_param_named(noaccel, nouveau_noaccel, charp, 0400); MODULE_PARM_DESC(modeset, "enable driver (default: auto, " "0 = disabled, 1 = enabled, 2 = headless)"); @@ -149,8 +150,13 @@ nouveau_accel_init(struct nouveau_drm *drm) u32 sclass[16]; int ret, i; - if (nouveau_noaccel) + if (nouveau_noaccel != NULL && + (!strcmp(nouveau_noaccel, "1") || + !strcmp(nouveau_noaccel, nvkm_device(device)->name))) + { + NV_WARN(drm, "Acceleration disabled for card on bus %s\n", nvkm_device(device)->name); return; + } /* initialise synchronisation routines */ /*XXX: this is crap, but the fence/channel stuff is a little @@ -1021,7 +1027,7 @@ static void nouveau_display_options(void) DRM_DEBUG_DRIVER("... nofbaccel : %d\n", nouveau_nofbaccel); DRM_DEBUG_DRIVER("... config : %s\n", nouveau_config); DRM_DEBUG_DRIVER("... debug : %s\n", nouveau_debug); - DRM_DEBUG_DRIVER("... noaccel : %d\n", nouveau_noaccel); + DRM_DEBUG_DRIVER("... noaccel : %s\n", nouveau_noaccel); DRM_DEBUG_DRIVER("... modeset : %d\n", nouveau_modeset); DRM_DEBUG_DRIVER("... runpm : %d\n", nouveau_runtime_pm); DRM_DEBUG_DRIVER("... vram_pushbuf : %d\n", nouveau_vram_pushbuf);