Skip to content

Commit

Permalink
drm/radeon: don't allow device to be opened if powered down
Browse files Browse the repository at this point in the history
If the switcheroo has switched the device off, don't let X open it.

Signed-off-by: Dave Airlie <airlied@redhat.com>
  • Loading branch information
Dave Airlie committed Sep 22, 2010
1 parent 1ce1e41 commit 5222454
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions drivers/gpu/drm/radeon/radeon_kms.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 5222454

Please sign in to comment.