mirror of
				git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
				synced 2025-11-01 09:13:37 +00:00 
			
		
		
		
	drm/radeon: don't allow device to be opened if powered down
If the switcheroo has switched the device off, don't let X open it. Signed-off-by: Dave Airlie <airlied@redhat.com>
This commit is contained in:
		
							parent
							
								
									1ce1e41c1b
								
							
						
					
					
						commit
						5222454cf9
					
				
					 1 changed files with 4 additions and 0 deletions
				
			
		| 
						 | 
				
			
			@ -203,6 +203,10 @@ int radeon_info_ioctl(struct drm_device *dev, void *data, struct drm_file *filp)
 | 
			
		|||
 */
 | 
			
		||||
int radeon_driver_firstopen_kms(struct drm_device *dev)
 | 
			
		||||
{
 | 
			
		||||
	struct radeon_device *rdev = dev->dev_private;
 | 
			
		||||
 | 
			
		||||
	if (rdev->powered_down)
 | 
			
		||||
		return -EINVAL;
 | 
			
		||||
	return 0;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		
		Reference in a new issue