@@ -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);
Signed-off-by: Pierre Moreau <pierre.morrow@free.fr> --- drm/nouveau_drm.c | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-)