summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/radeon/radeon_kms.c
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2010-09-22 06:31:46 +0400
committerDave Airlie <airlied@redhat.com>2010-09-22 06:32:46 +0400
commit5222454cf941b09205d502242dd1e44fd62aa551 (patch)
tree9d172d1e6e98ada8c1fc52383e0c9aac1ab7b34d /drivers/gpu/drm/radeon/radeon_kms.c
parent1ce1e41c1b61a992077bd1c45c6c3fd6a8b10c02 (diff)
downloadlinux-5222454cf941b09205d502242dd1e44fd62aa551.tar.xz
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>
Diffstat (limited to 'drivers/gpu/drm/radeon/radeon_kms.c')
-rw-r--r--drivers/gpu/drm/radeon/radeon_kms.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/gpu/drm/radeon/radeon_kms.c b/drivers/gpu/drm/radeon/radeon_kms.c
index 5eee3c41d124..8fbbe1c6ebbd 100644
--- a/drivers/gpu/drm/radeon/radeon_kms.c
+++ b/drivers/gpu/drm/radeon/radeon_kms.c
@@ -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;
}