diff options
author | Dave Airlie <airlied@redhat.com> | 2010-09-22 12:31:46 +1000 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2010-09-22 12:32:46 +1000 |
commit | 5222454cf941b09205d502242dd1e44fd62aa551 (patch) | |
tree | 9d172d1e6e98ada8c1fc52383e0c9aac1ab7b34d /drivers/gpu/drm | |
parent | 1ce1e41c1b61a992077bd1c45c6c3fd6a8b10c02 (diff) | |
download | op-kernel-dev-5222454cf941b09205d502242dd1e44fd62aa551.zip op-kernel-dev-5222454cf941b09205d502242dd1e44fd62aa551.tar.gz |
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')
-rw-r--r-- | drivers/gpu/drm/radeon/radeon_kms.c | 4 |
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 5eee3c4..8fbbe1c 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; } |