mirror of
				git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
				synced 2025-10-31 08:44:41 +00:00 
			
		
		
		
	drm/nouveau: Add module options to disable acceleration.
noaccel=1 disables all acceleration and doesn't even attempt initialising PGRAPH+PFIFO, nofbaccel=1 only makes fbcon unaccelerated. Signed-off-by: Marcin Kościelnicki <koriakin@0x04.net> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
This commit is contained in:
		
							parent
							
								
									f927b8907c
								
							
						
					
					
						commit
						a32ed69d7b
					
				
					 4 changed files with 37 additions and 15 deletions
				
			
		|  | @ -75,6 +75,14 @@ MODULE_PARM_DESC(ignorelid, "Ignore ACPI lid status"); | |||
| int nouveau_ignorelid = 0; | ||||
| module_param_named(ignorelid, nouveau_ignorelid, int, 0400); | ||||
| 
 | ||||
| MODULE_PARM_DESC(noagp, "Disable all acceleration"); | ||||
| int nouveau_noaccel = 0; | ||||
| module_param_named(noaccel, nouveau_noaccel, int, 0400); | ||||
| 
 | ||||
| MODULE_PARM_DESC(noagp, "Disable fbcon acceleration"); | ||||
| int nouveau_nofbaccel = 0; | ||||
| module_param_named(nofbaccel, nouveau_nofbaccel, int, 0400); | ||||
| 
 | ||||
| MODULE_PARM_DESC(tv_norm, "Default TV norm.\n" | ||||
| 		 "\t\tSupported: PAL, PAL-M, PAL-N, PAL-Nc, NTSC-M, NTSC-J,\n" | ||||
| 		 "\t\t\thd480i, hd480p, hd576i, hd576p, hd720p, hd1080i.\n" | ||||
|  |  | |||
|  | @ -678,6 +678,8 @@ extern int nouveau_reg_debug; | |||
| extern char *nouveau_vbios; | ||||
| extern int nouveau_ctxfw; | ||||
| extern int nouveau_ignorelid; | ||||
| extern int nouveau_nofbaccel; | ||||
| extern int nouveau_noaccel; | ||||
| 
 | ||||
| /* nouveau_state.c */ | ||||
| extern void nouveau_preclose(struct drm_device *dev, struct drm_file *); | ||||
|  |  | |||
|  | @ -267,8 +267,12 @@ nouveau_fbcon_create(struct drm_device *dev, uint32_t fb_width, | |||
| 	dev_priv->fbdev_info = info; | ||||
| 
 | ||||
| 	strcpy(info->fix.id, "nouveaufb"); | ||||
| 	info->flags = FBINFO_DEFAULT | FBINFO_HWACCEL_COPYAREA | | ||||
| 		      FBINFO_HWACCEL_FILLRECT | FBINFO_HWACCEL_IMAGEBLIT; | ||||
| 	if (nouveau_nofbaccel) | ||||
| 		info->flags = FBINFO_DEFAULT | FBINFO_HWACCEL_DISABLED; | ||||
| 	else | ||||
| 		info->flags = FBINFO_DEFAULT | FBINFO_HWACCEL_COPYAREA | | ||||
| 			      FBINFO_HWACCEL_FILLRECT | | ||||
| 			      FBINFO_HWACCEL_IMAGEBLIT; | ||||
| 	info->fbops = &nouveau_fbcon_ops; | ||||
| 	info->fix.smem_start = dev->mode_config.fb_base + nvbo->bo.offset - | ||||
| 			       dev_priv->vm_vram_base; | ||||
|  | @ -316,7 +320,7 @@ nouveau_fbcon_create(struct drm_device *dev, uint32_t fb_width, | |||
| 	par->nouveau_fb = nouveau_fb; | ||||
| 	par->dev = dev; | ||||
| 
 | ||||
| 	if (dev_priv->channel) { | ||||
| 	if (dev_priv->channel && !nouveau_nofbaccel) { | ||||
| 		switch (dev_priv->card_type) { | ||||
| 		case NV_50: | ||||
| 			nv50_fbcon_accel_init(info); | ||||
|  |  | |||
|  | @ -427,15 +427,19 @@ nouveau_card_init(struct drm_device *dev) | |||
| 	if (ret) | ||||
| 		goto out_timer; | ||||
| 
 | ||||
| 	/* PGRAPH */ | ||||
| 	ret = engine->graph.init(dev); | ||||
| 	if (ret) | ||||
| 		goto out_fb; | ||||
| 	if (nouveau_noaccel) | ||||
| 		engine->graph.accel_blocked = true; | ||||
| 	else { | ||||
| 		/* PGRAPH */ | ||||
| 		ret = engine->graph.init(dev); | ||||
| 		if (ret) | ||||
| 			goto out_fb; | ||||
| 
 | ||||
| 	/* PFIFO */ | ||||
| 	ret = engine->fifo.init(dev); | ||||
| 	if (ret) | ||||
| 		goto out_graph; | ||||
| 		/* PFIFO */ | ||||
| 		ret = engine->fifo.init(dev); | ||||
| 		if (ret) | ||||
| 			goto out_graph; | ||||
| 	} | ||||
| 
 | ||||
| 	/* this call irq_preinstall, register irq handler and
 | ||||
| 	 * call irq_postinstall | ||||
|  | @ -479,9 +483,11 @@ nouveau_card_init(struct drm_device *dev) | |||
| out_irq: | ||||
| 	drm_irq_uninstall(dev); | ||||
| out_fifo: | ||||
| 	engine->fifo.takedown(dev); | ||||
| 	if (!nouveau_noaccel) | ||||
| 		engine->fifo.takedown(dev); | ||||
| out_graph: | ||||
| 	engine->graph.takedown(dev); | ||||
| 	if (!nouveau_noaccel) | ||||
| 		engine->graph.takedown(dev); | ||||
| out_fb: | ||||
| 	engine->fb.takedown(dev); | ||||
| out_timer: | ||||
|  | @ -518,8 +524,10 @@ static void nouveau_card_takedown(struct drm_device *dev) | |||
| 			dev_priv->channel = NULL; | ||||
| 		} | ||||
| 
 | ||||
| 		engine->fifo.takedown(dev); | ||||
| 		engine->graph.takedown(dev); | ||||
| 		if (!nouveau_noaccel) { | ||||
| 			engine->fifo.takedown(dev); | ||||
| 			engine->graph.takedown(dev); | ||||
| 		} | ||||
| 		engine->fb.takedown(dev); | ||||
| 		engine->timer.takedown(dev); | ||||
| 		engine->mc.takedown(dev); | ||||
|  |  | |||
		Loading…
	
	Add table
		
		Reference in a new issue
	
	 Marcin Kościelnicki
						Marcin Kościelnicki